aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/image
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2013-06-27 19:58:31 +0000
committerFlorian Fainelli <florian@openwrt.org>2013-06-27 19:58:31 +0000
commit704e2ed39d4e157d0c24d4dc3a3078cbacc6505c (patch)
treeffba1790b89941519ddb5acc2bf8f55df6b65529 /target/linux/brcm47xx/image
parent5431c1983b51e4f69db63f5d5c94b2ed157e5374 (diff)
downloadmaster-187ad058-704e2ed39d4e157d0c24d4dc3a3078cbacc6505c.tar.gz
master-187ad058-704e2ed39d4e157d0c24d4dc3a3078cbacc6505c.tar.bz2
master-187ad058-704e2ed39d4e157d0c24d4dc3a3078cbacc6505c.zip
targets: prepare for supporting normal and initramfs images
In order to support both normal images and initramfs, ensure that each target sets KERNELNAME properly so that the generic kernel building code can copy the corresponding files over $(KDIR) with the appropriate extension. Update the various paths to the kernel and wrapper images from $(LINUX_DIR)/arch/$(ARCH)/boot/$(foo) to $(KDIR)/$(foo). Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37049 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/image')
-rw-r--r--target/linux/brcm47xx/image/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile
index 09109573f7..9a477a6fda 100644
--- a/target/linux/brcm47xx/image/Makefile
+++ b/target/linux/brcm47xx/image/Makefile
@@ -13,6 +13,9 @@ endef
define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma
+endif
rm -f $(KDIR)/loader.gz
$(MAKE) -C lzma-loader \
BUILD_DIR="$(KDIR)" \
@@ -120,7 +123,7 @@ define Image/Build/squashfs
endef
define Image/Build/Initramfs
- $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-initramfs.trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma
+ $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-initramfs.trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux-initramfs.lzma
endef
define Image/Build/Chk
@@ -148,6 +151,9 @@ define Image/Build
# $(call Image/Build/Chk,$(1),wnr3500U,U12H136T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/Chk,$(1),wnr3500v2,U12H127T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
# $(call Image/Build/Chk,$(1),wnr3500v2_VC,U12H127T70_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ $(call Image/Build/Initramfs)
+endif
endef
$(eval $(call BuildImage))