From patchwork Tue Sep 2 02:15:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Davis Jr X-Patchwork-Id: 69369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73B23CA1007 for ; Tue, 2 Sep 2025 02:15:34 +0000 (UTC) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) by mx.groups.io with SMTP id smtpd.web11.68033.1756779331692764493 for ; Mon, 01 Sep 2025 19:15:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@underview.tech header.s=google header.b=hSaYbKOm; spf=pass (domain: underview.tech, ip: 209.85.219.51, mailfrom: vince@underview.tech) Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-70deaa19d5aso28503176d6.1 for ; Mon, 01 Sep 2025 19:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=underview.tech; s=google; t=1756779330; x=1757384130; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VPU4ZMa0glJot5vc8Cad8w0mQS3c0giU/uJVjTopFlk=; b=hSaYbKOm8Tz1u7GXw2SoYl+PYTHioZ8jpC2HXr95BlrQJftohLeIHzTsS9GUXIajO2 Y/7Aj7h0Ym4IuGmBcLjrDBhXEKuZf5jsQQvm0aIZta3eFaBEgDiVX0IcneC4Ps7MPhTc /13rX2fnvRs8fs6ZBVT033V9v+MwECB95XXCmEnNAue0oAnIFDeQG7x8xOnioehITipc CrlgN5EfKfBizBcu4yBOzGGsDr8pUwmkrSC1mzzWvePT7sRMX+zuEpsNUDjLq31oyJeS aXD9l2d4/eY2vH7e9TToscXXFE5ak91mp6XFValEcSSog9PVQUjTxSASeoNDwlyNVZq0 9Vfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756779330; x=1757384130; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VPU4ZMa0glJot5vc8Cad8w0mQS3c0giU/uJVjTopFlk=; b=FENTTkwJXMhFxtHGOLve3wmLDKzvwN6pLcJ7r+aaJbFcePnO+jOePNYjy2/Ctx2RNe X433XDFpQx2DqcVQTr2GTi2JJYdN3XoP+ArXPHt5TyFoIzSFpemXoRNVnATZ282UFpol bAmAJihiAv0x9W9d/f3d9lEJNY3rGqUPdK7gudOh/MRmBWS4fb4Aa6SpXBC7xDyWNLtL IHdgC5fyEAdHnpTDdG6WhIqWAE87svMPXmnLIaCtBe+0L4ydlx2MaTorIYJxp2jx6qLz AHdOD30xZ9JhC3oNA8cBwRaEVLZ0S4WSDdal82LGfJzUDYQsFgxAFBlx6OhM72PhC3Mm Q8hQ== X-Gm-Message-State: AOJu0YwB3EyWLxlPbUnZ9mx5bMsqNChbiIXzDSDoTJ4erXWe5qpMfcGm bIomqpL0BEqHhhZjzPnt85aiR8AOgIBHf9q2ap4rhiGzpRWHJ9PtYGq7h+1fSBjHBxtlh0z1V2z ZnVyimfI= X-Gm-Gg: ASbGnctrUsTYBKpHrWcO2o0w/TCGduVMYdw50nuaVZq4btp4Usw5a0UXRQEwL84McSN O3zQObY1RfVySaf8ga8/1o98ExSNs9w3B83Fkw6e2sHS0tk14xo0IuQafSzvADPNKOBQLddaLJl lnup1EdvKz1pKp0QVsHuFr5MPBHNdglZdZz2vTaLbce5AZjaDwS2fzKgjMkHQL71IJnREuNgYHR j9zA+go/IzrclgV6cbIISn+jt6NwVou8N3x3xHVF2w9eYN9rjGC6qX8do41Q8owDfM5B8VVJmhQ VHhhH9NNQEttetZBItQ6CsRfH1e+anGion+sLteww9rTp9evKzoUkOS+Rg5s0TRcPnMlnOBHf7/ 38yvHey2Av8AtlZ7Yu2uqnloQIJ3nSV02LJd0kJKQy4O9SA== X-Google-Smtp-Source: AGHT+IEkpI+yLv7CVQuzwVo9bkE4x9gAzAITjUwhffgcxKs7910Mjs4kwhzPLVMnSs0tDic4EEsTZA== X-Received: by 2002:a05:6214:40e:b0:70d:e501:1fa1 with SMTP id 6a1803df08f44-70fac901fbdmr117270886d6.53.1756779330396; Mon, 01 Sep 2025 19:15:30 -0700 (PDT) Received: from vince-B550I-AORUS-PRO-AX.. ([2601:406:4d01:1820:90ff:fb15:d573:4b27]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720b55cf6c9sm4194436d6.49.2025.09.01.19.15.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 19:15:30 -0700 (PDT) From: Vincent Davis Jr To: openembedded-core@lists.openembedded.org Cc: Vincent Davis Jr Subject: [OE-core][PATCH v2 1/7] bootimg_pcbios: support grub hybrid boot Date: Mon, 1 Sep 2025 22:15:17 -0400 Message-Id: <20250902021523.25780-1-vince@underview.tech> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 Sep 2025 02:15:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222692 If caller wants to primarily leverage grub as the primary boot loader current oe-core doesn't support booting grub when the boot firmware is legacy BIOS based and the partition table format is GPT based. Issue GPT header reside where core.img should be located (at byte 512). To navigate around issue core.img was moved to a seperate partition. If disk is a GPT disk caller must specify the file system type as none and set the partition type as BIOS boot. No filesystem will be created on partition. This also allows wic plugin to know where to dd core.img. Unfortunately No deep dive into grub-install was perform to know the exact bytes changed in hybrid boot case. To see the change in bytes generated boot.img + core.img was compared to boot.img + core.img after grub-install was executed using the xxd command. Signed-off-by: Vincent Davis Jr --- .../lib/wic/plugins/source/bootimg_pcbios.py | 55 ++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/scripts/lib/wic/plugins/source/bootimg_pcbios.py b/scripts/lib/wic/plugins/source/bootimg_pcbios.py index caabda6318..a7fb2eca4e 100644 --- a/scripts/lib/wic/plugins/source/bootimg_pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg_pcbios.py @@ -101,7 +101,7 @@ class BootimgPcbiosPlugin(SourcePlugin): disk_name, full_path, disk.min_size) if cls.loader == 'grub': - cls._do_install_grub(creator, kernel_dir, + cls._do_install_grub(disk, creator, kernel_dir, native_sysroot, full_path) elif cls.loader == 'syslinux': cls._do_install_syslinux(creator, bootimg_dir, @@ -340,6 +340,12 @@ class BootimgPcbiosPlugin(SourcePlugin): @classmethod def _do_configure_grub(cls, part, creator, cr_workdir): + # If partition type is either EFI System or + # BIOS boot no need to generate/copy grub config. + if part.part_type == '21686148-6449-6E6F-744E-656564454649' or \ + part.part_type == 'C12A7328-F81F-11D2-BA4B-00A0C93EC93B': + return 0 + hdddir = "%s/hdd" % cr_workdir bootloader = creator.ks.bootloader @@ -438,6 +444,12 @@ class BootimgPcbiosPlugin(SourcePlugin): grub_mods_path, core_img, builtin_modules) exec_native_cmd(grub_mkimage, native_sysroot) + # If partition type is either EFI System or + # BIOS boot no need to copy in grub modules. + if part.part_type == '21686148-6449-6E6F-744E-656564454649' or \ + part.part_type == 'C12A7328-F81F-11D2-BA4B-00A0C93EC93B': + return 0 + # Copy grub modules install_dir = '%s/%s/%s' % (hdddir, grub_prefix_path, grub_format) os.makedirs(install_dir, exist_ok=True) @@ -454,7 +466,7 @@ class BootimgPcbiosPlugin(SourcePlugin): native_sysroot, False) @classmethod - def _do_install_grub(cls, creator, kernel_dir, + def _do_install_grub(cls, disk, creator, kernel_dir, native_sysroot, full_path): core_img = '%s/grub-bios-core.img' % (kernel_dir) @@ -478,6 +490,45 @@ class BootimgPcbiosPlugin(SourcePlugin): # Install core.img or grub stage 1.5 dd_cmd = "dd if=%s of=%s conv=notrunc bs=1 seek=512" % (core_img, full_path) exec_cmd(dd_cmd, native_sysroot) + elif creator.ptable_format == 'gpt': + # Issue GPT headers reside where core.img should be (at byte 512). + # To navigate around issue core.img was moved to a seperate partition. + # + # If disk is a GPT disk caller must specify the file system + # type as none. As no filesystem may be created. Caller must + # also set the partition type to BIOS boot. So, the plugin + # may embed core.img there. + + # Replicates what grub-install does to boot.img + # Found by comparing xxd output of generated boot.img + # to boot.img after grub-install. + dd_cmd = "echo -ne '\\x00\\x08' | dd of=%s conv=notrunc bs=1 count=2 seek=92" % (full_path) + exec_native_cmd(dd_cmd, native_sysroot) + + dd_cmd = "echo -ne '\\x90\\x90' | dd of=%s conv=notrunc bs=1 count=2 seek=102" % (full_path) + exec_native_cmd(dd_cmd, native_sysroot) + + for part in creator.parts: + if part.part_type == '21686148-6449-6E6F-744E-656564454649': + part_start_byte = part.start * disk.sector_size + + # Install core.img or grub stage 1.5 + dd_cmd = "dd if=%s of=%s conv=notrunc bs=1 seek=%s" % \ + (core_img, full_path, part_start_byte) + exec_cmd(dd_cmd, native_sysroot) + + # Replicates what grub-install does to core.img + # Found by comparing xxd output of generated + # core.img to core.img ater grub install. + dd_cmd = "echo -ne '\\x01\\x08' | dd of=%s conv=notrunc bs=1 count=2 seek=%d" % \ + (full_path, part_start_byte + 500) + exec_native_cmd(dd_cmd, native_sysroot) + + dd_cmd = "echo -ne '\\x2f\\x02' | dd of=%s conv=notrunc bs=1 count=2 seek=%d" % \ + (full_path, part_start_byte + 508) + exec_native_cmd(dd_cmd, native_sysroot) + + break else: raise WicError("Unsupported partition table: %s" % creator.ptable_format) From patchwork Tue Sep 2 02:15:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Davis Jr X-Patchwork-Id: 69370 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C510CA1009 for ; Tue, 2 Sep 2025 02:15:44 +0000 (UTC) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by mx.groups.io with SMTP id smtpd.web11.68035.1756779337447827893 for ; Mon, 01 Sep 2025 19:15:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@underview.tech header.s=google header.b=Dg5hgBOZ; spf=pass (domain: underview.tech, ip: 209.85.219.47, mailfrom: vince@underview.tech) Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-70df4418f98so42417806d6.0 for ; Mon, 01 Sep 2025 19:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=underview.tech; s=google; t=1756779336; x=1757384136; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Cpgw4QovyeaadDer5Ue/TNRyQ9emj/RR1pKiQU0tvek=; b=Dg5hgBOZa0I/IO1T3HBtMz+1pVONrNJFQLkAbGgfEmIhsPmPlEpGWZkuGXNRk4zKPO mrDNKWOi1FsXWUM19wadu+A3XdoYZQSSIzROFmJ+9H6EJ25kZkmDfAvtfpQoQ9DrdeOB 7j1C9/FKv5vlVROCEl8thMe3TWJcc3Ph1UdfMILQuHhbruHfZGfr/UtO8YcyESIJz4Ml hJsNslD/BBWsOvgdigp7x6xCVd3+42wUr9lIOfi1Vp3liLq0KtoiOBoNKuCitvgJR9xS wCN+tBoFOtA49QOHVdaLTvbInI39Hh5AKg14uIJqYSJRZFwrLDisrtosmYKgLH9chgVP 0S7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756779336; x=1757384136; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cpgw4QovyeaadDer5Ue/TNRyQ9emj/RR1pKiQU0tvek=; b=p+y7s209zysS6xiNwBBDyPQu3izurLs4zXl2KVLRJ8p4juOLc9ABPJKEINWzFewT2n RJYjzzbv9DNCEBAOFB9oWOgNdnB8hDyRNheRNwf7GqV6LX9khDpu7AzCSU7EnK6bah/+ YGabEPFZ4qLOh6eLggpBhtqbgzGTPjodxCe6K98Zw4IPtuqBvSPcVwsx3PfjdQiAkiHv kbtqMAnKwhJqo+StWlwWJ7Ufm49SwSgMD3NkhY+vobioecnm4D7JKMq/tytam5ncBq4u +jOMPlH3f2qsEF7RAkEvXCuzENTQ1eXUSkdqcIZ9PLCuVcEe6vBwJN66Ih6ZvHipDfxs bXGw== X-Gm-Message-State: AOJu0YzBERGeoUBF/Br3EKT22f/C33Vk8H6ssrK/nXETGyEiegItOWk8 6Ukgh3fRjTB7HbObiOekwmmfeg73uFGrc5nGn4P3GO3Jv+ckesgpWVm9kX/uA5ZD8OlwuzPjg9R thMo/SMc= X-Gm-Gg: ASbGncsQ+7qb36FyXcMZukwBUmCynS/FsGNNpJUKmp0jqkO+Zqz2XLEy6F2soFysuMD nkrvrzfaNMZeFOg3MgZQIoOZNe4feB0swxXR931+XlDAVvf997gK/nPMdPoA14AVl+3PQsx8gJF 3mudJpMbewk2UW7XvXnpFFtV3RPCraDHpa5FWp0K63DZtnnTlSlXcJWVWB/DUViuezPrH/kXUny p9ipbLn5ngymWsSpC2AwIMbE/HSANix9JwKMDCftfl9vmOk7n0IapZm+2LHvshxxyhoEYfz+H/N JnVbEhQ+a6ncpVNeIUjBL7bL+PgbFetLKyRjwqFBV4cXs/2Unu3erjLDIfJnY5HU/gjQjn9uCSa Is7I/R2IjnBUHL84lf6+M2W/wsXeIm7jNw3JR5Rp+9a7UyzAryvV6fiFO X-Google-Smtp-Source: AGHT+IFhCRVKjojM5053nDUpotQTIqxkNzDfm7+kEMCxPGs4O/Gq3JAvJHPX9I3pmioxDwnbapoWZQ== X-Received: by 2002:a05:6214:4102:b0:70f:a558:2955 with SMTP id 6a1803df08f44-70fa98b1f61mr124879086d6.22.1756779335651; Mon, 01 Sep 2025 19:15:35 -0700 (PDT) Received: from vince-B550I-AORUS-PRO-AX.. ([2601:406:4d01:1820:90ff:fb15:d573:4b27]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720b55cf6c9sm4194436d6.49.2025.09.01.19.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 19:15:35 -0700 (PDT) From: Vincent Davis Jr To: openembedded-core@lists.openembedded.org Cc: Vincent Davis Jr Subject: [OE-core][PATCH v2 2/7] bootimg_efi: support grub hybrid boot Date: Mon, 1 Sep 2025 22:15:18 -0400 Message-Id: <20250902021523.25780-2-vince@underview.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250902021523.25780-1-vince@underview.tech> References: <20250902021523.25780-1-vince@underview.tech> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 Sep 2025 02:15:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222693 If bootimg_biosplusefi wics plugin is used check for loader-bios in sourceparam. The grub config is copied by the bootimg_pcbios wic's plugin. The reason is it's autogenerated grub config is generic enough to support both legacy boot and hybrid boot. Thus, no need to update it. If partition type marked as EFI System only copy in UEFI application boot*.efi (core.img). It appears the EFI directory resides after initial population of the EFI System partition. If bootimg_efi called again and the partiton type not marked as EFI System remove any unwanted files. Signed-off-by: Vincent Davis Jr --- scripts/lib/wic/plugins/source/bootimg_efi.py | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/scripts/lib/wic/plugins/source/bootimg_efi.py b/scripts/lib/wic/plugins/source/bootimg_efi.py index cf16705a28..98be12160c 100644 --- a/scripts/lib/wic/plugins/source/bootimg_efi.py +++ b/scripts/lib/wic/plugins/source/bootimg_efi.py @@ -223,7 +223,13 @@ class BootimgEFIPlugin(SourcePlugin): exec_cmd(install_cmd) try: - if source_params['loader'] == 'grub-efi': + # In grub hybrid boot case bootimg_pcbios generates/copies the grub.cfg + # that will be stored on same partitions as the grub modules. + if 'loader-bios' in source_params and \ + source_params['loader-bios'] == 'grub' and \ + source_params['loader'] == 'grub-efi': + pass + elif source_params['loader'] == 'grub-efi': cls.do_configure_grubefi(hdddir, creator, cr_workdir, source_params) elif source_params['loader'] == 'systemd-boot': cls.do_configure_systemdboot(hdddir, creator, cr_workdir, source_params) @@ -328,7 +334,25 @@ class BootimgEFIPlugin(SourcePlugin): logger.debug("Installed IMAGE_EFI_BOOT_FILES:\n%s" % out) try: - if source_params['loader'] == 'grub-efi': + if 'loader-bios' in source_params and \ + source_params['loader-bios'] == 'grub' and \ + source_params['loader'] == 'grub-efi': + + # If partition type is Bios Boot return + if part.part_type == '21686148-6449-6E6F-744E-656564454649': + return 0 + + # The grub config in the hybrid grub boot setup is + # copied by the bootimg_pcbios wics plugin. + if part.part_type == 'C12A7328-F81F-11D2-BA4B-00A0C93EC93B': + for mod in [x for x in os.listdir(kernel_dir) if x.startswith("grub-efi-")]: + cp_cmd = "cp -v -p %s/%s %s/EFI/BOOT/%s" % \ + (kernel_dir, mod, hdddir, mod[9:]) + exec_cmd(cp_cmd, True) + else: + shutil.rmtree("%s/EFI" % hdddir) + return 0 + elif source_params['loader'] == 'grub-efi': shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, "%s/grub.cfg" % cr_workdir) for mod in [x for x in os.listdir(kernel_dir) if x.startswith("grub-efi-")]: From patchwork Tue Sep 2 02:15:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Davis Jr X-Patchwork-Id: 69375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A9DFCA1007 for ; Tue, 2 Sep 2025 02:16:04 +0000 (UTC) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by mx.groups.io with SMTP id smtpd.web10.68268.1756779340572722896 for ; Mon, 01 Sep 2025 19:15:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@underview.tech header.s=google header.b=PGWNNiDx; spf=pass (domain: underview.tech, ip: 209.85.219.47, mailfrom: vince@underview.tech) Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-70df91bdc53so40807326d6.3 for ; Mon, 01 Sep 2025 19:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=underview.tech; s=google; t=1756779339; x=1757384139; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3mwsaZs5IlXVYlujKOMC8jF7uSg5r7QHgVF03R2UUMg=; b=PGWNNiDxRMwl4DspyJFmdvapzxivoN1KICA0c9mE+vLIAI5vx30k7e/r4/he/PQ8BX jS2uxztoJQXTKqOoCpCt5cvqenhClkjntBHKMc25u3xReCPkPhWLpKh2op5RSdfxjr/Y DcV1NPwqy6xjTiaLiXvpQ78lk9Kpj6mGYW1TuMv9c+HvFnJ1MAqotszT3p82UlvAbB7J rbc0TWrffZdv7O1GNbTyPR99XebrqmTpbJlRZOVIKqLG/XdMSZkvhU8G9nOCe/scMwBQ rXQM7Hddwx7TL8T8VV6Kjdqvqnw7b7b3ZiPfAe5ThP68JbdJePoYwG1hIVfLKew0XooU hhjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756779339; x=1757384139; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3mwsaZs5IlXVYlujKOMC8jF7uSg5r7QHgVF03R2UUMg=; b=e6fCPxiBw6hEfXyN4D7rU8wxZdIOrVr4Q/cAhEYzdniDvyUlEhAlAl3BzZuC8xdf7i WHp2Td4DWumUP696CVIUlNtUXUdkDVEIRK+VRH3Yp3NC6qaNfmffOtQiiRqNAckzFdYC gZYkStZc8xFwUtcw0chpG2hv5e3GTJXRB0pLNS3NXkqPZhguxnCZZMii67zI9ZFz1lG8 TdnVYIb1+ir7S+PX4MHSDnNobJKKPpQrpNrE7EsuBmEOaLMlgV73QT4HLvZ0CZL+TeEr o1exnQVmaj/utv/L6tmURjzMvu6bGoYdNZuYu2BN8pMSQWxSLRM0EHK0OKKd1S3LXRLH JoGw== X-Gm-Message-State: AOJu0YyvHtDbMEFvGQhWQoSdj6s7eAt2M6qzhsS155asSsURQzG5f+ac EIBDcgXhJqzVzoAvX7UAzNT6WzOFk9LLx/+5eFkC7eVFp3qZxWkQjAMlrt88TRfGbUG4IyCSgdR wUza//Ss= X-Gm-Gg: ASbGnctCmJbQPcgBP7O+AF3Ww9EZ83yfv7G377QpWYt7DZaknRDdmXTNsA142Lppam3 WquyYbeHBeRk98uKzYDi7LX5BpsoeL/GldiyuahXIV9XBf5JvUfCkz5/o6ooxT8dPbUzO3/tMd0 8t7DAks14NkjsZiujJsCjo5hqg4fFCeyrNJxggKcWZ+lfJL97tTNXI3m0FbyQhFqZ+yxeMFQgX4 QN/IapVLaLrcXXlseAfrMUDJlNsBGACq4p5//M/J77gxgmCYYweo+0liLtfAqCPnGgTUq1zSj6i noDbInbrhueXY7RQOgUQeJxLs8WVh6VxQVqwDnSGXN6T3A7lqpVzthz2pl1+yfJ5LBUnFP1FRdK E+OihtdbzaMfjRJNOZY6kOoFD5NdY55VgL0/ZdRzTPcATrsdC3BgwJlUk X-Google-Smtp-Source: AGHT+IEOsf0mCyviVw8Ex2biU6aGba7P+iZc+/dvR6rhJfOzZA+fTbO5+JIhUHTVsO1lF4cfz5yxCw== X-Received: by 2002:a05:6214:20eb:b0:70d:fec6:494a with SMTP id 6a1803df08f44-70fac74b6f7mr105717956d6.17.1756779339050; Mon, 01 Sep 2025 19:15:39 -0700 (PDT) Received: from vince-B550I-AORUS-PRO-AX.. ([2601:406:4d01:1820:90ff:fb15:d573:4b27]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720b55cf6c9sm4194436d6.49.2025.09.01.19.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 19:15:38 -0700 (PDT) From: Vincent Davis Jr To: openembedded-core@lists.openembedded.org Cc: Vincent Davis Jr Subject: [OE-core][PATCH v2 3/7] bootimg_efi: copy grub modules Date: Mon, 1 Sep 2025 22:15:19 -0400 Message-Id: <20250902021523.25780-3-vince@underview.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250902021523.25780-1-vince@underview.tech> References: <20250902021523.25780-1-vince@underview.tech> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 Sep 2025 02:16:04 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222694 Assumming all grub modules weren't embedded into boot*.efi (core.img) copy them now. This commit populates the common partition used to store the grub config and grub modules for both PCBIOS and EFI. Signed-off-by: Vincent Davis Jr --- scripts/lib/wic/plugins/source/bootimg_efi.py | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/scripts/lib/wic/plugins/source/bootimg_efi.py b/scripts/lib/wic/plugins/source/bootimg_efi.py index 98be12160c..c3254033d6 100644 --- a/scripts/lib/wic/plugins/source/bootimg_efi.py +++ b/scripts/lib/wic/plugins/source/bootimg_efi.py @@ -350,7 +350,39 @@ class BootimgEFIPlugin(SourcePlugin): (kernel_dir, mod, hdddir, mod[9:]) exec_cmd(cp_cmd, True) else: + # Assumming all grub modules weren't embedded + # into grub.efi or core.img copy them now. + copy_types = [ '*.mod', '*.o', '*.lst' ] + + # It appears the EFI directory resides after + # initial population of the EFI System partition + # in the if statement above. Remove so that the + # partition doesn't contain any unrequired files. shutil.rmtree("%s/EFI" % hdddir) + + hdddir = "%s/hdd" % cr_workdir + + staging_libdir = cls._get_staging_libdir() + + grub_format = get_bitbake_var('GRUB_MKIMAGE_FORMAT_EFI') + if not grub_format: + grub_format = 'x86_64-efi' + + grub_prefix_path = get_bitbake_var('GRUB_PREFIX_PATH') + if not grub_prefix_path: + grub_prefix_path = '/boot/grub' + + # Copy grub modules + install_dir = '%s/%s/%s' % (hdddir, grub_prefix_path, grub_format) + os.makedirs(install_dir, exist_ok=True) + + for ctype in copy_types: + files = glob('%s/grub/%s/%s' % \ + (staging_libdir, grub_format, ctype)) + for file in files: + shutil.copy2(file, install_dir, follow_symlinks=True) + + # bootimg_pcbios calles prepare_rootfs no need to here. return 0 elif source_params['loader'] == 'grub-efi': shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, @@ -457,3 +489,24 @@ class BootimgEFIPlugin(SourcePlugin): part.size = int(bootimg_size) part.source_file = bootimg + + @classmethod + def _get_staging_libdir(cls): + """ + For unknown reasons when running test with poky + STAGING_LIBDIR gets unset when wic create is executed. + Bellow is a hack to determine what STAGING_LIBDIR should + be if not specified. + """ + + staging_libdir = get_bitbake_var('STAGING_LIBDIR') + staging_dir_target = get_bitbake_var('STAGING_DIR_TARGET') + + if not staging_libdir: + staging_libdir = '%s/usr/lib64' % staging_dir_target + if not os.path.isdir(staging_libdir): + staging_libdir = '%s/usr/lib32' % staging_dir_target + if not os.path.isdir(staging_libdir): + staging_libdir = '%s/usr/lib' % staging_dir_target + + return staging_libdir From patchwork Tue Sep 2 02:15:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Davis Jr X-Patchwork-Id: 69371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B8CCCA1007 for ; Tue, 2 Sep 2025 02:15:44 +0000 (UTC) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by mx.groups.io with SMTP id smtpd.web10.68270.1756779342776382464 for ; Mon, 01 Sep 2025 19:15:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@underview.tech header.s=google header.b=E+aNGptr; spf=pass (domain: underview.tech, ip: 209.85.219.46, mailfrom: vince@underview.tech) Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-7193fc78bc3so13555196d6.3 for ; Mon, 01 Sep 2025 19:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=underview.tech; s=google; t=1756779341; x=1757384141; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H9u+z4a0bWl0ZkQqG95UaYSoma7jZekxtD2FL8P76j8=; b=E+aNGptruVUpZvaabrgfWStb7u9yyoMDwCYe2SIwBGfy0jJNSRcMsRkH/iHTud8NK9 SX+9tMLIPzCYwcS+p8HmP/ZUf4Rf55ltFxGrg0BeYNRHJFM2va9lxJqfwyM4hyt5d4mn LFv9cw8Vvb+z32jbaXwokgi5SodsyqRTvXyKr8rUZzkoLAwCWWcRwdH1G79AutIDPmN6 +HUX3Eok+lNLsb7kXOrR4R9HJI2zHleNNS2e7vQJwfKIHvTbjpsno+g7RIN9FCGEw7Dv XKx26s7lmdSp5WUXqP0xtqlFHSNyDgN9uIAdeiZqSnNkokTrPELcYv2tDJpPzA7M4Ctn 4MQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756779341; x=1757384141; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H9u+z4a0bWl0ZkQqG95UaYSoma7jZekxtD2FL8P76j8=; b=njJa+6heh72Q9N4aYhMQig10IrXDL0k/zR/HpxQlkYEFTZDgdfSe3BhjrOyMNFuPFd V8EmUv06hI0LMHWhARVldg4p3ycvli1WepPDpW8dw8D6OeRGSGLaJqwmKlKVi8msJqrj aXb6yhNurwwuxnY4enVIy7VpjkK91iHzhXOmVzl1togTWOnq8Mb/88Z/TG2dEMmufVgW PKjcLXf80nUuS7IapZd8396ob2mWlABtSzlHc2BHexgJT2qCgyxLAgDAexmjexQW6/VM QEZPOhMq5VYE2fbfA0a69ipcQdgGL918d71S+wku/XWn/O742rqNmeb5XLkSUp4jIJhQ wfIA== X-Gm-Message-State: AOJu0YyHdIVx54uCsAomJGLquRi0WZXuwCBXCYBlCKcdL9NbDpriZsKZ TvX4J/d5yZNqQKM3uC3nMCNj5JYCaswG/TpDpNYskMv7Dlmcb7v2QDja34yCqRQzGKAqeaZxEXU 1FpfIWmU= X-Gm-Gg: ASbGncuM5B+i90aS7eWUOHl88rcOPK2PTGY6TQaJOZ4jD/jmzRN2GJ5giRuVYqlqcFb YWi313dAG2OAOVRqmeIQ2hT4LyjSwDZvrwGC4cUs9iS0gJx9rkgyNUvrnmIKyaB5spE4uHbLCih LR+EUmOtZ/YnNNEDdUrUpt6DbIzqXDDqjB8kmrD8PxoV1PR+1Y7nGj011O/CZfeCzfOjFY7PGCR 5Jr3GEHluYAaTWAYlub03yUeU9Eq2n1rKK6n5uDwaWgVIqdUiZeH2hvko/hFU0zHFAAhoFNVhVg YurFyAYpzbVo2wdXlOJNo+61FQ1HcxrQxt0tAgj30lYvvvmPLC7sYD+xj08dWgEHpcqzVateBrD /cePEsOnvuSOlJFJyw/17TSKNGs1ixeKect9PcDNE/KBjYJ+7LhK6zvlY X-Google-Smtp-Source: AGHT+IHEJfE59PvH3YTMKIFkpaS8kekES3us5m8uEYSV5/slhchSzbVtFRadfpBBTSTWbLL70E/Ykg== X-Received: by 2002:a05:6214:252f:b0:70d:e2ba:62fa with SMTP id 6a1803df08f44-70fac9593f3mr123700706d6.60.1756779341535; Mon, 01 Sep 2025 19:15:41 -0700 (PDT) Received: from vince-B550I-AORUS-PRO-AX.. ([2601:406:4d01:1820:90ff:fb15:d573:4b27]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720b55cf6c9sm4194436d6.49.2025.09.01.19.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 19:15:41 -0700 (PDT) From: Vincent Davis Jr To: openembedded-core@lists.openembedded.org Cc: Vincent Davis Jr Subject: [OE-core][PATCH v2 4/7] bootimg_biosplusefi: add grub only examples Date: Mon, 1 Sep 2025 22:15:20 -0400 Message-Id: <20250902021523.25780-4-vince@underview.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250902021523.25780-1-vince@underview.tech> References: <20250902021523.25780-1-vince@underview.tech> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 Sep 2025 02:15:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222695 Updates the comments section to explain new usage of wic plugins. Signed-off-by: Vincent Davis Jr --- .../wic/plugins/source/bootimg_biosplusefi.py | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/scripts/lib/wic/plugins/source/bootimg_biosplusefi.py b/scripts/lib/wic/plugins/source/bootimg_biosplusefi.py index 4279ddded8..ad4c0e1768 100644 --- a/scripts/lib/wic/plugins/source/bootimg_biosplusefi.py +++ b/scripts/lib/wic/plugins/source/bootimg_biosplusefi.py @@ -27,7 +27,7 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin): """ Create MBR + EFI boot partition - This plugin creates a boot partition that contains both + This plugin creates a boot partition(s) that contains both legacy BIOS and EFI content. It will be able to boot from both. This is useful when managing PC fleet with some older machines without EFI support. @@ -50,7 +50,9 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin): not turn the rootfs into an initramfs RAM image. This plugin is made to put everything into a single /boot partition so it - does not have the limitations listed above. + does not have the limitations listed above. Unless GRUB is the primary + bootloader. We have to seperate it into multiple partitions because + of core.img. The plugin is made so it does tries not to reimplement what's already been done in other plugins; as such it imports "bootimg_pcbios" @@ -70,9 +72,33 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin): Plugin options, such as "--sourceparams" can still be passed to a plugin, as long they does not cause issue in the other plugin. - Example wic configuration: + Example wic configurations: + + ************ Example kickstart GRUB/Syslinux Hybrid Legacy Bios Or Newer UEFI Boot ************ part /boot --source bootimg_biosplusefi --sourceparams="loader=grub-efi"\\ --ondisk sda --label os_boot --active --align 1024 --use-uuid + ************ Example kickstart GRUB/Syslinux Hybrid Legacy Bios Or Newer UEFI Boot ************ + + + ********************** Example kickstart GRUB Hybrid Legacy Bios Or Newer UEFI Boot ********************** + # See https://wiki.archlinux.org/title/GPT_fdisk#Partition_type + + part bios_boot --label bios_boot --fstype none --offset 1024 --fixed-size 1M \\ + --part-type 21686148-6449-6E6F-744E-656564454649 --source bootimg_biosplusefi \\ + --sourceparams="loader=grub-efi,loader-bios=grub,install-kernel-into-boot-dir=false" + + part efi_system --label efi_system --fstype vfat --fixed-size 48M \\ + --part-type C12A7328-F81F-11D2-BA4B-00A0C93EC93B --source bootimg_biosplusefi \\ + --sourceparams="loader=grub-efi,loader-bios=grub,install-kernel-into-boot-dir=false" + + part grub_data --label grub_data --fstype ext4 --fixed-size 78M \\ + --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4 --source bootimg_biosplusefi \\ + --sourceparams="loader=grub-efi,loader-bios=grub,install-kernel-into-boot-dir=false" + + part roots --label rootfs --fstype ext4 --source rootfs --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4 + + bootloader --ptable gpt --source bootimg_biosplusefi + ********************** Example kickstart GRUB Hybrid Legacy Bios Or Newer UEFI Boot ********************** """ name = 'bootimg_biosplusefi' From patchwork Tue Sep 2 02:15:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Davis Jr X-Patchwork-Id: 69372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AF93CA1002 for ; Tue, 2 Sep 2025 02:15:54 +0000 (UTC) Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) by mx.groups.io with SMTP id smtpd.web11.68038.1756779345499096784 for ; Mon, 01 Sep 2025 19:15:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@underview.tech header.s=google header.b=CPrYF2MW; spf=pass (domain: underview.tech, ip: 209.85.219.53, mailfrom: vince@underview.tech) Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-70ddadde2e9so39463636d6.0 for ; Mon, 01 Sep 2025 19:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=underview.tech; s=google; t=1756779344; x=1757384144; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=j7A1yGClRNMhO1/MjwevIYMVgUacLM684WUtGKTh7iQ=; b=CPrYF2MWr0PsYXGt/4EdNT7rdSghRi/XnmbGxQlJp5akVdWPEX78fE2JQufjd9ZhFM TnDzjk0eKAK+rAO7TZvZJCCU8EvwtPsurjalXKLv5Q+Vla+YmHu5ySjbsXfkw0YXdnii hxq8dYY8Qm0qbGxsSGG80dtJGsu/AREmLCLsBrwkdktiFZFC1j9sgcq1wxYwFRe+O8Q4 y5Kaf9zpoqA+4Jb514uUX99HTdni8M4ubhqAcx5VgzeLibi7PCDSBxW3XJ8y9+2Y0OWO VEjv/zqNyt+qN64jrdiV9limJkhLUgK/1FXB5DHla9YAdwp7Bq225FPW+z10K7yLsuav QKQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756779344; x=1757384144; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j7A1yGClRNMhO1/MjwevIYMVgUacLM684WUtGKTh7iQ=; b=n7UZDJbo5Bw7exz/Eue864O4oP3KWTbJ/gl5NwmkgiO6Gl+1NU9S/0Ja6nJYyekKIB EgGHjMN6qQWjGeUa7jmFBcmZaCrId48K6y4EjhqDoOwtpKhFh1PtlBcjvtmKs4C1P/dD E2cMWJUt5uZjEpfkme7TewlOsn8FewHJL5pWLDX2RZCpCczjE/HqK1ljSNeo335RFO+a jujF5MVMy75ZgBPQ7Y45KekGbo67cL1tzbjnLJVOVg80W4yksgLUC42GZaeIkgBNcEqV fObsQ3jaOZHxlnHDcKdXkEFy5b22w5vL0pDksLm3hhKqVRpgURul0FKPXqCuYrub/ptp C/pQ== X-Gm-Message-State: AOJu0YwRovRzSdF5Ft1pBN+nm6wnUY0Q23aSLr/tZ2J35deOk94eCkbQ 0KSt36oHUf2kTtwEaCBM1iQNnSzFZhBLgYh+agkRdi2KyJ8M584CE8SUdJs2Apyko06MSTJsVQ8 FqSVuzCM= X-Gm-Gg: ASbGncu3XA96MrTDk0AEqGlOCoRUdi+W9F8l0okU6QP4xvn/RtjCG/cs06JFVqnNv/e r7Bu0Y+lV0g8dzo/+rmLdA/VvCpxr9g0W5s+RNe+7eL6oFvSzqsukyq77ZSmgOKQnpO0vJH2Hal oe5rC4e1y5QPlvsX69G0hcDNtI8mCaqylo+eqs5S/W1cff8j3D/FuDw3nvKE4BKr5FO7AaencjQ 96bJQhFfL/UYT9yu0ZwHNtmISnTR0CWEQLSR8m168qDg8afHl/VhfltVXI1gKx1FDKW5qPW6vwD /ahIAEj3GE6Y/oI9DAAv7bPmvA0xoB91eTOCI8p3QgeGRBWAJYeL+AskLdpfJAQQhpBl9fEvBCc e/zb34QAWPF/x56TDTR8+ewpj7byeraw8ra4qu2yHTo8vCjYhPkeLBIh1 X-Google-Smtp-Source: AGHT+IGFRR7DoQdGSN91PE5jtDX174u6J3ou6oFPX+CncdwlTeQ27ZRMXbDz6CAb5zJ7yLUChHpvVw== X-Received: by 2002:ad4:5ae3:0:b0:720:4a66:d3df with SMTP id 6a1803df08f44-7204a66e19amr16644256d6.16.1756779344043; Mon, 01 Sep 2025 19:15:44 -0700 (PDT) Received: from vince-B550I-AORUS-PRO-AX.. ([2601:406:4d01:1820:90ff:fb15:d573:4b27]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720b55cf6c9sm4194436d6.49.2025.09.01.19.15.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 19:15:43 -0700 (PDT) From: Vincent Davis Jr To: openembedded-core@lists.openembedded.org Cc: Vincent Davis Jr Subject: [OE-core][PATCH v2 5/7] grub-efi: support custom embedded grub configs Date: Mon, 1 Sep 2025 22:15:21 -0400 Message-Id: <20250902021523.25780-5-vince@underview.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250902021523.25780-1-vince@underview.tech> References: <20250902021523.25780-1-vince@underview.tech> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 Sep 2025 02:15:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222696 Commit: Adds support for including custom embedded grub configs. The default one provided in OE-core is limited to everything being in the /EFI/BOOT directory. Adds an embedded grub config that sets root and prefix based upon the /boot/grub directory. Adds probe to the list of default builtin grub modules. Probe is required by the bootimg_pcbios wic plugin generated grub config. Signed-off-by: Vincent Davis Jr --- meta/recipes-bsp/grub/files/cfg-boot-grub | 3 +++ meta/recipes-bsp/grub/grub-efi_2.12.bb | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-bsp/grub/files/cfg-boot-grub diff --git a/meta/recipes-bsp/grub/files/cfg-boot-grub b/meta/recipes-bsp/grub/files/cfg-boot-grub new file mode 100644 index 0000000000..ab370479af --- /dev/null +++ b/meta/recipes-bsp/grub/files/cfg-boot-grub @@ -0,0 +1,3 @@ +search.file /boot/grub/grub.cfg root +set prefix=($root) +configfile ($root)/boot/grub/grub.cfg diff --git a/meta/recipes-bsp/grub/grub-efi_2.12.bb b/meta/recipes-bsp/grub/grub-efi_2.12.bb index 6354b43989..91748c8d04 100644 --- a/meta/recipes-bsp/grub/grub-efi_2.12.bb +++ b/meta/recipes-bsp/grub/grub-efi_2.12.bb @@ -9,6 +9,7 @@ RDEPENDS:${PN} = "grub-common virtual-grub-bootconf" SRC_URI += " \ file://cfg \ + file://cfg-boot-grub \ " S = "${UNPACKDIR}/grub-${PV}" @@ -48,6 +49,7 @@ EXTRA_OECONF += "--enable-efiemu=no" # Define GRUB_MKIMAGE_OPTS variable for additional grub-mkimage options (e.g., disabling shim lock) GRUB_MKIMAGE_OPTS ?= "" +EMBEDDED_GRUB_CONFIG ?= "${UNPACKDIR}/cfg" do_mkimage() { cd ${B} @@ -63,7 +65,7 @@ do_mkimage() { # Search for the grub.cfg on the local boot media by using the # built in cfg file provided via this recipe - grub-mkimage -v -c ${UNPACKDIR}/cfg -p ${EFIDIR} -d ./grub-core/ \ + grub-mkimage -v -c ${EMBEDDED_GRUB_CONFIG} -p ${EFIDIR} -d ./grub-core/ \ -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \ ${GRUB_MKIMAGE_OPTS} ${GRUB_MKIMAGE_MODULES} } @@ -87,7 +89,7 @@ do_install() { # To include all available modules, add 'all' to GRUB_BUILDIN GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \ - efi_gop iso9660 configfile search loadenv test" + efi_gop iso9660 configfile search probe loadenv test" # 'xen_boot' is a module valid only for aarch64 GRUB_BUILDIN:append:aarch64 = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' xen_boot', '', d)}" From patchwork Tue Sep 2 02:15:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Davis Jr X-Patchwork-Id: 69374 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AFD1CA1009 for ; Tue, 2 Sep 2025 02:15:54 +0000 (UTC) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by mx.groups.io with SMTP id smtpd.web11.68039.1756779346903421781 for ; Mon, 01 Sep 2025 19:15:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@underview.tech header.s=google header.b=hMB4XA5d; spf=pass (domain: underview.tech, ip: 209.85.160.176, mailfrom: vince@underview.tech) Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-4b30f73cb05so31092681cf.0 for ; Mon, 01 Sep 2025 19:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=underview.tech; s=google; t=1756779345; x=1757384145; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SonSS2ppfzgvWFpciZIOW9nhTW/Rqyk0ZKkN0GkrIys=; b=hMB4XA5dWNA5Fb9foZQsd+wotIeUB2pJy9FsLOi2fkddLMszoxMAi+qT5mTwcfwMaq w5THJP0jtarEVHhRebx5WmRG63uR8luOq6w+sF/IWM/CV+yMJQZpE6koht7bLv8P8Vkl OuomkGEIgaACo4jiAjLXXJeSgjQ0G4EQ9H44u4Xq2RqMHaEaL/VnTdTMYUfWrKGi/8z8 MX1nheGow6UbCVLUyc+SmXF/0sRkzuM0g44Zz9CNu47YWMI2NdA2Y5At2MCWvxbDf0DO +0Wo0OnNdwbjzUjkaDWQg26DKzGdsb0Q5bvvRflgChXdRlsvgztlLSKBCQ15q0hz1+6T zkKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756779345; x=1757384145; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SonSS2ppfzgvWFpciZIOW9nhTW/Rqyk0ZKkN0GkrIys=; b=UifLDAMqUt7reBUeUht751/EqqUY0Wvn1ZpfTuBYvg+clJ5Kk5RYzmZC+41UidpMP5 Ma9NFXuG2WrMQrIKE7YElFTvRUz9eq3T5REGMtWj4Zp8ORX62K6dycNc9ejddj6K3Nfl yVfnunRE+2wd88L2SniGRHCEa+InwHFZhK+x+6qr+9v6d2Se4mJJQhJEu0ZByxZk8KTN hmwk0bzn2uA3Oy30ljx+Hy4okXSJBwlHaP6KI4cMjd8fmv2q9ao8a9zE5D02DVuryROw G6U0oIFt+64fhGWYqh9IGYN+OVXrK4NkTryMmjA2WW5894ByaCLQfgJRYMxj8Vj9ZYV9 FWWg== X-Gm-Message-State: AOJu0YwOy7/UO3Xiu/DG0Ahi3ldsU4+325fCQzSv5L9H+lY3C6roJBu9 HBj8vUqjJpx/JczMxlpYKX6hlYkr2tvmu4IfTew9b0+WdpXiv62dQIkYd1TRxo/v/8w5miSre5a uUiT7RxU= X-Gm-Gg: ASbGncvc2+uwidsjCtlcX1li78v5XKe7EHT1RaW9kWVcf3WxROPfp8aME4fC8xHCrrW xr4QMlXB4orepMSYxwjXhCb1BgfZFOPyzL4ncDgLxg1onok8Auums/buQK471caDnlKVl6Yy06W aqO/tjiSQXiv8i6Y4QcV27TAazrNXkynmbxNhYbOjUohBiQNXlfYyBbgFMQG9Ao8PIJGtmWS2oL UY8w5NKx1nCLXPqGnmbSFXljEFTf0sCjAPrIm9RGQa35UCC6CQZELj237U2S1X226mKwtGaTo5r OEb7Evq/oZvldZiV+lz2oFsGinxlQ7OYEHVGrmXC95/1bmciflGFMJU2yNFmTjuEBWnszK0sqDp BMnCtaLaAul7vvoYJ9zPG41syx8idC7f6rbK03ex+YoNKiKiLg9PKFTij X-Google-Smtp-Source: AGHT+IFDBbct7iYVRRjuyXKbHcZk/VFRw3QHDjY1o2xApzMSLin8NbZyfWKDKD5BuEhNUQMd13b7vA== X-Received: by 2002:a05:6214:1c82:b0:70d:f74a:8f5b with SMTP id 6a1803df08f44-70fac75fdb0mr95307106d6.20.1756779345439; Mon, 01 Sep 2025 19:15:45 -0700 (PDT) Received: from vince-B550I-AORUS-PRO-AX.. ([2601:406:4d01:1820:90ff:fb15:d573:4b27]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720b55cf6c9sm4194436d6.49.2025.09.01.19.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 19:15:45 -0700 (PDT) From: Vincent Davis Jr To: openembedded-core@lists.openembedded.org Cc: Vincent Davis Jr Subject: [OE-core][PATCH v2 6/7] oe-selftest[wic]: add test_grub_install_biosplusefi Date: Mon, 1 Sep 2025 22:15:22 -0400 Message-Id: <20250902021523.25780-6-vince@underview.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250902021523.25780-1-vince@underview.tech> References: <20250902021523.25780-1-vince@underview.tech> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 Sep 2025 02:15:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222697 Commit adds test to check if required files are found in the EFI directory and that grub modules for both EFI and BIOS are found on the same partition as the grub config. Signed-off-by: Vincent Davis Jr --- meta/lib/oeqa/selftest/cases/wic.py | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 44442e402d..10c3497519 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -1456,6 +1456,60 @@ run_wic_cmd() { out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname)) self.assertEqual(1, len(out)) + @skipIfNotArch(['x86_64']) + def test_grub_install_biosplusefi(self): + """ + Test the installation of the grub in hybrid boot mode. + """ + + # create a temporary file for the WKS content + with NamedTemporaryFile("w", suffix=".wks") as wks: + wks.write( + 'part bios_boot --label bios_boot --fstype none --offset 1024 --fixed-size 1M ' \ + '--part-type 21686148-6449-6E6F-744E-656564454649 --source bootimg_biosplusefi ' \ + '--sourceparams="loader=grub-efi,loader-bios=grub,install-kernel-into-boot-dir=false"\n' \ + 'part efi_system --label efi_system --fstype vfat --fixed-size 48M ' \ + '--part-type C12A7328-F81F-11D2-BA4B-00A0C93EC93B --source bootimg_biosplusefi ' \ + '--sourceparams="loader=grub-efi,loader-bios=grub,install-kernel-into-boot-dir=false"\n' \ + 'part grub_data --label grub_data --fstype ext4 --fixed-size 78M ' \ + '--part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4 --source bootimg_biosplusefi ' \ + '--sourceparams="loader=grub-efi,loader-bios=grub,install-kernel-into-boot-dir=false"\n' \ + 'bootloader --ptable gpt --source bootimg_biosplusefi\n' + ) + wks.flush() + + img = "core-image-minimal" + config = 'DEPENDS:pn-%s += "grub-native grub grub-efi"' % (img) + + self.append_config(config) + bitbake(img) + self.remove_config(config) + + cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) + runCmd(cmd) + + wksname = os.path.splitext(os.path.basename(wks.name))[0] + out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname)) + self.assertEqual(1, len(out)) + + sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') + + # Check if grub UEFI application (core.img) installed + result = runCmd("wic ls %s:2/EFI/BOOT -n %s" % (out[0], sysroot)) + self.assertIn('bootx64', result.output) + + # Check if grub.cfg is installed + result = runCmd("wic ls %s:3/boot/grub -n %s" % (out[0], sysroot)) + self.assertIn('grub', result.output) + + # Check if normal.mod is installed + result = runCmd("wic ls %s:3/boot/grub/i386-pc -n %s" % (out[0], sysroot)) + self.assertIn('normal', result.output) + + # Check if normal.mod is installed + result = runCmd("wic ls %s:3/boot/grub/x86_64-efi -n %s" % (out[0], sysroot)) + self.assertIn('normal', result.output) + @skipIfNotArch(['i586', 'i686', 'x86_64', 'aarch64']) def test_uefi_kernel(self): """ Test uefi-kernel in wic """ From patchwork Tue Sep 2 02:15:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Davis Jr X-Patchwork-Id: 69373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6522BCA1007 for ; Tue, 2 Sep 2025 02:15:54 +0000 (UTC) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by mx.groups.io with SMTP id smtpd.web11.68040.1756779348424562196 for ; Mon, 01 Sep 2025 19:15:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@underview.tech header.s=google header.b=DBNr2kL2; spf=pass (domain: underview.tech, ip: 209.85.219.41, mailfrom: vince@underview.tech) Received: by mail-qv1-f41.google.com with SMTP id 6a1803df08f44-70dfcc589a6so47438636d6.2 for ; Mon, 01 Sep 2025 19:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=underview.tech; s=google; t=1756779347; x=1757384147; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=h7CPHW3JXcdF9dRYPIqs2+3tTx4vMiG7jO4JsaD66AQ=; b=DBNr2kL2Ufl5W4AbM7DwybWDdfBBo6WtH01Ch2Dkl+7nxHdYo301ZBBwWlJJFfFdtv 2V/BAt3zsmjao3tvmzcEiUa1E/I1p/XYkSTeNtCz4jQGg/Ncjum05lHgiRxtoksDzORo HFZq4fel+y2Tf+aZ8KMEB8N7ZHlZ4xO3deuF/Zp9O68Aqw3Kx+U9AtGLw1xQ34WdUmWb gY9ttRJylp7clfB+FkYma8TqjvZpl/IppdAgzkln+Nl3WZmPnuOEsvXwOn9pVVVL64lZ TULeWYkcGZ2/bHzwnSucnealqma4zd0jCJxeF3gb7NFC+bXs70o2JZUnIazrrpaX85cW hF3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756779347; x=1757384147; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h7CPHW3JXcdF9dRYPIqs2+3tTx4vMiG7jO4JsaD66AQ=; b=culEYzWnc0Bj+CWrgW25mVsySO4tbWFS9F6M7LRmVgfQyVKqDfPWZfjRlZFXcXcBqs AXkwWCmmD4BO8QmLhrW0QcyuNC2Pks9O2B0sn4ZKXMTZI8nuTm+S3EKOCxCmCO7+UAvE 693loz1oqPYNzjJBjxY+s6g8S3WGzOlpW/ueM3qlHPjuFQhgT4CM4nK/amL0Hjix3W9q RvFS1kPkO0eXexB1ViA6APvbPf05ulTqK70SBFxmBV4SK2Y9nE1NPl9Jma/7YOXcT2JS R4TZQ6OuwQmEHNC+gs4CxzQPi1SARtStHGwt9UhDNUDgIQbtvMlf0QXy8onnFDJxmrwB IZ8A== X-Gm-Message-State: AOJu0YwnRAEYdD7/WwhFCiryiFUoH+5iR79bEtwiMCyv7L+pnu6nt21E VNRNRWgkx0rNyS85dZ5Z2zPJcqlXclLHeljlCVOcdgb7RGhBfgIuZjWtIeD2GJUTj06WnnHgDlp ymcOJvMo= X-Gm-Gg: ASbGnctMTC7FkYjvANSSt1yG5XhqygIR3rcUPrtu6rKw4adRMuxMKo1zDNS1aBAF9Hb Nj+twy9KuJgSYEToOHN8fYc95xtTwFT9i5+3cfMxhKKRMTKzfsQToBufRuANCXta+iwNge2WjON wHoOFF7QG2OmvYtsIWS5pXGNaGGjH0N210UNN61gNNVJfSECbPGwM1IRGwH7urT8BFH6/jpKyVu 3+Iy+W5MxLj9+b5A4rPMV5CtR416FODGg/RjIXJpjrTBz0zeUZ8unbdZ5Or7kUGF8Uhc+StINrC RDU98Wi5bL+75Xj0vJaL/SXOKKXRUf9KvtUFWQO9qK0XU9RZ0sRI9Lln58ocWmm+PLCUHmvW37P YKCp7e4GxLS6h5aM3vEUOhv+EuFOCcFfmghCKetwSClEblw== X-Google-Smtp-Source: AGHT+IEYzNSFU/3DjW285wSat8DbfGzVFtMN0bUBeA+d/VmrOUpa9wh14Hv1M3M48kKWLMekN/1TGQ== X-Received: by 2002:a05:6214:e4c:b0:71f:238c:1494 with SMTP id 6a1803df08f44-71f238c1737mr24872116d6.20.1756779346728; Mon, 01 Sep 2025 19:15:46 -0700 (PDT) Received: from vince-B550I-AORUS-PRO-AX.. ([2601:406:4d01:1820:90ff:fb15:d573:4b27]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-720b55cf6c9sm4194436d6.49.2025.09.01.19.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 19:15:46 -0700 (PDT) From: Vincent Davis Jr To: openembedded-core@lists.openembedded.org Cc: Vincent Davis Jr Subject: [OE-core][PATCH v2 7/7] oe-selftest[wic]: add test_grub_install_biosplusefi_qemu Date: Mon, 1 Sep 2025 22:15:23 -0400 Message-Id: <20250902021523.25780-7-vince@underview.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250902021523.25780-1-vince@underview.tech> References: <20250902021523.25780-1-vince@underview.tech> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 Sep 2025 02:15:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222698 Test runs qemu given wic file and checks to see if the resulting wic image boots with either legacy bios or newer UEFI frimware whilst grub is the primary bootloader. Signed-off-by: Vincent Davis Jr --- meta/lib/oeqa/selftest/cases/wic.py | 61 +++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 10c3497519..efd1f5e6f0 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -1510,6 +1510,67 @@ run_wic_cmd() { result = runCmd("wic ls %s:3/boot/grub/x86_64-efi -n %s" % (out[0], sysroot)) self.assertIn('normal', result.output) + @skipIfNotArch(['x86_64']) + @OETestTag("runqemu") + def test_grub_install_biosplusefi_qemu(self): + """Test biosplusefi plugin grub only in qemu""" + + img = "core-image-minimal" + + # create a temporary file for the WKS content + with NamedTemporaryFile("w", suffix=".wks") as wks: + wks.write( + 'part bios_boot --label bios_boot --fstype none --offset 1024 --fixed-size 1M ' \ + '--part-type 21686148-6449-6E6F-744E-656564454649 --source bootimg_biosplusefi ' \ + '--sourceparams="loader=grub-efi,loader-bios=grub,install-kernel-into-boot-dir=false"\n' \ + 'part efi_system --label efi_system --fstype vfat --fixed-size 48M ' \ + '--part-type C12A7328-F81F-11D2-BA4B-00A0C93EC93B --source bootimg_biosplusefi ' \ + '--sourceparams="loader=grub-efi,loader-bios=grub,install-kernel-into-boot-dir=false"\n' \ + 'part grub_data --label grub_data --fstype ext4 --fixed-size 78M ' \ + '--part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4 --source bootimg_biosplusefi ' \ + '--sourceparams="loader=grub-efi,loader-bios=grub,install-kernel-into-boot-dir=false"\n' \ + 'part roots --label rootfs --fstype ext4 --source rootfs ' \ + '--part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4\n' \ + 'bootloader --timeout=1 --ptable gpt --source bootimg_biosplusefi\n' + ) + wks.flush() + + config = 'DEPENDS:pn-%s += "grub-native grub grub-efi ovmf"\n' % (img) + config += 'IMAGE_FSTYPES:pn-%s += "wic"\n' % (img) + #config += 'MACHINE_FEATURES:append = " efi"\n' + config += 'IMAGE_CLASSES += "qemuboot"\n' + config += 'WKS_FILE = "%s"\n' % (os.path.basename(wks.name)) + config += 'WKS_SEARCH_PATH = "%s"\n' % (os.path.dirname(wks.name)) + + self.append_config(config) + bitbake(img) + self.remove_config(config) + + cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) + runCmd(cmd) + + # Test legacy bios boot + runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', img) or "" + with runqemu(img, ssh=False, runqemuparams='%s nographic' % (runqemu_params), + image_fstype='wic') as qemu: + # Check that we have all four /dev/sda* partitions (/boot and /) + cmd = "grep sda. /proc/partitions | wc -l" + status, output = qemu.run_serial(cmd) + self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) + self.assertEqual(output, '4') + + # Test UEFI boot + # Can't test as it requires swapping the grub-efi*.bb + # embedded grub config. With one that works in the + # hybrid boot case. + #with runqemu(img, ssh=False, runqemuparams='%s ovmf nographic' % (runqemu_params), + # image_fstype='wic') as qemu: + # Check that we have all four /dev/sda* partitions (/boot and /) + # cmd = "grep sda. /proc/partitions | wc -l" + # status, output = qemu.run_serial(cmd) + # self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) + # self.assertEqual(output, '4') + @skipIfNotArch(['i586', 'i686', 'x86_64', 'aarch64']) def test_uefi_kernel(self): """ Test uefi-kernel in wic """