I’m getting a very strange behaviour:
- When the UART is not enabled (like default
config.txt), then the system does NOT boot. *Specifically, my
config.txthas
enable_uart=1` commented out.*
- When the UART is enabled (
enable_uart=1
in config.txt
file), then the system boots OK.
Before running docker-mender-convert
again, I pruned all my docker image layers/resources and then reran ‘docker-build’ (to build the mender-convert container image) at the current HEAD of branch 2.3.x
.
I ran ‘docker-mender-convert’ this against RaspiOS Lite 2021-01-11
.
With the UART enabled, I was able to boot the system. I then used rpi-eeprom-config
to set BOOT_UART=1
in the EEPROM configuration, so that I could try and capture some console output to try and see what was happening (see below):
I’ve been using my old bus-pirate (with its 3.3V UART) to attach to the primary UART (GPIO 14/15) - captured logs are below.
Default non-booting (enable_uart=1
commented out):
PM_RSTS: 0x00001000
RPi: BOOTLOADER release VERSION:c305221a DATE: Sep 3 2020 TIME: 13:11:46 BOOTMODE: 0x00000006 part: 0 BUILD_TIMESTAMP=1599135103 0xdf179f44 0x00d03114
uSD voltage 3.3V
Initialising SDRAM 'Micron' 32Gb x2 total-size: 64 Gbit 3200
VLI: HUB2: 0xfff00000 0x24e6 MCU: 0xfff20000 0x15218
VL805 0xfff00000 0xfff20000
XHCI-STOP
xHC ver: 256 HCS: 05000420 fc000031 00e70004 HCC: 002841eb
xHC ports 5 slots 32 intrs 4
Boot mode: SD (01) order 0
SD HOST: 250000000 CTL0: 0x00000000 BUS: 100000 Hz actual: 100000 HZ div: 2500 (1250) status: 0x1fff0000 delay: 1080
SD HOST: 250000000 CTL0: 0x00000f00 BUS: 100000 Hz actual: 100000 HZ div: 2500 (1250) status: 0x1fff0000 delay: 1080
CID: 00275048534431364730014148f60122
CSD: 400e00325b590000737f7f800a400000
SD: bus-width: 4 spec: 2 SCR: 0x02358002 0x01000000
SD HOST: 250000000 CTL0: 0x00000f04 BUS: 50000000 Hz actual: 41666666 HZ div: 6 (3) status: 0x1fff0000 delay: 2
MBR: 0x00006000, 524288 type: 0x0c
MBR: 0x00086000,14327808 type: 0x83
MBR: 0x00e30000,14327808 type: 0x83
MBR: 0x01bda000, 1048576 type: 0x83
lba: 24576 oem: 'mkfs.fat' volume: ' boot '
rsc 32 fat-sectors 4033 c-count 516190 c-size 1 r-dir 2 r-sec 0
PM_RSTS: 0x00001000
Partition: 0
lba: 24576 oem: 'mkfs.fat' volume: ' boot '
rsc 32 fat-sectors 4033 c-count 516190 c-size 1 r-dir 2 r-sec 0
Read config.txt bytes 1800 hnd 0x00005ef5 hash '6910d15434027841'
recover4.elf not found (6)
recovery.elf not found (6)
Read start4.elf bytes 2215776 hnd 0x0000d407 hash '906e34e8700956d7'
Read fixup4.dat bytes 5429 hnd 0x000003f8 hash '1d0725a9904ebc93'
0x00d03114 0x00000000 0x0000003f
MEM GPU: 76 ARM: 948 TOTAL: 1024
Starting start4.elf @ 0xfec00200 partition 0
<NO FURTHER OUTPUT>
Booting OK (enable_uart=1
enabled):
PM_RSTS: 0x00001000
RPi: BOOTLOADER release VERSION:c305221a DATE: Sep 3 2020 TIME: 13:11:46 BOOTMODE: 0x00000006 part: 0 BUILD_TIMESTAMP=1599135103 0xdf179f44 0x00d03114
uSD voltage 3.3V
Initialising SDRAM 'Micron' 32Gb x2 total-size: 64 Gbit 3200
VLI: HUB2: 0xfff00000 0x24e6 MCU: 0xfff20000 0x15218
VL805 0xfff00000 0xfff20000
XHCI-STOP
xHC ver: 256 HCS: 05000420 fc000031 00e70004 HCC: 002841eb
xHC ports 5 slots 32 intrs 4
Boot mode: SD (01) order 0
SD HOST: 250000000 CTL0: 0x00000000 BUS: 100000 Hz actual: 100000 HZ div: 2500 (1250) status: 0x1fff0000 delay: 1080
SD HOST: 250000000 CTL0: 0x00000f00 BUS: 100000 Hz actual: 100000 HZ div: 2500 (1250) status: 0x1fff0000 delay: 1080
CID: 00275048534431364730014148f60122
CSD: 400e00325b590000737f7f800a400000
SD: bus-width: 4 spec: 2 SCR: 0x02358002 0x01000000
SD HOST: 250000000 CTL0: 0x00000f04 BUS: 50000000 Hz actual: 41666666 HZ div: 6 (3) status: 0x1fff0000 delay: 2
MBR: 0x00006000, 524288 type: 0x0c
MBR: 0x00086000,14327808 type: 0x83
MBR: 0x00e30000,14327808 type: 0x83
MBR: 0x01bda000, 1048576 type: 0x83
lba: 24576 oem: 'mkfs.fat' volume: ' boot '
rsc 32 fat-sectors 4033 c-count 516190 c-size 1 r-dir 2 r-sec 0
PM_RSTS: 0x00001000
Partition: 0
lba: 24576 oem: 'mkfs.fat' volume: ' boot '
rsc 32 fat-sectors 4033 c-count 516190 c-size 1 r-dir 2 r-sec 0
Read config.txt bytes 1799 hnd 0x00005eed hash '68ca07b419dcf6ab'
recover4.elf not found (6)
recovery.elf not found (6)
Read start4.elf bytes 2215776 hnd 0x0000d407 hash '906e34e8700956d7'
Read fixup4.dat bytes 5429 hnd 0x000003f8 hash '1d0725a9904ebc93'
0x00d03114 0x00000000 0x0000003f
MEM GPU: 76 ARM: 948 TOTAL: 1024
Starting start4.elf @ 0xfec00200 partition 0
U-Boot 2020.01-g83cf4883ec (Mar 09 2021 - 08:12:31 +0000)
DRAM: 3.9 GiB
RPI 4 Model B (0xd03114)
MMC: mmcnr@7e300000: 1, emmc2@7e340000: 0
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
568 bytes read in 49 ms (10.7 KiB/s)
## Executing script at 02400000
switch to partitions #0, OK
mmc0 is current device
...
Also, I tried setting config.txt
options start_file=start4db.elf
and fixup_file=fixup4db.dat
, but this doesn’t yield anything different in the console output.
If I understand the RPi4 UART configuration correctly:
- There are 6 UARTs (5 x PL011, 1 x ‘mini UART’), and the “primary UART” is connected to GPIO 14/15.
- The “primary UART” is of type ‘mini UART’, which is disabled by default.
- The ‘mini UART’ type requires a fixed VPU core clock frequency, and setting
enable_uart=1
sets the GPU core clock to 250 MHz.
Could this (the GPU variable clock) be a factor?
A colleague of mine also sees this behaviour (with the same mender-converted image) on his RPi4 - i.e. that setting enable_uart=1
allows the system to boot OK. So for now we can continue developing, but it would be good to know what’s causing this behaviour.
Thanks again for all your help!