ramips: add common definition netgear_sercomm_nor

Like NAND-based devices, SPI-NOR based Netgear devices also share
a common setup for their images. This creates a common defition
for them in image/Makefile, so it can be reused across subtargets.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2020-08-03 19:23:50 +02:00
parent e0e607f0d0
commit 3b89849b57
3 changed files with 24 additions and 27 deletions

View File

@ -12,7 +12,7 @@ DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
DEVICE_VARS += SERCOMM_HWNAME SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER DEVICE_VARS += SERCOMM_HWNAME SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER
DEVICE_VARS += JCG_MAXSIZE DEVICE_VARS += SERCOMM_PAD JCG_MAXSIZE
loadaddr-y := 0x80000000 loadaddr-y := 0x80000000
loadaddr-$(CONFIG_TARGET_ramips_rt288x) := 0x88000000 loadaddr-$(CONFIG_TARGET_ramips_rt288x) := 0x88000000
@ -176,6 +176,18 @@ define Device/Default
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
endef endef
define Device/netgear_sercomm_nor
BLOCKSIZE := 64k
DEVICE_VENDOR := NETGEAR
IMAGES += factory.img
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
pad-rootfs
IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size
IMAGE/factory.img := pad-extra $$$$(SERCOMM_PAD) | $$(IMAGE/default) | \
pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
zip $$$$(SERCOMM_HWNAME).bin | sercom-seal
endef
define Device/seama define Device/seama
SEAMA_MTDBLOCK := 2 SEAMA_MTDBLOCK := 2
IMAGES += factory.bin IMAGES += factory.bin

View File

@ -827,22 +827,16 @@ endef
TARGET_DEVICES += netgear_wac124 TARGET_DEVICES += netgear_wac124
define Device/netgear_wndr3700-v5 define Device/netgear_wndr3700-v5
$(Device/netgear_sercomm_nor)
$(Device/uimage-lzma-loader) $(Device/uimage-lzma-loader)
BLOCKSIZE := 64k
IMAGE_SIZE := 15232k IMAGE_SIZE := 15232k
DEVICE_MODEL := WNDR3700
DEVICE_VARIANT := v5
SERCOMM_HWNAME := WNDR3700v5
SERCOMM_HWID := AYB SERCOMM_HWID := AYB
SERCOMM_HWVER := A001 SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x1054 SERCOMM_SWVER := 0x1054
IMAGES += factory.img SERCOMM_PAD := 320k
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
pad-rootfs
IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size
IMAGE/factory.img := pad-extra 320k | $$(IMAGE/default) | \
pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | zip WNDR3700v5.bin | \
sercom-seal
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := WNDR3700
DEVICE_VARIANT := v5
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport wpad-basic kmod-usb-ledtrig-usbport wpad-basic
SUPPORTED_DEVICES += wndr3700v5 SUPPORTED_DEVICES += wndr3700v5

View File

@ -216,20 +216,8 @@ define Device/mercury_mac1200r-v2
endef endef
TARGET_DEVICES += mercury_mac1200r-v2 TARGET_DEVICES += mercury_mac1200r-v2
define Device/netgear_r6xxx
BLOCKSIZE := 64k
DEVICE_VENDOR := NETGEAR
IMAGES += factory.img
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
pad-rootfs
IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size
IMAGE/factory.img := pad-extra 576k | $$(IMAGE/default) | \
pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
zip $$$$(SERCOMM_HWNAME).bin | sercom-seal
endef
define Device/netgear_r6020 define Device/netgear_r6020
$(Device/netgear_r6xxx) $(Device/netgear_sercomm_nor)
IMAGE_SIZE := 7104k IMAGE_SIZE := 7104k
DEVICE_MODEL := R6020 DEVICE_MODEL := R6020
DEVICE_PACKAGES := kmod-mt76x2 DEVICE_PACKAGES := kmod-mt76x2
@ -237,11 +225,12 @@ define Device/netgear_r6020
SERCOMM_HWID := CFR SERCOMM_HWID := CFR
SERCOMM_HWVER := A001 SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0040 SERCOMM_SWVER := 0x0040
SERCOMM_PAD := 576k
endef endef
TARGET_DEVICES += netgear_r6020 TARGET_DEVICES += netgear_r6020
define Device/netgear_r6080 define Device/netgear_r6080
$(Device/netgear_r6xxx) $(Device/netgear_sercomm_nor)
IMAGE_SIZE := 7552k IMAGE_SIZE := 7552k
DEVICE_MODEL := R6080 DEVICE_MODEL := R6080
DEVICE_PACKAGES := kmod-mt76x2 DEVICE_PACKAGES := kmod-mt76x2
@ -249,11 +238,12 @@ define Device/netgear_r6080
SERCOMM_HWID := CFR SERCOMM_HWID := CFR
SERCOMM_HWVER := A001 SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0040 SERCOMM_SWVER := 0x0040
SERCOMM_PAD := 576k
endef endef
TARGET_DEVICES += netgear_r6080 TARGET_DEVICES += netgear_r6080
define Device/netgear_r6120 define Device/netgear_r6120
$(Device/netgear_r6xxx) $(Device/netgear_sercomm_nor)
IMAGE_SIZE := 15744k IMAGE_SIZE := 15744k
DEVICE_MODEL := R6120 DEVICE_MODEL := R6120
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
@ -261,6 +251,7 @@ define Device/netgear_r6120
SERCOMM_HWID := CGQ SERCOMM_HWID := CGQ
SERCOMM_HWVER := A001 SERCOMM_HWVER := A001
SERCOMM_SWVER := 0x0040 SERCOMM_SWVER := 0x0040
SERCOMM_PAD := 576k
endef endef
TARGET_DEVICES += netgear_r6120 TARGET_DEVICES += netgear_r6120