[英]U-Boot - multiple same output formats in linker scripts for ARM
[英]Running scripts in u-boot with qemu on arm
我正在使用QEMU在ARM上使用u-boot。 我正在使用“ versatilepb”计算机,因为Linux和u-boot都可以很好地工作。 我想编写一个脚本来处理一些启动过程(设置内核args,计算CRC等)-但我似乎找不到如何运行我的脚本。 我已经将脚本保存在内存中,并且可以通过u-boot进行识别:
VersatilePB # iminfo 0x285EC
## Checking Image at 000285ec ...
Legacy image found
Image Name: Test Linux Boot
Image Type: ARM Linux Script (uncompressed)
Data Size: 300 Bytes = 300 Bytes
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 292 Bytes = 292 Bytes
Verifying Checksum ... OK
但是,我不知道如何运行它:
VersatilePB # run 0x285EC
Unknown command 'run' - try 'help'
VersatilePB # autoscr 0x285EC
Unknown command 'autoscr' - try 'help'
VersatilePB # go 0x285EC
## Starting application at 0x000285EC ...
qemu: fatal: Trying to execute code outside RAM or ROM at 0x56190526
我知道上一个命令失败了,因为我有一个脚本映像(使用mkimage -A arm -T script -C none -n "Test Linux Boot" -d myscript.sh ./boot-commands.img
),而不是实际的独立应用程序。
我的测试脚本非常简单,仅用于引导Linux内核:
#Global Variables
FLASH_ADDR=0x34000000
BOOT_ARGS="console=ttyAMA0"
#Now we'll try booting it from the beginning of flash
setenv bootcmd bootm $FLASH_ADDR
setenv bootargs $BOOT_ARGS
在u-boot命令行中键入bootm 0x34000000
成功引导Linux内核
我是否缺少有关如何运行u-boot脚本的内容?
这是社区维基的答案。
您应该添加正在使用的u-boot的版本。 对于“运行”命令,验证是否在配置中定义了CONFIG_CMD_RUN 。 由sessyargc.jp
该命令autoscr
是由您的配置定义CONFIG_CMD_SOURCE按照启用的U-boot命令documetnation 。 通过乔·库尔
脚本不能以纯ascii的方式运行,必须根据文档由mkimage
进行预处理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.