Author: jogo
Date: 2015-09-04 16:45:00 +0200 (Fri, 04 Sep 2015)
New Revision: 46789

Added:
   trunk/target/linux/ipq806x/base-files/lib/upgrade/
   trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
Modified:
   trunk/target/linux/ipq806x/image/Makefile
Log:
ipq806x: build images and add sysupgrade support for AP148

Add full ubi and sysupgrade images for AP148 and add sysupgrade support
for ipq806x to allow updating the current installation.

Signed-off-by: Jonas Gorski <[email protected]>

Added: trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
===================================================================
--- trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh               
                (rev 0)
+++ trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh       
2015-09-04 14:45:00 UTC (rev 46789)
@@ -0,0 +1,18 @@
+. /lib/ipq806x.sh
+
+PART_NAME=firmware
+
+platform_check_image() {
+       local board=$(ipq806x_board_name)
+
+       case "$board" in
+       AP148)
+               nand_do_platform_check $board $1
+               return $?;
+               ;;
+       *)
+               return 1;
+       esac
+}
+
+# use default for platform_do_upgrade()

Modified: trunk/target/linux/ipq806x/image/Makefile
===================================================================
--- trunk/target/linux/ipq806x/image/Makefile   2015-09-04 14:44:51 UTC (rev 
46788)
+++ trunk/target/linux/ipq806x/image/Makefile   2015-09-04 14:45:00 UTC (rev 
46789)
@@ -35,36 +35,50 @@
        DEVICE_DTS :=
        KERNEL_PREFIX := $$(IMAGE_PREFIX)
        IMAGES :=
+       KERNEL_IN_UBI :=
 endef
-DEVICE_VARS += DEVICE_DTS
+DEVICE_VARS += DEVICE_DTS KERNEL_IN_UBI
 
 define Device/LegacyImage
        KERNEL_SUFFIX := -uImage
        KERNEL = kernel-bin | append-dtb | uImage none
        KERNEL_NAME := zImage
-       KERNEL_INSTALL := 1
 endef
 
 define Device/FitImage
        KERNEL_SUFFIX := -fit-uImage.itb
        KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
        KERNEL_NAME := Image
-       KERNEL_INSTALL := 1
 endef
 
+define Device/UbiFit
+       KERNEL_IN_UBI := 1
+       IMAGES := nand-factory.ubi nand-sysupgrade.tar
+       IMAGE/nand-factory.ubi := append-ubi
+       IMAGE/nand-sysupgrade.tar := sysupgrade-nand
+endef
+
 define Device/AP148
        $(call Device/FitImage)
+       $(call Device/UbiFit)
        DEVICE_DTS := qcom-ipq8064-ap148
+       BLOCKSIZE := 128KiB
+       PAGESIZE := 2048
 endef
 
 define Device/AP148-legacy
        $(call Device/LegacyImage)
+       $(call Device/UbiFit)
        DEVICE_DTS := qcom-ipq8064-ap148
+       BLOCKSIZE := 128KiB
+       PAGESIZE := 2048
+       BOARD_NAME := AP148
 endef
 
 define Device/DB149
        $(call Device/FitImage)
        DEVICE_DTS := qcom-ipq8064-db149
+       KERNEL_INSTALL := 1
 endef
 
 TARGET_DEVICES += AP148 AP148-legacy DB149
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to