motioneyeos icon indicating copy to clipboard operation
motioneyeos copied to clipboard

A Single Raspberry Pi 4 4GB Won't Boot dev20201026

Open Matthew1471 opened this issue 4 years ago • 22 comments
trafficstars

Preliminary Docs

I confirm that I have read the CONTRIBUTING guide before opening this issue.

I confirm that I have read the FAQ before opening this issue.

motionEyeOS Version

I am running motionEyeOS version: dev20201026.

Board Model

I am using the following board/model: Raspberry Pi 4 Model B Rev 1.4.

Camera

I am using the following type of camera: (choose from V4L2, MMAL, Network Camera, Fast Network Camera and Simple MJPEG Camera).

My camera model is: None.

Network Connection

My motionEyeOS unit is connected to the network via: WiFi.

Peripherals

I am using the following peripherals that I consider relevant to this issue:

  • Raspberry Pi 4 Official Power Supply

Log Files

I consider the following log files relevant to this issue:

  • None available

Issue

Logging this for info but I have 6 x seemingly identical Raspberry Pis.. on one of them dev20201026 boots REALLY slowly and then crashes and reboots. I have tried the same SD card in other Pis = Fine. I've installed Rasperry Pi OS on a fresh SD = Fine. This is with the identical power supply too.

The only thing that fixed it was taking a newer firmware (start4x.elf, fixup4x.dat) and overwriting (start.elf, fixup.dat).. this problematic device then boots:

[root@meye-f5803d50 ~]# vcgencmd version
Apr 30 2021 13:46:42
Copyright (c) 2012 Broadcom
version d7f29d96450abfc77cd6cf011af1faf1e03e5e56 (clean) (release) (start_x)

So some weird bug must be in the Jul 17 2020 firmware that dev20201026 is bundled with.. that only impacts SOME Raspberry Pi 4 Model B Rev 1.4.

Matthew1471 avatar Jul 10 '21 23:07 Matthew1471

The command you used tells the version of vcgencmd. The command you need is: vcgencmd bootloader_version Which reports for the current stable version: pi@raspi5:~/pi-gen $ vcgencmd bootloader_version Apr 29 2021 17:11:25 version c2f8c388c4ee37ad709ace403467d163e8dd91ce (release) timestamp 1619712685 update-time 1621697261 capabilities 0x0000001f pi@raspi5:~/pi-gen $ Pretty much anything after Sept 2020 should work.

starbasessd avatar Jul 10 '21 23:07 starbasessd

Bootloader is identical on both devices. I left the bootloader alone. This is exclusively fixed by replacing the firmware for some reason..

Matthew1471 avatar Jul 10 '21 23:07 Matthew1471

Works without issue with my Pi4-4GB without grabbing the start4x and fixup4. The issue you will have doing that is the rest of the motionEyeOS won't match, and USB is broken, among other things.

starbasessd avatar Jul 10 '21 23:07 starbasessd

Yep it works fine without grabbing the start4x and fixup4 on 5 devices for me too.. this 6th device it didn't.. I think this might be a firmware bug. I'm going to try grabbing different versions of https://github.com/raspberrypi/firmware/commits so I can tell you which exactly the bug occurs in :)

Matthew1471 avatar Jul 10 '21 23:07 Matthew1471

What firmware? It's a bootloader issue. What does vcgencmd bootloader_version report?

starbasessd avatar Jul 10 '21 23:07 starbasessd

BTW, you will find it nearly impossible to apply any of those updates to a Read-Only file system, that is missing almost all the update functionality found in RPiOS...

starbasessd avatar Jul 10 '21 23:07 starbasessd

Showing the differences between the command you ran vs the command you need to run. pi@raspi1:~ $ vcgencmd version May 27 2021 14:02:15 Copyright (c) 2012 Broadcom version 7d9a298cda813f747b51fe17e1e417e7bf5ca94d (clean) (release) (start) pi@raspi1:~ $ vcgencmd bootloader_version Apr 29 2021 17:11:25 version c2f8c388c4ee37ad709ace403467d163e8dd91ce (release) timestamp 1619712685 update-time 1624989764 capabilities 0x0000001f

starbasessd avatar Jul 10 '21 23:07 starbasessd

What firmware? It's a bootloader issue. It's getting past the bootloader and it's crashing during the kernel.

Raspberry Pi has both bootloader and firmware. The bootloader (which is baked into EEPROM) just gets ready to load the firmware into the VideoCore chip ready to boot the kernel. The firmware is loaded from start4x and fixup4x on the sdcard, see https://www.raspberrypi.org/documentation/configuration/boot_folder.md

What does vcgencmd bootloader_version report?

Apr 29 2021 17:11:25
version c2f8c388c4ee37ad709ace403467d163e8dd91ce (release)
timestamp 1619712685

Same as all of them

Yep I am having to plug the SD card into my laptop and modify the 2 files in /boot.

I'll keep testing so I can let you know which specific firmware fixes it.

Matthew1471 avatar Jul 10 '21 23:07 Matthew1471

