德州仪器
直播中

郭武莱

7年用户 192经验值
私信 关注
[问答]

在tftp上加载和执行eewiki u-boot映像失败

我已经使用linuxonARM eewiki页面上的beaglebone black的说明构建了一个u-boot.bin文件。
我正在尝试使用tftp从现有的beaglebone black上的u-boot加载并运行它,并使用以下命令:
tftp 0x80800000 u-boot.bin
去0x80800000
tftp成功,但在打印后运行新的u-boot会挂起:
##在0x80800000处启动应用程序
在没有0002-U-Boot-BeagleBone-Cape-Manager.patch的情况下构建u-boot是有效的,所以我认为这个问题不在构建环境中。
关于为什么这不起作用或如何解决它的任何想法?
更长的故事:
我正在开发一种嵌入了beaglebone的产品,但micro-SD卡无法访问(访问它需要物理拆除整个产品)。
我们希望通过以太网端口使用tftp更新emmc上的操作系统(包括u-boot,内核和根文件系统)。
从高层次来看,这需要:
编写可以在现有操作系统中运行的应用程序来覆盖emmc中的当前u-boot映像,以便下次设备启动时将使用tftp检索新的操作系统组件
当设备重新启动时,u-boot使用tftp检索新内核,设备树blob(?)和根文件系统(我的理解是它必须将这些图像加载到ram中,然后将ram的内容复制到emmc中,是
那是对的吗?)
启动新的操作系统,最好关闭u-boot功能以下载新的操作系统,同时保持在将来从用户空间重新启用它的能力
我想第一个问题是否合理?
我使用eewiki上的说明构建了u-boot。
另一篇博客(beyondlogic,BeagleBoneBlack_Upgrading_uBoot)描述了一种使用tftp启动并执行它来将u-boot加载到ram中的方法:
tftp 0x80800000 u-boot.bin
去0x80800000
当我使用从eewiki创建的u-boot映像尝试此操作时,tftp成功,但是当我尝试执行它时,该过程挂起在此行:
##在0x80800000处启动应用程序
如果我尝试使用从beyondlogic页面上的说明创建的u-boot映像,它可以工作。
该过程基本相同,但其说明仅适用于此补丁:
0001-am335x_evm-uEnv.txt-bootz正fixes.patch
而eewiki的说明也适用于此补丁:
技术-的U-Boot-BeagleBone普-Manager.patch
Cape Manager支持是从当前操作系统(ArchLinux)过渡到Debian的主要原因(Arch似乎不支持最新的开普管理和设备树覆盖功能。)
我已经找到了在u-boot中打开其他调试语句的方法,但到目前为止还没有找到任何有用的东西。
那么,那么:
关于为什么在tftp上加载和执行eewiki u-boot映像失败的想法,以及如何修复它?
我也试图找出如何将图像从ram写入emmc,但还没有找到任何例子。

以上来自于谷歌翻译


以下为原文

        I have built a u-boot.bin file built using the instructions for the beaglebone black on the linuxonarm eewiki page.  I’m trying to load and run it using tftp from u-boot on an existing beaglebone black with the commands:
tftp 0x80800000 u-boot.bingo 0x80800000The tftp is successful, but running the new u-boot hangs after printing:
## Starting application at 0x80800000Building u-boot without the 0002-U-Boot-BeagleBone-Cape-Manager.patch works, so I don’t think the issue is in the build environment.  Any ideas on why this doesn’t work or how to fix it?
Longer story:
I’m working on a product that has a beaglebone embedded within it, but the micro-SD card is inaccessible (accessing it requires physically dismantling the entire product).  We are hoping to update the operating system (including u-boot, the kernel, and the root file system) on the emmc using tftp over the ethernet port.  At a high level, this would require:
  • writing an application that can run in the existing operating system to overwrite the current u-boot image in emmc so that the next time the device boots it will retrieve the new operating system components using tftp
  • when the device reboots, u-boot retrieves the new kernel, device tree blob (?) and root filesystem using tftp (my understanding is that it would have to load these images into ram, then copy the contents of ram into the emmc, is that correct?)
  • boot the new operating system, preferably turning off the u-boot feature to download a new os while maintaining the ability to turn that back on from userspace in the future
I guess the first question is does that seem reasonable?
I have built u-boot using the instructions on eewiki.  Another blog (beyondlogic, BeagleBoneBlack_Upgrading_uBoot) describes a method for loading u-boot into ram using tftp boot and executing it:
tftp 0x80800000 u-boot.bingo 0x80800000When I try this with the u-boot image created from eewiki, the tftp is successful, but when I try to execute it the process hangs at this line:
## Starting application at 0x80800000If I try this with the u-boot image created from the instructions on the beyondlogic page, it works.  The process is basically identical, but their instructions only apply this patch:
0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
while eewiki’s instructions also apply this patch:
0002-U-Boot-BeagleBone-Cape-Manager.patch
The Cape Manager support is the primary reason for transitioning from the current operating system (ArchLinux) to Debian (Arch does not appear to support the latest cape management and device tree overlay functionality.)
I have looked for ways to turn on additional debugging statements in u-boot, but so far haven’t found anything useful.
So, then:
  • Any ideas on why loading and execute the eewiki u-boot image over tftp fails, and how to fix it?
  • I’m also trying to figure out how to write images from ram into emmc, but haven’t found any examples yet.

回帖(5)

郭雨桐

2018-10-24 19:59:29
@ don.carter
这可能是一个tftp传输问题,我刚刚在一个BBB上检查了存储在SD卡上的u-boot ...
U-Boot SPL 2018.03-00002-g254339602c(2018年3月16日 -  12:36:44 -0500)
试图从MMC1启动
从EXT4加载环境... **找不到文件/boot/uboot.env **
**无法从mmc0读取“/boot/uboot.env”:1 **
失败(-5)
U-Boot 2018.03-00002-g254339602c(2018年3月16日 -  12:36:44 -0500),构建:jenkins-github_Bootloader-Builder-42
CPU:AM335X-GP rev 2.1
I2C:准备好了
DRAM:512 MiB
没有匹配的驱动程序'omap_hsmmc'
没有匹配的驱动程序'omap_hsmmc'
找不到一些司机
复位源:发生全局热SW复位。
复位源:发生了上电复位。
MMC:OMAP SD / MMC:0,OMAP SD / MMC:1
从EXT4加载环境... **找不到文件/boot/uboot.env **
**无法从mmc0读取“/boot/uboot.env”:1 **
失败(-5)
董事会:BeagleBone Black 
没有设置。
验证第一个E-fuse MAC
BeagleBone Black:
BeagleBone:cape eeprom:i2c_probe:0x54:
BeagleBone:cape eeprom:i2c_probe:0x55:
BeagleBone:cape eeprom:i2c_probe:0x56:
BeagleBone:cape eeprom:i2c_probe:0x57:
净:eth0:MII模式
cpsw,u***_ether
按SPACE可在2秒内中止自动引导
=> load mmc 0:1 0x80800000 /home/debian/u-boot/u-boot.bin
在135 ms(3 MiB / s)内读取422496个字节
=>去0x80800000
##在0x80800000启动应用程序...
U-Boot 2018.01-dirty(2018年3月26日 -  16:35:54 +0000)
CPU:AM335X-GP rev 2.1
I2C:准备好了
DRAM:512 MiB
没有匹配的驱动程序'omap_hsmmc'
没有匹配的驱动程序'omap_hsmmc'
找不到一些司机
复位源:发生全局热SW复位。
复位源:发生了上电复位。
MMC:OMAP SD / MMC:0,OMAP SD / MMC:1
使用默认环境
董事会:BeagleBone Black 
没有设置。
验证第一个E-fuse MAC
BeagleBone Black:
BeagleBone:cape eeprom:i2c_probe:0x54:
BeagleBone:cape eeprom:i2c_probe:0x55:
BeagleBone:cape eeprom:i2c_probe:0x56:
BeagleBone:cape eeprom:i2c_probe:0x57:
净:eth0:MII模式
cpsw,u***_ether
按SPACE可在2秒内中止自动引导
=> load mmc 0:1 0x80800000 /home/debian/u-boot/u-boot.bin
在135 ms(3 MiB / s)内读取422496个字节
=>去0x80800000
##在0x80800000启动应用程序...
U-Boot 2018.01-dirty(2018年3月26日 -  16:35:54 +0000)
CPU:AM335X-GP rev 2.1
I2C:准备好了
DRAM:512 MiB
没有匹配的驱动程序'omap_hsmmc'
没有匹配的驱动程序'omap_hsmmc'
找不到一些司机
复位源:发生全局热SW复位。
复位源:发生了上电复位。
MMC:OMAP SD / MMC:0,OMAP SD / MMC:1
使用默认环境
董事会:BeagleBone Black 
没有设置。
验证第一个E-fuse MAC
BeagleBone Black:
BeagleBone:cape eeprom:i2c_probe:0x54:
BeagleBone:cape eeprom:i2c_probe:0x55:
BeagleBone:cape eeprom:i2c_probe:0x56:
BeagleBone:cape eeprom:i2c_probe:0x57:
净:eth0:MII模式
cpsw,u***_ether
按SPACE可在2秒内中止自动引导
=>
PS:有一个为u-boot开发的wget实现:
https://lists.denx.de/pipermail/u-boot/2018-March/323699.html
问候,

