brcm47xx: image: switch Linksys WRT54G3GV2-VF to the new building system
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Backport of r48974 git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@49002 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
1ce37b76d2
commit
3ed976b846
|
@ -34,21 +34,6 @@ endif
|
|||
$(call prepare_generic_squashfs,$(KDIR)/fs_mark)
|
||||
endef
|
||||
|
||||
# $(1): filesystem type.
|
||||
# $(2): device model (used for output file).
|
||||
# $(3): pattern (device specific magic).
|
||||
# $(4): version.
|
||||
# $(5): simplified filesystem type (without block size).
|
||||
define Image/Build/CyberTAN
|
||||
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(5).bin $(if $(6),-s $(6))
|
||||
endef
|
||||
define Image/Build/CyberTAN2
|
||||
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(5).noheader.bin -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(5).bin $(if $(6),-s $(6))
|
||||
endef
|
||||
define Image/Build/CyberTANHead
|
||||
$(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
|
||||
|
||||
# $(1): filesystem type.
|
||||
# $(2): device model (used for output file).
|
||||
# $(3): board_id (device specific magic).
|
||||
|
@ -68,14 +53,6 @@ define trxalign/squashfs
|
|||
-a 1024 -f $(KDIR)/root.$(1) $(if $(2),-f $(2)) -a 0x10000 -A $(KDIR)/fs_mark
|
||||
endef
|
||||
|
||||
define Image/Build/trxV2
|
||||
$(call Image/Build/CyberTANHead,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
|
||||
$(STAGING_DIR_HOST)/bin/trx -2 -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(5).noheader.bin \
|
||||
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
|
||||
$(call trxalign/$(1),$(1),$(KDIR)/$(IMG_PREFIX)-$(2)-header.bin)
|
||||
$(call Image/Build/CyberTAN2,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
|
||||
endef
|
||||
|
||||
#################################################
|
||||
# Images
|
||||
#################################################
|
||||
|
@ -88,6 +65,17 @@ define Build/trx-with-loader
|
|||
$(call trxalign/$(FILESYSTEM),$(FILESYSTEM))
|
||||
endef
|
||||
|
||||
define Build/trx-v2-with-loader
|
||||
$(STAGING_DIR_HOST)/bin/trx \
|
||||
-2 \
|
||||
-m 33554432 \
|
||||
-o $@.new \
|
||||
-f $(KDIR)/loader.gz \
|
||||
-f $(KDIR)/vmlinux.lzma \
|
||||
$(call trxalign/$(FILESYSTEM),$(FILESYSTEM),$@)
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/trx-without-loader
|
||||
$(STAGING_DIR_HOST)/bin/trx \
|
||||
-m 33554432 \
|
||||
|
@ -114,10 +102,14 @@ define Build/huawei-bin
|
|||
endef
|
||||
|
||||
define Build/linksys-bin
|
||||
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(DEVICE_ID) -v v$(VERSION) -i $@ -o $@.new
|
||||
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(DEVICE_ID) -v v$(VERSION) $(if $(SERIAL),-s $(SERIAL)) -i $@ -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/linksys-pattern-partition
|
||||
$(STAGING_DIR_HOST)/bin/addpattern -5 -p $(DEVICE_ID) -v v$(VERSION) $(if $(SERIAL),-s $(SERIAL)) -i /dev/null -o $@
|
||||
endef
|
||||
|
||||
define Build/motorola-bin
|
||||
$(STAGING_DIR_HOST)/bin/motorola-bin -$(MOTOROLA_DEVICE) $@ $@.new
|
||||
mv $@.new $@
|
||||
|
@ -152,7 +144,7 @@ endef
|
|||
#################################################
|
||||
|
||||
DEVICE_VARS += PRODUCTID
|
||||
DEVICE_VARS += DEVICE_ID VERSION
|
||||
DEVICE_VARS += DEVICE_ID VERSION SERIAL
|
||||
DEVICE_VARS += BOARD_ID REGION
|
||||
DEVICE_VARS += MOTOROLA_DEVICE
|
||||
DEVICE_VARS += BIN_TAIL
|
||||
|
@ -240,21 +232,6 @@ endif
|
|||
# Subtarget legacy
|
||||
#################################################
|
||||
|
||||
# $(1): filesystem type.
|
||||
define Image/Build/legacy/devices-with-128k-blocks
|
||||
$(call Image/Build/trxV2,$(1),wrt54g3gv2-vf,3G2V,3.00.24,$(patsubst jffs2-%,jffs2,$(1)),6)
|
||||
endef
|
||||
|
||||
# $(1): filesystem type.
|
||||
define Image/Build/legacy/jffs2-128k
|
||||
$(call Image/Build/legacy/devices-with-128k-blocks,$(1))
|
||||
endef
|
||||
|
||||
# $(1): filesystem type.
|
||||
define Image/Build/legacy/squashfs
|
||||
$(call Image/Build/legacy/devices-with-128k-blocks,$(1))
|
||||
endef
|
||||
|
||||
define Device/dlink-dwl-3150
|
||||
IMAGES := bin
|
||||
IMAGE/bin := trx-with-loader | tailed-bin
|
||||
|
@ -272,6 +249,16 @@ define Device/huawei-e970
|
|||
IMAGE/bin := trx-without-loader | huawei-bin
|
||||
endef
|
||||
|
||||
define Device/linksys-wrt54g3gv2-vf
|
||||
FILESYSTEMS := $(FS_128K)
|
||||
IMAGES := noheader.bin bin
|
||||
IMAGE/noheader.bin := linksys-pattern-partition | trx-v2-with-loader
|
||||
IMAGE/bin := linksys-pattern-partition | trx-v2-with-loader | linksys-bin
|
||||
DEVICE_ID := 3G2V
|
||||
VERSION := 3.00.24
|
||||
SERIAL := 6
|
||||
endef
|
||||
|
||||
define Device/linksys-wrt54gs
|
||||
$(Device/linksys)
|
||||
FILESYSTEMS := $(FS_128K)
|
||||
|
@ -302,6 +289,7 @@ ifeq ($(SUBTARGET),legacy)
|
|||
dlink-dwl-3150 \
|
||||
edimax-ps1208-mfg \
|
||||
huawei-e970 \
|
||||
linksys-wrt54g3gv2-vf \
|
||||
linksys-wrt54gs \
|
||||
linksys-wrtsl54gs \
|
||||
netgear-wgt634u \
|
||||
|
@ -406,7 +394,6 @@ define Image/Build
|
|||
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx \
|
||||
-f $(KDIR)/vmlinux.gz \
|
||||
$(call trxalign/$(1),$(1))
|
||||
$(call Image/Build/$(SUBTARGET)/$(1),$(1))
|
||||
# $(call Image/Build/Chk,$(1),wgr614_v9,U12H094T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
|
||||
# $(call Image/Build/Chk,$(1),wndr3400_vcna,U12H155T01_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
|
||||
# $(call Image/Build/Chk,$(1),wnr3500U,U12H136T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
|
||||
|
|
Loading…
Reference in New Issue