bcm63xx: add support for Comtrend VR-3032u
[openwrt/openwrt.git] / target / linux / bcm63xx / image / bcm63xx_nand.mk
1 #
2 # BCM63XX NAND Profiles
3 #
4
5 DEVICE_VARS += CFE_RAM_FILE
6 DEVICE_VARS += CFE_RAM_JFFS2_NAME CFE_RAM_JFFS2_PAD
7 DEVICE_VARS += CFE_WFI_CHIP_ID CFE_WFI_FLASH_TYPE
8 DEVICE_VARS += CFE_WFI_FLAGS CFE_WFI_VERSION
9
10 # CFE expects a single JFFS2 partition with cferam and kernel. However,
11 # it's possible to fool CFE into properly loading both cferam and kernel
12 # from two different JFFS2 partitions by adding dummy files (see
13 # cfe-jffs2-cferam and cfe-jffs2-kernel).
14 # Separate JFFS2 partitions allow upgrading openwrt without reflashing cferam
15 # JFFS2 partition, which is much safer in case anything goes wrong.
16 define Device/bcm63xx-nand
17 FILESYSTEMS := squashfs ubifs
18 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | cfe-jffs2-kernel
19 KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma elf
20 IMAGES := cfe.bin sysupgrade.bin
21 IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | cfe-jffs2-cferam | append-ubi | cfe-wfi-tag
22 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
23 KERNEL_SIZE := 5120k
24 CFE_CHIP_ID :=
25 CFE_RAM_FILE :=
26 CFE_RAM_JFFS2_NAME :=
27 CFE_RAM_JFFS2_PAD :=
28 CFE_WFI_VERSION := 0x5731
29 CFE_WFI_CHIP_ID = 0x$$(CFE_CHIP_ID)
30 CFE_WFI_FLASH_TYPE :=
31 CFE_WFI_FLAGS :=
32 UBINIZE_OPTS := -E 5
33 DEVICE_PACKAGES += nand-utils
34 SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
35 endef
36
37 ### Comtrend ###
38 define Device/comtrend_vr-3032u
39 $(Device/bcm63xx-nand)
40 DEVICE_VENDOR := Comtrend
41 DEVICE_MODEL := VR-3032u
42 CFE_CHIP_ID := 63268
43 SOC := bcm63168
44 CFE_RAM_FILE := comtrend,vr-3032u/cferam.000
45 CFE_RAM_JFFS2_NAME := cferam.000
46 BLOCKSIZE := 128k
47 PAGESIZE := 2048
48 SUBPAGESIZE := 512
49 VID_HDR_OFFSET := 2048
50 DEVICE_PACKAGES += $(USB2_PACKAGES)
51 CFE_WFI_FLASH_TYPE := 3
52 endef
53 TARGET_DEVICES += comtrend_vr-3032u