Patrick76 wrote: ↑
Sun Apr 08, 2018 6:10 pm
Why it is necessary to switch manually PINN's firmware before (or after ) changing SD-card between Pi 0123 and Pi 3+ hardware?
Is this process also necessary with the actual NOOBS-version?
Addressing your 2nd question first, NOOBS does not switch firmware, so this is purely PINN related.
OK, so back to your first question... There are 2 main issues here which make it a bit complicated.
Firstly, since the RPi3B+ has slightly different hardware to the other models, it requires different (newer) firmware that knows how to interface with it. This firmware will run quite happily on ALL RPi models, so PINN is distributed with the NEW firmware to work on all models.
Secondly, in order to multi-boot, The RPi will first run bootcode.bin from the PINN recovery partition, which will then run start.elf from the desired OS partitition, which will then load the kernel and rootfs. But bootcode.bin, start.elf and the kernel need to be compatible with each other in order for this to work. During the evolution of the RPi, there seems to have been a couple of occasions where some inevitable differences have arisen. (This is just me paraphrasing for a simple explanation).
PINN supports about 50 different OS versions (if you include all the variants for the different models). A lot of these were produced before the RPi3B+ was known about, and some a lot longer ago than that. So some of them have very old firmware that is not compatible with the latest firmware and they will not boot when launched from PINN's latest bootcode.bin.
So my solution is to downgrade PINN's firmware when it detects it is being run on a RPi model other than the 3B+ for the first time. This means it can continue to install and boot all the old OSes on the older models. On the RPi3B+, it will keep the new firmware to be able to run on the 3B+ and load the latest OSes that are suitable for it.
If you try to run older firmware on the 3B+. you will just get the rainbow screen with a lightning bolt and 4 quick followed by 4 long flashes of the red power led. (See many forum posts). Now it should be clear that if PINN is used on an older model and had its firmware downgraded, when it is put in a 3B+, it will not work as its firmware is no longer suitable for the 3B+. Therefore it is necessary to put the PINN SD card back in an older model and upgrade the firmware before putting it in a 3B+.
Automatic downgrading only works once. So if you constantly switch from a 3B+ to another RPi model, you must manually change the firmware to match.
It is possible to run the new firmware on the older RPi models by manually upgrading it, but most of the older OSes will not be compatible with the new bootcode.bin. So, PINN will attempt to upgrade the firmware of these OSes to allow them to work. This may or may not be successful in all cases, so the `nofirmware` cmdline option has been added to disable this upgrading.
Sorry if this sounds complicated. When all the OSes get upgraded to use the latest firmware, this firmware switching will no longer be necessary.