gemini: use existing build code where possible
authorMathias Kresin <dev@kresin.me>
Fri, 25 Jan 2019 20:48:10 +0000 (21:48 +0100)
committerMathias Kresin <dev@kresin.me>
Sat, 26 Jan 2019 14:23:36 +0000 (15:23 +0100)
Use the existing image build recipes in favour of introducing deplicate
shell code.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/gemini/image/Makefile

index 773fe1e4bc7890aa298d35e76ecf92676997dc1e..469e2b0a536da88c62f2c76a5c96940335bdb928 100644 (file)
@@ -55,7 +55,7 @@ endef
 define Build/nas4220b-sq201-images
        rm -rf $@-tmp
        mkdir -p $@-tmp
-       dd if=$(IMAGE_ROOTFS) of=$@-tmp/rd.gz bs=6144k conv=sync
+       mv $@ $@-tmp/rd.gz
        dd if=/dev/zero of=$@-tmp/hddapp.tgz bs=6144k count=1
        cp $(IMAGE_KERNEL) $@-tmp/zImage
        cp ./ImageInfo-$(1) $@-tmp/ImageInfo
@@ -120,7 +120,7 @@ define Device/nas4220b-sq201
        ARTIFACT/zImage := append-kernel
        IMAGES += rd.gz sysupgrade.tar.gz
        IMAGE/rd.gz := append-rootfs | pad-to 6144k
-       IMAGE/sysupgrade.tar.gz := nas4220b-sq201-images $(1)
+       IMAGE/sysupgrade.tar.gz := append-rootfs | pad-to 6144k | nas4220b-sq201-images $(1)
        DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES)
 endef