ar71xx: fix some more issues with initramfs images

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37229
This commit is contained in:
Florian Fainelli 2013-07-10 15:22:47 +00:00
parent 1c742fb388
commit 399283f875

View File

@ -131,8 +131,9 @@ define Image/BuildLoader
-rm -rf $(KDIR)/lzma-loader -rm -rf $(KDIR)/lzma-loader
$(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)"\ $(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)"\
LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \ LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \
LOADER_DATA="$(KDIR)/vmlinux.bin.lzma" BOARD="$(1)" \ LOADER_DATA="$(KDIR)/vmlinux$(5).bin.lzma" BOARD="$(1)" \
compile loader.$(2) compile loader.$(2)
-$(CP) $(KDIR)/loader-$(1).$(2) $(KDIR)/loader-$(1)$(5).$(2)
endef endef
define Image/BuildLoaderAlone define Image/BuildLoaderAlone
@ -199,7 +200,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
dd if=$(KDIR)/vmlinux-initramfs.bin.gz of=$(VMLINUX)-initramfs.gz bs=65536 conv=sync dd if=$(KDIR)/vmlinux-initramfs.bin.gz of=$(VMLINUX)-initramfs.gz bs=65536 conv=sync
$(call MkuImage,gzip,,$(KDIR)/vmlinux-initramfs.bin.gz,$(UIMAGE)-initramfs-gzip.bin) $(call MkuImage,gzip,,$(KDIR)/vmlinux-initramfs.bin.gz,$(UIMAGE)-initramfs-gzip.bin)
$(call MkuImage,lzma,,$(KDIR)/vmlinux-initramfs.bin.lzma,$(UIMAGE)-initramfs-lzma.bin) $(call MkuImage,lzma,,$(KDIR)/vmlinux-initramfs.bin.lzma,$(UIMAGE)-initramfs-lzma.bin)
cp $(KDIR)/loader-generic.elf $(VMLINUX)-initramfs-lzma.elf cp $(KDIR)/loader-generic-initramfs.elf $(VMLINUX)-initramfs-lzma.elf
$(call Image/Build/Initramfs) $(call Image/Build/Initramfs)
endif endif
endef endef
@ -547,11 +548,11 @@ define Image/Build/TPLINKOLD
endef endef
define Image/Build/TPLINKOLD/initramfs define Image/Build/TPLINKOLD/initramfs
$(call Image/BuildLoader,$(2),gz,$(3),0x80060000) $(call Image/BuildLoader,$(2),gz,$(3),0x80060000,-initramfs)
-$(STAGING_DIR_HOST)/bin/mktplinkfw -c \ -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\ -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-k $(KDIR)/loader-$(2).gz \ -k $(KDIR)/loader-initramfs-$(2).gz \
-o $(call imgname,$(1),$(2))-uImage.bin -o $(call imgname,$(1),$(2))-initramfs-uImage.bin
endef endef
define Image/Build/TPLINK/loader define Image/Build/TPLINK/loader
@ -580,11 +581,11 @@ define Image/Build/TPLINK
endef endef
define Image/Build/TPLINK/initramfs define Image/Build/TPLINK/initramfs
$(call Image/BuildLoader,$(2),gz,$(3),0x80060000) $(call Image/BuildLoader,$(2),gz,$(3),0x80060000,-initramfs)
-$(STAGING_DIR_HOST)/bin/mktplinkfw -c \ -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\ -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-k $(KDIR)/loader-$(2).gz \ -k $(KDIR)/loader-initramfs-$(2).gz \
-o $(call imgname,$(1),$(2))-uImage.bin -o $(call imgname,$(1),$(2))-initramfs-uImage.bin
endef endef
define Image/Build/TPLINK-LZMA define Image/Build/TPLINK-LZMA
@ -604,10 +605,10 @@ define Image/Build/TPLINK-LZMA
endef endef
define Image/Build/TPLINK-LZMA/initramfs define Image/Build/TPLINK-LZMA/initramfs
$(call PatchKernelLzma,$(2),$(3)) $(call PatchKernelLzma,$(2),$(3),,-initramfs)
-$(STAGING_DIR_HOST)/bin/mktplinkfw -c \ -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) -s \ -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) -s \
-k $(KDIR_TMP)/vmlinux-$(2).bin.lzma \ -k $(KDIR_TMP)/vmlinux-initramfs-$(2).bin.lzma \
-o $(call imgname,$(1),$(2))-uImage.bin -o $(call imgname,$(1),$(2))-uImage.bin
endef endef
@ -702,8 +703,8 @@ endef
define Image/Build/Netgear/initramfs define Image/Build/Netgear/initramfs
$(call MkuImageLzma,$(2),$(3) $(4)) $(call MkuImageLzma,$(2),$(3) $(4))
$(STAGING_DIR_HOST)/bin/wndr3700 \ $(STAGING_DIR_HOST)/bin/wndr3700 \
$(KDIR_TMP)/vmlinux-$(2).uImage \ $(KDIR_TMP)/vmlinux-initramfs-$(2).uImage \
$(call imgname,$(1),$(2))-uImage.bin \ $(call imgname,$(1),$(2))-initramfs-uImage.bin \
$(5) $(5)
endef endef
@ -1045,6 +1046,7 @@ define Image/Prepare
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
gzip -9 -c $(KDIR)/vmlinux-initramfs > $(KDIR)/vmlinux-initramfs.bin.gz gzip -9 -c $(KDIR)/vmlinux-initramfs > $(KDIR)/vmlinux-initramfs.bin.gz
$(call CompressLzma,$(KDIR)/vmlinux-initramfs,$(KDIR)/vmlinux-initramfs.bin.lzma) $(call CompressLzma,$(KDIR)/vmlinux-initramfs,$(KDIR)/vmlinux-initramfs.bin.lzma)
$(call Image/BuildLoader,generic,elf,,,-initramfs)
endif endif
$(call Image/BuildLoader,generic,elf) $(call Image/BuildLoader,generic,elf)
$(call Image/Build/Profile/$(if $(CONFIG_IB),Default,$(PROFILE)),loader) $(call Image/Build/Profile/$(if $(CONFIG_IB),Default,$(PROFILE)),loader)