From ce149a86b97684344f67abbb412add3531ed5ebf Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Wed, 15 Apr 2020 09:35:18 +0800 Subject: [PATCH 1/3] ipq806x/4.19: fix error dts for m520 Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> --- target/linux/ipq40xx/image/Makefile | 18 ------- .../arm/boot/dts/qcom-ipq8064-mtfi-m520.dts | 53 +++++++------------ target/linux/ipq806x/image/Makefile | 4 +- 3 files changed, 21 insertions(+), 54 deletions(-) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 107e0d250a..3b73959e20 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -147,24 +147,6 @@ define Device/asus_rt-ac58u endef TARGET_DEVICES += asus_rt-ac58u -define Device/asus_rt-ac1300uhp - $(call Device/FitImageLzma) - DEVICE_VENDOR := ASUS - DEVICE_MODEL := RT-AC1300UHP - DEVICE_DTS := qcom-ipq4018-rt-ac58u - BLOCKSIZE := 128k - PAGESIZE := 2048 - DTB_SIZE := 65536 - IMAGE_SIZE := 20439364 - FILESYSTEMS := squashfs - UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U') - KERNEL_INITRAMFS := $$(KERNEL) | uImage none - KERNEL_INITRAMFS_SUFFIX := -factory.trx - IMAGES := sysupgrade.bin - DEVICE_PACKAGES := kmod-usb-ledtrig-usbport -endef -TARGET_DEVICES += asus_rt-ac1300uhp - define Device/asus_rt-acrh17 $(call Device/FitImageLzma) DEVICE_VENDOR := ASUS diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts index 3b3172ec93..008f270b64 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts @@ -136,10 +136,10 @@ gsbi2: gsbi@12480000 { qcom,mode = ; - status = "ok"; + status = "okay"; i2c@124a0000 { - status = "ok"; + status = "okay"; lm75@48 { status = "okay"; @@ -157,9 +157,9 @@ gsbi@16300000 { qcom,mode = ; - status = "ok"; + status = "okay"; serial@16340000 { - status = "ok"; + status = "okay"; }; /* * The i2c device on gsbi4 should not be enabled. @@ -171,10 +171,10 @@ gsbi5: gsbi@1a200000 { qcom,mode = ; - status = "ok"; + status = "okay"; spi4: spi@1a280000 { - status = "ok"; + status = "okay"; pinctrl-0 = <&spi_pins>; pinctrl-names = "default"; @@ -264,47 +264,31 @@ }; sata-phy@1b400000 { - status = "ok"; + status = "okay"; }; sata@29000000 { ports-implemented = <0x1>; - status = "ok"; + status = "okay"; }; - phy@100f8800 { /* USB3 port 1 HS phy */ - status = "ok"; + usb3_0: usb3@110f8800 { + status = "okay"; }; - phy@100f8830 { /* USB3 port 1 SS phy */ - status = "ok"; - }; - - phy@110f8800 { /* USB3 port 0 HS phy */ - status = "ok"; - }; - - phy@110f8830 { /* USB3 port 0 SS phy */ - status = "ok"; - }; - - usb30@0 { - status = "ok"; - }; - - usb30@1 { - status = "ok"; + usb3_1: usb3@100f8800 { + status = "okay"; }; pcie0: pci@1b500000 { - status = "ok"; + status = "okay"; reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_pins>; pinctrl-names = "default"; }; pcie1: pci@1b700000 { - status = "ok"; + status = "okay"; reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_pins>; pinctrl-names = "default"; @@ -315,7 +299,8 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, + <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; @@ -338,7 +323,7 @@ }; gmac1: ethernet@37200000 { - status = "ok"; + status = "okay"; phy-mode = "rgmii"; qcom,id = <1>; @@ -354,7 +339,7 @@ }; gmac2: ethernet@37400000 { - status = "ok"; + status = "okay"; phy-mode = "sgmii"; qcom,id = <2>; @@ -391,5 +376,5 @@ }; &adm_dma { - status = "ok"; + status = "okay"; }; diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index bae96017ea..91ec128445 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -275,8 +275,8 @@ define Device/ruijie_rg-mtfi-m520 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$${BLOCKSIZE} | sysupgrade-tar rootfs=$$$$@ | append-metadata IMAGE/mmcblk0p2-kernel.bin := append-kernel | pad-to $$$${KERNEL_SIZE} IMAGE/mmcblk0p3-rootfs.bin := append-rootfs | pad-rootfs - DEVICE_PACKAGES := ath10k-firmware-qca988x-ct blockd e2fsprogs f2fs-tools \ - kmod-hwmon-lm75 kmod-fs-ext4 kmod-fs-f2fs kmod-rtc-pcf8563 kmod-usb-serial losetup + DEVICE_PACKAGES := ath10k-firmware-qca988x-ct e2fsprogs f2fs-tools \ + kmod-hwmon-lm75 kmod-fs-ext4 kmod-fs-f2fs kmod-rtc-pcf8563 losetup endef TARGET_DEVICES += ruijie_rg-mtfi-m520 From 1dc3da583555400f67e938df3e67a63c7849efcc Mon Sep 17 00:00:00 2001 From: ElonH Date: Tue, 14 Apr 2020 23:37:46 +0800 Subject: [PATCH 2/3] cmake: fixing compiler are not proper when ccache enable --- include/cmake.mk | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/include/cmake.mk b/include/cmake.mk index a5ba7d31bf..e2d13c8ab3 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -17,18 +17,8 @@ else cmake_tool=$(shell which $(1)) endif -ifeq ($(CONFIG_CCACHE),) - CMAKE_C_COMPILER:=$(call cmake_tool,$(TARGET_CC)) - CMAKE_CXX_COMPILER:=$(call cmake_tool,$(TARGET_CXX)) - CMAKE_C_COMPILER_ARG1:= - CMAKE_CXX_COMPILER_ARG1:= -else - CCACHE:=$(STAGING_DIR_HOST)/bin/ccache - CMAKE_C_COMPILER:=$(CCACHE) - CMAKE_C_COMPILER_ARG1:=$(TARGET_CC_NOCACHE) - CMAKE_CXX_COMPILER:=$(CCACHE) - CMAKE_CXX_COMPILER_ARG1:=$(TARGET_CXX_NOCACHE) -endif +CMAKE_C_COMPILER:=$(call cmake_tool,$(TARGET_CC_NOCACHE)) +CMAKE_CXX_COMPILER:=$(call cmake_tool,$(TARGET_CXX_NOCACHE)) CMAKE_AR:=$(call cmake_tool,$(TARGET_AR)) CMAKE_NM:=$(call cmake_tool,$(TARGET_NM)) CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB)) @@ -50,12 +40,11 @@ define Build/Configure/Default -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ + $(if $(CONFIG_CCACHE),-DCMAKE_CXX_COMPILER_LAUNCHER="$(STAGING_DIR_HOST)/bin/ccache") \ + $(if $(CONFIG_CCACHE),-DCMAKE_C_COMPILER_LAUNCHER="$(STAGING_DIR_HOST)/bin/ccache") \ -DCMAKE_C_COMPILER="$(CMAKE_C_COMPILER)" \ - -DCMAKE_C_COMPILER_ARG1="$(CMAKE_C_COMPILER_ARG1)" \ -DCMAKE_CXX_COMPILER="$(CMAKE_CXX_COMPILER)" \ - -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_CXX_COMPILER_ARG1)" \ -DCMAKE_ASM_COMPILER="$(CMAKE_C_COMPILER)" \ - -DCMAKE_ASM_COMPILER_ARG1="$(CMAKE_C_COMPILER_ARG1)" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \ -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS) $(CMAKE_SHARED_LDFLAGS)" \ -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS) $(CMAKE_SHARED_LDFLAGS)" \ From 5e03475b9cd127c34b0c3ff54b2f724da9573284 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Mon, 6 Apr 2020 01:53:19 -1000 Subject: [PATCH 3/3] scripts/download: add sources CDN as first mirror OpenWrt now has a CDN for sources at sources.cdn.openwrt.org which mirrors sources.openwrt.org. Downloading sources outside Europe or US (mainland) could result in low throughput, extremely slowing down the first compilation of the build system. This patch adds sources.cdn.openwrt.org as the first mirror to offer worldwide fast download speeds by default. If the CDN goes down for whatever reason, the script jumps to the next available mirror and downloads requested files as before (in regional varying speed). Signed-off-by: Paul Spooren Acked-by: Eneas U de Queiroz --- scripts/download.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/download.pl b/scripts/download.pl index d0dd9fc356..ce90780b97 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -272,6 +272,7 @@ foreach my $mirror (@ARGV) { } } +unshift @mirrors, 'https://sources.cdn.openwrt.org'; #push @mirrors, 'https://mirror1.openwrt.org'; push @mirrors, 'https://sources.openwrt.org'; push @mirrors, 'https://mirror2.openwrt.org/sources';