[OpenWrt-Devel] [PATCH 4/4] gemini: Add SL93512R Support

Linus Walleij linus.walleij at linaro.org
Sat Jan 19 15:29:02 EST 2019


This generates images for the StorLink SL93512R reference
design which is supported in kernel v4.19.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
 target/linux/gemini/image/Makefile | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile
index 59041a72a785..722df1c82b00 100644
--- a/target/linux/gemini/image/Makefile
+++ b/target/linux/gemini/image/Makefile
@@ -39,6 +39,19 @@ define Build/dns313-images
 	if [ -d $(BIN_DIR)/.boot ] ; then rm -rf $(BIN_DIR)/.boot ; fi
 endef
 
+# Create the special SL93512R image format with the squashfs
+# split across two "partitions" named rd.gz and hddapp.tgz but
+# essentially just being used by OpenWRT as one big squashfs
+# partition
+define Build/sl93512r-images
+	dd if=$(IMAGE_ROOTFS) of=$(BIN_DIR)/rd.gz bs=6144k conv=sync
+	dd if=$(IMAGE_ROOTFS) of=$(BIN_DIR)/hddapp.bz2 bs=6144k count=1 seek=1
+	cp $(IMAGE_KERNEL) $(BIN_DIR)/zImage
+	mv $(BIN_DIR)/rd.gz $(BIN_DIR)/$(IMG_PREFIX)-sl93512r-rd.gz
+	mv $(BIN_DIR)/hddapp.bz2 $(BIN_DIR)/$(IMG_PREFIX)-sl93512r-hddapp.bz2
+	mv $(BIN_DIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-sl93512r-zImage
+endef
+
 # Create the special NAS4220B image format with the squashfs
 # and overlay inside the "rd.gz" file. We pad it out to 6144K
 # which is the size of the initramfs partition.
@@ -122,6 +135,14 @@ define Device/dlink-dns-313
 endef
 TARGET_DEVICES += dlink-dns-313
 
+define Device/sl93512r
+	DEVICE_TITLE := StorLink SL93512R Reference Design
+	IMAGES += sl93512r-image
+	IMAGE/sl93512r-image := sl93512r-images
+	DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES)
+endef
+TARGET_DEVICES += sl93512r
+
 define Device/nas4220b
 	DEVICE_TITLE := Raidsonic NAS IB-4220-B
 	IMAGES += nas4220b-image
-- 
2.19.2


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list