Comments (2)
Hi @zhutang, I tried using your toolchain. When I enter
./riscv64-unknown-elf-gcc -v
to see the result.Using built-in specs. COLLECT_GCC=./riscv64-unknown-elf-gcc COLLECT_LTO_WRAPPER=/home/qqm/Downloads/riscv/bin/../libexec/gcc/riscv64-unknown-elf/12.2.0/lto-wrapper Target: riscv64-unknown-elf Configured with: /home/runner/work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc/configure --target=riscv64-unknown-elf --prefix=/opt/riscv --disable-shared --disable-threads --enable-languages=c,c++ --with-pkgversion=g2ee5e430018 --with-system-zlib --enable-tls --with-newlib --with-sysroot=/opt/riscv/riscv64-unknown-elf --with-native-system-header-dir=/include --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-tm-clone-registry --src=/home/runner/work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc --disable-multilib --with-abi=lp64d --with-arch=rv64gc --with-tune=rocket --with-isa-spec=2.2 'CFLAGS_FOR_TARGET=-Os -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-Os -mcmodel=medlow' Thread model: single Supported LTO compression algorithms: zlib gcc version 12.2.0 (g2ee5e430018)
-mcmodel=medlow
is not an option we need. Because trusted_fw.bin need to link to high addresses above 0x80000000.You can refer to the instructions here for the correct toolchain compilation options(sorry only in chinese).quard_star_tutorial/DEVELOPNOTE.md
Lines 92 to 102 in ed1c291
谢谢!我用你发的这个编译器
(https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz)
成功完成了trusted_domain的编译,但用这个
(https://github.com/riscv/riscv-gnu-toolchain/releases/download/2021.08.07/riscv64-glibc-ubuntu-20.04-nightly-2021.08.07-nightly.tar.gz)
编译器编译busybox的时候有些问题:
/opt/gcc-riscv64-unknown-linux-gnu/bin/../lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: coreutils/lib.a(mktemp.o): in function .L5': mktemp.c:(.text.mktemp_main+0x88): warning: the use of
mktemp' is dangerous, better use mkstemp' or
mkdtemp'
/opt/gcc-riscv64-unknown-linux-gnu/bin/../lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: -march=rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0_zmmul1p0: unknown z ISA extension zmmul' /opt/gcc-riscv64-unknown-linux-gnu/bin/../lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: failed to merge target specific data of file coreutils/lib.a(test_ptr_hack.o) /opt/gcc-riscv64-unknown-linux-gnu/bin/../lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: -march=rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0_zmmul1p0: unknown z ISA extension
zmmul'
/opt/gcc-riscv64-unknown-linux-gnu/bin/../lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: failed to merge target specific data of file libbb/lib.a(lineedit_ptr_hack.o)
collect2: error: ld returned 1 exit status
Note: if build needs additional libraries, put them in CONFIG_EXTRA_LDLIBS.
Example: CONFIG_EXTRA_LDLIBS="pthread dl tirpc audit pam"
make: *** [Makefile:718:busybox_unstripped] 错误 1
然后切换到这个
(https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.02.25/riscv64-glibc-ubuntu-20.04-nightly-2023.02.25-nightly.tar.gz)
编译器编译busybox和rootfs之后,就成功运行了。
from quard_star_tutorial.
Hi @zhutang, I tried using your toolchain. When I enter ./riscv64-unknown-elf-gcc -v
to see the result.
Using built-in specs.
COLLECT_GCC=./riscv64-unknown-elf-gcc
COLLECT_LTO_WRAPPER=/home/qqm/Downloads/riscv/bin/../libexec/gcc/riscv64-unknown-elf/12.2.0/lto-wrapper
Target: riscv64-unknown-elf
Configured with: /home/runner/work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc/configure --target=riscv64-unknown-elf --prefix=/opt/riscv --disable-shared --disable-threads --enable-languages=c,c++ --with-pkgversion=g2ee5e430018 --with-system-zlib --enable-tls --with-newlib --with-sysroot=/opt/riscv/riscv64-unknown-elf --with-native-system-header-dir=/include --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-tm-clone-registry --src=/home/runner/work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc --disable-multilib --with-abi=lp64d --with-arch=rv64gc --with-tune=rocket --with-isa-spec=2.2 'CFLAGS_FOR_TARGET=-Os -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-Os -mcmodel=medlow'
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 12.2.0 (g2ee5e430018)
-mcmodel=medlow
is not an option we need. Because trusted_fw.bin need to link to high addresses above 0x80000000.You can refer to the instructions here for the correct toolchain compilation options(sorry only in chinese).
quard_star_tutorial/DEVELOPNOTE.md
Lines 92 to 102 in ed1c291
from quard_star_tutorial.
Related Issues (12)
- 重复引用了头文件 #include "hw/sysbus.h" HOT 1
- 在 头文件中已经定义 TYPE_RISCV_QUARD_STAR_MACHINE HOT 2
- 编译qemu时, 支持audio需要装那些库? (ubuntu 20.04) HOT 2
- 对 build.sh lowlevelboot 的疑问 HOT 2
- Use the full-screen parameter does not work HOT 1
- 请问 同时执行两个操作系统 算不算type 1 的hypervisor? HOT 2
- 关于riscv编译工具链的问题 HOT 6
- 使用ip命令配置can网络出错 HOT 1
- 关于ch9的疑问 HOT 6
- 可以认识一下吗? HOT 4
- 请教下 quard_star 有硬件手册之类的吗?小白想知道对于一些地址、寄存器配置是这么来的 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quard_star_tutorial.