aboutsummaryrefslogtreecommitdiffstats
path: root/target
Commit message (Collapse)AuthorAgeFilesLines
* bcm63xx: fix bcm63xx ethernet kernel panicsÁlvaro Fernández Rojas2021-01-287-17/+52
| | | | | | | | | | | | Calling netdev_reset_queue() from _stop() functions is causing sporadic kernel panics on bcm63xx, which happen mainly on BCM6318 and BCM6328. This reverts to the previous behaviour, which called netdev_reset_queue() from _open() functions. Tested on Comtrend AR-5315u (BCM6318). Fixes: 1d6f422e346b ("bcm63xx: sync ethernet driver with net-next") Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* sunxi: add support for linksprite pcDuino3 nano boardJiang Yongquan2021-01-273-1/+9
| | | | | | | | | | | | | | | | | | Specifications: - SoC: Allwinner A20 @ 1Ghz - DRAM: 1GiB DDR3 @ 408MHz (K4B4G1646Q-HYK0) - NAND: 4GB MLC NAND (H27UBG8T2BTR-BC) - Ethernet: 10/100/1000Mbps Ethernet (Realtek RTL8211E) Flash instructions: dd if=openwrt-sunxi-cortexa7-linksprite_pcduino3-nano-ext4-sdcard.img of=/dev/sdX Signed-off-by: Jiang Yongquan <woxwchc@foxmail.com> [Remove CONFIG_REALTEK_PHY from sunxi/cortexa53 config] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* rockchip: fix SUPPORTED_DEVICES for Radxa ROCK Pi 4Marty Jones2021-01-271-1/+2
| | | | | | | | | | | This sets SUPPORTED_DEVICES to match the compatible in the DTS. While at it, synchronize the capitalization in DEVICE_MODEL and DTS model. Signed-off-by: Marty Jones <mj8263788@gmail.com> [commit title/message facelift, move variable in armv8.mk] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* bcm4908: sort and wrap build recipesAdrian Schmutzler2021-01-271-12/+16
| | | | | | | | | | This sorts the Build recipes alphabetically, wraps some long lines and moves the DEVICE_VARS to the top like common on several other targets. Cc: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: remove generic profilesAdrian Schmutzler2021-01-273-45/+0
| | | | | | | | | | We have support for reference boards available on this target, so support for an additional generic profile does not make much sense. Remove it to have one thing less to maintain. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>
* kirkwood: remove generic profileAdrian Schmutzler2021-01-271-17/+0
| | | | | | | | | | | On a platform with many very different devices, like found on kirkwood, the generic profile seems like a remnant of the past that does not have a real use anymore. Remove it to have one thing less to maintain. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>
* ipq806x: remove generic profileAdrian Schmutzler2021-01-271-10/+0
| | | | | | | | | | | On a platform with many very different devices, like found on ipq806x, the generic profile seems like a remnant of the past that does not have a real use anymore. Remove it to have one thing less to maintain. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>
* ipq40xx: remove generic profileAdrian Schmutzler2021-01-271-9/+0
| | | | | | | | | | | On a platform with many very different devices, like found on ipq40xx, the generic profile seems like a remnant of the past that does not have a real use anymore. Remove it to have one thing less to maintain. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>
* ramips: remove generic profilesAdrian Schmutzler2021-01-275-89/+0
| | | | | | | | | | | | | On a platform with many very different devices, like found on ramips, the generic profiles seem like remnants of the past that do not have a real use anymore. Remove them to have one thing less to maintain. Actually, rt288x didn't have a default profile in the first place. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>
* ath79: remove generic profilesAdrian Schmutzler2021-01-274-61/+0
| | | | | | | | | | | On a platform with many very different devices, like found on ath79, the generic profiles seem like remnants of the past that do not have a real use anymore. Remove them to have one thing less to maintain. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>
* ramips: use lzma-loader on zbtlink devicesFelix Fietkau2021-01-271-0/+3
| | | | | | Fixes boot loader LZMA decompression issues Signed-off-by: Felix Fietkau <nbd@nbd.name>
* realtek: add debugfs support for mirroringBirger Koblitz2021-01-261-14/+391
| | | | | | This adds debugfs support to monitor mirroring via debugfs Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: add API for the hw tables of RTL83XX/93XX SoCsBirger Koblitz2021-01-261-100/+436
| | | | | | | | Add a table API that has per accss register locking and uses register description information to handle all table access through a single set of api calls. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: add switch driver support for the RTL93XX based switchesBirger Koblitz2021-01-265-245/+1522
| | | | | | | Adds support for the RTL9300 and RTL9310 series of switches with 10GBit per port and up to 56 ports. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: add internal and external SDS/PHYs of RTL9300 devicesBirger Koblitz2021-01-262-28/+523
| | | | | | | | This adds support for the internal SerDes of the RTL9300 SoC and for the RTL8218D and RTL8226B phys found in combination with this SoC in switches. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: fix RTL8231 gpio expander usage with RTL839X SoCBirger Koblitz2021-01-261-24/+40
| | | | | | | | This fixes the usage of the RTL8231 GPIO extender chip when used with the RTL839X SoCs. Specifically, the PHY addresses may be different from 0. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: enable default rate limiting and qos settingsBirger Koblitz2021-01-261-64/+0
| | | | | | | Enable default rate limiting and QoS support. Remove previous storm control code. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: correct l2 offloading tag handlingBirger Koblitz2021-01-261-4/+7
| | | | | | | Makes sure the DSA trailer information on any L2 offloading done by the switch is honoured by the bridge layer Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: add QoS and rate controlBirger Koblitz2021-01-266-530/+1955
| | | | | | | | | This adds support for identifying QoS information in packets and use this and rate control information to submit to multiple egress queues. The ethernet driver is also made to support 2 egress and up to 32 egress queues. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: add dtsi for RTL930X SoCsBirger Koblitz2021-01-261-0/+182
| | | | | | Add a default dtsi to support RTL930X SoCs. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: add support for the RTL9300 timerBirger Koblitz2021-01-264-22/+349
| | | | | | | | this adds support for the SoC timer of the RTL9300 chips, it provides 6 independent timer/counters, of which the first one is used as a clocksource and the second one as event timer. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: add support for the RTL8390 and RTL9300 SoC IRQsBirger Koblitz2021-01-264-150/+174
| | | | | | | | This adds support for the RTL8390 and RTL9300 SoCs it also cleans up unnecessary definitions in mach-rtl83xx.h and moves definitions relevant for irq routing to irq.h Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: add detection of RTL930X SoCs and RTL8313 SoCBirger Koblitz2021-01-261-6/+65
| | | | | | | | This adds support to detect RTL930X based SoCs and the RTL9313 SoC. Tested on Zyxel XGS1210-10 (RTL9302B SoC) and the Zyxel XS1930-12 (RTL9313 SoC) Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* kernel: bump 5.4 to 5.4.92John Audia2021-01-264-6/+6
| | | | | | | | | | | | | | | | | All modification made by update_kernel.sh in a fresh clone without existing toolchains. Build system: x86_64 Build-tested: ipq806x/R7800, bcm27xx/bcm2711 Run-tested: ipq806x/R7800 Compile-tested [*]: ath79/{tiny,generic}, ipq40xx, octeon, ramips/mt7621, realtek, x86/64. Run-tested [*]: ath79/generic, octeon, ramips/mt7621, realtek. No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us> Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
* config: limit CONFIG_PERF_EVENTS to top-level generic configsTony Ambardar2021-01-2511-11/+0
| | | | | | Remove redundant target-level settings. Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
* malta: update target configs and fix build warningsTony Ambardar2021-01-251-4/+4
| | | | | | | | | | | Comment out some conflicting target configs that are set from subtarget configs, which sometimes lead to kernel compile warnings: scripts/kconfig/conf --syncconfig Kconfig net/sched/Kconfig:45: warning: menuconfig statement without prompt .config:1038:warning: override: CPU_MIPS32_R2 changes choice state Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
* realtek: build ZyXEL vendor firmware compatible initramfsBjørn Mork2021-01-241-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Append a device specific version trailer used by the stock firmware upgrade application to validate firmwares. The trailer contains a list of ZyXEL firmware version numbers, which includes a four letter hardware identifier. The stock web UI requires that the current hardware matches one of the listed versions, and that the version number is larger than a model specific minimum value. The minimum version varies between V1.00 and V2.60 for the currently known GS1900 models. The number is not used anywhere else to our knowlege, and has no direct relation to the version info in the u-image header. We can therefore use an arbitrary value larger than V2.60. The stock firmware upgrade application will only load and flash the part of the file specified in the u-image header, regardless of file size. It can therefore not be used to flash images with an appended rootfs. There is therefore no need to include the trailer in other images than the initramfs. This prevents accidentally bricking by attempts to flash other images from the stock web UI. Stock images support all models in the series, listing all of them in the version trailer. OpenWrt provide model specific images. We therefore only list the single supported hardware identifier for each image. This eliminates the risk of flashing the wrong OpenWrt image from stock web UI. OpenWrt can be installed from stock firmware in two steps: 1) flash OpenWrt initramfs image from stock web gui 2) boot OpenWrt and sysupgrade to a squasfs image The OpenWrt squashfs image depends on a static partition map in the DTS. It can only be installed to the "firmware" partition. This partition is labeled "RUNTIME1" in u-boot and in stock firmware, and is referred to as "image 0" in the stock flash management tool. The OpenWrt initramfs can be installed and run from either partitions. But if you want to keep stock irmware in the spare system partition, then you must make sure stock firmware is installed to the "RUNTIME2" partition referred to as "image 1" in the stock web UI. And the initial OpenWrt initramfs must be flashed to "RUNTIME1"/"image 0". The stock flash management application supports direct selection of both which partition to flash and which partition to boot next. This allows software controlled "dual-boot" between OpenWrt and stock firmware, without using console access to u-boot. u-boot use the "bootpartition" variable stored in the second u-boot environment to select which of the two system partitions to boot. This variable is set by the stock flash management application, by direct user input. It can also be set in OpenWrt using e.g fw_setsys bootpartition 1 to select "RUNTIME2"/"image 1" as default, assuming a stock firmware version is installed in that partition. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* realtek: use vendor-specific magic for ZyXELBjørn Mork2021-01-242-1/+5
| | | | | | | | | | | | | | The stock firmware of the ZyXEL GS1900 series use a non-standard u-image magic. This is not enforced by the stock u-boot, which is why we could boot images with the default magic. The flash management application of the stock firmware will however verify the magic, and refuse any image with another value. Convert to vendor-specific value to get flash management support in stock firmware, including the ability to upgrade to OpenWrt directly from stock web UI. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* x86: fix upgrade by emptying SUPPORTED_DEVICESAdrian Schmutzler2021-01-231-0/+1
| | | | | | | | | | | | | | | | | | | x86 uses append-metadata, but only for signing and not for the metadata itself. Since recently SUPPORTED_DEVICES was assigned with a global value and is not empty anymore, append-metadata will now actually put metadata into x86 images. This breaks sysupgrade on x86. To fix it for the moment, let's just empty SUPPORTED_DEVICES for this target again. In the long term, one should either not add metadata to the images if it is not desired, and/or remove the unintended fwtool check. Fixes: f52081bcf938 ("treewide: provide global default for SUPPORTED_DEVICES") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* bcm53xx: use default SUPPORTED_DEVICES for Meraki MR32Adrian Schmutzler2021-01-231-3/+1
| | | | | | | | Since the new global SUPPORTED_DEVICES are now available in bcm53xx as well, we do not need to specify an explicit value for the MR32 anymore. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Senao Engenius EAP1200HMichael Pratt2021-01-234-0/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-EAP1200H Engenius EAP1200H is an indoor wireless access point with 1 Gb ethernet port, dual-band wireless, internal antenna plates, and 802.3at PoE+ **Specification:** - QCA9557 SOC - QCA9882 WLAN PCI card, 5 GHz, 2x2, 26dBm - AR8035-A PHY RGMII GbE with PoE+ IN - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM NT5TU32M16FG - UART at J10 populated - 4 internal antenna plates (5 dbi, omni-directional) - 5 LEDs, 1 button (power, eth0, 2G, 5G, WPS) (reset) **MAC addresses:** MAC addresses are labeled as ETH, 2.4G, and 5GHz Only one Vendor MAC address in flash eth0 ETH *:a2 art 0x0 phy1 2.4G *:a3 --- phy0 5GHz *:a4 --- **Serial Access:** the RX line on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin at J10 **Installation:** 2 ways to flash factory.bin from OEM: Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Firmware Upgrade" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fd70000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes **Return to OEM:** If you have a serial cable, see Serial Failsafe instructions otherwise, uboot-env can be used to make uboot load the failsafe image *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will brick the device DO NOT downgrade to ar71xx this way, it can cause kernel loop or halt ssh into openwrt and run `fw_setenv rootfs_checksum 0` reboot, wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade **TFTP recovery:** Requires serial console, reset button does nothing rename initramfs to 'vmlinux-art-ramdisk' make available on TFTP server at 192.168.1.101 power board, interrupt boot execute tftpboot and bootm 0x81000000 NOTE: TFTP is not reliable due to bugged bootloader set MTU to 600 and try many times **Format of OEM firmware image:** The OEM software of EAP1200H is a heavily modified version of Openwrt Kamikaze. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-ar71xx-generic-eap1200h-uImage-lzma.bin openwrt-ar71xx-generic-eap1200h-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring. Newer EnGenius software requires more checks but their script includes a way to skip them, otherwise the tar must include a text file with the version and md5sums in a deprecated format. The OEM upgrade script is at /etc/fwupgrade.sh. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1536k and the factory.bin upgrade procedure would otherwise overwrite part of the kernel when writing rootfs. Note on PLL-data cells: The default PLL register values will not work because of the external AR8035 switch between the SOC and the ethernet port. For QCA955x series, the PLL registers for eth0 and eth1 can be see in the DTSI as 0x28 and 0x48 respectively. Therefore the PLL registers can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x18050028 1` and `md 0x18050048 1`. The clock delay required for RGMII can be applied at the PHY side, using the at803x driver `phy-mode`. Therefore the PLL registers for GMAC0 do not need the bits for delay on the MAC side. This is possible due to fixes in at803x driver since Linux 5.1 and 5.3 Signed-off-by: Michael Pratt <mcpratt@pm.me>
* treewide: provide global default for SUPPORTED_DEVICESAdrian Schmutzler2021-01-2322-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The majority of our targets provide a default value for the variable SUPPORTED_DEVICES, which is used in images to check against the compatible on a running device: SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) At the moment, this is implemented in the Device/Default block of the individual targets or even subtargets. However, since we standardized device names and compatible in the recent past, almost all targets are following the same scheme now: device/image name: vendor_model compatible: vendor,model The equal redundant definitions are a symptom of this process. Consequently, this patch moves the definition to image.mk making it a global default. For the few targets not using the scheme above, SUPPORTED_DEVICES will be defined to a different value in Device/Default anyway, overwriting the default. In other words: This change is supposed to be cosmetic. This can be used as a global measure to get the current compatible with: $(firstword $(SUPPORTED_DEVICES)) (Though this is not precisely an achievement of this commit.) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: mtdsplit_uimage: replace "edimax, uimage" parserBjørn Mork2021-01-229-106/+60
| | | | | | | | The "edimax,uimage"" parser can be replaced by the generic parser using device specific openwrt,partition-magic and openwrt,offset properties. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: mtdsplit_uimage: add "openwrt, offset" and "openwrt, partition-magic"Bjørn Mork2021-01-221-12/+28
| | | | | | | | Some devices prepend a standard U-Boot Image with a vendor specific header, having its own magic. Adding two new properties will support validation of such images, including the additional magic. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: mtdsplit_uimage: replace "netgear, uimage" parserBjørn Mork2021-01-2216-80/+44
| | | | | | | | | | | | | | | | | | | The "netgear,uimage" parser can be replaced by the generic parser using device specific openwrt,ih-magic and openwrt,ih-type properties. Device tree properties for the following devices have not been set, as they have been dropped from OpenWrt with the removal of the ar71xx target: FW_MAGIC_WNR2000V1 0x32303031 FW_MAGIC_WNR2000V4 0x32303034 FW_MAGIC_WNR1000V2_VC 0x31303030 FW_MAGIC_WPN824N 0x31313030 Tested-by: Sander Vanheule <sander@svanheule.net> # WNDR3700v2 Tested-by: Stijn Segers <foss@volatilesystems.org> # WNDR3700v1 Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: mtdsplit_uimage: add "openwrt, ih-type" device-tree propertyBjørn Mork2021-01-221-10/+14
| | | | | | | Some devices use uimage headers with a non-default ih_type. Add support for overriding this in device tree. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: mtdsplit_uimage: replace "allnet, uimage" parserBjørn Mork2021-01-222-50/+2
| | | | | | | Convert users to the generic "openwrt,uimage" using device specific "openwrt,ih-magic" properties, and remove "allnet,uimage". Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: mtdsplit_uimage: replace "openwrt, okli" parserBjørn Mork2021-01-2212-63/+35
| | | | | | | | | The only difference between the "openwrt,okli" and the generic parser is the magic. Set this in device tree for all affected devices and remove the "openwrt,okli" parser. Tested-by: Michael Pratt <mcpratt@protonmail.com> # EAP300 v2, ENS202EXT and ENH202 Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: mtdsplit_uimage: add "openwrt, ih-magic" device-tree propertyBjørn Mork2021-01-221-18/+23
| | | | | | | Many devices use uimages with non-standard magic values. Let device tree override the default magic. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: mtdsplit_uimage: replace "fonfxc" and "sge" parsersBjørn Mork2021-01-224-89/+16
| | | | | | | | Convert users of the "fonfxc" and "sge" parsers to the generic "openwrt,uimage", using device specific "openwrt,padding" properties. Tested-by: Stijn Segers <foss@volatilesystems.org> [DIR-878 A1] Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: mtdsplit_uimage: read extralen from device treeBjørn Mork2021-01-221-10/+14
| | | | | | | An "openwrt,padding" property in device tree can replace two device specific parsers. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* dt-bindings: mtd: partitions: add OpenWrt defined U-Boot ImageBjørn Mork2021-01-222-0/+282
| | | | | | | Add devicetree bindings for vendor specific variants of U-Boot Images, as defined by OpenWrt. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* kernel: add parser finding rootfs after CFE bootfsRafał Miłecki2021-01-224-1/+101
| | | | | | | | | | | | | | It's required for BCM4908. It cannot use "bcm-wfi-fw" parser because that one requires *two* JFFS2 partitions which is untested / unsupported on the BCM4908 architecture. With a single JFFS2 partition "bcm-wfi-fw" parser will: 1. Fail to find "vmlinux.lz" as it doesn't follow "1-openwrt" file 2. Create partitions that don't precisely match bootfs layout The new parser is described in details in the MTD_SPLIT_CFE_BOOTFS symbol help message. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm4908: build valid Asus GT-AC5300 firmware imageRafał Miłecki2021-01-221-1/+11
| | | | | | Insert Asus specific tail that is required for image identification. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm63xx: sync ethernet driver with net-nextSieng Piaw Liew2021-01-2215-191/+703
| | | | | | | | | | | | | | Sync ethernet driver code with upstream Linux kernel: -Reduce xmit_more code changes. -Combine rx cleanup code into a function. -Convert to build_skb. -Improve rx loop by optimizing loop tracking. https://lore.kernel.org/netdev/20210106144208.1935-1-liew.s.piaw@gmail.com/ Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com> [Amend commit description, move patches to the top since they are going to be upstreamed] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bcm63xx: nand: fix OOB R/W for non Hamming ECCÁlvaro Fernández Rojas2021-01-222-11/+34
| | | | | | | | Hamming ECC devices do not cover OOB data, as opposed to BCH ECC devices. Therefore, disabling ECC for all devices is preventing BCH devices from correctly reading and writing the OOB data. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* ramips: fix port labels for Xiaomi Mi Router 4Adrian Schmutzler2021-01-211-2/+2
| | | | | | | | The OEM assignment of LAN ports is swapped. Fixes: c2a7bb520a0f ("ramips: mt7621: add support for Xiaomi Mi Router 4") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: add support for Xiaomi Mi Router 4Dmytro Oz2021-01-214-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xiaomi Mi Router 4 is the same as Xiaomi Mi Router 3G, except for the RAM (256Mib→128Mib), LEDs and gpio (MiNet button). Specifications: Power: 12 VDC, 1 A Connector type: barrel CPU1: MediaTek MT7621A (880 MHz, 4 cores) FLA1: 128 MiB (ESMT F59L1G81MA) RAM1: 128 MiB (ESMT M15T1G1664A) WI1 chip1: MediaTek MT7603EN WI1 802dot11 protocols: bgn WI1 MIMO config: 2x2:2 WI1 antenna connector: U.FL WI2 chip1: MediaTek MT7612EN WI2 802dot11 protocols: an+ac WI2 MIMO config: 2x2:2 WI2 antenna connector: U.FL ETH chip1: MediaTek MT7621A Switch: MediaTek MT7621A UART Serial [o] TX [o] GND [o] RX [ ] VCC - Do not connect it MAC addresses as verified by OEM firmware: use address source LAN *:c2 factory 0xe000 (label) WAN *:c3 factory 0xe006 2g *:c4 factory 0x0000 5g *:c5 factory 0x8000 Flashing instructions: 1.Create a simple http server (nginx etc) 2.set uart enable To enable writing to the console, you must reset to factory settings Then you see uboot boot, press the keyboard 4 button (enter uboot command line) If it is not successful, repeat the above operation of restoring the factory settings. After entering the uboot command line, type: setenv uart_en 1 saveenv boot 3.use shell in uart cd /tmp wget http://"your_computer_ip:80"/openwrt-ramips-mt7621-xiaomi_mir4-squashfs-kernel1.bin wget http://"your_computer_ip:80"/openwrt-ramips-mt7621-xiaomi_mir4-squashfs-rootfs0.bin mtd write openwrt-ramips-mt7621-xiaomi_mir4-squashfs-kernel1.bin kernel1 mtd write openwrt-ramips-mt7621-xiaomi_mir4-squashfs-rootfs0.bin rootfs0 nvram set flag_try_sys1_failed=1 nvram commit reboot 4.login to the router http://192.168.1.1/ Installation via Software exploit Find the instructions in the https://github.com/acecilia/OpenWRTInvasion Signed-off-by: Dmytro Oz <sequentiality@gmail.com> [commit message facelift, rebase onto shared DTSI/common device definition, bump uboot-envtools] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: create DTSI for Xiaomi NAND devicesAdrian Schmutzler2021-01-213-189/+111
| | | | | | | | | | | | This creates a DTSI for Xiaomi devices with 128M NAND. This allows to consolidate the partitions and a few other nodes for AC2100 family and Mi Router 3G. Note that the Mi Router 3 Pro has 256M NAND and differently sized partitions. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: reorganize shared device definitions for XiaomiAdrian Schmutzler2021-01-211-21/+13
| | | | | | | | | | This creates a shared device definition for Xiaomi devices with NAND and "separate" images, i.e. kernel1.bin and rootfs0.bin. This allows to consolidate similar/duplicate code for AC2100 family and Mi Router 3G. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>