首页 > 解决方案 > 制作busybox时缺少头文件

问题描述

我正在尝试使用 qemu 安装 riscv linux,并在此处遵循本指南: https ://risc-v-getting-started-guide.readthedocs.io/en/latest/linux-qemu.html

操作系统是 ubuntu 18.04

我设法制作了 qemu 和 linux,但 busybox 引起了问题。当我尝试CROSS_COMPILE=riscv64-unknown-elf- make -j $(nproc) 错误消失为

include/platform.h:168:11: fatal error: byteswap.h: No such file or directory
  168 | # include <byteswap.h>
      |           ^~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:197: recipe for target 'applets/applets.o' failed
make[1]: *** [applets/applets.o] Error 1
Makefile:372: recipe for target 'applets_dir' failed
make: *** [applets_dir] Error 2

我不确定,但尝试从 glibc 添加文件会给我更多缺少的标头错误,这些错误在此 https://github.com/lattera/glibc/blob/master/bits/byteswap.h中不可用

如果有帮助,我正在使用 risc64-unknown-elf

标签: ubuntu-18.04riscvbusybox

解决方案


推荐阅读