From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Korsgaard Date: Fri, 03 Apr 2020 00:25:05 +0200 Subject: [Buildroot] [PATCH 1/2] linux: do not install images in subdirectories In-Reply-To: <20200402214549.2977215-1-thomas.petazzoni@bootlin.com> (Thomas Petazzoni's message of "Thu, 2 Apr 2020 23:45:48 +0200") References: <20200402214549.2977215-1-thomas.petazzoni@bootlin.com> Message-ID: <877dyx7cfy.fsf@dell.be.48ers.dk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net >>>>> "Thomas" == Thomas Petazzoni 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 > Cc: Paul Cercueil > Signed-off-by: Thomas Petazzoni > --- > 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