From 4104bc292a63f5d45124e19a3165a6ebf69e028c Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 26 Jan 2018 10:42:11 +0800 Subject: [PATCH 1/4] sync ac58u upgrade script --- .../base-files/lib/preinit/06_set_iface_mac | 1 + .../base-files/lib/upgrade/platform.sh | 31 ++----------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/target/linux/ipq806x/base-files/lib/preinit/06_set_iface_mac b/target/linux/ipq806x/base-files/lib/preinit/06_set_iface_mac index 2638df1da..f0c7dda87 100644 --- a/target/linux/ipq806x/base-files/lib/preinit/06_set_iface_mac +++ b/target/linux/ipq806x/base-files/lib/preinit/06_set_iface_mac @@ -9,6 +9,7 @@ preinit_set_mac_address() { . /lib/functions.sh case $(board_name) in + asus,rt-ac58u|\ asus,rt-acrh17) CI_UBIPART=UBI_DEV mac=$(mtd_get_mac_binary_ubi Factory 4102) diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 295177c95..571c9cc8a 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -5,34 +5,12 @@ RAMFS_COPY_BIN='fw_printenv fw_setenv' RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' platform_check_image() { - local board=$(board_name) - - case "$board" in - rt-ac58u) - CI_UBIPART="UBI_DEV" - local ubidev=$(nand_find_ubi $CI_UBIPART) - local asus_root=$(nand_find_volume $ubidev jffs2) - - [ -n "$asus_root" ] || return 0 - - cat << EOF -jffs2 partition is still present. -There's probably no space left -to install the filesystem. - -You need to delete the jffs2 partition first: -# ubirmvol /dev/ubi0 --name=jffs2 - -Once this is done. Retry. -EOF - return 1 - ;; - esac - return 0 + return 0; } platform_do_upgrade() { case "$(board_name)" in + asus,rt-ac58u|\ asus,rt-acrh17) CI_UBIPART="UBI_DEV" CI_KERNPART="linux" @@ -44,11 +22,6 @@ platform_do_upgrade() { [ -n "$linux2" ] && ubirmvol /dev/$ubidev --name=linux2 nand_do_upgrade "$1" ;; - asus,rt-ac58u) - CI_UBIPART="UBI_DEV" - CI_KERNPART="linux" - nand_do_upgrade "$1" - ;; linksys,ea8500) platform_do_upgrade_linksys "$ARGV" ;; From 51106230003e0dc7d1dbc8986e5d94ea7c8cec47 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 26 Jan 2018 11:07:10 +0800 Subject: [PATCH 2/4] force custom wireless to 30dbm --- package/firmware/wireless-regdb/Makefile | 1 + .../600-custom-fix-txpower-and-dfs.patch | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 package/firmware/wireless-regdb/patches/600-custom-fix-txpower-and-dfs.patch diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile index d06da2c70..e66c48679 100644 --- a/package/firmware/wireless-regdb/Makefile +++ b/package/firmware/wireless-regdb/Makefile @@ -29,3 +29,4 @@ define Package/wireless-regdb/install endef $(eval $(call BuildPackage,wireless-regdb)) + diff --git a/package/firmware/wireless-regdb/patches/600-custom-fix-txpower-and-dfs.patch b/package/firmware/wireless-regdb/patches/600-custom-fix-txpower-and-dfs.patch new file mode 100644 index 000000000..b1c912444 --- /dev/null +++ b/package/firmware/wireless-regdb/patches/600-custom-fix-txpower-and-dfs.patch @@ -0,0 +1,42 @@ +From 7eb6313910023f1be6015a8cd9e1b380ae01af64 Mon Sep 17 00:00:00 2001 +From: Chen Minqiang +Date: Sun, 7 Jan 2018 14:38:36 +0800 +Subject: [PATCH] custom fix txpower and dfs + +--- + db.txt | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/db.txt b/db.txt +index 75dc0a3..24989ad 100644 +--- a/db.txt ++++ b/db.txt +@@ -277,9 +277,9 @@ country CL: DFS-JP + (5735 - 5835 @ 80), (20) + + country CN: DFS-FCC +- (2402 - 2482 @ 40), (20) +- (5170 - 5250 @ 80), (23), AUTO-BW +- (5250 - 5330 @ 80), (23), DFS, AUTO-BW ++ (2402 - 2482 @ 40), (30) ++ (5170 - 5250 @ 80), (30), AUTO-BW ++ (5250 - 5330 @ 80), (30), AUTO-BW + (5735 - 5835 @ 80), (30) + # 60 GHz band channels 1,4: 28dBm, channels 2,3: 44dBm + # ref: http://www.miit.gov.cn/n11293472/n11505629/n11506593/n11960250/n11960606/n11960700/n12330791.files/n12330790.pdf +@@ -1238,9 +1238,9 @@ country UG: DFS-FCC + country US: DFS-FCC + (2402 - 2472 @ 40), (30) + # 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients +- (5170 - 5250 @ 80), (23), AUTO-BW +- (5250 - 5330 @ 80), (23), DFS, AUTO-BW +- (5490 - 5730 @ 160), (23), DFS ++ (5170 - 5250 @ 80), (30), AUTO-BW ++ (5250 - 5330 @ 80), (30), AUTO-BW ++ (5490 - 5730 @ 160), (30) + (5735 - 5835 @ 80), (30) + # 60g band + # reference: http://cfr.regstoday.com/47cfr15.aspx#47_CFR_15p255 +-- +2.7.4 + From 52101a847ccac8c893d606918a766d57a1a0ef66 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 26 Jan 2018 18:54:01 +0800 Subject: [PATCH 3/4] fix EA8500 ubifs image support --- target/linux/ipq806x/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 983106186..5336e76f5 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq806x BOARDNAME:=Qualcomm Atheros IPQ806X -FEATURES:=squashfs nand ubifs fpu ramdisk +FEATURES:=squashfs nand fpu ramdisk CPU_TYPE:=cortex-a15 CPU_SUBTYPE:=neon-vfpv4 MAINTAINER:=John Crispin From 280da421a3f921bed195505bc95cbeb83e6bde41 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 26 Jan 2018 22:34:06 +0800 Subject: [PATCH 4/4] revert ubifs support --- target/linux/ipq806x/Makefile | 2 +- target/linux/ipq806x/image/Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 5336e76f5..983106186 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq806x BOARDNAME:=Qualcomm Atheros IPQ806X -FEATURES:=squashfs nand fpu ramdisk +FEATURES:=squashfs nand ubifs fpu ramdisk CPU_TYPE:=cortex-a15 CPU_SUBTYPE:=neon-vfpv4 MAINTAINER:=John Crispin diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 092f39fb7..a6402cfa6 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -3,6 +3,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +UBIFS_OPTS = -m 2048 -e 124KiB -c 4096 -U -F + define Device/Default PROFILES := Default KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)