以上来自于谷歌翻译


以下为原文

        @don.carter
This could be a tftp transfer issue, I just checked on a BBB with u-boot stored on a sdcard…
U-Boot SPL 2018.03-00002-g254339602c (Mar 16 2018 - 12:36:44 -0500)Trying to boot from MMC1Loading Environment from EXT4... ** File not found /boot/uboot.env **** Unable to read "/boot/uboot.env" from mmc0:1 **Failed (-5)U-Boot 2018.03-00002-g254339602c (Mar 16 2018 - 12:36:44 -0500), Build: jenkins-github_Bootloader-Builder-42CPU  : AM335X-GP rev 2.1I2C:   readyDRAM:  512 MiBNo match for driver 'omap_hsmmc'No match for driver 'omap_hsmmc'Some drivers were not foundReset Source: Global warm SW reset has occurred.Reset Source: Power-on reset has occurred.MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1Loading Environment from EXT4... ** File not found /boot/uboot.env **** Unable to read "/boot/uboot.env" from mmc0:1 **Failed (-5)Board: BeagleBone Black not set. Validating first E-fuse MACBeagleBone Black:BeagleBone: cape eeprom: i2c_probe: 0x54:BeagleBone: cape eeprom: i2c_probe: 0x55:BeagleBone: cape eeprom: i2c_probe: 0x56:BeagleBone: cape eeprom: i2c_probe: 0x57:Net:   eth0: MII MODEcpsw, u***_etherPress SPACE to abort autoboot in 2 seconds=> load mmc 0:1 0x80800000 /home/debian/u-boot/u-boot.bin422496 bytes read in 135 ms (3 MiB/s)=> go 0x80800000## Starting application at 0x80800000 ...U-Boot 2018.01-dirty (Mar 26 2018 - 16:35:54 +0000)CPU  : AM335X-GP rev 2.1I2C:   readyDRAM:  512 MiBNo match for driver 'omap_hsmmc'No match for driver 'omap_hsmmc'Some drivers were not foundReset Source: Global warm SW reset has occurred.Reset Source: Power-on reset has occurred.MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1Using default environmentBoard: BeagleBone Black not set. Validating first E-fuse MACBeagleBone Black:BeagleBone: cape eeprom: i2c_probe: 0x54:BeagleBone: cape eeprom: i2c_probe: 0x55:BeagleBone: cape eeprom: i2c_probe: 0x56:BeagleBone: cape eeprom: i2c_probe: 0x57:Net:   eth0: MII MODEcpsw, u***_etherPress SPACE to abort autoboot in 2 seconds=> load mmc 0:1 0x80800000 /home/debian/u-boot/u-boot.bin422496 bytes read in 135 ms (3 MiB/s)=> go 0x80800000## Starting application at 0x80800000 ...U-Boot 2018.01-dirty (Mar 26 2018 - 16:35:54 +0000)CPU  : AM335X-GP rev 2.1I2C:   readyDRAM:  512 MiBNo match for driver 'omap_hsmmc'No match for driver 'omap_hsmmc'Some drivers were not foundReset Source: Global warm SW reset has occurred.Reset Source: Power-on reset has occurred.MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1Using default environmentBoard: BeagleBone Black not set. Validating first E-fuse MACBeagleBone Black:BeagleBone: cape eeprom: i2c_probe: 0x54:BeagleBone: cape eeprom: i2c_probe: 0x55:BeagleBone: cape eeprom: i2c_probe: 0x56:BeagleBone: cape eeprom: i2c_probe: 0x57:Net:   eth0: MII MODEcpsw, u***_etherPress SPACE to abort autoboot in 2 seconds=> PS: there is a wget implementation being developed for u-boot:
https://lists.denx.de/pipermail/u-boot/2018-March/323699.html
Regards,
举报

