ramips: fix PWH2004 image generation
[openwrt.git] / target / linux / ramips / image / Makefile
index 2a841ef..1d6a72a 100644 (file)
@@ -80,7 +80,7 @@ define BuildFirmware/Buffalo
                        -o $(KDIR)/vmlinux-$(2).uImage.enc; \
                buffalo-enc -p $(3) -v 1.76 \
                        -i $(KDIR)/root.$(1) \
-                       -o $(KDIR)/root.$(1).enc; \
+                       -o $(KDIR)/root.$(2).enc; \
                buffalo-tag -b $(3) -p $(3) -a ram -v 1.76 -m 1.01 \
                        -l mlang8 -f 1 -r EU \
                        -i $(KDIR)/vmlinux-$(2).uImage.enc \
@@ -117,7 +117,7 @@ define Image/Build/Profile/FONERA20N
        $(call Image/Build/Template/GENERIC_8M,$(1),fonera20n,FONERA20N)
 endef
 
-define Image/Build/Template/PWH2004
+define Image/Build/Profile/PWH2004
        $(call Image/Build/Template/GENERIC_8M,$(1),pwh2004,PWH2004)
 endef
 
@@ -129,6 +129,13 @@ mtdlayout_whrg300n=mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k
 define Image/Build/Profile/WHRG300N
        $(call Image/Build/Template/GENERIC_4M,$(1),whr-g300n,WHR-G300N)
        $(call BuildFirmware/Buffalo,$(1),whr-g300n,WHR-G300N,mtdlayout_whrg300n,983040,3801088)
+       ( \
+               echo -n -e "# Airstation FirmWare\nrun u_fw\nreset\n\n" | \
+                       dd bs=512 count=1 conv=sync; \
+               dd if=$(call imgname,$(1),whr-g300n)-sysupgrade.bin; \
+       ) > $(KDIR)/whr-g300n-tftp.tmp
+       buffalo-tftp -i $(KDIR)/whr-g300n-tftp.tmp \
+               -o $(call imgname,$(1),whr-g300n)-tftp.bin
 endef
 
 define Image/Build/Profile/HW5503G
This page took 0.025859 seconds and 4 git commands to generate.