To preface, I should make clear that I’m very, very new to all this. I’ve taken a couple courses on programming, data structures, algorithms and the like, but I only have surface-level knowledge about computer architecture and hardware. I’m pretty sure I’m way out of my depth here and that I’ll need a lot of hand-holding (or at least pointers to resources I can read up on) to get anything done.
Sooo that said, what I’m trying to do is follow the instructions in the readme here:
Specifically, the Linux/RISC-V Installation Manual. As the readme puts it, I’m in the “needs to hack the kernel source code”, “have special requirements for your OS environment”, and “have a very particular notion of ‘fun’” categories. With my lack of expertise (or any experience whatsoever), I figured it’d be easy enough to just follow the instructions, but I’ve run into quite a lot of trouble. From asking around on the repository’s issues forum I’ve learned the manual is pretty out-of-date, but I’m hoping it’s still usable to some extent, since I haven’t found anything else that can guide me through what I want to do.
So, here are the problems I’ve run into:
- “Building the Linux Kernel -> Obtaining and Patching the Kernel Sources”
Here’s one of those signs the manual’s up-to-date - they date the linux version they’re working with at Feb 2014. I’ve got no idea whether I should patch with the latest 3.14.xx sources like the manual recommends, patch with the latest sources period, or not patch at all. The later steps seem to work regardless of which of those options I go with, but considering all the problems I’ve been having occur in this directory, I have to wonder if I’m doing something wrong here.
- “Building Busybox”
My end goal here is actually to get an environment set up without Busybox, but I’m nowhere near that stage yet, so I’m following the instructions here just to getting something up and running (not that I’ve gotten to that stage yet).
The thing here is fairly minor, possibly not even an actual problem, having to do with the configuration options. There are a few instances where the defaults differ from what the manual claims, or options that’re missing entirely. Namely, “CONFIG_FEATURE_INSTALLER=y, listed as “Support --install [-s] to install applet links at runtime” in BusyBox Settings → General Configuration” is missing from the GUI configuration menu entirely, but is present in the actual config file set to “y” by default.
- “Creating a root disk image”
This is the biggest problem I have at the moment, and is where I’m currently “stuck”. The specific step is where the manual says “Don’t forget to rebuild riscv-linux and riscv-pk!”. Attempting to rebuild at this point results in a “relocated truncated to fit error”. I was directed to this page:
Which described the nature of the error pretty well, but as far as I can tell doesn’t have anything explicit on how to fix it.
So yes, those are the things I’m currently concerned about, number 3 being the biggest, since it’s preventing me from progressing further through the manual. Thank you all in advance if you’re able to spare any time or advice to help.