diff --git a/patches-siflower-18.x/0106-sft1200-support-nand-tar-upgrade.patch b/patches-siflower-18.x/0106-sft1200-support-nand-tar-upgrade.patch new file mode 100644 index 0000000..c76a9d1 --- /dev/null +++ b/patches-siflower-18.x/0106-sft1200-support-nand-tar-upgrade.patch @@ -0,0 +1,64 @@ +From 5743dc601072dbff157258255b5832382967c0aa Mon Sep 17 00:00:00 2001 +From: "GL.iNet-Xinfa.Deng" +Date: Tue, 22 Jun 2021 12:25:17 +0800 +Subject: [PATCH] fix: sft1200 support nand tar upgrade + +Signed-off-by: GL.iNet-Xinfa.Deng +--- + .../base-files/files/lib/upgrade/platform.sh | 25 ++++++++++++++++------ + 1 file changed, 18 insertions(+), 7 deletions(-) + +diff --git a/openwrt-18.06/package/base-files/files/lib/upgrade/platform.sh b/openwrt-18.06/package/base-files/files/lib/upgrade/platform.sh +index 60666e7..e8d213a 100644 +--- a/openwrt-18.06/package/base-files/files/lib/upgrade/platform.sh ++++ b/openwrt-18.06/package/base-files/files/lib/upgrade/platform.sh +@@ -9,7 +9,7 @@ platform_expected_image() { + + case "$machine" in + # this is from dts +- "GL") echo "siwifi-1688a"; return;; ++ "GL") [ -e /dev/ubi0 ] && echo "siwifi-1688a-nand" || echo "siwifi-1688a"; return;; + "sf16a18") echo "siwifi-1688a"; return;; + "sf19a28") echo "siwifi-1688a"; return;; + esac +@@ -59,8 +59,11 @@ platform_check_image() { + fi + ;; + *) +- echo "Invalid image type. Please use only .trx files" +- error=1 ++ local dev_siwifi_id=$(platform_expected_image) ++ if [ "$dev_siwifi_id" != "siwifi-1688a-nand" ]; then ++ echo "Invalid image type. Please use only .trx files" ++ error=1 ++ fi + ;; + esac + +@@ -72,11 +75,19 @@ platform_do_upgrade() { + local cmd="" + + case "$siwifi_id" in +- "siwifi-1688a") cmd=$ARGV;; +- "siwifi-1688b") cmd=$ARGV;; ++ "siwifi-1688a-nand") ++ cmd=$ARGV ++ nand_do_upgrade "$cmd" ++ ;; ++ "siwifi-1688a" |\ ++ "siwifi-1688b") ++ cmd=$ARGV ++ default_do_upgrade "$cmd" ++ ;; ++ *) ++ default_do_upgrade "$cmd" ++ ;; + esac +- +- default_do_upgrade "$cmd" + } + + disable_watchdog() { +-- +2.7.4 + diff --git a/patches-siflower-18.x/0201-fix-siflower-support-nand-tar-upgrade.patch b/patches-siflower-18.x/0201-feat-siflower-add-usb-nand-gpio-feature.patch similarity index 94% rename from patches-siflower-18.x/0201-fix-siflower-support-nand-tar-upgrade.patch rename to patches-siflower-18.x/0201-feat-siflower-add-usb-nand-gpio-feature.patch index 2bc8260..e60a042 100644 --- a/patches-siflower-18.x/0201-fix-siflower-support-nand-tar-upgrade.patch +++ b/patches-siflower-18.x/0201-feat-siflower-add-usb-nand-gpio-feature.patch @@ -1,7 +1,7 @@ From c354e5a0ca8ad862c3c1f3c1b71a13a2d634939f Mon Sep 17 00:00:00 2001 From: "GL.iNet-Xinfa.Deng" Date: Mon, 21 Jun 2021 15:44:41 +0800 -Subject: [PATCH] fix: siflower support nand tar upgrade +Subject: [PATCH] feat: siflower add usb nand gpio feature Signed-off-by: GL.iNet-Xinfa.Deng --- diff --git a/profiles/target_siflower_gl-sft1200.yml b/profiles/target_siflower_gl-sft1200.yml index 12a7445..5d8fe88 100644 --- a/profiles/target_siflower_gl-sft1200.yml +++ b/profiles/target_siflower_gl-sft1200.yml @@ -861,3 +861,32 @@ diffconfig: | CONFIG_PACKAGE_iwinfo=y CONFIG_PACKAGE_jshn=y CONFIG_PACKAGE_libjson-script=y + CONFIG_PACKAGE_kmod-fs-ext4=y + CONFIG_PACKAGE_kmod-fs-ntfs=y + CONFIG_PACKAGE_kmod-fs-vfat=y + CONFIG_PACKAGE_kmod-fs-ext4=y + CONFIG_PACKAGE_kmod-fs-exfat=y + CONFIG_PACKAGE_ntfs-3g=y + CONFIG_PACKAGE_kmod-usb-storage=y + CONFIG_PACKAGE_kmod-usb-uhci=y + CONFIG_PACKAGE_kmod-usb2=y + CONFIG_PACKAGE_kmod-usb-ohci=y + CONFIG_PACKAGE_kmod-rt2800-usb=y + CONFIG_PACKAGE_wwan=y + CONFIG_PACKAGE_kmod-usb-serial=y + CONFIG_PACKAGE_kmod-usb-serial-cp210x=y + CONFIG_PACKAGE_kmod-usb-serial-option=y + CONFIG_PACKAGE_kmod-usb-serial-wwan=y + CONFIG_PACKAGE_kmod-usb-serial-sierrawireless=y + CONFIG_PACKAGE_usb-modeswitch=y + CONFIG_PACKAGE_kmod-mppe=y + CONFIG_PACKAGE_kmod-usb-net=y + CONFIG_PACKAGE_kmod-usb-net-cdc-ether=y + CONFIG_PACKAGE_kmod-usb-net-rndis=y + CONFIG_PACKAGE_kmod-usb-net-qmi-wwan=y + CONFIG_PACKAGE_uqmi=y + CONFIG_PACKAGE_kmod-usb-net-ipheth=y + CONFIG_PACKAGE_libusbmuxd=y + CONFIG_PACKAGE_libimobiledevice=y + CONFIG_PACKAGE_usbmuxd=y + CONFIG_PACKAGE_libustream-openssl=y