Try swapping the power supply between the 2, and when running RPiOS run the commands: vcgencmd get_throttled vcgencmd measure_temp If get_throttled reports anything but 0x0 or measure_temp reports anything over 60`C you have issues.

starbasessd avatar Jul 10 '21 23:07 starbasessd

This is with the identical power supply too.

Already tried the same power supply.. I'm not seeing any throttled.

I am running motioneyeOS on this board and the other 5 cameras. The only thing I am playing with is the firmware files as that seems to alter whether motioneyeOS is bootable on this specific board or not.

I'm excited to find out which firmware bug dev motioneyeOS is hitting.. this should really help us support other people and potentially the issue I saw someone had with a RPi 400

Matthew1471 avatar Jul 11 '21 00:07 Matthew1471

You may want to look at ThingOS and Buildroot for the changes to be applied. https://github.com/ccrisan/thingos/wiki https://github.com/buildroot/buildroot since those are what motionEyeOS is built upon them.

starbasessd avatar Jul 11 '21 00:07 starbasessd

Finished my debugging.

Firmware:

< 17 September 2020 - No Boot => 28 September 2020 - Works

https://github.com/raspberrypi/firmware/commit/f0eab3a24f42c06fb6f2360140a00873c2793b1f

dev20201026 contains firmware Jul 17 2020.. therefore dev20201026 may not run on some Raspberry Pi 4 Model B Rev 1.4 4GB+ boards without replacing the firmware.

Matthew1471 avatar Jul 11 '21 00:07 Matthew1471

Updated Pi Boot.zip Here are the files you can replace in /boot (accessible from Windows as D:\ usually as it's a FAT partition) to ensure you're running the latest and greatest firmware:

Jun 29 2021 16:01:08
Copyright (c) 2012 Broadcom
version 7f92ceab26a7aafcd932fb9ffe85d21ec112eb15 (clean) (release) (start_x)

I'm also noticing a significant performance increase!

Matthew1471 avatar Jul 11 '21 01:07 Matthew1471

Created USB boot device using dev20201026 for Pi4 modified cmdline.txt from mmcblk0p2 to sda2 copied your uncompressed zipped /boot files to /boot copied my wpa_supplicant.conf and ssh.txt files to /boot ejected and inserted to Pi4-4GB with current bootloader Boot performance is drastically slower, than same setup (minus your zipped files) for both USB and SDCard on my 2 Pi4-4GB. Will test on my Pi4-8GB shortly.

starbasessd avatar Jul 11 '21 17:07 starbasessd

Further on 4-4GB, ssh performance is almost nonexistent. top display takes 3-5 seconds, and refreshes are likewise slow/delayed. Haven't even bothered to install my cameras.

starbasessd avatar Jul 11 '21 17:07 starbasessd

On my Pi4-8GB it does work as normal. Both on bootup, and into ssh session. Reboot, and system is corrupted. Will research further, but I believe it has to do with the USB issues found with other fixup and start replacements.

starbasessd avatar Jul 11 '21 17:07 starbasessd

@ccrisan I believe this maay be another good reason to run a new build for dev & release.

starbasessd avatar Jul 11 '21 17:07 starbasessd

Will do, as soon as I get some spare time.

ccrisan avatar Jul 11 '21 19:07 ccrisan

Just to confirm I'm seeing the same issue with a newly purchased Pi 4 8GB.

klcampbell6502 avatar Sep 19 '21 19:09 klcampbell6502

You need to update the rpi-eeprom to something from this year (Apr 2021 is latest)

Raspberry Pi Imager provides a GUI for updating the bootloader and selecting the boot mode.

Download Raspberry Pi Imager

Select a spare SD card. The contents will get overwritten!

Launch Raspberry Pi Imager

Select Misc utility images under Operating System

Select Bootloader

Select a boot-mode i.e. SD (recommended), USB or Network.

Select SD card and then Write

Boot the Raspberry Pi with the new image and wait for at least 10 seconds.

The green activity LED will blink with a steady pattern and the HDMI display will be green on success.

Power off the Raspberry Pi and remove the SD card.

Using raspi-config to update the bootloader

To change the boot-mode or bootloader version from within Raspberry Pi OS run raspi-config

Update Raspberry Pi OS to get the latest version of the rpi-eeprom package.

Run sudo raspi-config

Select Advanced Options

Select Bootloader Version

Select Default for factory default settings or Latest for the latest stable bootloader release.

Reboot

starbasessd avatar Sep 19 '21 19:09 starbasessd

You need to update the rpi-eeprom to something from this year (Apr 2021 is latest)

Raspberry Pi Imager provides a GUI for updating the bootloader and selecting the boot mode.

Download Raspberry Pi Imager

Select a spare SD card. The contents will get overwritten!

Launch Raspberry Pi Imager

Select Misc utility images under Operating System

Select Bootloader

Select a boot-mode i.e. SD (recommended), USB or Network.

Select SD card and then Write

Boot the Raspberry Pi with the new image and wait for at least 10 seconds.

The green activity LED will blink with a steady pattern and the HDMI display will be green on success.

Power off the Raspberry Pi and remove the SD card.

Using raspi-config to update the bootloader

To change the boot-mode or bootloader version from within Raspberry Pi OS run raspi-config

Update Raspberry Pi OS to get the latest version of the rpi-eeprom package.

Run sudo raspi-config

Select Advanced Options

Select Bootloader Version

Select Default for factory default settings or Latest for the latest stable bootloader release.

Reboot

I followed the instructions to create and boot from an SD based bootloader, but it made no difference to the problem seen.

I then copied the updated files to my SD card and tried to boot again, but still see the message that "Start4.elf : is not compatible", and am instructed to get a newer version of the software. I note that supplied .zip does not include a replacement for start4.elf, just start.elf.

klcampbell6502 avatar Sep 20 '21 14:09 klcampbell6502

Using the RaspberryPiOS: vcgencmd bootloader_version rpi-eeprom-update report results for both commands Also, on the PRi4-8GB make sure you are using motionEyeOS dev20201026 and not 20200606

starbasessd avatar Sep 20 '21 15:09 starbasessd