From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux target name might be not equal linux file name
Date: Tue, 24 Jun 2014 15:18:25 +0200 [thread overview]
Message-ID: <20140624131825.GA29718@waldemar-brodkorb.de> (raw)
For example the upcoming qemu-xtensa patch is using this feature,
where the target is called "zImage", but the resulting kernel name
is "Image.elf".
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
linux/Config.in | 6 ++++++
linux/linux.mk | 10 ++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/linux/Config.in b/linux/Config.in
index ece48a7..0f4337f 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -244,6 +244,12 @@ config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
Specify the kernel make target to build the kernel that you
need.
+config BR2_LINUX_KERNEL_IMAGE_NAME
+ string "Kernel image name"
+ depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
+ help
+ Specify the kernel filename.
+
config BR2_LINUX_KERNEL_UIMAGE_LOADADDR
string "load address (for 3.7+ multi-platform image)"
depends on BR2_arm || BR2_armeb
diff --git a/linux/linux.mk b/linux/linux.mk
index bd3f2ac..1e7d2e2 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -80,8 +80,10 @@ endif
KERNEL_DTBS = $(addsuffix .dtb,$(KERNEL_DTS_NAME))
ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
-LINUX_IMAGE_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME))
+LINUX_IMAGE_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_NAME))
+LINUX_TARGET_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME))
else
+LINUX_TARGET_NAME = $(LINUX_IMAGE_NAME)
ifeq ($(BR2_LINUX_KERNEL_UIMAGE),y)
LINUX_IMAGE_NAME = uImage
else ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y)
@@ -259,7 +261,7 @@ endif
define LINUX_BUILD_CMDS
$(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
cp $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH) $(KERNEL_ARCH_PATH)/boot/dts/)
- $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME)
+ $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \
$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
fi
@@ -331,8 +333,8 @@ endif
# been generated in $(BINARIES_DIR)/rootfs.cpio.
$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LINUX_DIR)/.stamp_images_installed $(BINARIES_DIR)/rootfs.cpio
@$(call MESSAGE,"Rebuilding kernel with initramfs")
- # Build the kernel.
- $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME)
+ # Build the kernel. for custom kernels make target may be unequal to kernel file name
+ $(TARGET_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)
--
1.7.10.4
next reply other threads:[~2014-06-24 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 13:18 Waldemar Brodkorb [this message]
2014-06-24 16:01 ` [Buildroot] [PATCH] linux target name might be not equal linux file name Arnout Vandecappelle
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=20140624131825.GA29718@waldemar-brodkorb.de \
--to=wbx@openadk.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox