From a9d3084b83bb2d0fa2c0b43bf2a0831b5ae1df13 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 14 Nov 2019 12:26:05 +0100 Subject: [PATCH 1/4] ar71xx: fix MAC address setup for TL-WDR4900 v2 The MAC address setup of the TL-WDR4900 v2 is different from the C5/C7. This aligns ar71xx with the setup in ath79: wlan0 (5GHz) : -2 wlan1 (2.4GHz) : -1 eth1 (LAN) : 0 eth0 (WAN) : 1 Signed-off-by: Adrian Schmutzler --- .../linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c index 923ed28b4a..304a8c7057 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c @@ -207,19 +207,22 @@ static void __init common_setup(bool pcie_slot) u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); u8 tmpmac[ETH_ALEN]; + u8 tmpmac2[ETH_ALEN]; ath79_register_m25p80(&archer_c7_flash_data); ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c7_leds_gpio), archer_c7_leds_gpio); - ath79_register_wmac(art + ARCHER_C7_WMAC_CALDATA_OFFSET, mac); - if (pcie_slot) { + ath79_register_wmac(art + ARCHER_C7_WMAC_CALDATA_OFFSET, mac); ath79_register_pci(); } else { ath79_init_mac(tmpmac, mac, -1); + ath79_register_wmac(art + ARCHER_C7_WMAC_CALDATA_OFFSET, tmpmac); + + ath79_init_mac(tmpmac2, mac, -2); ap9x_pci_setup_wmac_led_pin(0, 0); - ap91_pci_init(art + ARCHER_C7_PCIE_CALDATA_OFFSET, tmpmac); + ap91_pci_init(art + ARCHER_C7_PCIE_CALDATA_OFFSET, tmpmac2); } mdiobus_register_board_info(archer_c7_mdio0_info, From 19800ac095f6ddbba03ccab08e5197b1eec4a49e Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Mon, 7 Oct 2019 21:33:51 +0900 Subject: [PATCH 2/4] ramips: set uImage name of WeVO 11AC NAS and W2914NS v2 The stock firmware and bootloader only accept uImage with names that match certain patterns. This patch enables OpenWrt installation from stock firmware without having to reflash the bootloader or access the UART console. Installation via web interface: 1. Flash **initramfs** image through the stock web interface. 2. Boot into OpenWrt and perform sysupgrade with sysupgrade image. Signed-off-by: Sungbo Eo --- target/linux/ramips/image/mt7621.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 66afe29620..d663aa29da 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -738,6 +738,7 @@ TARGET_DEVICES += unielec_u7621-06-64m define Device/wevo_11acnas MTK_SOC := mt7621 IMAGE_SIZE := 16064k + UIMAGE_NAME := 11AC-NAS-Router(0.0.0) DEVICE_VENDOR := WeVO DEVICE_MODEL := 11AC NAS Router DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic @@ -748,6 +749,7 @@ TARGET_DEVICES += wevo_11acnas define Device/wevo_w2914ns-v2 MTK_SOC := mt7621 IMAGE_SIZE := 16064k + UIMAGE_NAME := W2914NS-V2(0.0.0) DEVICE_VENDOR := WeVO DEVICE_MODEL := W2914NS DEVICE_VARIANT := v2 From d4f1937a21ae81194918bc1eb5a91118e0ff6267 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 17 Nov 2019 18:12:08 +0100 Subject: [PATCH 3/4] mediatek: drop leading + from config Signed-off-by: John Crispin --- target/linux/mediatek/mt7629/config-4.19 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mediatek/mt7629/config-4.19 b/target/linux/mediatek/mt7629/config-4.19 index f32d9d1919..2dab4e393d 100644 --- a/target/linux/mediatek/mt7629/config-4.19 +++ b/target/linux/mediatek/mt7629/config-4.19 @@ -235,7 +235,7 @@ CONFIG_MTD_NAND=y CONFIG_MTD_NAND_CORE=y CONFIG_MTD_NAND_ECC=y CONFIG_MTD_NAND_MTK=y -+CONFIG_MTD_SPI_NAND=y +CONFIG_MTD_SPI_NAND=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_FIT_FW=y From 567d08104efb28f22e2094c68cb470cf87a572c3 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 17 Nov 2019 18:13:28 +0100 Subject: [PATCH 4/4] mediatek: pass console inside bootargs on mt7629 Signed-off-by: John Crispin --- .../mediatek/files-4.19/arch/arm/boot/dts/mt7629-lynx-rfb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mediatek/files-4.19/arch/arm/boot/dts/mt7629-lynx-rfb.dts b/target/linux/mediatek/files-4.19/arch/arm/boot/dts/mt7629-lynx-rfb.dts index b8ef3ed557..8ea7b163d8 100644 --- a/target/linux/mediatek/files-4.19/arch/arm/boot/dts/mt7629-lynx-rfb.dts +++ b/target/linux/mediatek/files-4.19/arch/arm/boot/dts/mt7629-lynx-rfb.dts @@ -18,7 +18,7 @@ chosen { stdout-path = "serial0:115200n8"; - bootargs = "earlycon=uart8250,mmio32,0x11002000"; + bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8"; }; gpio-keys {