aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/image
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bcm63xx/image')
-rw-r--r--target/linux/bcm63xx/image/Makefile25
-rw-r--r--target/linux/bcm63xx/image/bcm63xx_nand.mk18
2 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/bcm63xx/image/Makefile b/target/linux/bcm63xx/image/Makefile
index e392d99f2c..483e711a5d 100644
--- a/target/linux/bcm63xx/image/Makefile
+++ b/target/linux/bcm63xx/image/Makefile
@@ -95,6 +95,31 @@ define Image/FileSystemStrip
$(firstword $(subst +,$(space),$(subst root.,,$(notdir $(1)))))
endef
+define Build/ad1018-jffs2-cferam
+ mv $@ $@.kernel
+
+ rm -rf $@-cferam
+ mkdir -p $@-cferam
+
+ # CFE RAM JFFS2 partition
+ cp $(KDIR)/bcm63xx-cfe/$(CFE_RAM_FILE) $@-cferam/$(CFE_RAM_JFFS2_NAME)
+ $(call Build/cfe-jffs2,$@-cferam)
+ mv $@ $@.cferam
+
+ # First block of CFE RAM 1 will be destroyed by MMAP
+ dd if=$@.cferam bs=$(BLOCKSIZE) count=1 > $@
+ dd if=$@.cferam >> $@
+ $(call Build/pad-to,896k)
+
+ # CFE RAM 2
+ dd if=$@.cferam >> $@
+
+ # Append kernel @ 4M
+ $(call Build/pad-to,4096k)
+ dd if=$@.kernel >> $@
+ rm -f $@.kernel
+endef
+
define Build/cfe-bin
$(STAGING_DIR_HOST)/bin/imagetag -i $(IMAGE_KERNEL) -f $(IMAGE_ROOTFS) \
--output $@ --boardid $(CFE_BOARD_ID) --chipid $(CFE_CHIP_ID) \
diff --git a/target/linux/bcm63xx/image/bcm63xx_nand.mk b/target/linux/bcm63xx/image/bcm63xx_nand.mk
index 9ff2c989b8..012745bbac 100644
--- a/target/linux/bcm63xx/image/bcm63xx_nand.mk
+++ b/target/linux/bcm63xx/image/bcm63xx_nand.mk
@@ -85,3 +85,21 @@ define Device/netgear_dgnd3700-v2
CFE_WFI_FLASH_TYPE := 2
endef
TARGET_DEVICES += netgear_dgnd3700-v2
+
+### Sercomm ###
+define Device/sercomm_ad1018
+ $(Device/bcm63xx-nand)
+ IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | ad1018-jffs2-cferam | append-ubi | cfe-wfi-tag
+ DEVICE_VENDOR := Sercomm
+ DEVICE_MODEL := AD1018
+ CFE_CHIP_ID := 6328
+ CFE_RAM_FILE := sercomm,ad1018/cferam
+ CFE_RAM_JFFS2_NAME := cferam
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ SUBPAGESIZE := 512
+ VID_HDR_OFFSET := 2048
+ DEVICE_PACKAGES += $(B43_PACKAGES) $(USB2_PACKAGES)
+ CFE_WFI_FLASH_TYPE := 3
+endef
+TARGET_DEVICES += sercomm_ad1018