The Pi4 devices (Pi4, CM4, Pi400) use an internal 8-pin GPIO header to control some firmware features including wifi and bluetooth. Initially these are set up by the broadcom bootloader, but after kexec (which the balena bootloader uses), they are all reset to zeroes. This means wifi and bluetooth "disappear" after kexec.
This patch adds an initrd scripts that reads the GPIO pin values before kexec and appends them as an extra kernel argument. After kexec, it reads the kernel argument and restores the pin values to what they originally were.
The Pi4 devices (Pi4, CM4, Pi400) use an internal 8-pin GPIO header to control some firmware features including wifi and bluetooth. Initially these are set up by the broadcom bootloader, but after kexec (which the balena bootloader uses), they are all reset to zeroes. This means wifi and bluetooth "disappear" after kexec.
This patch adds an initrd scripts that reads the GPIO pin values before kexec and appends them as an extra kernel argument. After kexec, it reads the kernel argument and restores the pin values to what they originally were.
This depends on https://github.com/balena-os/meta-balena/pull/3445, it won't break anything without it, but won't work either.