aboutsummaryrefslogtreecommitdiff
path: root/linux/linux.mk
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2020-04-02 23:45:48 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2020-04-03 00:23:49 +0200
commit19be97d497f7139d17deb7a7a5223d20bc4b98d5 (patch)
tree73d9562b5c23863cafa6375b2eaffdb722701565 /linux/linux.mk
parentd0affe4710b46c8700ae8190f9b7aa54ed04b9a9 (diff)
downloadbuildroot-19be97d497f7139d17deb7a7a5223d20bc4b98d5.tar.gz
buildroot-19be97d497f7139d17deb7a7a5223d20bc4b98d5.tar.bz2
linux: do not install images in subdirectories
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)/$(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> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'linux/linux.mk')
-rw-r--r--linux/linux.mk2
1 files changed, 1 insertions, 1 deletions
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