aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* umbim: include MBIM-provided DNS servers also with DHCP modeLech Perczak2023-04-291-15/+18
| | | | | | | | In MBIM interfaces, DNS servers may be provided out-of-band regardless whether DHCP is used for configuration, or not. Move the DNS configuration outside "if" blocks to support that. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: extract common code from static and dhcp(v6) setup procedureLech Perczak2023-04-291-34/+16
| | | | | | | Beginnings and endings of sub-interface creation procedure were literally duplicates - extract them outside if "if" blocks Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: handle MTU configurationLech Perczak2023-04-291-2/+16
| | | | | | | | | Allow setting interface MTU through UCI. If this is not set, use MBIM-provided MTU, if provided through control channel. If separate MTUs are provided for IPv4 and IPv6, apply larger of them. This is very unlikely and possible only for IPv4v6 dual-stack configuration. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: delegate RFC7278 IPv6 prefixes from OOB configLech Perczak2023-04-291-0/+6
| | | | | | | Delegate prefixes received through MBIM control channel the same way, as would be done through DHCP, according to RFC7278. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: drop IP configuration parsing using 'eval'Lech Perczak2023-04-291-1/+0
| | | | | | Finally, when new helper is in use, drop old IP configuration parser. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: support multiple-valued configuration fieldsLech Perczak2023-04-291-10/+32
| | | | | | | | | MBIM supports multiple values for IP address and DNS server, and such configuration is available through output of MBIM. Use new helper method to support adding multiple addresses and DNS servers to static interfaces for both IPv4 and IPv6. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: add "_proto_mbim_get_field" helperLech Perczak2023-04-291-0/+12
| | | | | | | | | Add a new helper to extract IP configuration from umbim output. This is required to extract fields which can possibly have multiple values, namely IP addresses and DNS servers, and get rid of primitive parser using 'eval' builtin without support for this. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: log output of 'config' stepLech Perczak2023-04-291-1/+3
| | | | | | | | Display full configuration obtained using MBIM control channel in the log, from umbim output verbatim, for easier troubleshooting, and in preparation for parser refactoring. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: pass ipXtable to child interfacesLech Perczak2023-04-291-2/+8
| | | | | | | | Inspired by commti e51aa699f7ca, allow setting specific routing tables via ip4table and ip6table options, by passing them on child interfaces created by MBIM protocol handler. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: respect 'Enable IPv6 negotiation' optionLech Perczak2023-04-291-0/+4
| | | | | | | Don't bring IPv6 part of interface up if it's disabled, or system does not support it. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: use static config by default, fallback to DHCPLech Perczak2023-04-291-4/+7
| | | | | | | | | Finally, inspired by ModemManager's logic, make static configuration obtained through MBIM control channel, preferred. If IP configuration is not available this way, fallback to DHCP(v6) if enabled, else do not create a sub-interface for unavailable IP type. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: separate DHCPv6 configuration from DHCP(v4)Lech Perczak2023-04-291-3/+4
| | | | | | | | | | Now, that sub-interface setup is split by IP type, and separate checks are performed for DHCP selection, it is possible to control DHCP on v4 an v6 sub-interfaces instantly. Add "dhcpv6" variable, akin to QMI option, to control behaviour of DHCPv6 separately from IPv4 option, which is required for some mobile operators. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: restructure IPv4/IPv6 handlingLech Perczak2023-04-291-29/+25
| | | | | | | | Check whether interface is configured per IP type, not per DHCP. This is preparation to allow fallback to DHCP if static IP configuration is not available, which is the default option for MBIM modems Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: inherit firewall zone membership from parent interfaceLech Perczak2023-04-291-0/+6
| | | | | | | | Fix an issue where subinterfaces were not added to the same firewall zone as their parent. Inspired by 64bb88841fb. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: inherit "peerdns" option from parent interfaceLech Perczak2023-04-291-2/+2
| | | | | | | | MBIM protocol handler should intherit "peerdns" options from parent interface on sub-interfaces, otherwise upstream DNS servers are applied regardless of configuration. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: use IP configuration provided by MBIM by defaultLech Perczak2023-04-291-1/+1
| | | | | | | | | | | | Previously, DHCP was used. According to MBIM Specification v1.0 errata 1 [1], section 10.5.20, MBIM_CID_IP_CONFIGURATION, if MBIM information element containing IP configuration is available, host shall use it, and fall back to in-band mechanisms to acquire it therwise - therefore make static configuration the default. [1] https://www.usb.org/document-library/mobile-broadband-interface-model-v10-errata-1-and-adopters-agreement Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: detect actual connection IP typeLech Perczak2023-04-291-4/+10
| | | | | | | | | | | | Current implementation needlessly creates both IPv4 and IPv6 sub-interfaces for single-stack IP types. Limit this only to selected IP type. While at that, ensure that IP type is also passed to umbim during "connect" phase. In addition, detect the actual established connection type returned by umbim and set up subinterfaces according to that, not to requested configuration. While at that, allow empty IP type explicitly, interpreted as "any" according to MBIM specification. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: fail connect step immediatelyLech Perczak2023-04-291-3/+6
| | | | | | | | | | | | | Subsequent calls to 'umbim connect' do not have any effect if a failure occured, and in such case an infinite loop without timeout is created, leading to possibility of interface stuck at connecting forever. Drop this loop, and issue MBIM disconnect properly, so netifd can restart from scratch. This issue can be observed with Sierra EM7455 at changing APN, which causes network re-registration by default, and a MBIM transaction timeout, which is resolved on next interface bringup by netifd. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: connect session for only the selected PDP typeLech Perczak2023-04-291-48/+60
| | | | | | | | | Previous implementation automatically set up connections for both IPv4 and IPv6, even if one of them isn't supported. Respect the "pdptype" option in the same way, as it is done for QMI or NCM, and only start the respective PDN sessions, if set. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: add support for non-dhcp modeMartin Schiller2023-04-291-22/+64
| | | | | | | | | | There are mbim compatible wwan modules available which do not support the dhcp autoconfiguration. (e.g. gemalto Cinterion ELS81) This adds the possibility to get the configuration parameters from mbim. Signed-off-by: Martin Schiller <ms@dev.tdt.de> Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* tools/patchelf: update to 0.18.0Nick Hainke2023-04-291-2/+2
| | | | | | | Release Notes: https://github.com/NixOS/patchelf/releases/tag/0.18.0 Signed-off-by: Nick Hainke <vincent@systemli.org>
* tools/coreutils: update to 9.3Nick Hainke2023-04-293-148/+2
| | | | | | | | | | Update to latest bugfix release. Remove upstreamed patches: - 001-copy-fix-reflink-auto-to-fallback-in-more-cases.patch - 002-date-diagnose-f-read-errors.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
* kernel: mtk_bmt: refactor to avoid deep recursionMichał Kępień2023-04-291-31/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Linksys E8450 (mt7622) device running current master has recently started crashing: [ 0.562900] mtk-ecc 1100e000.ecc: probed [ 0.570254] spi-nand spi2.0: Fidelix SPI NAND was found. [ 0.575576] spi-nand spi2.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64 [ 0.583780] mtk-snand 1100d000.spi: ECC strength: 4 bits per 512 bytes [ 0.682930] Insufficient stack space to handle exception! [ 0.682939] ESR: 0x0000000096000047 -- DABT (current EL) [ 0.682946] FAR: 0xffffffc008c47fe0 [ 0.682948] Task stack: [0xffffffc008c48000..0xffffffc008c4c000] [ 0.682951] IRQ stack: [0xffffffc008008000..0xffffffc00800c000] [ 0.682954] Overflow stack: [0xffffff801feb00a0..0xffffff801feb10a0] [ 0.682959] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S 5.15.107 #0 [ 0.682966] Hardware name: Linksys E8450 (DT) [ 0.682969] pstate: 800000c5 (Nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 0.682975] pc : dequeue_entity+0x0/0x250 [ 0.682988] lr : dequeue_task_fair+0x98/0x290 [ 0.682992] sp : ffffffc008c48030 [ 0.682994] x29: ffffffc008c48030 x28: 0000000000000001 x27: ffffff801feb6380 [ 0.683004] x26: 0000000000000001 x25: ffffff801feb6300 x24: ffffff8000068000 [ 0.683011] x23: 0000000000000001 x22: 0000000000000009 x21: 0000000000000000 [ 0.683017] x20: ffffff801feb6380 x19: ffffff8000068080 x18: 0000000017a740a6 [ 0.683024] x17: ffffffc008bae748 x16: ffffffc008bae6d8 x15: ffffffffffffffff [ 0.683031] x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000f00000101 [ 0.683038] x11: 0000000000000449 x10: 0000000000000127 x9 : 0000000000000000 [ 0.683044] x8 : 0000000000000125 x7 : 0000000000116da1 x6 : 0000000000116da1 [ 0.683051] x5 : 00000000001165a1 x4 : ffffff801feb6e00 x3 : 0000000000000000 [ 0.683058] x2 : 0000000000000009 x1 : ffffff8000068080 x0 : ffffff801feb6380 [ 0.683066] Kernel panic - not syncing: kernel stack overflow [ 0.683069] SMP: stopping secondary CPUs [ 1.648361] SMP: failed to stop secondary CPUs 0-1 [ 1.648366] Kernel Offset: disabled [ 1.648368] CPU features: 0x00003000,00000802 [ 1.648372] Memory Limit: none Several factors contributed to this issue: 1. The mtk_bmt driver recursively calls its scan_bmt() helper function during device initialization, while looking for a valid block mapping table (BMT). 2. Commit fa4dc86e98 ("kernel: backport MEMREAD ioctl"): - increased the size of some stack-allocated structures (like struct mtd_oob_ops, used in bbt_nand_read(), which is indirectly called from scan_bmt()), - increased the stack size for some functions (for example, spinand_mtd_read(), which is indirectly called from scan_bmt(), now uses an extra stack-allocated struct mtd_ecc_stats). 3. OpenWrt currently compiles the kernel with the -fno-optimize-sibling-calls flag, which prevents tail-call optimization. Collectively, all of these factors caused stack usage in the mtk_bmt driver to grow excessively large, triggering stack overflows. Recursion is not really necessary in scan_bmt() as it simply iterates over flash memory blocks in reverse order, looking for a valid BMT. Refactor the logic contained in the scan_bmt() and read_bmt() functions in target/linux/generic/files/drivers/mtd/nand/mtk_bmt_v2.c so that deep recursion is prevented (and therefore also any potential stack overflows it may cause). Link: https://lists.openwrt.org/pipermail/openwrt-devel/2023-April/040872.html Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
* kernel: Activate CONFIG_SCHED_STACK_END_CHECKHauke Mehrtens2023-04-292-2/+2
| | | | | | | | | | | This activates the CONFIG_SCHED_STACK_END_CHECK option. The kernel will check if the kernel stack overflowed in the schedule() function. This just adds a very small computational overhead. This option is activated in Debian by default. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Activate CONFIG_SLAB_FREELIST_HARDENEDHauke Mehrtens2023-04-292-2/+2
| | | | | | | | | | This activates some extra checks in SLAB or SLUB to make it harder to execute kernel heap exploits. This adds a minor performance degradation which I haven't measured-. Many mainstream Linux distributions also activate this option. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Initialize RNG using CPU RNG and bootloaderHauke Mehrtens2023-04-292-4/+4
| | | | | | | | | | | | | | | | | | | This activates the following kernel options by default: * CONFIG_RANDOM_TRUST_CPU * CONFIG_RANDOM_TRUST_BOOTLOADER With these option Linux will also use data from the CPU RNG e.g. RDRAND and the bootloader to initialize the Linux RNG if such sources are available. These random bits are used in addition to the other sources, no other sources are getting deactivated. I read that the Chacha mixer isn't vulnerable to injected entropy, so this should not be a problem even if these sources might inject bad random data. The Linux kernel suggests to activate both options, Debian also activates them. This does not increase kernel code size. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* openssl: fix low-severity CVE-2023-1255Eneas U de Queiroz2023-04-292-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applies commit 02ac9c94 to fix this OpenSSL Security Advisory issued on 20th April 2023[1]: Input buffer over-read in AES-XTS implementation on 64 bit ARM (CVE-2023-1255) ============================================================== Severity: Low Issue summary: The AES-XTS cipher decryption implementation for 64 bit ARM platform contains a bug that could cause it to read past the input buffer, leading to a crash. Impact summary: Applications that use the AES-XTS algorithm on the 64 bit ARM platform can crash in rare circumstances. The AES-XTS algorithm is usually used for disk encryption. The AES-XTS cipher decryption implementation for 64 bit ARM platform will read past the end of the ciphertext buffer if the ciphertext size is 4 mod 5 in 16 byte blocks, e.g. 144 bytes or 1024 bytes. If the memory after the ciphertext buffer is unmapped, this will trigger a crash which results in a denial of service. If an attacker can control the size and location of the ciphertext buffer being decrypted by an application using AES-XTS on 64 bit ARM, the application is affected. This is fairly unlikely making this issue a Low severity one. 1. https://www.openssl.org/news/secadv/20230420.txt Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* kernel: crypto: crypto-rng: select SHA512 for >= 5.14.0Glen Huang2023-04-291-1/+3
| | | | | | | drbg swtiched to use HMAC(SHA-512) since 5.14.0 https://github.com/torvalds/linux/commit/5261cdf457ce3635bf18d393a3c1991dcfaf9d02 Signed-off-by: Glen Huang <me@glenhuang.com>
* mediatek: remove mt753x driverFelix Fietkau2023-04-2916-3970/+0
| | | | | | It is unused Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: reduce Archer AX23 / MR70X SPI-frequencyDavid Bauer2023-04-272-2/+2
| | | | | | | | | | | | | | It was brought to attention the Archer AX23 v1 fails to read jffs2 data from time to time. While this is not reproducible on my unit, it is on others. Reducing the SPI frequency does the trick. While it worked with at lest 40 MHz, opt for the cautious side and choose a save frequency of 25 MHz. Apply the same treatment to the Mercusys MR70X which uses a similar design just in case. Signed-off-by: David Bauer <mail@david-bauer.net>
* broadcom-sprom: update to latest versionÁlvaro Fernández Rojas2023-04-271-3/+3
| | | | | | | Replaces SPROMs with the ones from bmips fixups to prevent errors such as: https://github.com/openwrt/openwrt/pull/11474#issuecomment-1524235591 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* generic: Convert incorrect generic/5.15 patches againOlliver Schinagl2023-04-273-0/+47
| | | | | | | | | | | | | | OpenWrt's developer guide prefers having actual patches so they an be sent upstream more easily. However, in the case of hack-5.15 patches which are not meant for upstream, adding proper fields allows for `git am` to properly function. This commit tries to rectify that, by digging in the history to find where and how it was first added. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* bmips: fix external interrupt controllerÁlvaro Fernández Rojas2023-04-271-21/+2
| | | | | | | | | - irq_domain_add_simple() can't be used on bmips since interrupts aren't hardcoded with specific offsets for internal and external as opposed to bcm63xx. This is needed to avoid collisions with other interrupts. - remove unused bcm63xx-specific code. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: document GPIO external interruptsÁlvaro Fernández Rojas2023-04-2712-11/+51
| | | | | | | BCM63xx SoCs have an external interrupt controller which can be used for specific GPIO keys. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: increment polled keys interval to 100Álvaro Fernández Rojas2023-04-279-9/+9
| | | | | | | There's no need to poll the gpio keys every 20 ms and the linux kernel documentation suggests 100 ms. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* ci: add Coverity Scan scheduled workflowPetr Štetiar2023-04-262-0/+134
| | | | | | | | Coverity Scan is a static code analysis service focused on open source software quality and security, so lets scan various OpenWrt components every Friday for the start. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* busybox: turn on BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT for having $RANDOMIlario Gelmetti2023-04-251-1/+1
| | | | | | $RANDOM shell variable is a convenient way for getting a random number from 0 to 32767 Signed-off-by: Ilario Gelmetti <iochesonome@gmail.com>
* busybox: Activate resize tool by defaultHauke Mehrtens2023-04-251-1/+1
| | | | | | | | | | | The resize tool will resize the prompt to match the current terminal size. This is helpful when connecting to the system using UART to make the vi or top output match the current terminal size. This increases the busybox binary size by 136 bytes and the ipkg size by 335 bytes on aarch64. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: ssb: fallback-sprom: check bustypeÁlvaro Fernández Rojas2023-04-241-2/+7
| | | | | | host_pci is only defined when bustype is SSB_BUSTYPE_PCI. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* kernel: bcma: fallback-sprom: check hosttypeÁlvaro Fernández Rojas2023-04-241-2/+7
| | | | | | host_pci is only defined when hosttype is BCMA_HOSTTYPE_PCI. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* kernel: bcma: fallback-sprom: align extraction with upstreamÁlvaro Fernández Rojas2023-04-241-355/+134
| | | | | | | | The current bcma SPROM extraction from upstream only supports SPROMs with revisions from 8 to 11. Let's align the downstream fallback driver with upstream. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* kernel: ssb: fallback-sprom: drop mac leftoversÁlvaro Fernández Rojas2023-04-241-12/+0
| | | | | | This was left behind when removing the MAC extractions from PCI SPROMs. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* kernel: ssb: fallback-sprom: optimize struct dataÁlvaro Fernández Rojas2023-04-241-14/+14
| | | | | | | - Remove unneeded mac bytes from struct (it's already present in the SPROM). - Convert devid_override to boolean. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* kernel: bcma: fallback-sprom: optimize struct dataÁlvaro Fernández Rojas2023-04-241-14/+14
| | | | | | | - Remove unneeded mac bytes from struct (it's already present in the SPROM). - Convert devid_override to boolean. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* ipq40xx: convert GL-AP1300 to DSANick Hainke2023-04-244-6/+37
| | | | | | | | | | Convert GL-AP1300 to DSA and enable it. While working on it rename the GL-AP1300 leds from green to white. Tested-by: Rob White <rob@blue-wave.net> Tested-by: Robert Sommer <frauhottelmann@gmail.com> Signed-off-by: Nick Hainke <vincent@systemli.org>
* ath79: create APBoot-compatible image for Aruba AP-175Martin Kennedy2023-04-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As was done in commit e11d00d44c66 ("ath79: create Aruba AP-105 APBoot compatible image"), alter the Aruba AP-175 image generation process so OpenWrt can be loaded with the vendor Aruba APBoot. Since the remainder of the explanation and installation process is identical, continuing the quote from that commit: This works by prepending the OpenWrt LZMA loader to the uImage and jumping directly to the loader. Aruba does not offer bootm on these boards. This approach keeps compatibility to devices which had their U-Boot replaced. Both bootloaders can boot the same image. With this patch, new installations do not require replacing the bootloader and can be performed from the serial console without opening the case. Installation ------------ 1. Attach to the serial console of the AP-175. Interrupt autoboot and change the U-Boot env. $ setenv apb_rb_openwrt "setenv ipaddr 192.168.1.1; setenv serverip 192.168.1.66; netget 0x84000000 ap175.bin; go 0x84000040" $ setenv apb_fb_openwrt "cp.b 0xbf040000 0x84000000 0x10000; go 0x84000040" $ setenv bootcmd "run apb_fb_openwrt" $ saveenv 2. Load the OpenWrt initramfs image on the device using TFTP. Place the initramfs image as "ap175.bin" in the TFTP server root directory, connect it to the AP and make the server reachable at 192.168.1.66/24. $ run apb_rb_openwrt 3. Once OpenWrt booted, transfer the sysupgrade image to the device using scp and use sysupgrade to install the firmware. Signed-off-by: Martin Kennedy <hurricos@gmail.com>
* kernel: net: phy: realtek: fix NULL pointer dereferenceDaniel Golle2023-04-243-34/+42
| | | | | | | | | | | | | The previous attempt to replace an open coded paged read in the RealTek Ethernet PHY driver was too naive and resulted in breaking the r8169 PCIe Ethernet driver which also makes use of the RealTek Ethernet PHY driver. Fix this by instead of using the (not yet populated) paged operations rather use rtl821x_write_page and protect the whole paged read operation using the MDIO bus mutex. Fixes: 998b973157 ("kernel: net: phy: realtek: improve RealTek 2.5G PHY driver") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: fix green LED for D-Link DAP-X1860Sebastian Schaper2023-04-241-4/+9
| | | | | | | | | | | It was found this device uses a single tri-color power/status LED rather than individual red/orange LEDs, which also supports green. Add GPIO for green color and use with `boot` and `running` aliases. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net> Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: Cudy X6 fixes / improvementsFelix Baumann2023-04-243-16/+19
| | | | | | | | | | | | | | | | | | | | | | - Correct WiFi MACs, they didn't match oem firmware - Move nvmem-cells to bdinfo partition and remove &bdinfo reference - Add OEM device model name R13 to SUPPORTED_DEVICES This allows sysupgrading from Cudy's OpenWrt fork without force - Label red_led and use it during failsafe mode and upgrades MAC addresses as verified by OEM firmware: use address source LAN b4:4b:d6:2d:c8:4a label WAN b4:4b:d6:2d:c8:4b label + 1 2g b4:4b:d6:2d:c8:4a label 5g b6:4b:d6:3d:c8:4a label + LA-Bit set + 4th oktet increased The label MAC address is found in bdinfo 0xde00. Signed-off-by: Felix Baumann <felix.bau@gmx.de> [read wifi mac from flash offset] Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for Alcatel HH40VAndreas Böhler2023-04-235-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Alcatel HH40V is a CAT4 LTE router used by various ISPs. Specifications ============== SoC: QCA9531 650MHz RAM: 128MiB Flash: 32MiB SPI NOR LAN: 1x 10/100MBit WAN: 1x 10/100MBit LTE: MDM9607 USB 2.0 (rndis configuration) WiFi: 802.11n (SoC integrated) MAC address assignment ====================== There are three MAC addresses stored in the flash ROM, the assignment follows stock. The MAC on the label is the WiFi MAC address. Installation (TFTP) =================== 1. Connect serial console 2. Configure static IP to 192.168.1.112 3. Put OpenWrt factory.bin file as firmware-system.bin 4. Press Power + WPS and plug in power 5. Keep buttons pressed until TFTP requests are visible 6. Wait for the system to finish flashing and wait for reboot 7. Bootup will fail as the kernel offset is wrong 8. Run "setenv bootcmd bootm 0x9f150000" 9. Reset board and enjoy OpenWrt Installation (without UART) =========================== Installation without UART is a bit tricky and requires several steps too long for the commit message. Basic steps: 1. Create configure backup 2. Patch backup file to enable SSH 3. Login via SSH and configure the new bootcmd 3. Flash OpenWrt factory.bin image manually (sysupgrade doesn't work) More detailed instructions will be provided on the Wiki page. Tested by: Christian Heuff <christian@heuff.at> Signed-off-by: Andreas Böhler <dev@aboehler.at>