public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Linton <jeremy.linton@arm.com>
To: Ard Biesheuvel <ardb@kernel.org>, linux-efi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Peter Jones <pjones@redhat.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Atish Patra <atishp@atishpatra.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Huacai Chen <chenhuacai@loongson.cn>,
	Xi Ruoyao <xry111@xry111.site>,
	Lennart Poettering <lennart@poettering.net>
Subject: Re: [PATCH v4 6/9] arm64: efi: enable generic EFI compressed boot
Date: Wed, 31 Aug 2022 17:05:03 -0500	[thread overview]
Message-ID: <d58f870f-c41c-9d4b-4dc8-83ef4efe5ce9@arm.com> (raw)
In-Reply-To: <20220827083850.2702465-7-ardb@kernel.org>

Hi,


On 8/27/22 03:38, Ard Biesheuvel wrote:
> Wire up the generic EFI zboot support for arm64.

Thanks for this series, its very helpful when using a boot manager that 
isn't grub (ex: systemd-boot, ipxe, etc) since those boot managers have 
the expectation that they are simply executing efi images. Given how 
large some of the uncompressed images get, and having a half dozen of 
them on a machine isn't ideal. So this series solves that problem, as 
well as cleans up some of the less than ideal grubisms that aren't 
needed on !x86 platforms.

So, I've been testing this series with a clean (as in grub/grubby/etc 
was never near the system) systemd-boot, which now works given the fixes 
to the initrd= option. It seems that the resulting boot path is 
noticeably faster as well. Given I've been testing both gziped and 
Lz4'ed images it could just be the latter option is faster, or it could 
be grubs decompressor/load sequence is just slow.

That said, I think there are a couple build tweaks in order. First, I 
would expect that just a normal 'make' (rather than 'make vmlinuz.efi') 
would make the resulting image when ZBOOT is enabled . Then I would 
expect 'make install' (or maybe a new 'make ezinstall?') to pass the new 
compressed efi to the installkernel utility. The install option would 
work without changes if the make pass just renames/creates the resulting 
vmlinuz.efi as Image. So.. there are a bunch of choices here, but my 
assumption is that the ZBOOT changes the resulting image, and the normal 
make/make install sequence just does the right thing.


So, now the fun bit. At the moment my shim->grub->efi-stubbed kernel 
path (which is the default fedora/rhel sequence) appears to be broken if 
I swap the compressed image (not the .gz version) in for a normal 
decompressed kernel. That appears to be a grub bug in fedora at the 
moment, but I've not fully tracked it down.

I was going to test secure boot, but the above problem has temporary 
stalled that, and I'm still cleaning up a few things on the sd-boot side 
(there isn't a shim in the path) before that is a workable testing path 
for anything other than a test signed kernel.


Thanks again for this, its extremely helpful.


> 
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> ---
>   arch/arm64/Makefile      | 4 ++--
>   arch/arm64/boot/Makefile | 6 ++++++
>   2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 6d9d4a58b898..92676ccc6363 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -153,10 +153,10 @@ libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
>   boot		:= arch/arm64/boot
>   KBUILD_IMAGE	:= $(boot)/Image.gz
>   
> -all:	Image.gz
> +all:	$(notdir $(KBUILD_IMAGE))
>   
>   
> -Image: vmlinux
> +Image vmlinuz.efi: vmlinux
>   	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
>   
>   Image.%: Image
> diff --git a/arch/arm64/boot/Makefile b/arch/arm64/boot/Makefile
> index a0e3dedd2883..c65aee088410 100644
> --- a/arch/arm64/boot/Makefile
> +++ b/arch/arm64/boot/Makefile
> @@ -38,3 +38,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
>   
>   $(obj)/Image.zst: $(obj)/Image FORCE
>   	$(call if_changed,zstd)
> +
> +EFI_ZBOOT_PAYLOAD	:= Image
> +EFI_ZBOOT_BFD_TARGET	:= elf64-littleaarch64
> +EFI_ZBOOT_MACH_TYPE	:= ARM64
> +
> +include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot


  reply	other threads:[~2022-08-31 22:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27  8:38 [PATCH v4 0/9] efi: implement generic compressed boot support Ard Biesheuvel
2022-08-27  8:38 ` [PATCH v4 1/9] efi: name the ARCH-stub.c files uniformly Ard Biesheuvel
2022-08-27  8:38 ` [PATCH v4 2/9] efi/libstub: add some missing EFI prototypes Ard Biesheuvel
2022-08-27  8:38 ` [PATCH v4 3/9] efi/libstub: use EFI provided memcpy/memset routines Ard Biesheuvel
2022-08-27  8:38 ` [PATCH v4 4/9] efi/libstub: move efi_system_table global var into separate object Ard Biesheuvel
2022-08-27  8:38 ` [PATCH v4 5/9] efi/libstub: implement generic EFI zboot Ard Biesheuvel
2022-08-27  8:38 ` [PATCH v4 6/9] arm64: efi: enable generic EFI compressed boot Ard Biesheuvel
2022-08-31 22:05   ` Jeremy Linton [this message]
2022-09-01  0:48     ` Xi Ruoyao
2022-08-27  8:38 ` [PATCH v4 7/9] riscv: " Ard Biesheuvel
2022-08-27  8:38 ` [PATCH v4 8/9] loongarch: avoid orphan input sections Ard Biesheuvel
2022-08-27 10:15   ` 陈华才
2022-08-27 13:27     ` Ard Biesheuvel
2022-08-28  3:31       ` Xi Ruoyao
2022-08-28  9:36         ` Ard Biesheuvel
2022-08-28  9:44           ` Xi Ruoyao
2022-08-29  3:59             ` 陈华才
2022-08-27  8:38 ` [PATCH v4 9/9] loongarch: efi: enable generic EFI compressed boot Ard Biesheuvel
2022-08-28  9:52   ` Xi Ruoyao
2022-08-28 10:57     ` Xi Ruoyao
2022-08-29  8:13     ` 陈华才

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d58f870f-c41c-9d4b-4dc8-83ef4efe5ce9@arm.com \
    --to=jeremy.linton@arm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=atishp@atishpatra.org \
    --cc=chenhuacai@loongson.cn \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=lennart@poettering.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=palmer@dabbelt.com \
    --cc=pjones@redhat.com \
    --cc=takahiro.akashi@linaro.org \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox