All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Frias <sf84@laposte.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux: use $(LINUX_INSTALL_IMAGE_CMDS) instead of plain 'cp'
Date: Mon, 25 Apr 2016 13:58:59 +0200	[thread overview]
Message-ID: <571E0683.4080306@laposte.net> (raw)


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) 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_IMAGES_CMDS) which
handles APPENDED_DTB. It also makes the copy verbose so that the user can
see how many images were copied.

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

Signed-off-by: Sebastian Frias <sf84@laposte.net>
---
 linux/linux.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 317587f..1f93074 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -330,7 +330,7 @@ ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y)
 # appended DTBs.
 define LINUX_INSTALL_IMAGE
 	mkdir -p $(1)
-	cp $(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME).* $(1)
+	cp -v $(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME).* $(1)
 endef
 else
 # Otherwise, just install the unique image generated by the kernel
@@ -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
+	$(LINUX_INSTALL_IMAGES_CMDS)
 	# 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 $@
-- 
1.7.11.2

             reply	other threads:[~2016-04-25 11:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 11:58 Sebastian Frias [this message]
2016-04-25 12:06 ` [Buildroot] [PATCH] linux: use $(LINUX_INSTALL_IMAGE_CMDS) instead of plain 'cp' Thomas Petazzoni
2016-04-25 12:13   ` Thomas Petazzoni
2016-04-25 12:17   ` Sebastian Frias
2016-04-25 12:23     ` Thomas Petazzoni
2016-04-25 12:44       ` Sebastian Frias
2016-04-25 14:52   ` [Buildroot] [PATCH v2] " Sebastian Frias
2016-04-25 19:43     ` Thomas Petazzoni
2016-04-26  8:44       ` Sebastian Frias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=571E0683.4080306@laposte.net \
    --to=sf84@laposte.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.