➜ opensbi git:(master) make PLATFORM=generic FW_TEXT_START=0x40000000 FW_OPTIONS=0 CC lib/sbi/riscv_asm.o CC lib/sbi/riscv_atomic.o AS lib/sbi/riscv_hardfp.o CC lib/sbi/riscv_locks.o CC lib/sbi/sbi_ecall.o CC lib/sbi/sbi_ecall_exts.o CC lib/sbi/sbi_ecall_time.o CC lib/sbi/sbi_ecall_rfence.o CC lib/sbi/sbi_ecall_ipi.o CC lib/sbi/sbi_ecall_base.o CC lib/sbi/sbi_ecall_hsm.o CC lib/sbi/sbi_ecall_srst.o CC lib/sbi/sbi_ecall_susp.o CC lib/sbi/sbi_ecall_pmu.o CC lib/sbi/sbi_ecall_dbcn.o CC lib/sbi/sbi_ecall_cppc.o CC lib/sbi/sbi_ecall_legacy.o CC lib/sbi/sbi_ecall_vendor.o CC lib/sbi/sbi_bitmap.o CC lib/sbi/sbi_bitops.o CC lib/sbi/sbi_console.o CC lib/sbi/sbi_domain.o CC lib/sbi/sbi_emulate_csr.o CC lib/sbi/sbi_fifo.o CC lib/sbi/sbi_hart.o CC lib/sbi/sbi_heap.o CC lib/sbi/sbi_math.o AS lib/sbi/sbi_hfence.o CC lib/sbi/sbi_hsm.o CC lib/sbi/sbi_illegal_insn.o CC lib/sbi/sbi_init.o CC lib/sbi/sbi_ipi.o CC lib/sbi/sbi_irqchip.o CC lib/sbi/sbi_misaligned_ldst.o CC lib/sbi/sbi_platform.o CC lib/sbi/sbi_pmu.o CC lib/sbi/sbi_scratch.o CC lib/sbi/sbi_string.o CC lib/sbi/sbi_system.o CC lib/sbi/sbi_timer.o CC lib/sbi/sbi_tlb.o CC lib/sbi/sbi_trap.o CC lib/sbi/sbi_unpriv.o AS lib/sbi/sbi_expected_trap.o CC lib/sbi/sbi_cppc.o AR lib/libsbi.a CC platform/generic/lib/utils/timer/aclint_mtimer.o CC platform/generic/lib/utils/timer/andes_plmt.o CC platform/generic/lib/utils/timer/fdt_timer.o CC platform/generic/lib/utils/timer/fdt_timer_drivers.o CC platform/generic/lib/utils/timer/fdt_timer_mtimer.o CC platform/generic/lib/utils/timer/fdt_timer_plmt.o CC platform/generic/lib/utils/sys/htif.o CC platform/generic/lib/utils/sys/atcsmu.o CC platform/generic/lib/utils/serial/fdt_serial.o CC platform/generic/lib/utils/serial/fdt_serial_drivers.o CC platform/generic/lib/utils/serial/fdt_serial_cadence.o CC platform/generic/lib/utils/serial/fdt_serial_gaisler.o CC platform/generic/lib/utils/serial/fdt_serial_htif.o CC platform/generic/lib/utils/serial/fdt_serial_renesas_scif.o CC platform/generic/lib/utils/serial/fdt_serial_shakti.o CC platform/generic/lib/utils/serial/fdt_serial_sifive.o CC platform/generic/lib/utils/serial/fdt_serial_litex.o CC platform/generic/lib/utils/serial/fdt_serial_uart8250.o CC platform/generic/lib/utils/serial/fdt_serial_xlnx_uartlite.o CC platform/generic/lib/utils/serial/cadence-uart.o CC platform/generic/lib/utils/serial/gaisler-uart.o CC platform/generic/lib/utils/serial/renesas_scif.o CC platform/generic/lib/utils/serial/shakti-uart.o CC platform/generic/lib/utils/serial/sifive-uart.o CC platform/generic/lib/utils/serial/litex-uart.o CC platform/generic/lib/utils/serial/uart8250.o CC platform/generic/lib/utils/serial/xlnx-uartlite.o CC platform/generic/lib/utils/serial/semihosting.o CC platform/generic/lib/utils/reset/fdt_reset.o CC platform/generic/lib/utils/reset/fdt_reset_drivers.o CC platform/generic/lib/utils/reset/fdt_reset_atcwdt200.o CC platform/generic/lib/utils/reset/fdt_reset_gpio.o CC platform/generic/lib/utils/reset/fdt_reset_htif.o CC platform/generic/lib/utils/reset/fdt_reset_sunxi_wdt.o CC platform/generic/lib/utils/reset/fdt_reset_syscon.o CC platform/generic/lib/utils/regmap/fdt_regmap.o CC platform/generic/lib/utils/regmap/fdt_regmap_drivers.o CC platform/generic/lib/utils/regmap/fdt_regmap_syscon.o CC platform/generic/lib/utils/regmap/regmap.o CC platform/generic/lib/utils/libfdt/fdt.o CC platform/generic/lib/utils/libfdt/fdt_addresses.o CC platform/generic/lib/utils/libfdt/fdt_check.o CC platform/generic/lib/utils/libfdt/fdt_empty_tree.o CC platform/generic/lib/utils/libfdt/fdt_ro.o CC platform/generic/lib/utils/libfdt/fdt_rw.o CC platform/generic/lib/utils/libfdt/fdt_strerror.o CC platform/generic/lib/utils/libfdt/fdt_sw.o CC platform/generic/lib/utils/libfdt/fdt_wip.o CC platform/generic/lib/utils/irqchip/fdt_irqchip.o CC platform/generic/lib/utils/irqchip/fdt_irqchip_drivers.o CC platform/generic/lib/utils/irqchip/fdt_irqchip_aplic.o CC platform/generic/lib/utils/irqchip/fdt_irqchip_imsic.o CC platform/generic/lib/utils/irqchip/fdt_irqchip_plic.o CC platform/generic/lib/utils/irqchip/aplic.o CC platform/generic/lib/utils/irqchip/imsic.o CC platform/generic/lib/utils/irqchip/plic.o CC platform/generic/lib/utils/ipi/aclint_mswi.o CC platform/generic/lib/utils/ipi/andes_plicsw.o CC platform/generic/lib/utils/ipi/fdt_ipi.o CC platform/generic/lib/utils/ipi/fdt_ipi_drivers.o CC platform/generic/lib/utils/ipi/fdt_ipi_mswi.o CC platform/generic/lib/utils/ipi/fdt_ipi_plicsw.o CC platform/generic/lib/utils/i2c/i2c.o CC platform/generic/lib/utils/i2c/fdt_i2c.o CC platform/generic/lib/utils/i2c/fdt_i2c_adapter_drivers.o CC platform/generic/lib/utils/i2c/fdt_i2c_sifive.o CC platform/generic/lib/utils/i2c/fdt_i2c_dw.o CC platform/generic/lib/utils/i2c/dw_i2c.o CC platform/generic/lib/utils/gpio/fdt_gpio.o CC platform/generic/lib/utils/gpio/fdt_gpio_drivers.o CC platform/generic/lib/utils/gpio/fdt_gpio_designware.o CC platform/generic/lib/utils/gpio/fdt_gpio_sifive.o CC platform/generic/lib/utils/gpio/fdt_gpio_starfive.o CC platform/generic/lib/utils/gpio/gpio.o CC platform/generic/lib/utils/fdt/fdt_domain.o CC platform/generic/lib/utils/fdt/fdt_pmu.o CC platform/generic/lib/utils/fdt/fdt_helper.o CC platform/generic/lib/utils/fdt/fdt_fixup.o CC platform/generic/thead/thead_c9xx_pmu.o AS platform/generic/thead/thead_c9xx_tlb_trap_handler.o CC platform/generic/thead/thead_c9xx_errata_tlb_flush.o CC platform/generic/thead/thead-generic.o CC platform/generic/starfive/jh7110.o CC platform/generic/sophgo/sg2042.o CC platform/generic/sifive/fu540.o CC platform/generic/sifive/fu740.o CC platform/generic/renesas/rzfive/rzfive.o CC platform/generic/platform.o CC platform/generic/platform_override_modules.o CC platform/generic/andes/ae350.o AS platform/generic/andes/sleep.o CC platform/generic/andes/andes45-pma.o CC platform/generic/andes/andes_sbi.o CC platform/generic/andes/andes_pmu.o CC platform/generic/allwinner/sun20i-d1.o AR platform/generic/lib/libplatsbi.a AS platform/generic/firmware/payloads/test_head.o CC platform/generic/firmware/payloads/test_main.o MERGE platform/generic/firmware/payloads/test.o ELF platform/generic/firmware/payloads/test.elf OBJCOPY platform/generic/firmware/payloads/test.bin AS platform/generic/firmware/fw_dynamic.o ELF platform/generic/firmware/fw_dynamic.elf OBJCOPY platform/generic/firmware/fw_dynamic.bin AS platform/generic/firmware/fw_jump.o ELF platform/generic/firmware/fw_jump.elf OBJCOPY platform/generic/firmware/fw_jump.bin AS platform/generic/firmware/fw_payload.o ELF platform/generic/firmware/fw_payload.elf OBJCOPY platform/generic/firmware/fw_payload.bin
➜ busybox make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv defconfig scripts/kconfig/conf -d Config.in * * Busybox Configuration * * * Settings * Enable compatibility for full-blown desktop systems (8kb) (DESKTOP) [Y/n/?] (NEW) y Provide compatible behavior for rare corner cases (bigger code) (EXTRA_COMPAT) [N/y/?] (NEW) n Building for Fedora distribution (FEDORA_COMPAT) [N/y/?] (NEW) n Enable obsolete features removed before SUSv3 (INCLUDE_SUSv2) [Y/n/?] (NEW) y Support --long-options (LONG_OPTS) [Y/?] (NEW) y Show applet usage messages (SHOW_USAGE) [Y/n/?] (NEW) y Show verbose applet usage messages (FEATURE_VERBOSE_USAGE) [Y/n/?] (NEW) y Store applet usage messages in compressed form (FEATURE_COMPRESS_USAGE) [Y/n/?] (NEW) y Support files > 2 GB (LFS) [Y/n/?] (NEW) y Support 64bit wide time types (TIME64) [Y/n/?] (NEW) y Support PAM (Pluggable Authentication Modules) (PAM) [N/y/?] (NEW) n Use the devpts filesystem for Unix98 PTYs (FEATURE_DEVPTS) [Y/n/?] (NEW) y Support utmp file (FEATURE_UTMP) [Y/n/?] (NEW) y Support wtmp file (FEATURE_WTMP) [Y/n/?] (NEW) y Support writing pidfiles (FEATURE_PIDFILE) [Y/n/?] (NEW) y Directory for pidfiles (PID_FILE_PATH) [/var/run] (NEW) /var/run Include busybox applet (BUSYBOX) [Y/n/?] (NEW) y Support --show SCRIPT (FEATURE_SHOW_SCRIPT) [Y/n] (NEW) y Support --install [-s] to install applet links at runtime (FEATURE_INSTALLER) [Y/n/?] (NEW) y Don't use /usr (INSTALL_NO_USR) [N/y/?] (NEW) n Drop SUID state for most applets (FEATURE_SUID) [Y/n/?] (NEW) y Enable SUID configuration via /etc/busybox.conf (FEATURE_SUID_CONFIG) [Y/n/?] (NEW) y Suppress warning message if /etc/busybox.conf is not readable (FEATURE_SUID_CONFIG_QUIET) [Y/n/?] (NEW) y exec prefers applets (FEATURE_PREFER_APPLETS) [N/y/?] (NEW) n Path to busybox executable (BUSYBOX_EXEC_PATH) [/proc/self/exe] (NEW) /proc/self/exe Support NSA Security Enhanced Linux (SELINUX) [N/y/?] (NEW) n Clean up all memory before exiting (usually not needed) (FEATURE_CLEAN_UP) [N/y/?] (NEW) n Support LOG_INFO level syslog messages (FEATURE_SYSLOG_INFO) [Y/n/?] (NEW) y * * * Build Options * ...... ...... ...... * * Options common to all shells * POSIX math support (FEATURE_SH_MATH) [Y/n/?] (NEW) y Extend POSIX math support to 64 bit (FEATURE_SH_MATH_64) [Y/n/?] (NEW) y Support BASE#nnnn literals (FEATURE_SH_MATH_BASE) [Y/n] (NEW) y Hide message on interactive shell startup (FEATURE_SH_EXTRA_QUIET) [Y/n/?] (NEW) y Standalone shell (FEATURE_SH_STANDALONE) [N/y/?] (NEW) n Run 'nofork' applets directly (FEATURE_SH_NOFORK) [N/y/?] (NEW) n read -t N.NNN support (+110 bytes) (FEATURE_SH_READ_FRAC) [Y/n/?] (NEW) y Use $HISTFILESIZE (FEATURE_SH_HISTFILESIZE) [Y/n/?] (NEW) y Embed scripts in the binary (FEATURE_SH_EMBEDDED_SCRIPTS) [Y/n/?] (NEW) y * * System Logging Utilities * klogd (6.2 kb) (KLOGD) [Y/n/?] (NEW) y * * klogd should not be used together with syslog to kernel printk buffer * Use the klogctl() interface (FEATURE_KLOGD_KLOGCTL) [Y/n/?] (NEW) y logger (6.5 kb) (LOGGER) [Y/n/?] (NEW) y logread (5 kb) (LOGREAD) [Y/n/?] (NEW) y Double buffering (FEATURE_LOGREAD_REDUCED_LOCKING) [Y/n/?] (NEW) y syslogd (14 kb) (SYSLOGD) [Y/n/?] (NEW) y Rotate message files (FEATURE_ROTATE_LOGFILE) [Y/n/?] (NEW) y Remote Log support (FEATURE_REMOTE_LOG) [Y/n/?] (NEW) y Support -D (drop dups) option (FEATURE_SYSLOGD_DUP) [Y/n/?] (NEW) y Support syslog.conf (FEATURE_SYSLOGD_CFG) [Y/n/?] (NEW) y Include milliseconds in timestamps (FEATURE_SYSLOGD_PRECISE_TIMESTAMPS) [N/y/?] (NEW) n Read buffer size in bytes (FEATURE_SYSLOGD_READ_BUFFER_SIZE) [256] (NEW) 256 Circular Buffer support (FEATURE_IPC_SYSLOG) [Y/n/?] (NEW) y Circular buffer size in Kbytes (minimum 4KB) (FEATURE_IPC_SYSLOG_BUFFER_SIZE) [16] (NEW) 16 Linux kernel printk buffer support (FEATURE_KMSG_SYSLOG) [Y/n/?] (NEW) y ➜ busybox
1 2 3 4 5 6 7 8 9
➜ busybox make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv menuconfig scripts/kconfig/mconf Config.in # # using defaults found in .config #
*** End of configuration. *** Execute 'make' to build the project or try 'make help'.
➜ busybox make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv -j8 LD archival/built-in.o CC archival/bzip2.o CC archival/bbunzip.o CC archival/chksum_and_xwrite_tar_header.o CC archival/dpkg.o CC archival/cpio.o CC archival/dpkg_deb.o LD archival/libarchive/built-in.o CC archival/gzip.o CC archival/libarchive/common.o CC archival/lzop.o CC archival/libarchive/data_align.o LD console-tools/built-in.o CC console-tools/chvt.o CC console-tools/clear.o CC console-tools/deallocvt.o CC archival/libarchive/data_extract_all.o LD coreutils/built-in.o CC coreutils/basename.o CC coreutils/cat.o CC console-tools/dumpkmap.o archival/libarchive/data_extract_all.c: In function ‘data_extract_all’: archival/libarchive/data_extract_all.c:235:25: warning: ignoring return value of ‘chown’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 235 | chown(dst_name, uid, gid); | ^~~~~~~~~~~~~~~~~~~~~~~~~ LD coreutils/libcoreutils/built-in.o CC archival/libarchive/data_extract_to_command.o CC archival/libarchive/data_extract_to_stdout.o CC coreutils/libcoreutils/cp_mv_stat.o LD debianutils/built-in.o CC debianutils/pipe_progress.o console-tools/dumpkmap.c: In function ‘dumpkmap_main’: ...... ...... ...... CC libbb/verror_msg.o util-linux/mkfs_minix.c: In function ‘get_list_blocks’: util-linux/mkfs_minix.c:532:17: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 532 | fscanf(listfile, "%lu\n", &blockno); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC libbb/vfork_daemon_rexec.o CC libbb/warn_ignoring_args.o CC util-linux/mkswap.o CC util-linux/more.o CC libbb/wfopen.o CC util-linux/mount.o CC libbb/wfopen_input.o CC libbb/write.o CC util-linux/mountpoint.o CC libbb/xatonum.o CC util-linux/nsenter.o CC util-linux/pivot_root.o CC util-linux/rdate.o CC libbb/xconnect.o CC util-linux/rdev.o CC libbb/xfunc_die.o CC util-linux/readprofile.o CC libbb/xfuncs.o CC util-linux/renice.o CC libbb/xfuncs_printf.o CC util-linux/rev.o CC libbb/xgetcwd.o CC util-linux/rtcwake.o CC util-linux/script.o CC libbb/xgethostbyname.o CC libbb/xreadlink.o CC libbb/xrealloc_vector.o CC util-linux/scriptreplay.o CC util-linux/setarch.o CC libbb/xregcomp.o CC util-linux/setpriv.o CC util-linux/setsid.o CC util-linux/swaponoff.o CC util-linux/switch_root.o CC util-linux/taskset.o CC util-linux/uevent.o CC util-linux/umount.o AR libbb/lib.a CC util-linux/unshare.o CC util-linux/wall.o util-linux/unshare.c: In function ‘unshare_main’: util-linux/unshare.c:295:25: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 295 | read(fdp.rd, ns_ctx_list, 1); /* ...using bogus buffer */ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ AR util-linux/lib.a LINK busybox_unstripped Trying libraries: m resolv rt Library m is needed, can't exclude it (yet) Library resolv is needed, can't exclude it (yet) Library rt is not needed, excluding it Library m is needed, can't exclude it (yet) Library resolv is needed, can't exclude it (yet) Final link with: m resolv
-------------------------------------------------- You will probably need to make your busybox binary setuid root to ensure all configured applets will work properly. --------------------------------------------------