ar71xx: put squash image right after the kernel on TP-Link boards
[openwrt.git] / target / linux / ar71xx / image / Makefile
index b2dec96..6fd72c1 100644 (file)
@@ -11,6 +11,10 @@ define imgname
 $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
 endef
 
+define rootfs_align
+$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs-%,4,$(1))))
+endef
+
 define sysupname
 $(call imgname,$(1),$(2))-sysupgrade.bin
 endef
@@ -333,12 +337,14 @@ define Image/Build/TPLINK
        -$(STAGING_DIR_HOST)/bin/mktplinkfw \
                -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION)\
                -k $(KDIR)/kernel-$(2).bin \
-               -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
+               -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+               -a $(call rootfs_align,$(1)) -j \
                -o $(call factoryname,$(1),$(2))
        -$(STAGING_DIR_HOST)/bin/mktplinkfw \
                -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
                -k $(KDIR)/kernel-$(2).bin \
-               -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
+               -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+               -a $(call rootfs_align,$(1)) -j \
                -o $(call sysupname,$(1),$(2))
 endef
 
@@ -355,12 +361,14 @@ define Image/Build/TPLINK-LZMA
        -$(STAGING_DIR_HOST)/bin/mktplinkfw \
                -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION)\
                -k $(KDIR)/vmlinux-$(2).bin.lzma \
-               -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
+               -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+               -a $(call rootfs_align,$(1)) -j \
                -o $(call factoryname,$(1),$(2))
        -$(STAGING_DIR_HOST)/bin/mktplinkfw \
                -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s \
                -k $(KDIR)/vmlinux-$(2).bin.lzma \
-               -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
+               -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+               -a $(call rootfs_align,$(1)) -j \
                -o $(call sysupname,$(1),$(2))
 endef
 
@@ -614,6 +622,12 @@ define Image/Build/Profile/EAP7660D
        $(call Image/Build/Template/$(fs_128k)/$(1),PB4X,eap7660d,$(eap7660d_cmdline))
 endef
 
+hornetub_cmdline=board=HORNET-UB console=ttyATH0,115200
+hornetub_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1600k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
+define Image/Build/Profile/HORNETUB
+       $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,hornet-ub,$(hornetub_cmdline),hornetub_mtdlayout,1638400,6291456,RK)
+endef
+
 ja76pf_cmdline=board=JA76PF console=ttyS0,115200
 define Image/Build/Profile/JA76PF
        $(call Image/Build/Template/$(fs_64k)/$(1),PB4X,ja76pf,$(ja76pf_cmdline))
@@ -869,6 +883,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/DIR825B1,$(1))
        $(call Image/Build/Profile/EAP7660D,$(1))
        $(call Image/Build/Profile/FR54RTR,$(1))
+       $(call Image/Build/Profile/HORNETUB,$(1))
        $(call Image/Build/Profile/JA76PF,$(1))
        $(call Image/Build/Profile/JWAP003,$(1))
        $(call Image/Build/Profile/MZKW04NU,$(1))
This page took 0.027409 seconds and 4 git commands to generate.