diff options
author | Yoonji Park <koreapyj@dcmys.kr> | 2022-06-06 07:44:48 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-09-12 01:43:49 +0100 |
commit | c27279dc26a26b8ad054882d4c5f86a85526fd16 (patch) | |
tree | 9622022edfd7a0dca29857546e9d6c290573246a /target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch | |
parent | 49763d907b0d87769c3e5885f1c11b5b62ccfa2b (diff) | |
download | upstream-c27279dc26a26b8ad054882d4c5f86a85526fd16.tar.gz upstream-c27279dc26a26b8ad054882d4c5f86a85526fd16.tar.bz2 upstream-c27279dc26a26b8ad054882d4c5f86a85526fd16.zip |
mediatek: add support for ipTIME A6004MX Add basic support for ipTIME A6004MX.
Hardware:
SoC: MediaTek MT7629 Cortex-A7 (ARMv7 1.25GHz, Dual-Core)
RAM: DDR3 128MB
Flash: Macronix MX35LF1GE4AB (SPI-NAND 128MB)
WiFi: MediaTek MT7761N (2.4GHz) / MediaTek MT7762N (5GHz) - no driver
Ethernet: SoC (WAN) / MediaTek MT7531 (LAN x4)
UART: [GND, RX, TX, 3.3V] (115200)
Installation:
- Flash recovery image with TFTP recovery
Revert to stock firmware:
- Flash stock firmware with TFTP recovery
TFTP Recovery method:
1. Unplug the router
2. Hold the reset button and plug in
3. Release when the power LED stops flashing and go off
4. Set your computer IP address manually to 192.168.0.x / 255.255.255.0
5. Flash image with TFTP client to 192.168.0.1
Signed-off-by: Yoonji Park <koreapyj@dcmys.kr>
Diffstat (limited to 'target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch')
-rw-r--r-- | target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch b/target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch new file mode 100644 index 0000000000..a11219d353 --- /dev/null +++ b/target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch @@ -0,0 +1,37 @@ +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1794,6 +1794,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL + + endchoice + ++config CMDLINE_OVERRIDE ++ bool "Use alternative cmdline from device tree" ++ help ++ Some bootloaders may have uneditable bootargs. While CMDLINE_FORCE can ++ be used, this is not a good option for kernels that are shared across ++ devices. This setting enables using "chosen/cmdline-override" as the ++ cmdline if it exists in the device tree. ++ + config CMDLINE + string "Default kernel command string" + default "" +--- a/drivers/of/fdt.c ++++ b/drivers/of/fdt.c +@@ -1059,6 +1059,17 @@ int __init early_init_dt_scan_chosen(uns + if (p != NULL && l > 0) + strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE)); + ++ /* CONFIG_CMDLINE_OVERRIDE is used to fallback to a different ++ * device tree option of chosen/bootargs-override. This is ++ * helpful on boards where u-boot sets bootargs, and is unable ++ * to be modified. ++ */ ++#ifdef CONFIG_CMDLINE_OVERRIDE ++ p = of_get_flat_dt_prop(node, "bootargs-override", &l); ++ if (p != NULL && l > 0) ++ strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); ++#endif ++ + /* + * CONFIG_CMDLINE is meant to be a default in case nothing else + * managed to set the command line, unless CONFIG_CMDLINE_FORCE |