pinn icon indicating copy to clipboard operation
pinn copied to clipboard

P3.9.7 doesn't work on D0 stepping CPUs

Open procount opened this issue 5 months ago • 23 comments

Raspberry Pi 5 Rev 1.1. 16GB, PINN 3.9.7 doesn't boot:

Image

procount avatar Jul 20 '25 17:07 procount

@fprietog - Could you please try 3.9.5 from https://sourceforge.net/projects/pinn/files/archive/pinn-395.zip/download

procount avatar Jul 20 '25 17:07 procount

@fprietog - Could you please try 3.9.5 from https://sourceforge.net/projects/pinn/files/archive/pinn-395.zip/download

Yes, it works with the same problem of previous versions: the selected OS takes one minute to start booting, like if it's waiting some kind of timeout.

Apart from that it works, I can enter in PINN and select any of the bootable OSs. Also noticed that it identify itself as 3.9.4.1 instead of 3.9.5.

fprietog avatar Jul 20 '25 18:07 fprietog

Thank you for helping me narrow down the issue and help find where things went wrong. I am rebuilding another version if you wouldn't mind trying it out for me? Probably some more versions after that.... It can take several hours to rebuild, but I'll post here when it is done.

procount avatar Jul 20 '25 19:07 procount

Yep, I'll try the test versions. I'm sure you'll find what happened :)

fprietog avatar Jul 20 '25 19:07 fprietog

Include bcm2712d0.dtbo in overlays folder so that D0 has the correct pinctrl mappings to avoid kernel panic. Make sure the main .dtb files are new enough to reference it. It would be good to include the other missing bcm2712 .dtb files for CM5 and Pi 500 in the folder as well. I think that bcm2712d0-rpi-5-b.dtb may be the default for the 2GB model, but I’m not sure. For other models the combo would be the standard .dtb plus overlay.

NumberOneGit avatar Jul 21 '25 15:07 NumberOneGit

Include bcm2712d0.dtbo in overlays folder so that D0 has the correct pinctrl mappings to avoid kernel panic.

I'm not sure that is the answer (unless you have tried it successfully). The bcm2712 D0 stepping CPUs are all 64-bit, and in PINN this means they will use the overlays6 folder not overlays. bcm2712d0.dtb0 already exists there. I do need to check the dtb files though as there are some differences there.

procount avatar Jul 21 '25 23:07 procount

Include bcm2712d0.dtbo in overlays folder so that D0 has the correct pinctrl mappings to avoid kernel panic.

This doesn't work, at least for me.

I've changed cmdline.txt to loglevel=8 to get more info at boot:

Image

Look at the list of the filesystems tried to mount root: ext3, ext2, ext4, vfat, msdos and f2fs... There is no squashfs in the list.

Maybe the kernel for PINN 3.9.7 was built without squashfs support, or maybe the ability to mount it as root was disabled...

This lead me to think that maybe the image of PINN 3.9.7 published is wrong. Has this concrete image published been tested in any Raspberry Pi 5 (or 4)?. After publishing I mean.

fprietog avatar Jul 22 '25 00:07 fprietog

I've also googled for the "No filesystem could mount, tried" message and I've found that a failed unzip of the root fs can lead to it.

As I saw that you've updated pigz version, may this new version be faulty with D0 processor? You may built PINN 3.9.7 with old pigz version to try...

fprietog avatar Jul 22 '25 01:07 fprietog

If for now you try “device_tree=bcm2712d0-rpi-5-b.dtb” in config.txt do you still get the panic? You’re right, I hadn’t checked the overlay6. Looking over the specific messages, it’s also different than the panic I was thinking of.

NumberOneGit avatar Jul 22 '25 01:07 NumberOneGit

If for now you try “device_tree=bcm2712d0-rpi-5-b.dtb” in config.txt do you still get the panic?

Yes, same panic.

Here is a fix: I've just replaced kernel8.img shipped in 3.9.7 with kernel8.img shipped in 3.9.5... and now 3.9.7 works (with the minute delay at OS boot as previous versions):

Image

So: 3.9.5 kernel8.img md5sum: 07e97afd4e07f1b3da231634be42b8f3 OK 3.9.7 kernel8.img md5sum: 298fddb7e495b407536cce678a5f87d1 BAD

Maybe squashfs support has been dropped/broken in newest kernels...

fprietog avatar Jul 22 '25 08:07 fprietog

Great! Thanks for finding a solution. Now I just have to find out why it went wrong... It worked on my pi5.

procount avatar Jul 22 '25 09:07 procount

