ipq40xx: add support for Sony NCP-HG100/Cellular
[openwrt/openwrt.git] / target / linux / ipq40xx / image / generic.mk
index 5652bf9414b990fdf6d187bff220153224358442..43244a914cdaf45c800cd0246f628ed40216d301 100644 (file)
@@ -43,7 +43,8 @@ define Build/append-rootfshdr
                -O linux -T filesystem \
                -C lzma -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
                -n root.squashfs -d $(IMAGE_ROOTFS) $@.new
-       dd if=$@.new bs=64 count=1 >> $(IMAGE_KERNEL)
+       cat $(IMAGE_KERNEL) > $@.$1
+       dd if=$@.new bs=64 count=1 >> $@.$1
 endef
 
 define Build/append-rutx-metadata
@@ -89,7 +90,7 @@ endef
 
 define Build/qsdk-ipq-factory-nand-askey
        $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh $@.its\
-               askey_kernel $(IMAGE_KERNEL) \
+               askey_kernel $@.$1 \
                askey_fs $(IMAGE_ROOTFS) \
                ubifs $@
        PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
@@ -313,8 +314,8 @@ define Device/cellc_rtl30vw
        KERNEL_NAME := zImage
        KERNEL_IN_UBI :=
        IMAGES := nand-factory.bin nand-sysupgrade.bin
-       IMAGE/nand-factory.bin := append-rootfshdr | append-ubi | qsdk-ipq-factory-nand-askey
-       IMAGE/nand-sysupgrade.bin := append-rootfshdr | sysupgrade-tar | append-metadata
+       IMAGE/nand-factory.bin := append-rootfshdr kernel | append-ubi | qsdk-ipq-factory-nand-askey kernel
+       IMAGE/nand-sysupgrade.bin := append-rootfshdr kernel | sysupgrade-tar kernel=$$$$@.kernel | append-metadata
        DEVICE_VENDOR := Cell C
        DEVICE_MODEL := RTL30VW
        SOC := qcom-ipq4019
@@ -559,7 +560,7 @@ define Device/glinet_gl-ap1300
        PAGESIZE := 2048
        IMAGE_SIZE := 131072k
        KERNEL_INSTALL := 1
-       DEVICE_PACKAGES := ipq-wifi-glinet_gl-ap1300
+       DEVICE_PACKAGES := ipq-wifi-glinet_gl-ap1300 kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
 endef
 TARGET_DEVICES += glinet_gl-ap1300
 
@@ -639,6 +640,7 @@ define Device/linksys_ea6350v3
        UBINIZE_OPTS := -E 5
        IMAGES += factory.bin
        IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA6350v3
+       DEFAULT := n
 endef
 TARGET_DEVICES += linksys_ea6350v3
 
@@ -655,6 +657,7 @@ define Device/linksys_ea8300
        IMAGES += factory.bin
        IMAGE/factory.bin  := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA8300
        DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
+       DEFAULT := n
 endef
 TARGET_DEVICES += linksys_ea8300
 
@@ -671,6 +674,7 @@ define Device/linksys_mr8300
        IMAGES += factory.bin
        IMAGE/factory.bin  := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
        DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
+       DEFAULT := n
 endef
 TARGET_DEVICES += linksys_mr8300
 
@@ -899,6 +903,7 @@ define Device/pakedge_wr-1
        DEVICE_VENDOR := Pakedge
        DEVICE_MODEL := WR-1
        DEVICE_DTS_CONFIG := config@ap.dk01.1-c1
+       DEVICE_PACKAGES := ipq-wifi-pakedge_wr-1
        SOC := qcom-ipq4018
        BLOCKSIZE := 64k
        IMAGE_SIZE := 31232k
@@ -999,6 +1004,19 @@ define Device/qxwlan_e2600ac-c2
 endef
 TARGET_DEVICES += qxwlan_e2600ac-c2
 
+define Device/sony_ncp-hg100-cellular
+       $(call Device/FitImage)
+       DEVICE_VENDOR := Sony
+       DEVICE_MODEL := NCP-HG100/Cellular
+       DEVICE_DTS_CONFIG := config@ap.dk04.1-c4
+       SOC := qcom-ipq4019
+       KERNEL_SIZE := 8192k
+       IMAGE_SIZE := 128m
+       DEVICE_PACKAGES := e2fsprogs ipq-wifi-sony_ncp-hg100-cellular \
+               kmod-fs-ext4 uqmi
+endef
+TARGET_DEVICES += sony_ncp-hg100-cellular
+
 define Device/teltonika_rutx10
        $(call Device/FitImage)
        $(call Device/UbiFit)