郭雨桐

2018-10-24 20:12:03
@ don.carter
好吧看起来我复制了它:
U-Boot SPL 2018.03-00002-g254339602c(2018年3月16日 -  12:36:44 -0500)
试图从MMC1启动
从EXT4加载环境... **找不到文件/boot/uboot.env **
**无法从mmc0读取“/boot/uboot.env”:1 **
失败(-5)
U-Boot 2018.03-00002-g254339602c(2018年3月16日 -  12:36:44 -0500),构建:jenkins-github_Bootloader-Builder-42
CPU:AM335X-GP rev 2.1
I2C:准备好了
DRAM:512 MiB
没有匹配的驱动程序'omap_hsmmc'
没有匹配的驱动程序'omap_hsmmc'
找不到一些司机
复位源:发生了全局外部热复位。
复位源:发生全局热SW复位。
复位源:发生了上电复位。
MMC:OMAP SD / MMC:0,OMAP SD / MMC:1
从EXT4加载环境... **找不到文件/boot/uboot.env **
**无法从mmc0读取“/boot/uboot.env”:1 **
失败(-5)
董事会:BeagleBone Black 
没有设置。
验证第一个E-fuse MAC
BeagleBone Black:
BeagleBone:cape eeprom:i2c_probe:0x54:
BeagleBone:cape eeprom:i2c_probe:0x55:
BeagleBone:cape eeprom:i2c_probe:0x56:
BeagleBone:cape eeprom:i2c_probe:0x57:
净:eth0:MII模式
cpsw,u***_ether
按SPACE可在2秒内中止自动引导
=> setenv serverip 192.168.0.10
=> setenv ipaddr 192.168.0.11
=> tftp 0x80800000 u-boot.bin
链接端口0,速度100,全双工
使用cpsw设备
来自服务器192.168.0.10的TFTP;
我们的IP地址是192.168.0.11
文件名'u-boot.bin'。
加载地址:0x80800000
正在加载:#############################
2.9 MiB / s
DONE
转移的字节数= 422496(67260十六进制)
=>去0x80800000
##在0x80800000启动应用程序...
U-Boot 2018.01-dirty(2018年3月26日 -  16:35:54 +0000)
CPU:AM335X-GP rev 2.1
I2C:准备好了
DRAM:512 MiB

以上来自于谷歌翻译


以下为原文

        @don.carter
