Author: blogic Date: 2016-04-26 13:43:28 +0200 (Tue, 26 Apr 2016) New Revision: 49241
Modified: trunk/target/linux/lantiq/image/Makefile Log: lantiq: use new image build process for brnImages LZMA compress the kernel without dictionary, otherwise brnboot fails to uncompress the kernel. The filesystem parameter of mkbrncmdline was dropped since the used filesystem isn't exported in the kernel build step and at least in my tests everything works without the parameter. If the parameter is required for some reason, the static keyword "squashfs" can be used. Signed-off-by: Mathias Kresin <[email protected]> Modified: trunk/target/linux/lantiq/image/Makefile =================================================================== --- trunk/target/linux/lantiq/image/Makefile 2016-04-26 11:43:24 UTC (rev 49240) +++ trunk/target/linux/lantiq/image/Makefile 2016-04-26 11:43:28 UTC (rev 49241) @@ -39,12 +39,6 @@ $(call CompressLzma,$(KDIR)/vmlinux$(2)-$(1).tmp,$(KDIR)/vmlinux$(2)-$(1).lzma) endef -define MkBrnImage - mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) - $(call CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma) - mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma $(KDIR)/root.$(6) -endef - define MkImageLzma mkimage -A mips -O linux -T kernel -a 0x80002000 -C lzma \ -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \ @@ -61,7 +55,6 @@ define Image/Build/squashfs cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image) - $(if $(3),$(call MkBrnImage,$(3),$(4),$(5),$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-brnImage,$(2),$(1),$(6))) endef define Image/BuildNAND/squashfs @@ -268,7 +261,15 @@ -o $@ endef +define Build/mkbrncmdline + mkbrncmdline -i $@ -o [email protected] BRN-BOOT + mv [email protected] $@ +endef +define Build/mkbrnimg + mkbrnimg -s $(SIGNATURE) -m $(MAGIC) -p $(CRC32_POLY) -o $@ $(word 1,$^) $(word 2,$^) +endef + # Shared device definition: applies to every defined device define Device/Default PROFILES = Default $$(DEVICE_PROFILE) @@ -291,6 +292,13 @@ IMAGE/tplink := mktplinkfw2 endef +define Device/lantiqBrnImage + KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict + IMAGES := factory.bin + IMAGE/factory.bin := mkbrnimg +endef +DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY + define lantiqTpLink define Device/$(1) $$(Device/lantiqTpLink) @@ -310,6 +318,17 @@ TARGET_DEVICES += $(1) endef +define lantiqBrnImage + define Device/$(1) + $$(Device/lantiqBrnImage) + DEVICE_PROFILE := $(1) + DEVICE_DTS := $(1) + SIGNATURE := $(2) + MAGIC := $(3) + CRC32_POLY := $(4) + endef + TARGET_DEVICES += $(1) +endef ifeq ($(CONFIG_TARGET_lantiq_falcon),y) @@ -404,15 +423,10 @@ $(eval $(call lantiqTpLink,TDW8980,TD-W8980v1)) $(eval $(call lantiqTpLink,VR200v,ArcherVR200V)) $(eval $(call lantiqImage,VGV7510KW22NOR)) - -Image/BuildKernel/Profile/VGV7510KW22BRN=$(call Image/BuildKernel/Template,VGV7510KW22BRN,$(1)) -Image/Build/Profile/VGV7510KW22BRN=$(call Image/Build/$(1),$(1),VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7,$(1)) - +$(eval $(call lantiqBrnImage,VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7)) $(eval $(call lantiqImage,VGV7519NOR)) +$(eval $(call lantiqBrnImage,VGV7519BRN,5D00008000,0x12345678,0x2083b8ed)) -Image/BuildKernel/Profile/VGV7519BRN=$(call Image/BuildKernel/Template,VGV7519BRN,$(1)) -Image/Build/Profile/VGV7519BRN=$(call Image/Build/$(1),$(1),VGV7519BRN,5D00008000,0x12345678,0x2083b8ed,$(1)) - define Image/Prepare $(call Image/Prepare/Profile,$(PROFILE)) endef _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
