Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upLoading U-boot on Raspberry Pi Zero W failed #1157
Comments
|
After updating to firmware with the release tag of 1.20190620 rpi3b also gets stuck in a loop with U-Boot. MMC: mmc@7e202000: 0, mmcnr@7e300000: 1 Resetting CPU ... resetting ... |
|
Although we try not to break existing behaviour, we don't officially support U-boot, so you'll need to provide a set of minimal instructions allowing us to reproduce these boot failures. |
|
U-Boot will be required as long as hardware doesn't ship with UEFI. To reproduce an OpenBSD/arm64 network install disk image can be used https://cdn.openbsd.org/pub/OpenBSD/6.5/arm64/miniroot65.fs This includes U-Boot 2019.01, u-boot.bin is created from rpi_3_defconfig with It includes raspberrypi-firmware-1.20190215 SHA1 (bootcode.bin) = c43d24c2dbed7cad569e82395bfc29461fd3e2db and uses the following config.txt: With serial attached this disk image boots to an OpenBSD install prompt on rpi3b. Replacing bootcode.bin fixup.dat and start.elf with the 1.20190620 versions gets The latest U-Boot master at the time of writing (5eea874b5e989e62519824ad140aa086432d01ee) still has the same problem with the new firmware. |
|
Does this also affect the RaspberryPiPkg UEFI bootloader? |
|
I'm seeing a similar issue with current ubuntu server arm64 builds and this new bootcode.bin, which also use u-boot, on a 3b+. You should be able to write the image at http://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/current/eoan-preinstalled-server-arm64+raspi3.img.xz to a sd card, and replace the bootcode.bin, .dat, and .elf files on the fat boot partition to see a similar boot issue. |
|
Thanks, that helps. I am aware of a possible problem for some platforms in situations where a Device Tree file is not available, but I doubt that would be the case here. |
|
I confirm the problem on RPi3B+ |
|
I hit this issue as well while trying to get u-boot to work on the Pi4. Possible workaround:
|
* Latest Raspberry Pi firmware breaks u-boot on rpi2, rpi3, pizero * rpi2: raspberrypi/firmware#1164 * rpi3: raspberrypi/firmware#1165 * pizero: raspberrypi/firmware#1157
|
So I tested this on Fedora because we saw something similar. It's late and I only had a RPi3A+ to hand. If necessary I can test across RPi2/3B/3B+ too. Testing with firmware "2019-06-21 18:44" with both a ARMv7 and aarch64 image both using U-Boot 2019.04 I got the same result but two slightly different outputs. If I have a HDMI display attached they both boot fine, if I don't I have a crash, the 32 bit is the "CACHE: Misaligned operation", on 64 bit I get the ""Synchronous Abort" handler, esr 0x86000004" RPi3A+ 64 bit, serial console (no display) U-Boot 2019.04: MMC: mmc@7e202000: 0, mmcnr@7e300000: 1 Loading Environment from FAT... *** Warning - bad CRC, using default environment mbox: Header response code invalid bcm2835: Could not configure display "Synchronous Abort" handler, esr 0x86000004 elr: 80000003e2141004 lr : 80000003e2141004 (reloc) elr: 8000000400000004 lr : 8000000400000004 x0 : 000000001dc00000 x1 : 000000001dc00000 x2 : 0000000000000040 x3 : 000000000000003f x4 : 0000000000000008 x5 : 000000001da00701 x6 : ffffffff80800000 x7 : 0000000000000002 x8 : 000000001da00000 x9 : 0000000000000008 x10: 0000000000000000 x11: 0000000000200000 x12: 0000000000000002 x13: 000000001da00000 x14: 0000000000000000 x15: 0000000000000020 x16: 000000001df66844 x17: 0000000000000000 x18: 000000001db3ade8 x19: 0000000000000000 x20: 000000001df671fc x21: 8000000000000020 x22: 0000000800028001 x23: 0000000080000008 x24: 0000000000000001 x25: 000000001db467f0 x26: 000000001db46a30 x27: 0000000000000002 x28: 000000001db46a38 x29: 0004000800000000 Resetting CPU ... resetting ... RPi3A+ 64 bit, serial console (HDMI display) U-Boot 2019.04: boots as expected RPi3A+ 32 bit, serial console (no display) U-Boot 2019.04: MMC: mmc@7e202000: 0, mmcnr@7e300000: 1 Loading Environment from FAT... *** Warning - bad CRC, using default environment mbox: Header response code invalid bcm2835: Could not configure display In: serial Out: vidconsole Err: vidconsole Net: CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00] RPi3A+ 32 bit, serial console (HDMI display) U-Boot 2019.04: boots as expected |
|
To reproduce it's probably enough just to put the U-Boot binary in the VFAT partition and adjust the config.txt. The relevant bits for the Fedora config is basically: 64 bit: [pi3] kernel=rpi3-u-boot.bin # Put the RPi3 into 64 bit mode arm_control=0x200 [all] # Enable UART enable_uart=1 32 bit: [pi2] kernel=rpi2-u-boot.bin [pi3] kernel=rpi3_32-u-boot.bin [all] # Enable UART enable_uart=1 The above U-Boot builds can be found here: https://pbrobinson.fedorapeople.org/rpi-u-boot/ Looking at the output above given it works fine with a HDMI display attached and doesn't without, at least for me (others may be able to confirm whether their configs are headless) I suspect these two lines might be of issue (I don't see them with a display attached): mbox: Header response code invalid bcm2835: Could not configure display |
|
I'm also having the same issue on a Raspberry Pi 3 running Arch Linux Arm aarch64, the following is the serial output during the loop. Just like @nullr0ute I was able to get it to boot by hooking the HDMI to a monitor, then just remove the monitor after a successful boot. I was talking with an individual on Reddit about this problem, but they were not able to get it to boot with a monitor attached, https://www.reddit.com/r/archlinux/comments/c6pzv3/anyone_elses_raspberry_pi_dead/.
|
|
@nullr0ute @GoofySpeed: Can you try the diff I posted? |
|
The video driver in u-boot relies on the mbox interface. I think the problem is the introduction of multi framebuffer support. This possibly resulted in change in the mbox property 0x00040003 (Get physical display width / height) behavior (raspberrypi/linux@4600e91#diff-7434d1db58b58fb45a55de66c12bdc1a). First the documentation of the mbox should be updated and then the video driver in u-boot. |
|
I thought @JamesH65 had retained the old API too. |
|
I don't remember changing that API, and did put in a lot of effort to retain backwards compatibility. I'll check the mbox call. |
|
Cannot see any changes to that specific property. There are additional properties -
which are used for multiframebuffer support. But things should work without using any of those, but perhaps not. I guess will need to debug at the firmware level but not time to set everything up and understand how uboot works to look at that right now. |
|
It seems to work, at least for me, when a display is attached to HDMI, it's when there's no display that things fall apart. |
|
Let me go into more detail what the diff I posted works around. u-boot first queries the "GET_PHYSICAL_W_H" property, but with the newer firmware that fails (response is not u-boot prints an error message but ignores the error. This leads to u-boot using uninitialized values for the width and height, causing the reported cache warnings and aborts. |
|
@Vogtinator Could you please clarify the influence of "HDMI attached or not"? |
|
Hmm, so maybe when no device is attached, there is no default values for width and height and somehow that affects the mbox call. I'll have a quick look. |
|
@Vogtinator I can confirm that your patch allows current firmware to be used to boot a current arm64 build of ubuntu using (patched) u-boot without any attached monitor. On 3B+:
On 3B:
|
|
@Vogtinator Yes, the workaround worked for my Arch Linux Arm aarch64. Thanks Edited: Boot console added
|
Otherwise there is a crash with newer RPi firmware, see raspberrypi/firmware#1157
|
I cannot reproduce on my Pi3B+ with 025759b Same for you guys? |
|
There was a change to ensure composite started up correctly if nothing else did which may have fixed this issue - it would mean if nothing was connected, a composite display would be assumed, which in turn would mean a default framebuffer would be created. |
Otherwise there is a crash with newer RPi firmware, see raspberrypi/firmware#1157
|
The 1.20190709 tagged firmware works with U-Boot on rpi3b. |
adds rpi4 files without breaking U-Boot like 1.20190620 did raspberrypi/firmware#1157
Otherwise there is a crash with newer RPi firmware, see raspberrypi/firmware#1157
Otherwise there is a crash with newer RPi firmware, see raspberrypi/firmware#1157
When probing we query for the width and hight of the display. If the firmware does not report any connected display the system will crash. See raspberrypi/firmware#1157 for details. Signed-off-by: Fabian Vogt <fvogt@suse.com> [mb: update commit message] Signed-off-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Andre Przywara <andre.przywara@arm.com>
When probing we query for the width and hight of the display. If the firmware does not report any connected display the system will crash. See raspberrypi/firmware#1157 for details. Signed-off-by: Fabian Vogt <fvogt@suse.com> [mb: update commit message] Signed-off-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Andre Przywara <andre.przywara@arm.com>
|
When testing RPi4 support with this patch set for U-Boot with the 2019.07 release https://lists.denx.de/pipermail/u-boot/2019-July/378340.html I'm seeing the same crash on a RPi4 4Gb Edition when the display isn't attached using firmware cba4be2 (Jul 15): MMC: emmc2@7e340000: 0, mmcnr@7e300000: 1 Loading Environment from FAT... *** Warning - bad CRC, using default environment mbox: Header response code invalid bcm2835: Could not configure display "Synchronous Abort" handler, esr 0x86000004 elr: 80000003c2116004 lr : 80000003c2116004 (reloc) elr: 8000000400000004 lr : 8000000400000004 x0 : 000000003dc00000 x1 : 000000003dc00000 x2 : 0000000000000040 x3 : 000000000000003f x4 : 0000000000000008 x5 : 000000003da00701 x6 : ffffffff80800000 x7 : 0000000000000002 x8 : 000000003da00000 x9 : 0000000000000008 x10: 0000000000000000 x11: 0000000000200000 x12: 0000000000000002 x13: 000000003da00000 x14: 0000000000000000 x15: 0000000000000020 x16: 000000003df8a8f0 x17: 4293900008300680 x18: 000000003db65de8 x19: 0000000000000000 x20: 000000003df8cad4 x21: 8000000000000020 x22: 0000000800028001 x23: 0000000080000008 x24: 0000000000000001 x25: 000000003db73b50 x26: 000000003db73d10 x27: 0000000000000002 x28: 000000003db73d18 x29: 0004000800000000 Resetting CPU ... resetting ... |
|
Please try to cherry-pick: From the master branch. |
|
It had been fixed in firmware for the rpi3, will take a look |
|
I'm trying this on a rpi4 2gbyte, I have head and 970baf16d1 has been merged, I still get this error. Anybody got any other thoughts? I tried with a monitor attached to hdmi 0 and with it attached to hdmi 1, but I don't have enough mini-hdmi cables to try both. Edit: Wait, I'm confused now, kernel is starting and I'm seeing this in the kernel? Im trying to get 5.2 64 bit Linux working. [19:16:22:846] U-Boot 2020.01-rc3-00082-g4b19b89ca4 (Nov 30 2019 - 18:54:25 -0700)␍␊ |
|
It looks like a different issue, since this is after |
Updating start.elf and bootcode.bin to "firmware: Updates for Pi4" (commit Id: 64b5649) caused "CACHE: Misaligned operation" warning printed in infinite loop during U-boot starting.
Issue not reproduced on firmware from previous commit "kernel: Bump to 4.19.50" (07937c7).
U-boot version: v2019.04.