ubuntu@ubuntu:~$ sudo flash-kernel
Using DTB: s32g274a-rdb2.dtb
Installing /lib/firmware/5.15.0-1007-s32/device-tree/freescale/s32g274a-rdb2.dtb into /boot/dtbs/5.15.0-1007-s32/./s32g274a-rdb2.dtb
Taking backup of s32g274a-rdb2.dtb.
Installing new s32g274a-rdb2.dtb.
flash-kernel: installing version 5.15.0-1007-s32
Generating u-boot image... done.
Taking backup of fitImage.
Installing new fitImage.
# Mount a tmpfs over /sys/firmware so that we can add an efi directory.
ubuntu@ubuntu:~$ sudo mount -t tmpfs test /sys/firmware
ubuntu@ubuntu:~$ sudo mkdir /sys/firmware/efi
# Test the existing EFI detection is still working.
# flash-kernel should exit without doing anything.
ubuntu@ubuntu:~$ sudo flash-kernel
System running in EFI mode, skipping.
# Set the environment variable FK_FORCE_EFI="yes" to skip the EFI check
# Note we have to set the FK_MACHINE variable here as it can no longer
# read the device tree due to the tmpfs mount.
# This should succeed.
ubuntu@ubuntu:~$ sudo FK_FORCE_EFI="yes" FK_MACHINE="NXP S32G274A-RDB2" flash-kernel
Using DTB: s32g274a-rdb2.dtb
Installing /lib/firmware/5.15.0-1007-s32/device-tree/freescale/s32g274a-rdb2.dtb into /boot/dtbs/5.15.0-1007-s32/./s32g274a-rdb2.dtb
Taking backup of s32g274a-rdb2.dtb.
Installing new s32g274a-rdb2.dtb.
flash-kernel: installing version 5.15.0-1007-s32
Generating u-boot image... done.
Taking backup of fitImage.
Installing new fitImage.
Test results on Ubuntu 22.04:
# Normal flash-kernel process.
ubuntu@ubuntu:~$ sudo flash-kernel 5.15.0- 1007-s32/ device- tree/freescale/ s32g274a- rdb2.dtb into /boot/dtbs/ 5.15.0- 1007-s32/ ./s32g274a- rdb2.dtb
Using DTB: s32g274a-rdb2.dtb
Installing /lib/firmware/
Taking backup of s32g274a-rdb2.dtb.
Installing new s32g274a-rdb2.dtb.
flash-kernel: installing version 5.15.0-1007-s32
Generating u-boot image... done.
Taking backup of fitImage.
Installing new fitImage.
# Mount a tmpfs over /sys/firmware so that we can add an efi directory.
ubuntu@ubuntu:~$ sudo mount -t tmpfs test /sys/firmware
ubuntu@ubuntu:~$ sudo mkdir /sys/firmware/efi
# Test the existing EFI detection is still working.
# flash-kernel should exit without doing anything.
ubuntu@ubuntu:~$ sudo flash-kernel
System running in EFI mode, skipping.
# Set the environment variable FK_FORCE_EFI="yes" to skip the EFI check
# Note we have to set the FK_MACHINE variable here as it can no longer
# read the device tree due to the tmpfs mount.
# This should succeed.
ubuntu@ubuntu:~$ sudo FK_FORCE_EFI="yes" FK_MACHINE="NXP S32G274A-RDB2" flash-kernel 5.15.0- 1007-s32/ device- tree/freescale/ s32g274a- rdb2.dtb into /boot/dtbs/ 5.15.0- 1007-s32/ ./s32g274a- rdb2.dtb
Using DTB: s32g274a-rdb2.dtb
Installing /lib/firmware/
Taking backup of s32g274a-rdb2.dtb.
Installing new s32g274a-rdb2.dtb.
flash-kernel: installing version 5.15.0-1007-s32
Generating u-boot image... done.
Taking backup of fitImage.
Installing new fitImage.