Okay looks like i replicated it:
U-Boot SPL 2018.03-00002-g254339602c (Mar 16 2018 - 12:36:44 -0500)Trying to boot from MMC1Loading Environment from EXT4... ** File not found /boot/uboot.env **** Unable to read "/boot/uboot.env" from mmc0:1 **Failed (-5)U-Boot 2018.03-00002-g254339602c (Mar 16 2018 - 12:36:44 -0500), Build: jenkins-github_Bootloader-Builder-42CPU  : AM335X-GP rev 2.1I2C:   readyDRAM:  512 MiBNo match for driver 'omap_hsmmc'No match for driver 'omap_hsmmc'Some drivers were not foundReset Source: Global external warm reset has occurred.Reset Source: Global warm SW reset has occurred.Reset Source: Power-on reset has occurred.MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1Loading Environment from EXT4... ** File not found /boot/uboot.env **** Unable to read "/boot/uboot.env" from mmc0:1 **Failed (-5)Board: BeagleBone Black not set. Validating first E-fuse MACBeagleBone Black:BeagleBone: cape eeprom: i2c_probe: 0x54:BeagleBone: cape eeprom: i2c_probe: 0x55:BeagleBone: cape eeprom: i2c_probe: 0x56:BeagleBone: cape eeprom: i2c_probe: 0x57:Net:   eth0: MII MODEcpsw, u***_etherPress SPACE to abort autoboot in 2 seconds=> setenv serverip 192.168.0.10=> setenv ipaddr 192.168.0.11=> tftp 0x80800000 u-boot.binlink up on port 0, speed 100, full duplexUsing cpsw deviceTFTP from server 192.168.0.10; our IP address is 192.168.0.11Filename 'u-boot.bin'.Load address: 0x80800000Loading: ############################# 2.9 MiB/sdoneBytes transferred = 422496 (67260 hex)=> go 0x80800000## Starting application at 0x80800000 ...U-Boot 2018.01-dirty (Mar 26 2018 - 16:35:54 +0000)CPU  : AM335X-GP rev 2.1I2C:   readyDRAM:  512 MiB
举报

郭雨桐

2018-10-24 20:31:33
可悲的是,wget实现在v2018.03上对我不起作用,它只是硬锁。
我们的GSOC还有一些基于“U-Boot”的microSD / eMMC更新器:   
GitHub上   
ravikp7 /节点小猎犬启动
node-beagle-boot  -  BeagleBone的node.js USB引导加载程序服务器,用于将其引导至大容量存储模式         
GitHub上   
ungureanuvladvictor / BBBlfs
BBBlfs  - 通过USB闪存BeagleBone Black      
虽然它们基于USB启动,但是一旦您进入u-boot,就可以应用相同的更新microSD / eMMC的技术。
问候,

以上来自于谷歌翻译


以下为原文

        Sadly the wget implementation isn’t working for me on v2018.03, it just hard locks.
There’s a couple other “U-Boot” based microSD/eMMC updaters from our GSOC’s:
              GitHub        ravikp7/node-beagle-boot

node-beagle-boot - A node.js USB bootloader server for BeagleBone for booting it into mass storage mode
                              GitHub        ungureanuvladvictor/BBBlfs

BBBlfs - Flash your BeagleBone Black via USB
                While they are based on u*** booting, once your in u-boot the same techniques for updating the microSD/eMMC can be applied.
Regards,
举报

李鑫赢

2018-10-24 20:43:50
谢谢Rob。
node-beagle-boot项目看起来就像我们需要的一切。
我们应该能够轻松访问USB端口。
我们遇到了一个问题。
将图像闪烁到beaglebone后,它会使用node-beagle-boot附带的u-boot版本启动(2015.04,2015年6月7日 -  19:26:11)。
我不确定这是怎么可能的,因为它应该用提供的图像覆盖整个emmc,但我们已经用我们创建的图像和beagleboard.org的图像尝试了它。
该版本的引导加载程序失败,因为它无法找到/ boot / zImage(下面的完整日志):
**找不到文件/ boot / zImage **
找不到内核
我们尝试用更高版本的bootloader(从eewiki和beyondlogic编译)替换node-beagle-boot中的“​​spl”和“uboot”文件,但是应用程序在闪存开始之前就失败了(它似乎在spl中崩溃)。
我们不确定应该使用哪个文件来替换spl(我们尝试了MLO,然后是在spl目录中生成的三个spl文件,它们都没有工作)。
我们会继续挖掘,但如果您有任何想法,我们将不胜感激。
谢谢,

