闪烁的Beaglebone出现自定义图像问题

时间:2019-01-05 16:57:25

标签: debian yocto beagleboneblack u-boot flashing

我正在使用Yocto为我的BeagleBone开发板生成定制的Linux版本。

我可以通过一个外部SD卡将此图像刷新到板上的内部emmc,并且运行良好。为了刷新它,我在开发板启动时按住启动按钮,这会将映像从SD卡刷新到内部emmc存储器中。

但是我现在遇到的一个问题是,如果我想以相同的方式将另一张自定义图像重新刷新到板上,除非我先刷新默认的Debian,否则它不起作用BeagleBone的图像(在BeagleBone网站上提供)。下面是在不同情况下的串行调试输出。

有人知道这是什么问题吗?

我的理解是,由TI提供的ROM引导程序是在板卡启动时首先要执行的事情,并且此代码永不更改。该ROM引导程序检查是否按下了引导按钮,并确定从何处引导。

为什么板上要刷新的是哪个内核版本,为什么重新刷新仅在默认Debian映像加载到我的自定义Yocto映像时才起作用?

在不同情况下启动时,通过串行方式从SPL和U-boot发出的消息:

从内部emmc启动自定义映像的正常输出:

U-Boot SPL 2016.05-g4db46a6bbd (Oct 01 2018 - 11:17:40)
Trying to boot from MMC2
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

U-Boot 2016.05-g4db46a6bbd (Oct 01 2018 - 11:17:40 +0000)

CPU  : AM335X-GP rev 2.1
       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net:   Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc1(part 0) is current device
SD/MMC found on device 1
reading boot.scr
** Unable to read file boot.scr **
reading uenv.txt
750 bytes read in 5 ms (146.5 KiB/s)
Loaded env from uenv.txt
Importing environment from mmc1 ...
Running uenvcmd ...
reading //zImage
9479464 bytes read in 536 ms (16.9 MiB/s)
reading zImage-am335x-bonegreen-wireless.dtb
64415 bytes read in 10 ms (6.1 MiB/s)
debug: [console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk1p2 
rootfstype=ext4 rootwait quiet systemd.show_status=0] ...
debug: [bootz 0x82000000 0x88080000: 0x88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x90a528 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Using Device Tree in place at 88000000, end 88012b9e

Starting kernel ...

[    0.000932] clocksource_probe: no matching clocksources found
[    0.769837] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    1.039034] omap_voltage_late_init: Voltage driver support not added
[    1.046157] PM: Cannot get wkup_m3_ipc handle
[    1.140466] bone_capemgr bone_capemgr: slot #0: No cape found
[    1.171664] bone_capemgr bone_capemgr: slot #1: No cape found
[    1.204470] bone_capemgr bone_capemgr: slot #2: No cape found
[    1.235544] bone_capemgr bone_capemgr: slot #3: No cape found
systemd 219 running in system mode. (-PAM -AUDIT -SELINUX +IMA -APPARMOR 
+SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP 
+BLKID -ELFUTILS +KMOD -IDN)
Detected architecture arm.
Set hostname to <lGW>.
[/lib/systemd/system/sensormagenetic.service:1] Assignment outside of 
section. Ignoring.
[/lib/systemd/system/sensormagenetic.service:2] Assignment outside of 
section. Ignoring.
[/lib/systemd/system/sensormagenetic.service:3] Assignment outside of 
section. Ignoring.
[/lib/systemd/system/routemanager.service:1] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/routemanager.service:2] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/routemanager.service:3] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/button.service:1] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/button.service:2] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/button.service:3] Assignment outside of section. 
Ignoring.
Cannot add dependency job for unit resin-device-uuid.service, ignoring: Unit 
mnt-boot.mount failed to load: No such file or directory.
[   23.746044] wlcore: ERROR could not get configuration binary ti- 
connectivity/wl18xx-conf.bin: -2

Resin OS (resin-os)

将默认Debian图像刷新到自定义图像上(可以正常闪烁):

U-Boot SPL 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
Trying to boot from MMC1
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **

