[PATCH v5 8/8] loongarch: efi: enable generic EFI compressed boot

Ard Biesheuvel ardb at kernel.org
Mon Sep 12 03:18:05 PDT 2022


On Sun, 11 Sept 2022 at 16:03, 陈华才 <chenhuacai at loongson.cn> wrote:
>
>
>
>
> > -----原始邮件-----
> > 发件人: "Ard Biesheuvel" <ardb at kernel.org>
> > 发送时间:2022-09-10 22:28:04 (星期六)
> > 收件人: "陈华才" <chenhuacai at loongson.cn>
> > 抄送: linux-efi at vger.kernel.org, linux-arm-kernel at lists.infradead.org, linux-kernel at vger.kernel.org, "James E.J. Bottomley" <James.Bottomley at hansenpartnership.com>, "Matthew Garrett" <mjg59 at srcf.ucam.org>, "Peter Jones" <pjones at redhat.com>, "Ilias Apalodimas" <ilias.apalodimas at linaro.org>, "Heinrich Schuchardt" <heinrich.schuchardt at canonical.com>, "AKASHI Takahiro" <takahiro.akashi at linaro.org>, "Palmer Dabbelt" <palmer at dabbelt.com>, "Atish Patra" <atishp at atishpatra.org>, "Arnd Bergmann" <arnd at arndb.de>, "Xi Ruoyao" <xry111 at xry111.site>, "Lennart Poettering" <lennart at poettering.net>, "Jeremy Linton" <jeremy.linton at arm.com>, "Will Deacon" <will at kernel.org>, "Catalin Marinas" <catalin.marinas at arm.com>
> > 主题: Re: [PATCH v5 8/8] loongarch: efi: enable generic EFI compressed boot
> >
> > On Sat, 10 Sept 2022 at 15:22, 陈华才 <chenhuacai at loongson.cn> wrote:
> > >
> > > Hi, Ard,
> > >
> > > I prefer to give a chance to disable ZBOOT, so I don't want to select EFI_ZBOOT unconditionally in Kconfig, and then the Makefile can be like this:
> > > diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile
> > > index c3f579bdf9e5..bc6fe65125f5 100644
> > > --- a/arch/loongarch/Makefile
> > > +++ b/arch/loongarch/Makefile
> > > @@ -14,6 +14,10 @@ else
> > >  KBUILD_IMAGE   := $(boot)/vmlinux.efi
> > >  endif
> > >
> > > +ifdef CONFIG_EFI_ZBOOT
> > > +KBUILD_IMAGE    := $(boot)/vmlinuz.efi
> > > +endif
> > > +
> > >  archscripts: scripts_basic
> > >         $(Q)$(MAKE) $(build)=arch/loongarch/boot/tools relocs
> > >
> >
> > OK, I will fold this in. This actually aligns it with the other
> > architectures, so I prefer this approach as well.
>
> Thank you, and if "make install" can also handle the zboot case, that's even better. :)
>
> diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile
> index c3f579bdf9e5..5480fe2de7cd 100644
> --- a/arch/loongarch/Makefile
> +++ b/arch/loongarch/Makefile
> @@ -137,7 +137,11 @@ vmlinux.elf vmlinux.efi vmlinuz.efi: vmlinux
>  core-y += arch/loongarch/boot/dts/
>
>  install:
> +ifndef CONFIG_EFI_ZBOOT
>         $(Q)install -D -m 755 $(KBUILD_IMAGE) $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
> +else
> +       $(Q)install -D -m 755 $(KBUILD_IMAGE) $(INSTALL_PATH)/vmlinuz-$(KERNELRELEASE)
> +endif
>         $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
>         $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
>

Is there any reason in particular this is open coded like this? Other
architectures just do something like

install:
    $(call cmd,install)

and be done with it.



More information about the linux-arm-kernel mailing list