Я использую Yocto для создания настраиваемой версии Linux для моей платы BeagleBone.
Я могу прошить это изображение во внутренний emmc на плате через внешнюю SD-карту, и оно работает нормально. Чтобы его прошить, я удерживаю кнопку загрузки при загрузке платы, которая мигает образ с SD-карты во внутреннюю память emmc.
Единственная проблема, которая возникает у меня сейчас, заключается в том, что если я захочу повторно перенастроить другое настраиваемое изображение после этого на плату тем же способом, оно не будет работать, если я first не прошиваю образ Debian по умолчанию для BeagleBone (предоставляется на сайте BeagleBone). Последовательные выходные данные отладки в различных сценариях приведены ниже.
Кто-нибудь знает, в чем здесь проблема?
Насколько я понимаю, загрузчик ПЗУ, предоставляемый TI, - это самое первое, что запускается при запуске платы, и этот код никогда не меняется. Этот загрузчик ПЗУ проверяет, нажата ли кнопка загрузки, и решает, откуда загрузиться.
Почему будет иметь значение, какая версия ядра в данный момент мигает на плате, и почему перепрошивка работает только тогда, когда туда загружен образ 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