franzflasch / linux_for_riscv_em Goto Github PK
View Code? Open in Web Editor NEWScripts to automate building linux images for my emulator riscv_em
Scripts to automate building linux images for my emulator riscv_em
I seem to have an issue building the Linux 32 bit payload on Ubuntu 21.10:
nico@lenovo:~/perso/git/linux_for_riscv_em$ ./riscv_em_rv32_mmu_linux.sh
...
>>> host-m4 1.4.18 Building
PATH="/home/nico/perso/git/linux_for_riscv_em/output_mmu_rv32/buildroot-2021.02.1/output/host/bin:/home/nico/perso/git/linux_for_riscv_em/output_mmu_rv32/buildroot-2021.02.1/output/host/sbin:~/bin:/home/nico/Downloads/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/bin:~/bin:/home/nico/Downloads/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04/bin:/home/nico/.cargo/bin:/home/nico/.local/bin:/home/nico/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/nico/perso/git/riscv-gnu-toolchain/the_install/bin:/home/nico/perso/git/vade:/home/nico/perso/git/riscv-gnu-toolchain/the_install/bin" PKG_CONFIG="/home/nico/perso/git/linux_for_riscv_em/output_mmu_rv32/buildroot-2021.02.1/output/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/nico/perso/git/linux_for_riscv_em/output_mmu_rv32/buildroot-2021.02.1/output/host/lib/pkgconfig:/home/nico/perso/git/linux_for_riscv_em/output_mmu_rv32/buildroot-2021.02.1/output/host/share/pkgconfig" /usr/bin/make -C /home/nico/perso/git/linux_for_riscv_em/output_mmu_rv32/buildroot-2021.02.1/output/build/host-m4-1.4.18/
/usr/bin/make all-recursive
Making all in .
make[4]: Nothing to be done for 'all-am'.
Making all in examples
make[4]: Nothing to be done for 'all'.
Making all in lib
GEN alloca.h
GEN configmake.h
GEN c++defs.h
GEN arg-nonnull.h
GEN warn-on-use.h
GEN unused-parameter.h
GEN limits.h
GEN sys/types.h
GEN fcntl.h
GEN locale.h
GEN langinfo.h
GEN math.h
GEN signal.h
GEN spawn.h
GEN stdio.h
GEN stdlib.h
GEN string.h
GEN sys/stat.h
GEN sys/time.h
GEN sys/wait.h
GEN time.h
GEN unistd.h
GEN wchar.h
GEN wctype.h
/usr/bin/make all-am
CC binary-io.o
CC gl_avltree_oset.o
CC c-ctype.o
CC c-stack.o
CC c-strcasecmp.o
CC c-strncasecmp.o
CC clean-temp.o
CC cloexec.o
CC close-stream.o
CC closein.o
CC closeout.o
CC dirname.o
CC basename.o
CC dirname-lgpl.o
CC basename-lgpl.o
CC stripslash.o
CC execute.o
CC exitfail.o
In file included from /usr/include/signal.h:328,
from ./signal.h:52,
from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
| ^~~~~~~~
CC fatal-signal.o
CC fd-hook.o
make[5]: *** [Makefile:1915: c-stack.o] Error 1
make[5]: *** Waiting for unfinished jobs....
CC fd-safer-flag.o
make[4]: *** [Makefile:1674: all] Error 2
make[3]: *** [Makefile:1572: all-recursive] Error 1
make[2]: *** [Makefile:1528: all] Error 2
make[1]: *** [package/pkg-generic.mk:250: /home/nico/perso/git/linux_for_riscv_em/output_mmu_rv32/buildroot-2021.02.1/output/build/host-m4-1.4.18/.stamp_built] Error 2
make: *** [Makefile:84: _all] Error 2
Do you have an idea of what's happening or something I missed ?
Note that I didn't follow your first step as I already had a riscv32 (rv32g) toolchain installed according to this doc:
https://github.com/nsauzede/myrv
Maybe the error actually comes from the alternate riscv toolchain ?
Hi,
I've tried the two links for the RISCV32 and RISCV64 toolchain zip archives, and they are both broken. The error message is:
Error 404 โ Not Found
GitHub produced an error for the download of artifact #359688336.
Usually this means that the artifact has expired (>90 days).
Greetings, Hans-Georg
Hi!
I compiled the firmware and emulator. What is dtc
? I don't know how to build the dtb
file.
Ran the script apparently successfully.
output_mmu_rv32/opensbi/build/platform/generic/firmware/fw_payload.bin
This file doesn't exist. In fact, the whole opensbi folder doesn't exist. Any ideas? Thanks.
I have tried to set PATH to linux_for_riscv_em/output_mmu_rv32/buildroot/output/host/bin/
, I built the Linux kernel and it runs successfully in your emulator.
I think buildroot has built the toolchain already, so there is no need to download your pre-built binaries from https://github.com/franzflasch/gcc-build-tools
. Should we mention this in the README?
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.