aboutsummaryrefslogtreecommitdiffstats
path: root/target
Commit message (Collapse)AuthorAgeFilesLines
* at91: remove pm debug features from sama5 kernel configClaudiu Beznea2022-02-261-4/+0
| | | | | | | | | | Remove PM debug features from sama5 kernel config. It is not necessary to have it on production code. This also fixes the build for sama5 target after commit 97158fe10e60 ("kernel: package ramoops pstore-ram crash log storage) Fixes: 97158fe10e60 ("kernel: package ramoops pstore-ram crash log storage") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
* ipq806x: Increase kernel size to 4 MB for EA8500/EA7500v1Hannu Nyman2022-02-263-9/+27
| | | | | | | | | | | | | | | | | | | Increase the kernel size from 3 MB to 4 MB for EA8500 and EA7500v1. * modify the common .dtsi * modify the kernel size in the image recipes Define compat-version 2.0 to force factory image usage for sysupgrade. Add explanation message. Reenable both devices. As for 4MiB (and not more): Hannu Nyman noted that: "We have lots of ipq806x devices with 4 MB kernel, so will need action at that point in future in any case. (Assuming that the bootloader did not have a 4 MB limit that has been tested...)" Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> (squashed, added 4MiB notice of support in ipq806x) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: support ZTE MF286A/RLech Perczak2022-02-267-201/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ZTE MF286A and MF286R are indoor LTE category 6/7 CPE router with simultaneous dual-band 802.11ac plus 802.11n Wi-Fi radios and quad-port gigabit Ethernet switch, FXS and external USB 2.0 port. Hardware highlights: - CPU: QCA9563 SoC at 775MHz, - RAM: 128MB DDR2, - NOR Flash: MX25L1606E 2MB SPI Flash, for U-boot only, - NAND Flash: W25N01GV 128MB SPI NAND-Flash, for all other data, - Wi-Fi 5GHz: QCA9886 2x2 MIMO 802.11ac Wave2 radio, - WI-Fi 2.4GHz: QCA9563 3x3 MIMO 802.11n radio, - Switch: QCA8337v2 4-port gigabit Ethernet, with single SGMII CPU port, - WWAN: [MF286A] MDM9230-based category 6 internal LTE modem [MF286R] PXA1826-based category 7 internal LTE modem in extended mini-PCIE form factor, with 3 internal antennas and 2 external antenna connections, single mini-SIM slot. - FXS: one external ATA port (handled entirely by modem part) with two physical connections in parallel, - USB: Single external USB 2.0 port, - Switches: power switch, WPS, Wi-Fi and reset buttons, - LEDs: Wi-Fi, Test (internal). Rest of LEDs (Phone, WWAN, Battery, Signal state) handled entirely by modem. 4 link status LEDs handled by the switch on the backside. - Battery: 3Ah 1-cell Li-Ion replaceable battery, with charging and monitoring handled by modem. - Label MAC device: eth0 The device shares many components with previous model, MF286, differing mostly by a Wave2 5GHz radio, flash layout and internal LED color. In case of MF286A, the modem is the same as in MF286. MF286R uses a different modem based on Marvell PXA1826 chip. Internal modem of MF286A is supported via uqmi, MF286R modem isn't fully supported, but it is expected to use comgt-ncm for connection, as it uses standard 3GPP AT commands for connection establishment. Console connection: connector X2 is the console port, with the following pinout, starting from pin 1, which is the topmost pin when the board is upright: - VCC (3.3V). Do not use unless you need to source power for the converer from it. - TX - RX - GND Default port configuration in U-boot as well as in stock firmware is 115200-8-N-1. Installation: Due to different flash layout from stock firmware, sysupgrade from within stock firmware is impossible, despite it's based on QSDK which itself is based on OpenWrt. STEP 0: Stock firmware update: As installing OpenWrt cuts you off from official firmware updates for the modem part, it is recommended to update the stock firmware to latest version before installation, to have built-in modem at the latest firmware version. STEP 1: gaining root shell: Method 1: This works if busybox has telnetd compiled in the binary. If this does not work, try method 2. Using well-known exploit to start telnetd on your router - works only if Busybox on stock firmware has telnetd included: - Open stock firmware web interface - Navigate to "URL filtering" section by going to "Advanced settings", then "Firewall" and finally "URL filter". - Add an entry ending with "&&telnetd&&", for example "http://hostname/&&telnetd&&". - telnetd will immediately listen on port 4719. - After connecting to telnetd use "admin/admin" as credentials. Method 2: This works if busybox does not have telnetd compiled in. Notably, this is the case in DNA.fi firmware. If this does not work, try method 3. - Set IP of your computer to 192.168.0.22. (or appropriate subnet if changed) - Have a TFTP server running at that address - Download MIPS build of busybox including telnetd, for example from: https://busybox.net/downloads/binaries/1.21.1/busybox-mips and put it in it's root directory. Rename it as "telnetd". - As previously, login to router's web UI and navigate to "URL filtering" - Using "Inspect" feature, extend "maxlength" property of the input field named "addURLFilter", so it looks like this: <input type="text" name="addURLFilter" id="addURLFilter" maxlength="332" class="required form-control"> - Stay on the page - do not navigate anywhere - Enter "http://aa&zte_debug.sh 192.168.0.22 telnetd" as a filter. - Save the settings. This will download the telnetd binary over tftp and execute it. You should be able to log in at port 23, using "admin/admin" as credentials. Method 3: If the above doesn't work, use the serial console - it exposes root shell directly without need for login. Some stock firmwares, notably one from finnish DNA operator lack telnetd in their builds. STEP 2: Backing up original software: As the stock firmware may be customized by the carrier and is not officially available in the Internet, IT IS IMPERATIVE to back up the stock firmware, if you ever plan to returning to stock firmware. It is highly recommended to perform backup using both methods, to avoid hassle of reassembling firmware images in future, if a restore is needed. Method 1: after booting OpenWrt initramfs image via TFTP: PLEASE NOTE: YOU CANNOT DO THIS IF USING INTERMEDIATE FIRMWARE FOR INSTALLATION. - Dump stock firmware located on stock kernel and ubi partitions: ssh root@192.168.1.1: cat /dev/mtd4 > mtd4_kernel.bin ssh root@192.168.1.1: cat /dev/mtd9 > mtd9_ubi.bin And keep them in a safe place, should a restore be needed in future. Method 2: using stock firmware: - Connect an external USB drive formatted with FAT or ext4 to the USB port. - The drive will be auto-mounted to /var/usb_disk - Check the flash layout of the device: cat /proc/mtd It should show the following: mtd0: 000a0000 00010000 "u-boot" mtd1: 00020000 00010000 "u-boot-env" mtd2: 00140000 00010000 "reserved1" mtd3: 000a0000 00020000 "fota-flag" mtd4: 00080000 00020000 "art" mtd5: 00080000 00020000 "mac" mtd6: 000c0000 00020000 "reserved2" mtd7: 00400000 00020000 "cfg-param" mtd8: 00400000 00020000 "log" mtd9: 000a0000 00020000 "oops" mtd10: 00500000 00020000 "reserved3" mtd11: 00800000 00020000 "web" mtd12: 00300000 00020000 "kernel" mtd13: 01a00000 00020000 "rootfs" mtd14: 01900000 00020000 "data" mtd15: 03200000 00020000 "fota" mtd16: 01d00000 00020000 "firmware" Differences might indicate that this is NOT a MF286A device but one of other variants. - Copy over all MTD partitions, for example by executing the following: for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do cat /dev/mtd$i > \ /var/usb_disk/mtd$i; done "Firmware" partition can be skipped, it is a concatenation of "kernel" and "rootfs". - If the count of MTD partitions is different, this might indicate that this is not a MF286A device, but one of its other variants. - (optionally) rename the files according to MTD partition names from /proc/mtd - Unmount the filesystem: umount /var/usb_disk; sync and then remove the drive. - Store the files in safe place if you ever plan to return to stock firmware. This is especially important, because stock firmware for this device is not available officially, and is usually customized by the mobile providers. STEP 3: Booting initramfs image: Method 1: using serial console (RECOMMENDED): - Have TFTP server running, exposing the OpenWrt initramfs image, and set your computer's IP address as 192.168.0.22. This is the default expected by U-boot. You may wish to change that, and alter later commands accordingly. - Connect the serial console if you haven't done so already, - Interrupt boot sequence by pressing any key in U-boot when prompted - Use the following commands to boot OpenWrt initramfs through TFTP: setenv serverip 192.168.0.22 setenv ipaddr 192.168.0.1 tftpboot 0x81000000 openwrt-ath79-nand-zte_mf286a-initramfs-kernel.bin bootm 0x81000000 (Replace server IP and router IP as needed). There is no emergency TFTP boot sequence triggered by buttons, contrary to MF283+. - When OpenWrt initramfs finishes booting, proceed to actual installation. Method 2: using initramfs image as temporary boot kernel This exploits the fact, that kernel and rootfs MTD devices are consecutive on NAND flash, so from within stock image, an initramfs can be written to this area and booted by U-boot on next reboot, because it uses "nboot" command which isn't limited by kernel partition size. - Download the initramfs-kernel.bin image - After backing up the previous MTD contents, write the images to the "firmware" MTD device, which conveniently concatenates "kernel" and "rootfs" partitions that can fit the initramfs image: nandwrite -p /dev/<firmware-mtd> \ /var/usb_disk/openwrt-ath79-zte_mf286a-initramfs-kernel.bin - If write is OK, reboot the device, it will reboot to OpenWrt initramfs: reboot -f - After rebooting, SSH into the device and use sysupgrade to perform proper installation. Method 3: using built-in TFTP recovery (LAST RESORT): - With that method, ensure you have complete backup of system's NAND flash first. It involves deliberately erasing the kernel. - Download "-initramfs-kernel.bin" image for the device. - Prepare the recovery image by prepending 8MB of zeroes to the image, and name it root_uImage: dd if=/dev/zero of=padding.bin bs=8M count=1 cat padding.bin openwrt-ath79-nand-zte_mf286a-initramfs-kernel.bin > root_uImage - Set up a TFTP server at 192.0.0.1/8. Router will use random address from that range. - Put the previously generated "root_uImage" into TFTP server root directory. - Deliberately erase "kernel" partition" using stock firmware after taking backup. THIS IS POINT OF NO RETURN. - Restart the device. U-boot will attempt flashing the recovery initramfs image, which will let you perform actual installation using sysupgrade. This might take a considerable time, sometimes the router doesn't establish Ethernet link properly right after booting. Be patient. - After U-boot finishes flashing, the LEDs of switch ports will all light up. At this moment, perform power-on reset, and wait for OpenWrt initramfs to finish booting. Then proceed to actual installation. STEP 4: Actual installation: - Set your computer IP to 192.168.1.22/24 - scp the sysupgrade image to the device: scp openwrt-ath79-nand-zte_mf286a-squashfs-sysupgrade.bin \ root@192.168.1.1:/tmp/ - ssh into the device and execute sysupgrade: sysupgrade -n /tmp/openwrt-ath79-nand-zte_mf286a-squashfs-sysupgrade.bin - Wait for router to reboot to full OpenWrt. STEP 5: WAN connection establishment Since the router is equipped with LTE modem as its main WAN interface, it might be useful to connect to the Internet right away after installation. To do so, please put the following entries in /etc/config/network, replacing the specific configuration entries with one needed for your ISP: config interface 'wan' option proto 'qmi' option device '/dev/cdc-wdm0' option auth '<auth>' # As required, usually 'none' option pincode '<pin>' # If required by SIM option apn '<apn>' # As required by ISP option pdptype '<pdp>' # Typically 'ipv4', or 'ipv4v6' or 'ipv6' For example, the following works for most polish ISPs config interface 'wan' option proto 'qmi' option device '/dev/cdc-wdm0' option auth 'none' option apn 'internet' option pdptype 'ipv4' The required minimum is: config interface 'wan' option proto 'qmi' option device '/dev/cdc-wdm0' In this case, the modem will use last configured APN from stock firmware - this should work out of the box, unless your SIM requires PIN which can't be switched off. If you have build with LuCI, installing luci-proto-qmi helps with this task. Restoring the stock firmware: Preparation: If you took your backup using stock firmware, you will need to reassemble the partitions into images to be restored onto the flash. The layout might differ from ISP to ISP, this example is based on generic stock firmware The only partitions you really care about are "web", "kernel", and "rootfs". These are required to restore the stock firmware through factory TFTP recovery. Because kernel partition was enlarged, compared to stock firmware, the kernel and rootfs MTDs don't align anymore, and you need to carve out required data if you only have backup from stock FW: - Prepare kernel image cat mtd12_kernel.bin mtd13_rootfs.bin > owrt_kernel.bin truncate -s 4M owrt_kernel_restore.bin - Cut off first 1MB from rootfs dd if=mtd13_rootfs.bin of=owrt_rootfs.bin bs=1M skip=1 - Prepare image to write to "ubi" meta-partition: cat mtd6_reserved2.bi mtd7_cfg-param.bin mtd8_log.bin mtd9_oops.bin \ mtd10_reserved3.bin mtd11_web.bin owrt_rootfs.bin > \ owrt_ubi_ubi_restore.bin You can skip the "fota" partition altogether, it is used only for stock firmware update purposes and can be overwritten safely anyway. The same is true for "data" partition which on my device was found to be unused at all. Restoring mtd5_cfg-param.bin will restore the stock firmware configuration you had before. Method 1: Using initramfs: This method is recmmended if you took your backup from within OpenWrt initramfs, as the reassembly is not needed. - Boot to initramfs as in step 3: - Completely detach ubi0 partition using ubidetach /dev/ubi0_0 - Look up the kernel and ubi partitions in /proc/mtd - Copy over the stock kernel image using scp to /tmp - Erase kernel and restore stock kernel: (scp mtd4_kernel.bin root@192.168.1.1:/tmp/) mtd write <kernel_mtd> mtd4_kernel.bin rm mtd4_kernel.bin - Copy over the stock partition backups one-by-one using scp to /tmp, and restore them individually. Otherwise you might run out of space in tmpfs: (scp mtd3_ubiconcat0.bin root@192.168.1.1:/tmp/) mtd write <ubiconcat0_mtd> mtd3_ubiconcat0.bin rm mtd3_ubiconcat0.bin (scp mtd5_ubiconcat1.bin root@192.168.1.1:/tmp/) mtd write <ubiconcat1_mtd> mtd5_ubiconcat1.bin rm mtd5_ubiconcat1.bin - If the write was correct, force a device reboot with reboot -f Method 2: Using live OpenWrt system (NOT RECOMMENDED): - Prepare a USB flash drive contatining MTD backup files - Ensure you have kmod-usb-storage and filesystem driver installed for your drive - Mount your flash drive mkdir /tmp/usb mount /dev/sda1 /tmp/usb - Remount your UBI volume at /overlay to R/O mount -o remount,ro /overlay - Write back the kernel and ubi partitions from USB drive cd /tmp/usb mtd write mtd4_kernel.bin /dev/<kernel_mtd> mtd write mtd9_ubi.bin /dev/<kernel_ubi> - If everything went well, force a device reboot with reboot -f Last image may be truncated a bit due to lack of space in RAM, but this will happen over "fota" MTD partition which may be safely erased after reboot anyway. Method 3: using built-in TFTP recovery: This method is recommended if you took backups using stock firmware. - Assemble a recovery rootfs image from backup of stock partitions by concatenating "web", "kernel", "rootfs" images dumped from the device, as "root_uImage" - Use it in place of "root_uImage" recovery initramfs image as in the TFTP pre-installation method. Quirks and known issuesa - It was observed, that CH340-based USB-UART converters output garbage during U-boot phase of system boot. At least CP2102 is known to work properly. - Kernel partition size is increased to 4MB compared to stock 3MB, to accomodate future kernel updates - at this moment OpenWrt 5.10 kernel image is at 2.5MB which is dangerously close to the limit. This has no effect on booting the system - but keep that in mind when reassembling an image to restore stock firmware. - uqmi seems to be unable to change APN manually, so please use the one you used before in stock firmware first. If you need to change it, please use protocok '3g' to establish connection once, or use the following command to change APN (and optionally IP type) manually: echo -ne 'AT+CGDCONT=1,"IP","<apn>' > /dev/ttyUSB0 - The only usable LED as a "system LED" is the blue debug LED hidden inside the case. All other LEDs are controlled by modem, on which the router part has some influence only on Wi-Fi LED. - Wi-Fi LED currently doesn't work while under OpenWrt, despite having correct GPIO mapping. All other LEDs are controlled by modem, including this one in stock firmware. GPIO19, mapped there only acts as a gate, while the actual signal source seems to be 5GHz Wi-Fi radio, however it seems it is not the LED exposed by ath10k as ath10k-phy0. - GPIO5 used for modem reset is a suicide switch, causing a hardware reset of whole board, not only the modem. It is attached to gpio-restart driver, to restart the modem on reboot as well, to ensure QMI connectivity after reboot, which tends to fail otherwise. - Modem, as in MF283+, exposes root shell over ADB - while not needed for OpenWrt operation at all - have fun lurking around. The same modem module is used as in older MF286. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* ramips: mt7621-dts: add pinctrl properties for ethernetArınç ÜNAL2022-02-2627-1/+108
| | | | | | | | | | | | | | | Add the missing pinctrl properties on the ethernet node. GMAC1 will start working with this change. Link: https://lore.kernel.org/netdev/83a35aa3-6cb8-2bc4-2ff4-64278bbcd8c8@arinc9.com/ Overwrite pinctrl-0 property without rgmii2_pins on devicetrees which use the rgmii2 pins as GPIO (22 - 33). Give gpio function to rgmii2 pin group on mt7621_tplink_archer-x6-v3.dtsi which uses GPIO 28. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
* ramips: mt7621-dts: enable flow control on port@6Arınç ÜNAL2022-02-261-0/+1
| | | | | | | | Flow control needs to be enabled on both sides to work. It is already enabled on gmac0, enable it on port@6 too. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Tested-by: Sungbo Eo <mans0n@gorani.run>
* ramips: mt7621-dts: fix switch@1f warningsArınç ÜNAL2022-02-261-3/+0
| | | | | | | | | | | | | Remove reg property from ports node to fix this warning: Warning (unit_address_vs_reg): /ethernet@1e100000/mdio-bus/switch@1f/ports: node has a reg or ranges property, but no unit name Another warning surfaces afterwards. Remove #address-cells and #size-cells from switch@1f node to fix this warning: Warning (avoid_unnecessary_addr_size): /ethernet@1e100000/mdio-bus/switch@1f: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
* ath79: add Zyxel EMG2926-Q10AAlex Henrie2022-02-267-0/+20
| | | | | | | | | The Zyxel EMG2926-Q10A is 99% the Zyxel NBG6716, but the bootloader expects a different product name when flashing over TFTP. Also, the EMG2926-Q10A always has 128 MiB of NAND flash whereas the NBG6716 reportedly can have either 128 MiB or 256 MiB. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
* x86: geode: fix package nameing kmod-crypto-ebc does not existFlorian Eckert2022-02-261-1/+1
| | | | | | | This commit fixes the package naming that was added by commit: e1e4cbde5ceb228e60fff1fc752cb90d9a7df2ab Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* bcm63xx: Fast 2704n: configure the WAN portDaniel González Cabanelas2022-02-261-2/+2
| | | | | | | | | | | | The Sagem/Plusnet F@ST2704N has a red label in ethernet port 4. Its purpose is to be used as Fibre/WAN with the stock firmware. Configure the Eth4 as WAN. Fixes: fbbb977772 (brcm63xx: Tune the network configuration for several routers) Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
* mpc85xx: HiveAP-330: add tmp125 temperature sensorChristian Lamparter2022-02-253-1/+81
| | | | | | | | | | | the Aerohive HiveAP-330 and HiveAP-350 come equipped with an TI TMP125 temperature chip. This patch wires up the necessary support for this sensor and exposes it through hwmon / thermal sensor framework. Upstream support is coming, but it has to go through hwmon-next first. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: add disabled PSTORE+REED_SOLOMON symbols for 5.4Christian Lamparter2022-02-251-0/+15
| | | | | | | | | The last remaining 5.4 target currently chokes because the symbols haven't been disabled like for 5.10. Fixes: 97158fe10e60 ("kernel: package ramoops pstore-ram crash log storage") Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* bcm4908: fix USB PHY supportRafał Miłecki2022-02-252-0/+294
| | | | | | This fixes problem with USB PHY not handling some USB 3.0 devices. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: generic: add missing 5.10 symbolsRui Salvaterra2022-02-251-3/+6
| | | | | | | | | | | | | | | Add the following kconfig symbols (disabled): CONFIG_DEFAULT_FQ CONFIG_DEFAULT_CODEL CONFIG_DEFAULT_SFQ Also resort the config with the kconfig.pl script. Fixes: f39872d966 ("kernel: generic: select the fq_codel qdisc by default") Tested-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ipq806x: kernel crash log ramoops storage for R7800 and XR500Hannu Nyman2022-02-241-0/+9
| | | | | | | | | | | | Define the kernel crash log storage ramoops/pstore feature for R7800 and its sister XR500. Reference to the ramoops admin guide in upstream Linux: https://www.kernel.org/doc/html/v5.10/admin-guide/ramoops.html Tested with R7800. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* kernel: package ramoops pstore-ram crash log storageHannu Nyman2022-02-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Package the ability to log kernel crashes to 'ramoops' pstore files into RAM in /sys/fs/pstore Reference to the ramoops admin guide in upstream Linux: https://www.kernel.org/doc/html/v5.10/admin-guide/ramoops.html The files in RAM survive a warm reboot, but not a cold reboot. Note: kmod-ramoops selects kmod-pstore and kmod-reed-solomon. The feature can be used by selecting the kmod-ramoops and adding a ramoops reserved-memory definition to the device DTS. Example from R7800: reserved-memory { rsvd@5fe00000 { reg = <0x5fe00000 0x200000>; reusable; }; ramoops@42100000 { compatible = "ramoops"; reg = <0x42100000 0x40000>; record-size = <0x4000>; console-size = <0x4000>; ftrace-size = <0x4000>; pmsg-size = <0x4000>; }; }; If no definition has been made in DTS, no crash log is stored for the device. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (added CONFIG_EFI_VARS_PSTORE disable)
* x86: grub2: search for the "kernel" filesystem on all disksJax Jiang2022-02-242-11/+1
| | | | | | | | | | | | | | | | | | | Previously, grub2 was hardcoded to always look on "hd0" for the kernel. This works well when the system only had a single disk. But if there was a second disk/stick present, it may have look on the wrong drive because of enumeration races. This patch utilizes grub2 search function to look for a filesystem with the label "kernel". This works thanks to existing setup in scripts/gen_image_generic.sh. Which sets the "kernel" label on both the fat and ext4 filesystem variants. Signed-off-by: Jax Jiang <jax.jiang.007@gmail.com> Suggested-by: Alberto Bursi <bobafetthotmail@gmail.com> (MX100 WA) (word wrapped, slightly rewritten commit message, removed MX100 WA) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* Revert "bcm27xx: bcm27xx: update defconfig"Christian Lamparter2022-02-244-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts all four commits dbb45421bab "bcm27xx: bcm2708: update defconfig" 332f69583ad "bcm27xx: bcm2709: update defconfig" a478202d74b "bcm27xx: bcm2710: update defconfig" 82da1dfd69a "bcm27xx: bcm2711: update defconfig" this also highlighted an unrelated kconfig failure that warrants investigation. But for now it is important for the bcm27xx target to come back again. |* |* Restart config... |* |* |* Allow override default queue discipline |* |Allow override default queue discipline (NET_SCH_DEFAULT) [Y/n/?] y | Default queuing discipline | 1. Fair Queue (DEFAULT_FQ) (NEW) | 2. Controlled Delay (DEFAULT_CODEL) (NEW) | > 3. Fair Queue Controlled Delay (DEFAULT_FQ_CODEL) | 4. Stochastic Fair Queue (DEFAULT_SFQ) (NEW) | 5. Priority FIFO Fast (DEFAULT_PFIFO_FAST) | choice[1-5?]: |Error in reading or end of file. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* at91: add support for sama7g5-ek boardClaudiu Beznea2022-02-243-4/+62
| | | | | | | | | | | | | | | | | | | | | | Add support for SAMA7G5-EK board. Hardware: - SoC: SAMA7G5 - RAM: Aliance Memory AS4C256M16D3LC (4 Gbit DDR3L) - SD/MMC: 1 standard 4bit SD Card interface - USB: 1 Micro-AB host/device, 1 Type-A host, 1 Type-C host - CAN: 2 interfaces - Ethernet: 10/100 port, 1Gbps port - Wi-Fi/BT: 1 optional interface - Audio: 1 SPDIF RX port, 1 SPDIF TX port, 4 digital microphones - Camera: 1 RPi CSI camera interface - Debug: 1 J-Link-OB + CDC, 1 JTAG - LEDs: 1 RGB - Buttons: 4 push buttons - Expansions: 1 RPi Expansion connector, 2 mikroBUS connectors - Power management: 1 power management IC, 1 power consumption measurement device Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
* at91: add kernel support for sama7g5 socClaudiu Beznea2022-02-24152-7/+20714
| | | | | | | | | | | | | | | | Add kernel support for SAMA7G5 by back-porting mainline kernel patches. Among SAMA7G5 features could be remembered: - ARM Cortex-A7 - double data rate multi-port dynamic RAM controller supporting DDR2, DDR3, DDR3L, LPDDR2, LPDDR3 up to 533MHz - peripherals for audio, video processing - 1 gigabit + 1 megabit Ethernet controllers - 6 CAN controllers - trust zone support - DVFS for CPU - criptography IPs Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
* mvebu: add targz feature flagPaul Spooren2022-02-241-1/+1
| | | | | | | Adding the feature flag automatically creates a a rootfs.tar.gz files which can be used for Docker rootfs containers. Signed-off-by: Paul Spooren <mail@aparcar.org>
* mediatek: mt7623: drop RAMFS_COPY_BINDaniel Golle2022-02-221-2/+0
| | | | | | | fwtool is now always part of the sysupgrade stage2 ramdisk, so drop the no longer needed RAMFS_COPY_BIN variable. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: drop RAMFS_COPY_BIN and RAMFS_COPY_DATADaniel Golle2022-02-221-2/+0
| | | | | | | | | Now that both, fw_printenv/fw_setenv and fwtool are always present during stage2 sysupgrade, we no longer need to list them in RAMFS_COPY_BIN and RAMFS_COPY_DATA in platform.sh. Drop both variables as they are now unneeded. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ath79: image: use 'kmod-usb-chipidea2' for AR933x devicesPiotr Dymacz2022-02-212-3/+3
| | | | | | | AR933x based devices should include 'kmod-usb-chipidea2' for USB support. Fixes: #9243. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ath79: image: drop 'BOARDNAME' from devices recipesPiotr Dymacz2022-02-211-4/+0
| | | | | | | The 'BOARDNAME' variable is part of target configuration and shouldn't be part of a device's image recipe. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* realtek: remove debugging code from timerSander Vanheule2022-02-201-15/+3
| | | | | | | Remove some (dead) debugging code from the Realtek timer to clean up the sources of this driver. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: use DT provided address for timersSander Vanheule2022-02-202-24/+24
| | | | | | | | | | | | | | | The I/O base address for the timers was hardcoded into the driver, or derived from the HW IRQ number as an even more horrible hack. All supported SoC families have these timers, but with hardcoded addresses the code cannot be reused right now. Request the timer's base address from the DT specification, and store it in a private struct for future reference. Matching the second interrupt specifier, the address range for the second timer is added to the DT specification. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: clean up RTL930x timer DT nodeSander Vanheule2022-02-201-3/+1
| | | | | | | | | | | | | | The Realtek timer node for RTL930x doesn't have any child nodes, making the use of '#address-cells' quite pointless. It is also not an interrupt controller, meaning it makes no sense to define '#interrupt-cells'. The I/O address for this node is also wrong, but this is hidden by the fact that the driver associated with this node bypasses the usual DT machinery and does it's own thing. Correct the address to have a sane value, even though it isn't actually used. Fixes: a75b9e3ecb61 ("realtek: Adding RTL930X sub-target") Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: ZyXEL GS1900-48: fix system LED polaritySander Vanheule2022-02-201-1/+1
| | | | | | | | | When driven by a GPIO pin, the system LED needs to be configured as active high. Otherwise the LED switches off after booting and initialisation. Fixes: 47f5a0a3eed5 ("realtek: Add support for ZyXEL GS1900-48 Switch") Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: ZyXEL GS1900-48: drop status from gpio1Sander Vanheule2022-02-201-2/+0
| | | | | | | | The default value for a DT node's status property is already "okay", so there's no need to specify it again. Drop the status property to clean up the DTS. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: use higher priority for timer interruptsSander Vanheule2022-02-201-1/+1
| | | | | | | | | | | | | | The assigned output index for the event timers was quite low, lower even than the ethernet interrupt. This means that high network load could preempt timer interrupts, possibly leading to all sorts of strange behaviour. Increase the interrupt output index of the event timers to 5, which is the highest priority output and corresponds to the (otherwise unused) MIPS CPU timer interrupt. Fixes: a75b9e3ecb61 ("realtek: Adding RTL930X sub-target") Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: move RTL8231 definitions to board filesSander Vanheule2022-02-204-21/+23
| | | | | | | | | | | | | | The RTL8231 is an external chip, and not part of the SoC. That means it is more appropriate to define it in the board specific (base) files, instead of the DT include for the SoC itself. Moving the RTL8231 definition also ensures that boards with no GPIO expander, or an alternative one, don't have a useless gpio1 node label defined. Tested on a Netgear GS110TPPv1. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: fix node addresses for RTL839xSander Vanheule2022-02-201-3/+3
| | | | | | | | | | The address in some node names doesn't match the actual offset specified in the DT node. Update the names to fix this. While fixing the node names, also drop the unused node labels. Fixes: 0a7565e53653 ("realtek: Update rtl839x.dtsi for realtek,rtl-intc, new gpio controller remove RTL8231 node") Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: consolidate bootargs againSander Vanheule2022-02-205-11/+3
| | | | | | | | | | | | | | | | | Bootargs for devices in the realtek target were previously consolidated in commit af2cfbda2bf5 ("realtek: Consolidate bootargs"), since all devices currently use the same arguments. Commit a75b9e3ecb61 ("realtek: Adding RTL930X sub-target") reverted this without any argumentation, so let's undo that. Commit 0b8dfe085180 ("realtek: Add RTL931X sub-target") introduced the old bootargs also for RTL931x, without providing any actual device support. Until that is done, let's assume vendors will have done what they did before, and use a baud rate of 115200. Fixes: a75b9e3ecb61 ("realtek: Adding RTL930X sub-target") Signed-off-by: Sander Vanheule <sander@svanheule.net>
* mvebu: cortexa72: enable ARM_ARMADA_8K_CPUFREQMatthew Hagan2022-02-201-0/+1
| | | | | | | | Enable the AP806's cpufreq driver. This driver is compatible with the Armada 7K and 8K platforms. Tested-by: Stijn Segers <foss@volatilesystems.org> (RB5009UG+S+IN) Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
* bcm27xx: bcm2711: update defconfigJohn Audia2022-02-201-5/+0
| | | | | | | | | | Enabled CONFIG_ALL_KMODS and ran make kernel_menuconfig against bcm2711 to update defconfig. Some of the removed symbols are present in target/linux/generic/config-5.10 while others were removed by the make target. Signed-off-by: John Audia <graysky@archlinux.us> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (wrapped)
* bcm27xx: bcm2710: update defconfigJohn Audia2022-02-201-5/+0
| | | | | | | | | | Enabled CONFIG_ALL_KMODS and ran make kernel_menuconfig against bcm2710 to update defconfig. Some of the removed symbols are present in target/linux/generic/config-5.10 while others were removed by the make target. Signed-off-by: John Audia <graysky@archlinux.us> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (wrapped)
* bcm27xx: bcm2709: update defconfigJohn Audia2022-02-201-3/+0
| | | | | | | | | | Enabled CONFIG_ALL_KMODS and ran make kernel_menuconfig against bcm2709 to update defconfig. Some of the removed symbols are present in target/linux/generic/config-5.10 while others were removed by the make target. Signed-off-by: John Audia <graysky@archlinux.us> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (wrapped)
* bcm27xx: bcm2708: update defconfigJohn Audia2022-02-201-3/+0
| | | | | | | | | | Enabled CONFIG_ALL_KMODS and ran make kernel_menuconfig against bcm2708 to update defconfig. Some of the removed symbols are present in target/linux/generic/config-5.10 while others were removed by the make target. Signed-off-by: John Audia <graysky@archlinux.us> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (wrapped)
* ipq40xx: mikrotik: fix LED scriptRobert Marko2022-02-201-0/+1
| | | | | | | | Fix the missing ;; after the cAP ac case in /e/b/01_leds. Fixes: 93d9119 ("ipq40xx: add MikroTik cAP ac support") Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (minor touch-up)
* ipq806x: disable Linksys EA7500v1 and EA8500Christian Lamparter2022-02-201-0/+2
| | | | | | | | | | | | The kernel of both images will no longer fit into the 3072KiB / 3MiB kernel partition: |Image Name: ARM OpenWrt Linux-5.10.100 |Created: Sat Feb 19 00:11:55 2022 |Image Type: ARM Linux Kernel Image (uncompressed) |Data Size: 3147140 Bytes = 3073.38 KiB = 3.00 MiB Disable both targets for now, until a solution is available. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* mpc85xx: fix KEY_RFKILL vs KEY_RFKillChristian Lamparter2022-02-201-1/+1
| | | | | | | | This fixes a buildbot builder error: Error: arch/powerpc/boot/dts/tl-wdr4900-v1.dts:245.18-19 syntax error Fixes: 256e1dbc7d09 ("mpc85xx: utilize dt-binding definitions for keys + gpios") Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ramips: clean up Makefile formattingNick McKinney2022-02-201-6/+6
| | | | | | | | | Use correct indent in target/linux/ramips/image/mt7621.mk to be consistent with the rest of the file. Signed-off-by: Nick McKinney <nick@ndmckinney.net> [rephrase commit message as Adrian suggested, fix a6004ns-m indent] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: mt7621: print size of factory initramfs-image if it's too bigSven Roederer2022-02-201-2/+2
| | | | | | | It's helpful to know the current and maximal size of the imagefiles if the creation fails. Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
* ath79: fix wndr4500v3 lan port order to match caseGraham Cole2022-02-201-2/+5
| | | | | | | | The LED and LAN port numbering on the case of wndr4500v3 devices are reversed relative to the wndr4300v2. I created this patch to so that the ordering in OpenWRT will be consistent with that. Signed-off-by: Graham Cole <diakka@gmail.com>
* ramips: add support for ipTIME A3002MESHYoonji Park2022-02-204-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for ipTIME A3002MESH. Hardware: - SoC: MediaTek MT7621AT (880MHz, Duel-Core) - RAM: DDR3 128MB - Flash: XMC XM25QH128AHIG (SPI-NOR 16MB) - WiFi: MediaTek MT7615D (2.4GHz, 5GHz, DBDC) - Ethernet: MediaTek MT7530 (WAN x1, LAN x2, SoC built-in) - UART: [GND, RX, TX, 3.3V] (57600 8N1, J4) MAC addresses: | interface | MAC | source | comment |-----------|-------------------|----------------|---------- | LAN | 70:XX:XX:5X:XX:X3 | | | WAN | 70:XX:XX:5X:XX:X1 | u-boot 0x1fc40 | | WLAN 2G | 72:XX:XX:4X:XX:X0 | | | WLAN 5G | 70:XX:XX:5X:XX:X0 | factory 0x4 | | | 70:XX:XX:5X:XX:X0 | u-boot 0x1fc20 | unknown | | 70:XX:XX:5X:XX:X2 | factory 0x8004 | unknown - WLAN 2G MAC address is not the same as stock firmware since OpenWrt uses LAN MAC address with local bit sets. Installation: 1. Flash initramfs image. This can be done using stock web ui or TFTP 2. Connect to OpenWrt with an SSH connection to 192.168.1.1 3. Perform sysupgrade with sysupgrade image Revert to stock firmware: - Flash stock firmware via OEM TFTP Recovery mode - Perform sysupgrade with stock image 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> [wrap/rephrase commit message] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* Revert "ramips: increase spi-max-frequency for ipTIME mt7620 devices"Sungbo Eo2022-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 13a185bf8acb67da4a68873e560876c0e60b1a87. There was a report that one A1004ns device fails to detect its flash chip correctly: [ 1.470297] spi-nor spi0.0: unrecognized JEDEC id bytes: e0 10 0c 40 10 08 [ 1.484110] spi-nor: probe of spi0.0 failed with error -2 It also uses a different flash chip model: * in my hand: Winbond W25Q128FVSIG (SOIC-8) * reported: Macronix MX25L12845EMI-10G (SOP-16) Reducing spi-max-frequency solved the detection failure. Hence revert. Reported-by: Koasing <koasing@gmail.com> Tested-by: Koasing <koasing@gmail.com> Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ath79: utilize nvmem on Netgear EX7300 v2Sungbo Eo2022-02-202-14/+46
| | | | | | | | | | | | | mtd-mac-address should no longer be used after commit 5ae2e786395c ("kernel: drop support for mtd-mac-address"). Convert it to nvmem-cells. While at it, also convert OpenWrt's custom mtd-cal-data property and userspace pre-calibration data extraction to the nvmem implementation. Note: nvmem-cells in QCN5502 wmac has not been tested. Fixes: c32008a37b81 ("ath79: add partial support for Netgear EX7300v2") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* apm821xx: WNDR4700: use upstream tc654 cooling devicesChristian Lamparter2022-02-193-85/+92
| | | | | | | | | | | | | | Upstream hwmon-maintainer had various comments about the changes to the tc654 driver. These have been addressed and the cooling device support is destined for inclusion. One of the comments was the change of the cooling states scaling. No longer the driver uses the same values as the hwmon interface, instead the states are now the 17 states the tc654 supports. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* mpc85xx: add HiveAP-350 alternative name for HiveAP-330Christian Lamparter2022-02-191-0/+2
| | | | | | | The HiveAP-350 has six external antennas connectors. (It also has twice the flash?) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* mpc85xx: utilize dt-binding definitions for keys + gpiosChristian Lamparter2022-02-195-39/+50
| | | | | | | | | include the device-tree binding headers that provide definitions for keys codes and gpios in the device-tree files. Random bonus: merge tl-wdr4900-v1's uboot with the nvmem-node. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>