damien-lemoal / buildroot Goto Github PK
View Code? Open in Web Editor NEWbuildroot fork
License: Other
buildroot fork
License: Other
Hi, I'm recently tweaking kernels and toolchains for 32-bit RISC-V No-MMU systems, I faced the same problem and I guess I came up with some solutions. So far I only tried 32-bit, but I guess they can apply to 64-bit as well.
On 5.9.4 kernel, seems relocation is done to wrong addresses during load_flat_file in fs/binfmt_flat.c, this is quite stubborn, after modifying datapos by 0x20 like this:
datapos = ALIGN(realdatastart +
MAX_SHARED_LIBS * sizeof(u32),
FLAT_DATA_ALIGN) - 0x20;
meanwhile change elf2flt.ld script like this on line 50:
. = . + 4; /* add this */
. = ALIGN(0x20) ;
_etext = . ;
Then busybox can run without noticeable problem. I keep kernel executable file formats configuration like this, with unrelated stuff all disabled:
[*] Kernel support for scripts starting with #!
[*] Kernel support for flat binaries
[ ] Enable support for very old legacy flat binaries
[ ] Enable ZFLAT support
[ ] Enable shared FLAT support
[ ] Kernel support for MISC binaries
[ ] Enable core dump support
On latest(5.17) kernel, seems other changes have taken place, and busybox can run without any modification in kernel source or the linker script, so using latest kernel for this project seems a good choice(if 64-bit can also work). If you are interested in 32-bit support(I verified on both QEMU and custom FPGA rv32ima softcore), I'll clean my modified code up and PR.
I'd like to build nommu linux for maixduino. Which defconfig should I use?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.