[Bug 2011536] Re: [SRU] Add FK_FORCE_EFI environment variable to skip EFI check
Aristo Chen
2011536 at bugs.launchpad.net
Mon Nov 18 04:36:23 UTC 2024
Hi Andreas,
I have followed your instructions in comment#16, and the behavior looks
good, here are the outputs
# Scenaro 1(while FK_FORCE_EFI is NOT set to "yes")
```
ubuntu at ubuntu:~$ sudo flash-kernel
Using DTB: freescale/imx8mp-evk.dtb
Installing /lib/firmware/5.15.0-1036-ein/device-tree/freescale/imx8mp-evk.dtb into /boot/dtbs/5.15.0-1036-ein/freescale/imx8mp-evk.dtb
Taking backup of imx8mp-evk.dtb.
Installing new imx8mp-evk.dtb.
System running in EFI mode, skipping.
```
# Scenario 2(While FK_FORCE_EFI is set to "yes")
```
ubuntu at ubuntu:~$ sudo flash-kernel
Using DTB: freescale/imx8mp-evk.dtb
Installing /lib/firmware/5.15.0-1036-ein/device-tree/freescale/imx8mp-evk.dtb into /boot/dtbs/5.15.0-1036-ein/freescale/imx8mp-evk.dtb
Taking backup of imx8mp-evk.dtb.
Installing new imx8mp-evk.dtb.
flash-kernel: installing version 5.15.0-1036-ein
Taking backup of imx8mp-evk.dtb.
Installing new imx8mp-evk.dtb.
```
Regarding to the comment#17, is there anything I need to do to fix it?
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to flash-kernel in Ubuntu.
https://bugs.launchpad.net/bugs/2011536
Title:
[SRU] Add FK_FORCE_EFI environment variable to skip EFI check
Status in flash-kernel:
Fix Released
Status in flash-kernel package in Ubuntu:
Fix Released
Status in flash-kernel source package in Jammy:
Fix Committed
Bug description:
[ Impact ]
Flash-kernel currently checks to see if the machine is running in an
EFI environment by checking the existence of /sys/firmware/efi, and
exits if this is the case. This is undesirable in some cases, such as
in virtual, container, or chroot environments where the host is
running in an EFI environment, but the target device that the system
will actually run on is not and needs flash-kernel to be run.
This debdiff adds the ability to skip this check by setting the
FK_FORCE_EFI environment variable to "yes" (which follows the usage of
the FK_FORCE environment variable). This way, flash-kernel can be run
even though the host system is running in an EFI environment.
[ Test Plan ]
As this change should not impact the current usage of the tool, a test
should be carried out that the normal default usage (i.e. on target
platforms) is not affected and retains the current behaviour.
We should also test that the current behaviour of exiting when the
/sys/firmware/efi directory is detected is retained when FK_FORCE_EFI
is not set to "yes".
Finally, the new ability to skip the EFI detection check when
FK_FORCE_EFI is set to "yes" must be tested.
[ Where problems could occur ]
Some users may be relying on the current behaviour of flash-kernel to
exit when the EFI environment is detected. The current default
behaviour is being retained so as to avoid this issue, meaning a user
should only see the effect of this change when setting FK_FORCE_EFI to
"yes".
[ Other Info ]
N/A
To manage notifications about this bug go to:
https://bugs.launchpad.net/flash-kernel/+bug/2011536/+subscriptions
More information about the foundations-bugs
mailing list