X-Git-Url: https://git.archive.openwrt.org/?p=openwrt.git;a=blobdiff_plain;f=target%2Flinux%2Framips%2Fimage%2FMakefile;h=307c3f93e6a0b77c3487beab9f6cf3dbefc8d6f9;hp=8bdd76a35cf92e8572cf7196efbcb119eb5be841;hb=2de05f62588f9d7fafb90d37f63002a56a1b885c;hpb=b3517025218361ca4754ad0a81b19764d471c076 diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 8bdd76a35c..307c3f93e6 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -912,8 +912,34 @@ endif # MT7620A Profiles # +# $(1): (ignored) +# $(2): lowercase board name +# $(3): uppercase board name (must match DTS filename w/o extension) +# $(4): erase block size +# $(5): hardware id for mkdniimg +# $(6): maximum image size +define BuildFirmware/Netgear/squashfs + $(call PatchKernelLzmaDtb,$(2),$(3)) + # Pad kernel to eraseblock boundary, minus 2 uImage headers (=128 bytes): + # bs = (eraseblock * (1 + (128 + kernelsize)/eraseblock)) - 128 + dd if=$(KDIR)/vmlinux-$(2).bin.lzma \ + of=$(KDIR)/vmlinux-$(2).bin.lzma.tmp \ + bs=`expr \( $(4) \* \( 1 + \( 128 + \`wc -c < $(KDIR)/vmlinux-$(2).bin.lzma\` \) / $(4) \) \) - 128` \ + count=1 conv=sync + + $(call MkImage,lzma,$(KDIR)/vmlinux-$(2).bin.lzma.tmp,$(KDIR)/vmlinux-$(2).uImage) + cat ex2700-fakeroot.uImage >> $(KDIR)/vmlinux-$(2).uImage + $(call MkImageSysupgrade/squashfs,squashfs,$(2),$(6)) + + $(STAGING_DIR_HOST)/bin/mkdniimg \ + -B $(3) -H $(5) -v OpenWrt \ + -i $(call imgname,squashfs,$(2))-sysupgrade.bin \ + -o $(call imgname,squashfs,$(2))-factory.bin +endef + Image/Build/Profile/E1700=$(call BuildFirmware/UMedia/$(1),$(1),e1700,E1700,0x013326) -Image/Build/Profile/EX2700=$(call BuildFirmware/Default4M/$(1),$(1),ex2700,EX2700) +ex2700_mtd_size=3866624 +Image/Build/Profile/EX2700=$(call BuildFirmware/Netgear/$(1),$(1),ex2700,EX2700,65536,29764623+4+0+32+2x2+0,$(ex2700_mtd_size)) Image/Build/Profile/MT7620a=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a,MT7620a) Image/Build/Profile/MT7620a_MT7610e=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_mt7610e,MT7620a_MT7610e) Image/Build/Profile/MT7620a_MT7530=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_mt7530,MT7620a_MT7530)