* [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories
@ 2020-04-02 21:45 Thomas Petazzoni
2020-04-02 21:45 ` [Buildroot] [PATCH 2/2] linux: adjust BR2_LINUX_KERNEL_IMAGE_NAME help text Thomas Petazzoni
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2020-04-02 21:45 UTC (permalink / raw)
To: buildroot
The Linux kernel image is typically found in arch/ARCH/boot/, which is
why LINUX_IMAGE_PATH is defined as:
LINUX_IMAGE_PATH = $(LINUX_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME)
However, on MIPS, some kernel image types are available from
arch/mips/boot/compressed, or even at the top-level directory. For
such cases, LINUX_IMAGE_NAME might be set (using
BR2_LINUX_KERNEL_IMAGE_NAME) to values such as:
compressed/vmlinux.bin.z
or
../../../uzImage.bin
Except that the line:
$(INSTALL) -m 0644 -D $(LINUX_IMAGE_PATH) $(1)/$(notdir $(LINUX_IMAGE_NAME))
will lead to such images be installed in:
$(TARGET_DIR)/boot/compressed/vmlinux.bin.z
$(BINARIES_DIR)/compressed/vmlinux.bin.z
and:
$(TARGET_DIR)/boot/../../../uzImage.bin
$(BINARIES_DIR)/../../../uzImage.bin
which of course is completely bogus.
So let's install them under their name, not their full relative path
to arch/ARCH/boot/.
Reported-by: Paul Cercueil <paul@crapouillou.net>
Cc: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
linux/linux.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux/linux.mk b/linux/linux.mk
index b2ceeecafb..3d9052a337 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -496,7 +496,7 @@ else
# Otherwise, just install the unique image generated by the kernel
# build process.
define LINUX_INSTALL_IMAGE
- $(INSTALL) -m 0644 -D $(LINUX_IMAGE_PATH) $(1)/$(LINUX_IMAGE_NAME)
+ $(INSTALL) -m 0644 -D $(LINUX_IMAGE_PATH) $(1)/$(notdir $(LINUX_IMAGE_NAME))
endef
endif
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH 2/2] linux: adjust BR2_LINUX_KERNEL_IMAGE_NAME help text
2020-04-02 21:45 [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories Thomas Petazzoni
@ 2020-04-02 21:45 ` Thomas Petazzoni
2020-04-02 22:25 ` Peter Korsgaard
2020-04-08 12:51 ` Peter Korsgaard
2020-04-02 22:25 ` [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories Peter Korsgaard
2020-04-08 12:50 ` Peter Korsgaard
2 siblings, 2 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2020-04-02 21:45 UTC (permalink / raw)
To: buildroot
The help text of BR2_LINUX_KERNEL_IMAGE_NAME is somewhat incomplete,
in the sense that it assumes just a filename can be passed, while it
can be a relative path, such as 'compressed/vmlinux.bin.z'. So make it
clear that such paths are relative to arch/ARCH/boot/.
Also, drop the part about this being only useful for Xtensa as this is
not true: on MIPS it might be needed as well for some specific image
types.
Reported-by: Paul Cercueil <paul@crapouillou.net>
Cc: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
linux/Config.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/linux/Config.in b/linux/Config.in
index 86b5092b8a..ddf0264d33 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -338,10 +338,10 @@ config BR2_LINUX_KERNEL_IMAGE_NAME
string "Kernel image name"
depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
help
- The filename of the kernel image, if it is different from the
- make target (above). Only Xtensa uses a filename different
- from the make target. Defaults to
- BR2_LINUX_KERNEL_IMAGE_TARGET_NAME.
+ The filename of the kernel image, if it is different from
+ the make target (above). Defaults to
+ BR2_LINUX_KERNEL_IMAGE_TARGET_NAME. If specified, the
+ filename is relative to arch/ARCH/boot/.
If unsure, leave it empty.
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] linux: adjust BR2_LINUX_KERNEL_IMAGE_NAME help text
2020-04-02 21:45 ` [Buildroot] [PATCH 2/2] linux: adjust BR2_LINUX_KERNEL_IMAGE_NAME help text Thomas Petazzoni
@ 2020-04-02 22:25 ` Peter Korsgaard
2020-04-08 12:51 ` Peter Korsgaard
1 sibling, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2020-04-02 22:25 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> The help text of BR2_LINUX_KERNEL_IMAGE_NAME is somewhat incomplete,
> in the sense that it assumes just a filename can be passed, while it
> can be a relative path, such as 'compressed/vmlinux.bin.z'. So make it
> clear that such paths are relative to arch/ARCH/boot/.
> Also, drop the part about this being only useful for Xtensa as this is
> not true: on MIPS it might be needed as well for some specific image
> types.
> Reported-by: Paul Cercueil <paul@crapouillou.net>
> Cc: Paul Cercueil <paul@crapouillou.net>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] linux: adjust BR2_LINUX_KERNEL_IMAGE_NAME help text
2020-04-02 21:45 ` [Buildroot] [PATCH 2/2] linux: adjust BR2_LINUX_KERNEL_IMAGE_NAME help text Thomas Petazzoni
2020-04-02 22:25 ` Peter Korsgaard
@ 2020-04-08 12:51 ` Peter Korsgaard
1 sibling, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2020-04-08 12:51 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> The help text of BR2_LINUX_KERNEL_IMAGE_NAME is somewhat incomplete,
> in the sense that it assumes just a filename can be passed, while it
> can be a relative path, such as 'compressed/vmlinux.bin.z'. So make it
> clear that such paths are relative to arch/ARCH/boot/.
> Also, drop the part about this being only useful for Xtensa as this is
> not true: on MIPS it might be needed as well for some specific image
> types.
> Reported-by: Paul Cercueil <paul@crapouillou.net>
> Cc: Paul Cercueil <paul@crapouillou.net>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed to 2020.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories
2020-04-02 21:45 [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories Thomas Petazzoni
2020-04-02 21:45 ` [Buildroot] [PATCH 2/2] linux: adjust BR2_LINUX_KERNEL_IMAGE_NAME help text Thomas Petazzoni
@ 2020-04-02 22:25 ` Peter Korsgaard
2020-04-03 5:18 ` Thomas Petazzoni
2020-04-08 12:50 ` Peter Korsgaard
2 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2020-04-02 22:25 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> The Linux kernel image is typically found in arch/ARCH/boot/, which is
> why LINUX_IMAGE_PATH is defined as:
> LINUX_IMAGE_PATH = $(LINUX_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME)
> However, on MIPS, some kernel image types are available from
> arch/mips/boot/compressed, or even at the top-level directory. For
> such cases, LINUX_IMAGE_NAME might be set (using
> BR2_LINUX_KERNEL_IMAGE_NAME) to values such as:
> compressed/vmlinux.bin.z
> or
> ../../../uzImage.bin
> Except that the line:
> $(INSTALL) -m 0644 -D $(LINUX_IMAGE_PATH) $(1)/$(notdir $(LINUX_IMAGE_NAME))
This is a bit confusing, as it is because notdir was NOT used that it
didn't work, so I've dropped that from the commit message and committed,
thanks.
> will lead to such images be installed in:
> $(TARGET_DIR)/boot/compressed/vmlinux.bin.z
> $(BINARIES_DIR)/compressed/vmlinux.bin.z
> and:
> $(TARGET_DIR)/boot/../../../uzImage.bin
> $(BINARIES_DIR)/../../../uzImage.bin
> which of course is completely bogus.
> So let's install them under their name, not their full relative path
> to arch/ARCH/boot/.
> Reported-by: Paul Cercueil <paul@crapouillou.net>
> Cc: Paul Cercueil <paul@crapouillou.net>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> linux/linux.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/linux/linux.mk b/linux/linux.mk
> index b2ceeecafb..3d9052a337 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -496,7 +496,7 @@ else
> # Otherwise, just install the unique image generated by the kernel
> # build process.
> define LINUX_INSTALL_IMAGE
> - $(INSTALL) -m 0644 -D $(LINUX_IMAGE_PATH) $(1)/$(LINUX_IMAGE_NAME)
> + $(INSTALL) -m 0644 -D $(LINUX_IMAGE_PATH) $(1)/$(notdir $(LINUX_IMAGE_NAME))
> endef
> endif
> --
> 2.25.1
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories
2020-04-02 22:25 ` [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories Peter Korsgaard
@ 2020-04-03 5:18 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2020-04-03 5:18 UTC (permalink / raw)
To: buildroot
On Fri, 03 Apr 2020 00:25:05 +0200
Peter Korsgaard <peter@korsgaard.com> wrote:
> > Except that the line:
>
> > $(INSTALL) -m 0644 -D $(LINUX_IMAGE_PATH) $(1)/$(notdir $(LINUX_IMAGE_NAME))
>
> This is a bit confusing, as it is because notdir was NOT used that it
> didn't work, so I've dropped that from the commit message and committed,
> thanks.
Gah, indeed, I copy/pasted the line after having done my change. Stupid
me. Thanks for noticing and fixing this!
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories
2020-04-02 21:45 [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories Thomas Petazzoni
2020-04-02 21:45 ` [Buildroot] [PATCH 2/2] linux: adjust BR2_LINUX_KERNEL_IMAGE_NAME help text Thomas Petazzoni
2020-04-02 22:25 ` [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories Peter Korsgaard
@ 2020-04-08 12:50 ` Peter Korsgaard
2 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2020-04-08 12:50 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> The Linux kernel image is typically found in arch/ARCH/boot/, which is
> why LINUX_IMAGE_PATH is defined as:
> LINUX_IMAGE_PATH = $(LINUX_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME)
> However, on MIPS, some kernel image types are available from
> arch/mips/boot/compressed, or even at the top-level directory. For
> such cases, LINUX_IMAGE_NAME might be set (using
> BR2_LINUX_KERNEL_IMAGE_NAME) to values such as:
> compressed/vmlinux.bin.z
> or
> ../../../uzImage.bin
> Except that the line:
> $(INSTALL) -m 0644 -D $(LINUX_IMAGE_PATH) $(1)/$(notdir $(LINUX_IMAGE_NAME))
> will lead to such images be installed in:
> $(TARGET_DIR)/boot/compressed/vmlinux.bin.z
> $(BINARIES_DIR)/compressed/vmlinux.bin.z
> and:
> $(TARGET_DIR)/boot/../../../uzImage.bin
> $(BINARIES_DIR)/../../../uzImage.bin
> which of course is completely bogus.
> So let's install them under their name, not their full relative path
> to arch/ARCH/boot/.
> Reported-by: Paul Cercueil <paul@crapouillou.net>
> Cc: Paul Cercueil <paul@crapouillou.net>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed to 2020.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-08 12:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-02 21:45 [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories Thomas Petazzoni
2020-04-02 21:45 ` [Buildroot] [PATCH 2/2] linux: adjust BR2_LINUX_KERNEL_IMAGE_NAME help text Thomas Petazzoni
2020-04-02 22:25 ` Peter Korsgaard
2020-04-08 12:51 ` Peter Korsgaard
2020-04-02 22:25 ` [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories Peter Korsgaard
2020-04-03 5:18 ` Thomas Petazzoni
2020-04-08 12:50 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox