aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2013-06-27 19:58:24 +0000
committerFlorian Fainelli <florian@openwrt.org>2013-06-27 19:58:24 +0000
commit5431c1983b51e4f69db63f5d5c94b2ed157e5374 (patch)
treea946a2ca29b069be15fcf5ce32b251bc96109b02
parent3bb96308779f349b19da03aa55cf56da94dd8195 (diff)
downloadmaster-187ad058-5431c1983b51e4f69db63f5d5c94b2ed157e5374.tar.gz
master-187ad058-5431c1983b51e4f69db63f5d5c94b2ed157e5374.tar.bz2
master-187ad058-5431c1983b51e4f69db63f5d5c94b2ed157e5374.zip
buildroot: copy KENRNELNAME files to $(KDIR)
In order to support building both normal and initramfs kernel, we will rebuild the wrappers around the vmlinux ELF binary, copy these with an appropriate extension when they exist. Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37048 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--include/kernel-defaults.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 9a5eefdf2c..7e807bfaff 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -118,9 +118,19 @@ endef
OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
+# AVR32 uses a non-standard location
+ifeq ($(LINUX_KARCH),avr32)
+IMAGES_DIR:=images
+endif
+
define Kernel/CopyImage
$(KERNEL_CROSS)objcopy -O binary $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)$(1)
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).elf
+ifneq ($(subst ",,$(KERNELNAME)),)
+ #")
+ $(foreach k,$(subst ",,$(KERNELNAME)),$(CP) $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/$(IMAGES_DIR)/$(k) $(KERNEL_BUILD_DIR)/$(k)$(1);)
+ #")
+endif
endef
define Kernel/CompileImage/Default