damien-lemoal / riscv64-nommu-buildroot Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
I think it would be desirable to not use -r
(force load to RAM) on the elf2flt build to make it possible for multiple instances of a binary (say, busybox
) to share a .text
section and thus conserve memory. With -r
each invocation copies the entire binary, text and data.
However, currently the -r
option to elf2flt
is required. Building wIthout it, binaries crash at the beginning of __uClibc_main
due to the _GLOBAL_OFFSET_TABLE_
not being correct.
I've tried looking into this but wasn't able to figure out how to make this work. The problem is that on RISC-V, the global offset table is assumed to be in a location relative to the code, part of the .text
section itself:
0000000000012ba4 <__uClibc_main>:
12ba4: 7169 addi sp,sp,-304
12ba6: 00005717 auipc a4,0x5
12baa: 5aa73703 ld a4,1450(a4) # 18150 <_GLOBAL_OFFSET_TABLE_+0x18>
As I see it, no amount of relocations can make this work (without a MMU—but with a MMU we could just ELF). I wonder how other architectures do this. I suppose this is something specific to the RISC-V ABI's handling of the GOT that makes this impossible.
Hi @damien-lemoal ! Thanks for excelent job and all team that work together.
In my application, beyond the minimal, I need to mount and access SD card partition at Maix M1 Board.
I was able to run pre-compiled and it is ok, but i could not found SD card partition. And I am stucked some days at this point. :(
Please, how can I mount SD card, since I can be able to run the commands from it?
Thanks and Best Regards!
Rogério Cassares
I'm not entirely sure where to report this, this seems the most appropriate place: I'm trying to build a working Linux image for the Maix Go (K210) board.
The image that they provide works, however when I build my own I get the following error after "Starting shell"
Oops - load address misaligned [#1]
I looked up the address using addr2line and it is in side the kernel, tiocgwinsz
copy_to_user
. A 64-bit integer is being stored to an address that is only 32-bit aligned.
Normally these traps are handled by the SBI, and the memory access is emulated in software. However with the kernel running in M mode itself I'm not so sure what should be handling this.
The kernel is 5.6-rc1 with these patches on top: https://lore.kernel.org/linux-riscv/[email protected]/T/#t
@damien-lemoal not sure if this is the best place to ask...
but someone asked me yesterday if buildroot support for k210 was going to get upstreamed into the buildroot project?
also, along those lines, is there a way for me to help?
Hi, I'm trying to install linux to Maix GO Development Board and saw your repo.
I have flashed this file with kflash-gui:
https://github.com/damien-lemoal/riscv64-nommu-buildroot/blob/master/riscv64-uclibc-nommu/kernel-image/linux-5.6-rc1.bin
But it is not booting and I can't see anything in ttyUSB0.
How can I make it work? Thanks!
When I built buildroot for k210, I encountered the error message below.
Please help! Thanks
os@os-MMLP7AP-00:~/dl/k210/linux/riscv64-nommu-buildroot$ make
/home/os/dl/k210/kendryte-toolchain/bin/make -j1 O=/home/os/dl/k210/linux/riscv64-nommu-buildroot/output HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" syncconfig
>>> host-skeleton Extracting
>>> host-skeleton Patching
>>> host-skeleton Configuring
>>> host-skeleton Building
>>> host-skeleton Installing to host directory
/bin/bash: line 2: 304 Segmentation fault (core dumped) make -C /home/os/dl/k210/linux/riscv64-nommu-buildroot --no-print-directory O=/home/os/dl/k210/linux/riscv64-nommu-buildroot/output
make: *** [Makefile:84: _all] Error 139
os@os-MMLP7AP-00:~/dl/k210/linux/riscv64-nommu-buildroot$ make -n
umask 0022 && \
make -C /home/os/dl/k210/linux/riscv64-nommu-buildroot --no-print-directory \
O=/home/os/dl/k210/linux/riscv64-nommu-buildroot/output
MAKE="/home/os/dl/k210/kendryte-toolchain/bin/make -j5" DL_TOOLS="bzcat xzcat" \
/home/os/dl/k210/linux/riscv64-nommu-buildroot/support/dependencies/dependencies.sh
/bin/bash: line 2: 920 Segmentation fault (core dumped) make -C /home/os/dl/k210/linux/riscv64-nommu-buildroot --no-print-directory O=/home/os/dl/k210/linux/riscv64-nommu-buildroot/output
make: *** [Makefile:84: _all] Error 139
I am trying to compile Linux for the Kendryte 210
I am getting an error, which seems to be acommon error in current fakeroot.
libfakeroot.c:99:40: error: ‘_STAT_VER’ undeclared (first use in this function)
Is there any fix for this?
Or there any other suggested way on how to build linux for the Sipeed Maixduino Kendryte K210 RISC-V?
I also started a thread on reddit, which can be found here:
https://www.reddit.com/r/embedded/comments/mx2rei/compiling_linux_for_sipeed_maixduino_kendryte/
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.