Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to boot with latest firmware on RPI4 #1467

Closed
Nopel2020 opened this issue Sep 15, 2020 · 47 comments
Closed

Unable to boot with latest firmware on RPI4 #1467

Nopel2020 opened this issue Sep 15, 2020 · 47 comments

Comments

@Nopel2020
Copy link

Nopel2020 commented Sep 15, 2020

On a RPI4 with 4GB with the latest kernel (5.4.65-V8+) and the latest firmware (086d9d9) my RPI4 freezes on the rainbow screen.

The only files from the firmware I'm using are fixup4cd.dat and start4cd.elf. After replacing just these two files with the ones from the latest commit before that (a490197), the RPI4 is booting normally again.

With the latest firmware files, the freeze is reproduceable.

  • Which model of Raspberry Pi?
    RPI4, 4GB

  • Which OS and version (cat /etc/rpi-issue)?
    64bit Debian Buster with self-compiled 64bit 5.4.65 kernel (but I don't think this is relevant, the Pi freezes before it loads anything from the OS)

@pelwell
Copy link
Contributor

pelwell commented Sep 15, 2020

I don't think this is relevant, the Pi freezes before it loads anything from the OS

What makes you say that? Are you capturing the output from the firmware over the UART?

@Nopel2020
Copy link
Author

Because it freezes on the rainbow screen. Does it load anything from the OS while the rainbow screen is still visible?

@pelwell
Copy link
Contributor

pelwell commented Sep 15, 2020

Yes - it's hard for the kernel to display raspberries and start to output messages until its been loaded.

@pelwell
Copy link
Contributor

pelwell commented Sep 15, 2020

Do you have any custom settings in config.txt?

@mikey1963
Copy link

mikey1963 commented Sep 15, 2020 via email

@Nopel2020
Copy link
Author

Ah ok, sorry, then I'm not sure if it's loading something from the OS.

This is my full config.txt:
gpu_mem=16
hdmi_ignore_cec=1
hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=4
initramfs initrd8.img followkernel

@pelwell
Copy link
Contributor

pelwell commented Sep 15, 2020

@mikey1963 are you also an initramfs user?

@mikey1963
Copy link

mikey1963 commented Sep 15, 2020 via email

@pelwell
Copy link
Contributor

pelwell commented Sep 15, 2020

Oh well - we'll investigate tomorrow.

@Nopel2020
Copy link
Author

Using the next-to-last firmware files is a workaround, so no rush. Thanks for looking into this!

@pelwell
Copy link
Contributor

pelwell commented Sep 15, 2020

I have to - that commit has my fingerprints all over it.

@mikey1963
Copy link

mikey1963 commented Sep 15, 2020 via email

@Nopel2020
Copy link
Author

FWIW, I'm running the exact same setup on an RPI3B, and almost identical (but 32bit) on an old RPI1 and some RPI0Ws. They are all booting fine, only the RPI4 is affected.

@pelwell
Copy link
Contributor

pelwell commented Sep 15, 2020

If it's the change I think it is then the code path is only visited when arm_64bit=1, but the 64-bit 3B non-failure is an interesting data point.

@yvoy
Copy link

yvoy commented Sep 16, 2020

Same issue on RPI4 , need to temporaly disable arm_64bit=1

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

Problem identified - sorry folks. Luckily, in the process of fixing this I spotted a corner case that also wouldn't have worked. I'll comment again when the fix is available.

popcornmix added a commit that referenced this issue Sep 16, 2020
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Sep 16, 2020
@popcornmix
Copy link
Contributor

Fix should be in latest rpi-update firmware - please test and report if issue is resolved.

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

Thanks, @popcornmix.

@by
Copy link

by commented Sep 16, 2020

Fix should be in latest rpi-update firmware - please test and report if issue is resolved.

Confirmed: it does work now.

@mikey1963
Copy link

mikey1963 commented Sep 16, 2020 via email

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

If you're feeling brave you can now gzip your kernel8.img:

$ sudo gzip -k /boot/kernel8.img
$ sudo mv /boot/kernel8.img{,.orig}
$ sudo mv /boot/kernel8.img{.gz,}

@tomty89
Copy link

tomty89 commented Sep 16, 2020

@pelwell It still fails to load u-boot in ArchLinuxARM (aarch64)

@vbauerster
Copy link

Can confirm that RPI3B+ affected as well.

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

Can confirm that RPI3B+ affected as well.

With U-boot or a Linux kernel?

@vbauerster
Copy link

There is just a rainbow screen no any kernel boot messages, that's all I know.

@Nopel2020
Copy link
Author

Original poster here. I can confirm that it's working on my RPI4 (and also on my RPI3B, (not 3B+)). Thanks!

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

@vbauerster When did you install the update?

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

@vbauerster A few more questions:

  1. Are you using a Raspberry Pi OS image?
  2. Have you customised config.txt in any way?
  3. If you can put the SD card in another device, how large (in bytes) is start.elf?

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

@tomty89 Are you definitely running the latest firmware? What does strings start.elf | grep VC_BUILD show?

What do you have in config.txt? (You ignore comments and blank lines)

@graysky2
Copy link

@pelwell - The raspberrypi-firmware package for Arch ARM is currently supplying 525f1eb

It is my understanding that the only time it needs to be updated is if there are changes to anything under https://github.com/raspberrypi/firmware/tree/master/hardfp/opt/vc ... Please correct me if I am mistaken.

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

That's correct - if it works for you, stick with it. Only the brave and the foolish take every update that comes along.

@graysky2
Copy link

graysky2 commented Sep 16, 2020

@pelwell - For Arch ARM as of today:

On Arch ARM armv7h, RPi4 boots fine.
On Arch ARM aarch64, RPi4 does NOT boot. I too only see the rainbow screen which does not go away.

% strings /boot/start.elf | grep VC_BUILD
VC_BUILD_ID_USER: dom
VC_BUILD_ID_TIME: 11:12:26
VC_BUILD_ID_VARIANT: start
VC_BUILD_ID_TIME: Sep 16 2020
VC_BUILD_ID_BRANCH: bcm2711_2
VC_BUILD_ID_HOSTNAME: buildbot
VC_BUILD_ID_PLATFORM: raspberrypi_linux
VC_BUILD_ID_VERSION: 0368c5cfa664e0534e5428dc45ac2a972802159c (clean)

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

What does Arch put in its config.txt? Until we understand why you and some others are still affected I suggest you revert your raspberrypi-bootloader package to a490197.

@xvanc
Copy link

xvanc commented Sep 16, 2020

On a fresh install just "enable_uart=1".
A user on the forum is reporting that it hangs after a message from systemd saying "A start job is running for /dev/mmcblk0".

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

@thisisnotev A fresh install of what?

@xvanc
Copy link

xvanc commented Sep 16, 2020

@pelwell ArchLinux ARM, aarch64

@graysky2
Copy link

Until we understand why you and some others are still affected I suggest you revert your raspberrypi-bootloader package to a490197.

For Arch ARM users of aarch64, the corresponding package is raspberrypi-bootloader-20200911-1 which boots just fine.

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2020

What does Arch call its 64-bit kernel image?
Does including arm_64bit=1 in config.txt make it work?

@tomty89
Copy link

tomty89 commented Sep 17, 2020

@pelwell Image and Image.gz (the former is used AFAIK). kernel8.img is u-boot.

@vbauerster
Copy link

vbauerster commented Sep 17, 2020

@pelwell

When did you install the update?

Yesterday.

Are you using a Raspberry Pi OS image?

No, I use Arch linux.

Have you customised config.txt in any way?

No, I have not.

If you can put the SD card in another device, how large (in bytes) is start.elf?

I already restored from backup, so cannot check.

PS: I actually referred to this issue via this post.

@vbauerster
Copy link

Still "bricking" device with bootloader 20200916-1
Screenshot-2020-09-17-at-11-16-36.png

@pelwell
Copy link
Contributor

pelwell commented Sep 17, 2020

There's clearly something different about Arch that is triggering the boot failure. I'm installing the 64-bit Arch to test it.

@pelwell
Copy link
Contributor

pelwell commented Sep 17, 2020

I think I've got this: Arch uses U-boot as its kernel8.img, and U-boot doesn't include the ARM64 header used by the Linux kernel. An unintentional result of this was to change the load address of the image, which U-boot doesn't like - it's either not position-independent code or it ended up clashing with other resources. The fix is in the internal repo and will be in the next rpi-update release. In the meantime you can work around the issue (for testing purposes) by adding kernel_address=0x80000 to config.txt.

@ghost
Copy link

ghost commented Sep 17, 2020

I think I've got this: Arch uses U-boot as its kernel8.img, and U-boot doesn't include the ARM64 header used by the Linux kernel. An unintentional result of this was to change the load address of the image, which U-boot doesn't like - it's either not position-independent code or it ended up clashing with other resources. The fix is in the internal repo and will be in the next rpi-update release. In the meantime you can work around the issue (for testing purposes) by adding kernel_address=0x80000 to config.txt.

I can confirm this workaround enables a previously non-booting aarch64 install to boot (Raspberry Pi 4 1GB RAM).

popcornmix added a commit that referenced this issue Sep 17, 2020
See: #1467

firmware: ilcamera: Disable timeouts on trigger sink devices
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Sep 17, 2020
See: raspberrypi/firmware#1467

firmware: ilcamera: Disable timeouts on trigger sink devices
@popcornmix
Copy link
Contributor

Latest rpi-update firmware has the fix for kernel_address.

@graysky2
Copy link

graysky2 commented Sep 17, 2020

@pelwell @popcornmix - Thank you both for the rapid engagement to detect and fix this. I can confirm that 7b99da7 fixes the issue on Arch ARM RPi4 (aarch64); I just updated Arch ARM's bootloader package. Safe to close this ticket from my perspective.

@pelwell
Copy link
Contributor

pelwell commented Sep 17, 2020

Thanks - I don't plan to make any further changes in this area for a while...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants