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

Christian Lamparter chunkeey at gmail.com
Thu Jan 24 10:21:57 EST 2019


Hello,

On Wednesday, January 23, 2019 7:59:58 PM CET Linus Walleij wrote:
> 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>
> ---
> ChangeLog v1->v2:
> - Resend.
> ---
>  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
So the rootfs gets added to 6144k of padding? For the NAS4220 this was all
just one zeroed file.

> +	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

I did rework the image creation process for the NAS4220B and sq201
because it was very racy (and probably caused some of the build
failures in this target? [0]) and I think it should be possible to
improve the sl93512r as well.

> +
>  # 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
Can you please check if something like this:

ARTIFACTS := zImage
ARTIFACT/zImage := append-kernel
IMAGES := rd.gz hddapp.bz2
IMAGE/rd.gz := append-rootfs | pad-to 6144k
IMAGE/hddapp.bz2 := pad-extra 6144k | append-rootfs

Produces similar/compatible files?
(This would make the extra Build/sl93512r-images obsolete).

> +	DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES)
> +endef
> +TARGET_DEVICES += sl93512r

Regards,
Christian

[0] http://phase1.builds.lede-project.org/builders/gemini%2Fgeneric




_______________________________________________
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