实施自定义u-boot命令

问题描述 投票:0回答:1

我想将自定义命令命令添加到u-boot,因为它是简单的hello world命令。

[搜索后,我找到了此链接Yocto u-boot Custom Commands,其中说它是以timer中的cmd/misc.c命令为起点。

如何将timer命令带到我的u-boot映像?我假设我已经对makefile进行了更改,但是不确定我应该编辑哪个makefile。

我正在使用qemu通过以下方法在Ubuntu 18.04中测试u-boot图像

  1. 从github中克隆u-boot源。
  2. 在系统中安装了所有构建依赖项。
  3. 使用make qemu_arm_config ARCH=arm CROSS_COMPILE=arm-none-eabi-准备的u-boot配置文件
  4. 构建u-boot make all ARCH=arm CROSS_COMPILE=arm-none-eabi-
  5. 使用u-boot映像qemu-system-arm -M virt -nographic -kernel u-boot启动qemu>
  6. U-boot日志

$ 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中的计时器命令...

linux embedded-linux qemu bootloader u-boot
1个回答
0
投票

doc / README.commands描述了应如何实现命令。

© www.soinside.com 2019 - 2024. All rights reserved.