@fprietog - could you raise the "minute delay before booting OS" as a separate issue, so it doesn't get forgotten? Please include steps to reproduce the issue & any configuration settings like forcetrigger being set.

procount avatar Jul 22 '25 09:07 procount

Great! Thanks for finding a solution. Now I just have to find out why it went wrong... It worked on my pi5.

Another difference between kernels is that newer PINN 3.9.7 kernel is 16k.

I'll test this PINN/kernel in a Raspberry Pi 4 that I'll borrow later.

@fprietog - could you raise the "minute delay before booting OS" as a separate issue, so it doesn't get forgotten? Please include steps to reproduce the issue & any configuration settings like forcetrigger being set.

Ok, I'll do it. I'll try to include as much info I can because it just happened, there are no errors shown in dmesg or something like this.

fprietog avatar Jul 22 '25 09:07 fprietog

@procount I've borrowed a Raspberry Pi 4 Rev 1.4 8GB.

PINN 3.9.7 doesn't boot. Same kernel Panic than Raspberry Pi 5 16 GB:

Image

I've changed loglevel to 8 and even used a freshly formatted SD card instead of my SSD drive. So problem is not D0 related.

I seriously think that the published PINN 3.9.7 image is broken.

I know 3.9.7 is working for you... But, have you tried the Github 3.9.7 published image? Maybe you are using a different build than the published one.

Edit: replacing kernel8.img with the 3.9.5 one solved the problem for the Raspberry Pi 4 Too.

Also I'm using the latest bootloader available versions in both machines: 20250717.

fprietog avatar Jul 22 '25 14:07 fprietog

Thanks for the report. I'll probably just replace the kernel and reissue 3.9.7 for now and will try to sort out the build later as I will have little time over the next couple of weeks.

procount avatar Jul 22 '25 14:07 procount

Please try https://sourceforge.net/projects/pinn/files/archive/pinn-397a.zip/download

procount avatar Jul 22 '25 18:07 procount

Please try https://sourceforge.net/projects/pinn/files/archive/pinn-397a.zip/download

Just tested in "Rpi 5 16GB" and "Rpi 4 8GB", both working as expected* 👍

*just the one minute delay in the Rpi 5. I've opened another issue as we talked before but I think that it should be very difficult to fix unless you can reproduce it as no errors are shown.

fprietog avatar Jul 22 '25 19:07 fprietog

I have updated the image version available in RPi Imager. Could you please try installing 3.9.7 from there too.

procount avatar Jul 23 '25 08:07 procount

I have updated the image version available in RPi Imager. Could you please try installing 3.9.7 from there too.

3.9.7 via RPi Imager tested in "Rpi 5 16GB" and "Rpi 4 8GB", both working.

fprietog avatar Jul 23 '25 08:07 fprietog

I have currently pulled 3.9.7 as a bad build. If you've got it working you can continue if you want, otherwise please revert to 3.9.3.

To revert:

  1. take a backup copy of config.txt and cmdline.txt from PINN's RECOVERY partition.
  2. Delete all files on PINN's RECOVERY partition.
  3. Download v3.9.3 from https://sourceforge.net/projects/pinn/files/pinn64/pinn-lite.zip/download
  4. unzip all the contents to the RECOVERY partition.
  5. Restore your backup of cmdline.txt and config.txt
  6. If you are paranoid, double-check cmdline.txt has no mention of runinstall in it.
  7. Reboot into PINN.
  8. In the rare event you get asked to format your drive - don't! Otherwise you will lose your existing OSes.

procount avatar Aug 07 '25 11:08 procount

I followed above instruction for my RPi 5 16GB, it simply hangs every time it boots. Is there any other workaround which works on all RPi5 flavors ?

smkrish007 avatar Aug 09 '25 21:08 smkrish007

In my RPi 5 16GB it seems to hang but it really take 1 minute to start the boot of the selected OS. Maybe it's the same for you, wait a minute.

Here is the description of this issue: https://github.com/procount/pinn/issues/919

fprietog avatar Aug 09 '25 21:08 fprietog

If you mean it "hangs" after PINN's splash screen is shown at about the time that the network is being established, then this is a known bug with PINN on the Pi5 - See #770. This looks like an issue with Qt4.7 and the 64-bit kernel. It may need a complete redesign to use the later Qt version to work around this. For now, it is necessary to pull the power and reconnect until it works.

EDIT: One thing that sometimes works is to press Ctrl-Alt-F2 as soon as the splash screen comes up and it starts initialising. Wait for about 10 secs until the network is established, then return to PINN's GUI with Ctrl-ALt-F1.

procount avatar Aug 09 '25 21:08 procount