U-Boot 2015。04(2015年6月7日 -  19:26:11) 
看门狗已启用
I2C:准备好了
DRAM:512 MiB
MMC:OMAP SD / MMC:0,OMAP SD / MMC:1
使用默认环境
网:未设定。
验证第一个E-fuse MAC
CPSW
按任意键停止自动引导:0
gpio:引脚53(gpio 53)的值为1
启动USB ...
USB0:端口不可用。
卡没有响应电压选择!
切换到分区#0,好的
mmc1(第0部分)是当前设备
mmc在设备1上找到
检查:/boot/uEnv.txt ...
gpio:引脚54(gpio 54)的值为1
16 ms读取1879字节(114.3 KiB / s)
来自/boot/uEnv.txt的加载环境
检查是否设置了uenvcmd ...
gpio:引脚55(gpio 55)的值为1
**找不到文件/ boot / zImage **
找不到内核
gpio:引脚54(gpio 54)的值为0
gpio:引脚55(gpio 55)的值为0
USB已停止。
请先发出'u*** start'。
USB已停止。
请先发出'u*** start'。
gpio:引脚54(gpio 54)的值为0
gpio:引脚55(gpio 55)的值为0
gpio:引脚56(gpio 56)的值为1
U-Boot的#

以上来自于谷歌翻译


以下为原文

        Thanks Rob.  The node-beagle-boot project looks like it does just about everything we need.  We should be able to get access to the USB port without too much trouble.
We are having one issue with it.  After flashing the image to the the beaglebone, it boots up using the  version of u-boot that comes with node-beagle-boot (2015.04, Jun 07 2015 - 19:26:11).  I’m not sure how that is possible since it is supposedly overwriting the entire emmc with the supplied image, but we have tried it with images we have created and with images from beagleboard.org.  That version of the bootloader fails because it can’t find /boot/zImage (full log appended below):
** File not found /boot/zImage **No kernel foundWe have tried replacing the “spl” and “uboot” files in node-beagle-boot with later versions of the bootloader (compiled from eewiki and beyondlogic), but the application fails before flashing begins (it appears to crash in spl).  We’re not certain which file should be used to replace spl (we tried MLO, then the three spl files generated in the spl directory, none of them worked).
We’ll keep digging, but if you have any ideas it would be appreciated.
Thanks,
Don
U-Boot 2015.04 (Jun 07 2015 - 19:26:11)       Watchdog enabledI2C:   readyDRAM:  512 MiBMMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1Using default environmentNet:    not set. Validating first E-fuse MACcpswHit any key to stop autoboot:  0 gpio: pin 53 (gpio 53) value is 1starting USB...USB0:   Port not available.Card did not respond to voltage select!switch to partitions #0, OKmmc1(part 0) is current devicemmc found on device 1Checking for: /boot/uEnv.txt ...gpio: pin 54 (gpio 54) value is 11879 bytes read in 16 ms (114.3 KiB/s)Loaded environment from /boot/uEnv.txtChecking if uenvcmd is set ...gpio: pin 55 (gpio 55) value is 1** File not found /boot/zImage **No kernel foundgpio: pin 54 (gpio 54) value is 0gpio: pin 55 (gpio 55) value is 0USB is stopped. Please issue 'u*** start' first.USB is stopped. Please issue 'u*** start' first.gpio: pin 54 (gpio 54) value is 0gpio: pin 55 (gpio 55) value is 0gpio: pin 56 (gpio 56) value is 1U-Boot#
举报

更多回帖

发帖
×
20
完善资料,
赚取积分