Message ID | 20250620054453.1933700-1-hongxu.jia@windriver.com |
---|---|
State | New |
Headers | show |
Series | [v3] image-live.bbclass: support disable isohybrid for EFI-only boot | expand |
diff --git a/meta/classes-recipe/image-live.bbclass b/meta/classes-recipe/image-live.bbclass index d2e95ef51c3..c3054be6301 100644 --- a/meta/classes-recipe/image-live.bbclass +++ b/meta/classes-recipe/image-live.bbclass @@ -147,7 +147,10 @@ build_iso() { isohybrid_args="-u" fi - isohybrid $isohybrid_args ${IMGDEPLOYDIR}/${IMAGE_NAME}.iso + # EFI only does not need isohybrid + if [ "${PCBIOS}" = "1" ] || [ "${EFI}" != "1" ]; then + isohybrid $isohybrid_args ${IMGDEPLOYDIR}/${IMAGE_NAME}.iso + fi } build_fat_img() {
While NO PCBIOS and EFI only for ISO 9660 image, burn the image to SandDisk USB stick, plug it into laptop, then boot laptop and enter UEFI mode, there are two boot options in UEFI system. Here is the steps: $ echo 'MACHINE = "genericx86-64"' >> conf/local.conf $ echo 'MACHINE_FEATURES:remove = "pcbios"' >> conf/local.conf $ echo 'IMAGE_FSTYPES:pn-core-image-minimal = " live"' >> conf/local.conf $ bitbake core-image-minimal $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.rootfs.iso of=/dev/sda Boot laptop and entery UEFI mode ... Boot mode is set to: UEFI UEFI BOOT: UEFI: SanDisk UEFI: SanDisk 2 ... In this case, PCBIOS is not used, calling isohybrid for ISO 9660 image is not necessary, and do not call isohybrid for ISO 9660 image could remove duplicated boot option in UEFI mode. According to [1][2], use `[ "${PCBIOS}" != "1" ] && [ "${EFI}" = "1" ]' as the EFI-only condition, the revert condition is `[ "${PCBIOS}" = "1" ] || [ "${EFI}" != "1" ]' [1] https://git.openembedded.org/openembedded-core/commit/?id=be3fc8c07e84c654f55c5d09934dfbdc7ff7e2b6 [2] https://git.openembedded.org/openembedded-core/commit/?id=be95f54495bf9e03062f86b929c66cab6e385a03 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- meta/classes-recipe/image-live.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)