aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-03-23 12:52:47 +0000
committerJohn Crispin <blogic@openwrt.org>2016-03-23 12:52:47 +0000
commitf1a66d4191183478a88e21e44565a4bea17ca841 (patch)
treef563a4ebdb7056ebb5da8e122dd2b9ec5e1cc0c2 /target/linux/ar71xx/image
parentf85bed07bc35dc0ea5bdf336342c3702cd13a484 (diff)
downloadmaster-187ad058-f1a66d4191183478a88e21e44565a4bea17ca841.tar.gz
master-187ad058-f1a66d4191183478a88e21e44565a4bea17ca841.tar.bz2
master-187ad058-f1a66d4191183478a88e21e44565a4bea17ca841.zip
ar71xx/image: allow builds of loader without cmdline injecting
On most platforms the cmdline is supplied by the loader to the kernel. When using an elf loader with cmdline the size is bloated by 512k. For loader-elf platforms like the cpe510 better use loader-elf but patch the cmdline into the kernel. wdr1043: Tested loader still works using sysupgade image. Signed-off-by: Alexander Couzens <lynxis@fe80.eu> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49080 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/image')
-rw-r--r--target/linux/ar71xx/image/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 0c8aaa2bfe..507d7506e5 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -78,7 +78,7 @@ define Build/loader-common
$(MAKE) -C lzma-loader \
PKG_BUILD_DIR="$@.src" \
TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
- KERNEL_CMDLINE="$(CMDLINE)" BOARD="$(BOARDNAME)" \
+ BOARD="$(BOARDNAME)" \
LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \
$(1) compile loader.$(LOADER_TYPE)
mv "$@.$(LOADER_TYPE)" "$@"
@@ -86,13 +86,17 @@ define Build/loader-common
endef
define Build/loader-okli-compile
- $(call Build/loader-common,FLASH_OFFS=$(LOADER_FLASH_OFFS) FLASH_MAX=0)
+ $(call Build/loader-common,FLASH_OFFS=$(LOADER_FLASH_OFFS) FLASH_MAX=0 KERNEL_CMDLINE="$(CMDLINE)")
endef
define Build/loader-kernel
$(call Build/loader-common,LOADER_DATA="$@")
endef
+define Build/loader-kernel-cmdline
+ $(call Build/loader-common,LOADER_DATA="$@" KERNEL_CMDLINE="$(CMDLINE)")
+endef
+
define Build/loader-okli
dd if=$(KDIR)/loader-$(1).gz bs=7680 conv=sync of="$@.new"
cat "$@" >> "$@.new"
@@ -278,7 +282,7 @@ $(Device/tplink)
COMPILE := loader-$(1).gz
COMPILE/loader-$(1).gz := loader-okli-compile
KERNEL := copy-file $(KDIR)/vmlinux.bin.lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1)
- KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel | mktplinkfw-initramfs
+ KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | mktplinkfw-initramfs
endef
define Device/tplink-4m