Author: rmilecki
Date: 2016-03-11 09:54:09 +0100 (Fri, 11 Mar 2016)
New Revision: 49000

Modified:
   branches/chaos_calmer/target/linux/brcm47xx/image/Makefile
Log:
brcm47xx: image: switch rest of 64k block devices to the new building system

Signed-off-by: Rafa{U+0142} Mi{U+0142}ecki <[email protected]>

Backport of r48972

Modified: branches/chaos_calmer/target/linux/brcm47xx/image/Makefile
===================================================================
--- branches/chaos_calmer/target/linux/brcm47xx/image/Makefile  2016-03-11 
08:54:06 UTC (rev 48999)
+++ branches/chaos_calmer/target/linux/brcm47xx/image/Makefile  2016-03-11 
08:54:09 UTC (rev 49000)
@@ -54,20 +54,6 @@
        $(STAGING_DIR_HOST)/bin/addpattern -5 -p $(3) -v v$(4) -i /dev/null -o 
$(KDIR)/$(IMG_PREFIX)-$(2)-header.bin $(if $(6),-s $(6))
 endef
 
-define Image/Build/USR
-       $(STAGING_DIR_HOST)/bin/trx2usr $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx 
$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3).bin
-endef
-
-define Image/Build/Edi
-       $(STAGING_DIR_HOST)/bin/trx2edips $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx 
$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3).bin
-endef
-
-define Image/Build/Huawei
-       dd if=/dev/zero of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-gz.bin bs=92 
count=1
-       echo -ne 'HDR0\x08\x00\x00\x00' >> 
$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-gz.bin
-       cat $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx >> 
$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-gz.bin
-endef
-
 # $(1): filesystem type.
 # $(2): device model (used for output file).
 # $(3): board_id (device specific magic).
@@ -107,11 +93,31 @@
                $(call trxalign/$(FILESYSTEM),$(FILESYSTEM))
 endef
 
+define Build/trx-without-loader
+       $(STAGING_DIR_HOST)/bin/trx \
+               -m 33554432 \
+               -o $@ \
+               -f $(word 1,$^) \
+               $(call trxalign/$(FILESYSTEM),$(FILESYSTEM))
+endef
+
 define Build/asus-trx
        $(STAGING_DIR_HOST)/bin/asustrx -p "$(PRODUCTID)" -i $@ -o [email protected]
        mv [email protected] $@
 endef
 
+define Build/edimax-bin
+       $(STAGING_DIR_HOST)/bin/trx2edips $@ [email protected]
+       mv [email protected] $@
+endef
+
+define Build/huawei-bin
+       dd if=/dev/zero [email protected] bs=92 count=1
+       echo -ne 'HDR0\x08\x00\x00\x00' >> [email protected]
+       cat $@ >> [email protected]
+       mv [email protected] $@
+endef
+
 define Build/linksys-bin
        $(STAGING_DIR_HOST)/bin/addpattern -4 -p $(DEVICE_ID) -v v$(VERSION) -i 
$@ -o [email protected]
        mv [email protected] $@
@@ -135,6 +141,11 @@
        echo $(BIN_TAIL) >> $@
 endef
 
+define Build/usrobotics-bin
+       $(STAGING_DIR_HOST)/bin/trx2usr $@ [email protected]
+       mv [email protected] $@
+endef
+
 #################################################
 # Devices
 #################################################
@@ -235,18 +246,6 @@
 endef
 
 # $(1): filesystem type.
-define Image/Build/legacy/devices-with-64k-blocks
-       $(call Image/Build/Edi,$(1),ps1208mfg,$(patsubst jffs2-%,jffs2,$(1)))
-       $(call Image/Build/Huawei,$(1),e970,$(1))
-       $(call Image/Build/USR,$(1),usr5461,$(1))
-endef
-
-# $(1): filesystem type.
-define Image/Build/legacy/jffs2-64k
-       $(call Image/Build/legacy/devices-with-64k-blocks,$(1))
-endef
-
-# $(1): filesystem type.
 define Image/Build/legacy/jffs2-128k
        $(call Image/Build/legacy/devices-with-128k-blocks,$(1))
 endef
@@ -253,7 +252,6 @@
 
 # $(1): filesystem type.
 define Image/Build/legacy/squashfs
-       $(call Image/Build/legacy/devices-with-64k-blocks,$(1))
        $(call Image/Build/legacy/devices-with-128k-blocks,$(1))
 endef
 
@@ -263,6 +261,17 @@
        BIN_TAIL := BCM-5352-2050-0000000-01
 endef
 
+define Device/edimax-ps1208-mfg
+       IMAGES := bin
+       IMAGE/bin := trx-with-loader | edimax-bin
+endef
+
+define Device/huawei-e970
+       KERNEL_NAME = vmlinux.gz
+       IMAGES := bin
+       IMAGE/bin := trx-without-loader | huawei-bin
+endef
+
 define Device/linksys-wrt54gs
        $(Device/linksys)
        FILESYSTEMS := $(FS_128K)
@@ -277,11 +286,19 @@
        VERSION := 2.08.1
 endef
 
+define Device/usrobotics-usr5461
+       IMAGES := bin
+       IMAGE/bin := trx-with-loader | usrobotics-bin
+endef
+
 ifeq ($(SUBTARGET),legacy)
   TARGET_DEVICES += \
        dlink-dwl-3150 \
+       edimax-ps1208-mfg \
+       huawei-e970 \
        linksys-wrt54gs \
-       linksys-wrtsl54gs
+       linksys-wrtsl54gs \
+       usrobotics-usr5461
 
   $(eval $(call AsusDevice,wl-300g,WL300g      ))
   $(eval $(call AsusDevice,wl-320gp,WL320gP     ))
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to