* [PATCH] arm64: properly install vmlinuz.efi
@ 2023-12-14 16:18 Josef Bacik
2023-12-14 20:12 ` Simon Glass
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Josef Bacik @ 2023-12-14 16:18 UTC (permalink / raw)
To: catalin.marinas, will, linux-arm-kernel
If you select CONFIG_EFI_ZBOOT, we will generate vmlinuz.efi, and then
when we go to install the kernel we'll install the vmlinux instead
because install.sh only recognizes Image.gz as wanting the compressed
install image. With CONFIG_EFI_ZBOOT we don't get the proper kernel
installed, which means it doesn't boot, which makes for a very confused
and subsequently angry kernel developer.
Fix this by properly installing our compressed kernel if we've enabled
CONFIG_EFI_ZBOOT.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
arch/arm64/boot/install.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/install.sh b/arch/arm64/boot/install.sh
index 7399d706967a..9b7a09808a3d 100755
--- a/arch/arm64/boot/install.sh
+++ b/arch/arm64/boot/install.sh
@@ -17,7 +17,8 @@
# $3 - kernel map file
# $4 - default install path (blank if root directory)
-if [ "$(basename $2)" = "Image.gz" ]; then
+if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
+then
# Compressed install
echo "Installing compressed kernel"
base=vmlinuz
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: properly install vmlinuz.efi
2023-12-14 16:18 [PATCH] arm64: properly install vmlinuz.efi Josef Bacik
@ 2023-12-14 20:12 ` Simon Glass
2023-12-15 14:25 ` Josef Bacik
2023-12-15 20:03 ` Catalin Marinas
2023-12-17 13:41 ` Will Deacon
2 siblings, 1 reply; 7+ messages in thread
From: Simon Glass @ 2023-12-14 20:12 UTC (permalink / raw)
To: Josef Bacik; +Cc: catalin.marinas, will, linux-arm-kernel
Hi Josef,
On Thu, 14 Dec 2023 at 09:19, Josef Bacik <josef@toxicpanda.com> wrote:
>
> If you select CONFIG_EFI_ZBOOT, we will generate vmlinuz.efi, and then
> when we go to install the kernel we'll install the vmlinux instead
> because install.sh only recognizes Image.gz as wanting the compressed
> install image. With CONFIG_EFI_ZBOOT we don't get the proper kernel
> installed, which means it doesn't boot, which makes for a very confused
> and subsequently angry kernel developer.
>
> Fix this by properly installing our compressed kernel if we've enabled
> CONFIG_EFI_ZBOOT.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> arch/arm64/boot/install.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/install.sh b/arch/arm64/boot/install.sh
> index 7399d706967a..9b7a09808a3d 100755
> --- a/arch/arm64/boot/install.sh
> +++ b/arch/arm64/boot/install.sh
> @@ -17,7 +17,8 @@
> # $3 - kernel map file
> # $4 - default install path (blank if root directory)
>
> -if [ "$(basename $2)" = "Image.gz" ]; then
> +if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
> +then
> # Compressed install
> echo "Installing compressed kernel"
> base=vmlinuz
This is a little messy.
There is a KBUILD_IMAGE var which should be usable, although I see
that it is set to $(boot)/Image when 'make install' is invoked.
Could we perhaps make sure that this var is set to the file to be installed?
I also wonder how useful it is to indicate whether the image is
compressed or not, so perhaps we could just say 'Installing kernel' ?
Regards,
Simon
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: properly install vmlinuz.efi
2023-12-14 20:12 ` Simon Glass
@ 2023-12-15 14:25 ` Josef Bacik
2023-12-15 17:49 ` Simon Glass
0 siblings, 1 reply; 7+ messages in thread
From: Josef Bacik @ 2023-12-15 14:25 UTC (permalink / raw)
To: Simon Glass; +Cc: catalin.marinas, will, linux-arm-kernel
On Thu, Dec 14, 2023 at 01:12:13PM -0700, Simon Glass wrote:
> Hi Josef,
>
> On Thu, 14 Dec 2023 at 09:19, Josef Bacik <josef@toxicpanda.com> wrote:
> >
> > If you select CONFIG_EFI_ZBOOT, we will generate vmlinuz.efi, and then
> > when we go to install the kernel we'll install the vmlinux instead
> > because install.sh only recognizes Image.gz as wanting the compressed
> > install image. With CONFIG_EFI_ZBOOT we don't get the proper kernel
> > installed, which means it doesn't boot, which makes for a very confused
> > and subsequently angry kernel developer.
> >
> > Fix this by properly installing our compressed kernel if we've enabled
> > CONFIG_EFI_ZBOOT.
> >
> > Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> > ---
> > arch/arm64/boot/install.sh | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/install.sh b/arch/arm64/boot/install.sh
> > index 7399d706967a..9b7a09808a3d 100755
> > --- a/arch/arm64/boot/install.sh
> > +++ b/arch/arm64/boot/install.sh
> > @@ -17,7 +17,8 @@
> > # $3 - kernel map file
> > # $4 - default install path (blank if root directory)
> >
> > -if [ "$(basename $2)" = "Image.gz" ]; then
> > +if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
> > +then
> > # Compressed install
> > echo "Installing compressed kernel"
> > base=vmlinuz
>
> This is a little messy.
>
> There is a KBUILD_IMAGE var which should be usable, although I see
> that it is set to $(boot)/Image when 'make install' is invoked.
Yeah, which is another pain point for me, because really what normal people want
to use is 'make zinstall', and that's not obvious anywhere and is a pretty
drastic departure from literally any other arch.
>
> Could we perhaps make sure that this var is set to the file to be installed?
>
> I also wonder how useful it is to indicate whether the image is
> compressed or not, so perhaps we could just say 'Installing kernel' ?
>
I have no strong opinions here, I'm reticent to be messing with an install
script for an arch I don't maintain. I need this change to be able to do
aarch64 testing in a VM, and honestly I'm sort of surprised I'm the first person
to run into this since the default stuff straight up doesn't work at all when it
does for other archs. Thanks,
Josef
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: properly install vmlinuz.efi
2023-12-15 14:25 ` Josef Bacik
@ 2023-12-15 17:49 ` Simon Glass
0 siblings, 0 replies; 7+ messages in thread
From: Simon Glass @ 2023-12-15 17:49 UTC (permalink / raw)
To: Josef Bacik; +Cc: catalin.marinas, will, linux-arm-kernel
Hi Josef,
On Fri, 15 Dec 2023 at 07:25, Josef Bacik <josef@toxicpanda.com> wrote:
>
> On Thu, Dec 14, 2023 at 01:12:13PM -0700, Simon Glass wrote:
> > Hi Josef,
> >
> > On Thu, 14 Dec 2023 at 09:19, Josef Bacik <josef@toxicpanda.com> wrote:
> > >
> > > If you select CONFIG_EFI_ZBOOT, we will generate vmlinuz.efi, and then
> > > when we go to install the kernel we'll install the vmlinux instead
> > > because install.sh only recognizes Image.gz as wanting the compressed
> > > install image. With CONFIG_EFI_ZBOOT we don't get the proper kernel
> > > installed, which means it doesn't boot, which makes for a very confused
> > > and subsequently angry kernel developer.
> > >
> > > Fix this by properly installing our compressed kernel if we've enabled
> > > CONFIG_EFI_ZBOOT.
> > >
> > > Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> > > ---
> > > arch/arm64/boot/install.sh | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/boot/install.sh b/arch/arm64/boot/install.sh
> > > index 7399d706967a..9b7a09808a3d 100755
> > > --- a/arch/arm64/boot/install.sh
> > > +++ b/arch/arm64/boot/install.sh
> > > @@ -17,7 +17,8 @@
> > > # $3 - kernel map file
> > > # $4 - default install path (blank if root directory)
> > >
> > > -if [ "$(basename $2)" = "Image.gz" ]; then
> > > +if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
> > > +then
> > > # Compressed install
> > > echo "Installing compressed kernel"
> > > base=vmlinuz
> >
> > This is a little messy.
> >
> > There is a KBUILD_IMAGE var which should be usable, although I see
> > that it is set to $(boot)/Image when 'make install' is invoked.
>
> Yeah, which is another pain point for me, because really what normal people want
> to use is 'make zinstall', and that's not obvious anywhere and is a pretty
> drastic departure from literally any other arch.
>
> >
> > Could we perhaps make sure that this var is set to the file to be installed?
> >
> > I also wonder how useful it is to indicate whether the image is
> > compressed or not, so perhaps we could just say 'Installing kernel' ?
> >
>
> I have no strong opinions here, I'm reticent to be messing with an install
> script for an arch I don't maintain. I need this change to be able to do
> aarch64 testing in a VM, and honestly I'm sort of surprised I'm the first person
> to run into this since the default stuff straight up doesn't work at all when it
> does for other archs. Thanks,
OK, well I don't plan to dig into either, and it fixes what seems to be a bug.
Reviewed-by: Simon Glass <sjg@chromium.org>
Regards,
Simon
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: properly install vmlinuz.efi
2023-12-14 16:18 [PATCH] arm64: properly install vmlinuz.efi Josef Bacik
2023-12-14 20:12 ` Simon Glass
@ 2023-12-15 20:03 ` Catalin Marinas
2023-12-15 21:43 ` Josef Bacik
2023-12-17 13:41 ` Will Deacon
2 siblings, 1 reply; 7+ messages in thread
From: Catalin Marinas @ 2023-12-15 20:03 UTC (permalink / raw)
To: Josef Bacik; +Cc: will, linux-arm-kernel, Ard Biesheuvel
On Thu, Dec 14, 2023 at 11:18:50AM -0500, Josef Bacik wrote:
> If you select CONFIG_EFI_ZBOOT, we will generate vmlinuz.efi, and then
> when we go to install the kernel we'll install the vmlinux instead
> because install.sh only recognizes Image.gz as wanting the compressed
> install image. With CONFIG_EFI_ZBOOT we don't get the proper kernel
> installed, which means it doesn't boot, which makes for a very confused
> and subsequently angry kernel developer.
>
> Fix this by properly installing our compressed kernel if we've enabled
> CONFIG_EFI_ZBOOT.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> arch/arm64/boot/install.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/install.sh b/arch/arm64/boot/install.sh
> index 7399d706967a..9b7a09808a3d 100755
> --- a/arch/arm64/boot/install.sh
> +++ b/arch/arm64/boot/install.sh
> @@ -17,7 +17,8 @@
> # $3 - kernel map file
> # $4 - default install path (blank if root directory)
>
> -if [ "$(basename $2)" = "Image.gz" ]; then
> +if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
> +then
> # Compressed install
> echo "Installing compressed kernel"
> base=vmlinuz
+ Ard who added the EFI_ZBOOT support.
If we go with this fix we should probably also add:
Fixes: c37b830fef13 ("arm64: efi: enable generic EFI compressed boot")
Cc: <stable@vger.kernel.org> # 6.1.x
But is arm64 the only one with this issue?
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: properly install vmlinuz.efi
2023-12-15 20:03 ` Catalin Marinas
@ 2023-12-15 21:43 ` Josef Bacik
0 siblings, 0 replies; 7+ messages in thread
From: Josef Bacik @ 2023-12-15 21:43 UTC (permalink / raw)
To: Catalin Marinas; +Cc: will, linux-arm-kernel, Ard Biesheuvel
On Fri, Dec 15, 2023 at 08:03:39PM +0000, Catalin Marinas wrote:
> On Thu, Dec 14, 2023 at 11:18:50AM -0500, Josef Bacik wrote:
> > If you select CONFIG_EFI_ZBOOT, we will generate vmlinuz.efi, and then
> > when we go to install the kernel we'll install the vmlinux instead
> > because install.sh only recognizes Image.gz as wanting the compressed
> > install image. With CONFIG_EFI_ZBOOT we don't get the proper kernel
> > installed, which means it doesn't boot, which makes for a very confused
> > and subsequently angry kernel developer.
> >
> > Fix this by properly installing our compressed kernel if we've enabled
> > CONFIG_EFI_ZBOOT.
> >
> > Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> > ---
> > arch/arm64/boot/install.sh | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/install.sh b/arch/arm64/boot/install.sh
> > index 7399d706967a..9b7a09808a3d 100755
> > --- a/arch/arm64/boot/install.sh
> > +++ b/arch/arm64/boot/install.sh
> > @@ -17,7 +17,8 @@
> > # $3 - kernel map file
> > # $4 - default install path (blank if root directory)
> >
> > -if [ "$(basename $2)" = "Image.gz" ]; then
> > +if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
> > +then
> > # Compressed install
> > echo "Installing compressed kernel"
> > base=vmlinuz
>
> + Ard who added the EFI_ZBOOT support.
>
> If we go with this fix we should probably also add:
>
> Fixes: c37b830fef13 ("arm64: efi: enable generic EFI compressed boot")
> Cc: <stable@vger.kernel.org> # 6.1.x
>
> But is arm64 the only one with this issue?
>
I can only speak for x86 and arm, x86 has been working fine using this config, I
only recently started using the same thing for arm on my mac studio and ran into
a variety of fun things. Thanks,
Josef
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: properly install vmlinuz.efi
2023-12-14 16:18 [PATCH] arm64: properly install vmlinuz.efi Josef Bacik
2023-12-14 20:12 ` Simon Glass
2023-12-15 20:03 ` Catalin Marinas
@ 2023-12-17 13:41 ` Will Deacon
2 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2023-12-17 13:41 UTC (permalink / raw)
To: Josef Bacik, linux-arm-kernel, catalin.marinas; +Cc: kernel-team, Will Deacon
On Thu, 14 Dec 2023 11:18:50 -0500, Josef Bacik wrote:
> If you select CONFIG_EFI_ZBOOT, we will generate vmlinuz.efi, and then
> when we go to install the kernel we'll install the vmlinux instead
> because install.sh only recognizes Image.gz as wanting the compressed
> install image. With CONFIG_EFI_ZBOOT we don't get the proper kernel
> installed, which means it doesn't boot, which makes for a very confused
> and subsequently angry kernel developer.
>
> [...]
Applied to arm64 (for-next/kbuild), thanks!
[1/1] arm64: properly install vmlinuz.efi
https://git.kernel.org/arm64/c/7b21ed7d119d
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-12-17 13:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14 16:18 [PATCH] arm64: properly install vmlinuz.efi Josef Bacik
2023-12-14 20:12 ` Simon Glass
2023-12-15 14:25 ` Josef Bacik
2023-12-15 17:49 ` Simon Glass
2023-12-15 20:03 ` Catalin Marinas
2023-12-15 21:43 ` Josef Bacik
2023-12-17 13:41 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).