U-Boot 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500), Build: 
jenkins-github_Bootloader-Builder-65

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
Model: SeeedStudio BeagleBone Green Wireless:
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 MODE
Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
board_name=[A335BNLT] ...
board_rev=[GW1A] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2098 bytes read in 79 ms (25.4 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.14.71-ti-r80 ...
10416640 bytes read in 718 ms (13.8 MiB/s)
debug: [enable_uboot_overlays=1] ...

尝试在自定义图片上闪烁自定义图片(不闪烁):

U-Boot SPL 2016.05-g4db46a6bbd (Oct 01 2018 - 11:17:40)
Trying to boot from MMC1
Card doesn't support part_switch
MMC partition switch failed
*** Warning - MMC partition switch failed, using default environment

U-Boot 2016.05-g4db46a6bbd (Oct 01 2018 - 11:17:40 +0000)

CPU  : AM335X-GP rev 2.1
       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net:   Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc1(part 0) is current device
SD/MMC found on device 1
reading boot.scr
** Unable to read file boot.scr **
reading uenv.txt
750 bytes read in 4 ms (182.6 KiB/s)
Loaded env from uenv.txt
Importing environment from mmc1 ...
Running uenvcmd ...
reading //zImage
9479464 bytes read in 535 ms (16.9 MiB/s)
reading zImage-am335x-bonegreen-wireless.dtb
64415 bytes read in 11 ms (5.6 MiB/s)
debug: [console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk1p2 
rootfstype=ext4 rootwait quiet systemd.show_status=0] ...
debug: [bootz 0x82000000 0x88080000: 0x88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x90a528 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Using Device Tree in place at 88000000, end 88012b9e

Starting kernel ...

[    0.000934] clocksource_probe: no matching clocksources found
[    0.769829] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    1.039161] omap_voltage_late_init: Voltage driver support not added
[    1.046307] PM: Cannot get wkup_m3_ipc handle
[    1.140455] bone_capemgr bone_capemgr: slot #0: No cape found
[    1.171521] bone_capemgr bone_capemgr: slot #1: No cape found
[    1.204295] bone_capemgr bone_capemgr: slot #2: No cape found
[    1.236726] bone_capemgr bone_capemgr: slot #3: No cape found
systemd 219 running in system mode. (-PAM -AUDIT -SELINUX +IMA -APPARMOR 
+SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP 
+BLKID -ELFUTILS +KMOD -IDN)
Detected architecture arm.
Set hostname to <lGW>.
[/lib/systemd/system/sensormagenetic.service:1] Assignment outside of 
section. Ignoring.
[/lib/systemd/system/sensormagenetic.service:2] Assignment outside of 
section. Ignoring.
[/lib/systemd/system/sensormagenetic.service:3] Assignment outside of 
section. Ignoring.
[/lib/systemd/system/routemanager.service:1] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/routemanager.service:2] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/routemanager.service:3] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/button.service:1] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/button.service:2] Assignment outside of section. 
Ignoring.
[/lib/systemd/system/button.service:3] Assignment outside of section. 
Ignoring.
Cannot add dependency job for unit resin-device-uuid.service, ignoring: Unit 
home-root-.rnd.mount failed to load: No such file or directory.
[   25.644826] wlcore: ERROR could not get configuration binary ti- 
connectivity/wl18xx-conf.bin: -2

Resin OS (resin-os)

在Debian图像上闪烁自定义图像(这可以正常闪烁):

U-Boot SPL 2016.05-g4db46a6bbd (Oct 01 2018 - 11:17:40)
Trying to boot from MMC1
Card doesn't support part_switch
MMC partition switch failed
*** Warning - MMC partition switch failed, using default environment

U-Boot 2016.05-g4db46a6bbd (Oct 01 2018 - 11:17:40 +0000)

CPU  : AM335X-GP rev 2.1
       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net:   Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading boot.scr
** Unable to read file boot.scr **
reading uenv.txt
750 bytes read in 7 ms (104.5 KiB/s)
Loaded env from uenv.txt
Importing environment from mmc0 ...
Running uenvcmd ...
reading //zImage

0 个答案:

没有答案