linux: properly install all images in the initramfs case
authorSebastian Frias <sf84@laposte.net>
Mon, 25 Apr 2016 14:52:17 +0000 (16:52 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 25 Apr 2016 19:40:47 +0000 (21:40 +0200)
The target "$(LINUX_DIR)/.stamp_initramfs_rebuilt" uses its own
'cp' command, instead of LINUX_INSTALL_IMAGE/LINUX_INSTALL_IMAGES_CMDS
provided by (or updated with) commit 055e6162bba7 ("linux: don't build
appended DTB image in place and support multiple images") and thus is
not operating properly when APPENDED_DTB is used.

Indeed, it copies a single image, and does not copy the one with the DTB
appended.

This patch replaces the 'cp' command with LINUX_INSTALL_IMAGE which
handles APPENDED_DTB.

Fixes: 055e6162bba7 ("linux: don't build appended DTB image in place and
support multiple images")

Signed-off-by: Sebastian Frias <sf84@laposte.net>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
linux/linux.mk

index 317587f1df69ff9ffb860a9c68197210c044ff5c..d88060e09cb77b41365e85df7c46b580b7f13215 100644 (file)
@@ -447,8 +447,8 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LI
        # Build the kernel.
        $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
        $(LINUX_APPEND_DTB)
-       # Copy the kernel image to its final destination
-       cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
+       # Copy the kernel image(s) to its(their) final destination
+       $(call LINUX_INSTALL_IMAGE,$(BINARIES_DIR))
        # If there is a .ub file copy it to the final destination
        test ! -f $(LINUX_IMAGE_PATH).ub || cp $(LINUX_IMAGE_PATH).ub $(BINARIES_DIR)
        $(Q)touch $@