aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/realtek/image/Makefile18
-rw-r--r--target/linux/realtek/image/rtl838x.mk8
2 files changed, 25 insertions, 1 deletions
diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile
index 026c6e0068..b54a1f0a8d 100644
--- a/target/linux/realtek/image/Makefile
+++ b/target/linux/realtek/image/Makefile
@@ -6,7 +6,8 @@ include $(INCLUDE_DIR)/image.mk
KERNEL_LOADADDR = 0x80000000
KERNEL_ENTRY = 0x80000400
-DEVICE_VARS += ZYXEL_VERS
+DEVICE_VARS += ZYXEL_VERS DLINK_KERNEL_PART_SIZE
+DEVICE_VARS += CAMEO_KERNEL_PART CAMEO_ROOTFS_PART CAMEO_CUSTOMER_SIGNATURE CAMEO_BOARD_VERSION
define Build/zyxel-vers
( echo VERS;\
@@ -16,6 +17,21 @@ define Build/zyxel-vers
done ) >> $@
endef
+define Build/dlink-headers
+ dd if=$@ bs=$(DLINK_KERNEL_PART_SIZE) count=1 of=$@.kernel_part; \
+ dd if=$@ bs=$(DLINK_KERNEL_PART_SIZE) skip=1 of=$@.rootfs_part; \
+ $(SCRIPT_DIR)/cameo-imghdr.py $@.kernel_part $@.kernel_part.hex \
+ "$(DEVICE_MODEL)" os $(CAMEO_KERNEL_PART) \
+ $(CAMEO_CUSTOMER_SIGNATURE) \
+ $(CAMEO_BOARD_VERSION) \
+ $(KERNEL_LOADADDR); \
+ $(SCRIPT_DIR)/cameo-imghdr.py $@.rootfs_part $@.rootfs_part.hex \
+ "$(DEVICE_MODEL)" squashfs $(CAMEO_ROOTFS_PART) \
+ $(CAMEO_CUSTOMER_SIGNATURE) \
+ $(CAMEO_BOARD_VERSION); \
+ cat $@.kernel_part.hex $@.rootfs_part.hex > $@
+endef
+
define Device/Default
PROFILES = Default
KERNEL := kernel-bin | append-dtb | gzip | uImage gzip
diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk
index 289e37db16..e71106d571 100644
--- a/target/linux/realtek/image/rtl838x.mk
+++ b/target/linux/realtek/image/rtl838x.mk
@@ -15,6 +15,7 @@ define Device/d-link_dgs-1210
SOC := rtl8382
IMAGE_SIZE := 13824k
DEVICE_VENDOR := D-Link
+ DLINK_KERNEL_PART_SIZE := 1572864
endef
define Device/d-link_dgs-1210-10p
@@ -33,6 +34,13 @@ TARGET_DEVICES += d-link_dgs-1210-16
define Device/d-link_dgs-1210-28
$(Device/d-link_dgs-1210)
DEVICE_MODEL := DGS-1210-28
+ CAMEO_KERNEL_PART := 2
+ CAMEO_ROOTFS_PART := 3
+ CAMEO_CUSTOMER_SIGNATURE := 2
+ CAMEO_BOARD_VERSION := 32
+ IMAGES += factory_image1.bin
+ IMAGE/factory_image1.bin := append-kernel | pad-to 64k | \
+ append-rootfs | pad-rootfs | pad-to 16 | check-size | dlink-headers
endef
TARGET_DEVICES += d-link_dgs-1210-28