我想将自定义命令命令添加到u-boot
,因为它是简单的hello world命令。
[搜索后,我找到了此链接Yocto u-boot Custom Commands,其中说它是以timer
中的cmd/misc.c
命令为起点。
如何将timer
命令带到我的u-boot映像?我假设我已经对makefile进行了更改,但是不确定我应该编辑哪个makefile。
我正在使用qemu通过以下方法在Ubuntu 18.04中测试u-boot
图像
u-boot
源。make qemu_arm_config ARCH=arm CROSS_COMPILE=arm-none-eabi-
准备的u-boot配置文件make all ARCH=arm CROSS_COMPILE=arm-none-eabi-
qemu-system-arm -M virt -nographic -kernel u-boot
启动qemu>$ qemu-system-arm -M virt -nographic -kernel u-boot U-Boot 2020.01-dirty (Mar 29 2020 - 15:46:14 +0530) DRAM: 128 MiB WARNING: Caches not enabled Flash: 128 MiB *** Warning - bad CRC, using default environment In: pl011@9000000 Out: pl011@9000000 Err: pl011@9000000 Net: No ethernet found. Hit any key to stop autoboot: 0 => timer Unknown command 'timer' - try 'help' =>
更多细节
U-boot:
主机操作系统:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
我想将自定义命令命令添加到u-boot,因为它是一个简单的hello world命令。搜索后,我找到了此链接Yocto u-boot自定义命令,其中显示了要查看cmd / misc.c中的计时器命令...
doc / README.commands描述了应如何实现命令。