aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/mikrotik
Commit message (Collapse)AuthorAgeFilesLines
* ath79: add support for MikroTik RouterBOARD 912UAG-2HPnDDenis Kalashnikov2021-06-213-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This board has been supported in the ar71xx. Links: * https://mikrotik.com/product/RB912UAG-2HPnD * https://openwrt.org/toh/hwdata/mikrotik/mikrotik_rb912uag-2hpnd This also supports the 5GHz flavour of the board. Hardware: * SoC: Atheros AR9342, * RAM: DDR 64MB, * SPI NOR: 64KB, * NAND: 128MB, * Ethernet: x1 10/100/1000 port with passive POE in, * Wi-Fi: 802.11 b/g/n, * PCIe, * USB: 2.0 EHCI controller, connected to mPCIe slot and a Type-A port -- both can be used for LTE modem, but only one can be used at any time. * LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED, Ethernet phy LED, * Button, * Beeper. Not working: * Button: it shares gpio line 15 with NAND ALE and NAND IO7, and current drivers doesn't easily support this configuration, * Beeper: it is connected to bit 5 of a serial shift register (tested with sysfs led trigger timer). But kmod-gpio-beeper doesn't work -- we left this as is for now. Flashing: * Use the RouterBOARD Reset button to enable TFTP netboot, boot kernel and initramfs and then perform sysupgrade. * From ar71xx OpenWrt firmware run: $ sysupgrade -F /tmp/<sysupgrade.bin> For more info see: https://openwrt.org/toh/mikrotik/common. Co-Developed-by: Koen Vandeputte <koen.vandeputte@citymesh.com> Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
* ath79: add NAND driver for MikroTik RB91xG seriesDenis Kalashnikov2021-06-211-0/+1
| | | | | | | | | | | | | Main part is copied from ar71xx original driver rb91x_nand written by Gabor Juhos <juhosg@openwrt.org>. What is done: * Support of kernel 5.4 and 5.10, * DTS support, * New gpio API (gpiod_*) support. Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
* treewide: remove "+" sign for increment with macaddr_addAdrian Schmutzler2021-06-051-2/+2
| | | | | | | | | | | | Many people appear to use an unneeded "+" prefix for the increment when calculating a MAC address with macaddr_add. Since this is not required and used inconsistently [*], just remove it. [*] As a funny side-fact, copy-pasting has led to almost all hotplug.d files using the "+", while nearly all of the 02_network files are not using it. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: mikrotik: swap RB922UAGS-5HPaCD eth0/1 MACsRoger Pueyo Centelles2021-04-301-0/+5
| | | | | | | | | | | Since support for SFP on the MikroTik RouterBOARD 922UAGS-5HPacD was added by 4387fe00cb, the MAC addresses for eth0 (Ethernet) and eth1 (SFP) were swapped. This patch fixes the 02_network script to assign MAC addresses correctly, so they match the label and the vendor's OS. Tested on a RouterBOARD 922UAGS-5HPacD board. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* treewide: remove redundant ubifs kconfig symbolsRui Salvaterra2021-04-211-3/+0
| | | | | | | For the targets which enable ubifs, these symbols are already part of the generic kconfigs. Drop them from the target kconfigs. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ath79: mikrotik: enable SFP on RB922UAGS-5HPaCDRoger Pueyo Centelles2021-04-162-1/+1
| | | | | | | | | | | | | | | | This patch enables the SFP cage on the MikroTik RouterBOARD 922UAGS-5HPacD. GPIO16 (tx-disable-gpios) should be governed by the SFP driver to enable or disable transmission, but no change is observed. Therefore, it is left as output high to ensure the SFP module is forced to transmit. Tested on a RouterBOARD 922UAGS-5HPacD board, with a CISCO GLC-LH-SMD 1310nm module and an unbranded GLC-T RJ45 Gigabit module. PC=>router iperf3 tests deliver 440/300 Mbps up/down, both via regular eth0 port or SFP port with RJ45 module. Bridge between eth0 and eth1 delivers 950 Mbps symmetric. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ath79: consolidate testing kernelAdrian Schmutzler2021-04-101-2/+0
| | | | | | | All subtargets have the same testing kernel set, so move it to the target definition. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: mikrotik: define the testing kernel versionKoen Vandeputte2021-04-091-0/+2
| | | | | | | | | | commit d6b785d477 ("ath79: add kernel 5.10 support") moved KERNEL_TESTING_PATCHVER to a subtarget level, but is looks like Mikrotik subtarget was forgotten. Also add it for Mikrotik. Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
* treewide: remove execute bit and shebang from board.d filesAdrian Schmutzler2021-03-062-2/+0
| | | | | | | | | | | | | | | | So far, board.d files were having execute bit set and contained a shebang. However, they are just sourced in board_detect, with an apparantly unnecessary check for execute permission beforehand. Replace this check by one for existance and make the board.d files "normal" files, as would be expected in /etc anyway. Note: This removes an apparantly unused '#!/bin/sh /etc/rc.common' in target/linux/bcm47xx/base-files/etc/board.d/01_network Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: enable Regulator support for targetDavid Bauer2021-02-221-1/+0
| | | | | | | | | | | | Regulator support was enabled on all subtargets except for ath79-nand. With Kernel 5.10, AT803x requires Regulator support, thus enabling on the complete target, as ath79-nand requires AT803x. While this is only required on Kernel 5.10, enable it also on 5.4. We have no major size-constraint, so enabling it on 5.4 allows us to clean up the occurences in the subtarget configuration. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: remove generic profilesAdrian Schmutzler2021-01-271-18/+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>
* ath79: add support for MikroTik RouterBOARD wAPR-2nD (wAP R)Roger Pueyo Centelles2020-12-223-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RouterBOARD wAPR-2nD (wAP R) router, a weatherproof 2.4 GHz access point with a miniPCI-e slot and a SIM card slot. Specifications: - SoC: Qualcomm Atheros QCA9533 - Flash: 16 MB (SPI) - RAM: 64 MB - Ethernet: 1x 10/100 Mbps (PoE in) - WiFi: AR9531 2T2R 2.4 GHz (SoC) - miniPCI-e slot - 4x green LEDs (1x WiFi, 3x RSSI) - 1x reset button See https://mikrotik.com/product/RBwAPR-2nD for more details. Flashing: TFTP boot initramfs image and then perform sysupgrade. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* kernel: move some disabled symbols to genericAleksander Jan Bajkowski2020-12-221-3/+0
| | | | | | Move some disabled config options found in lantiq target to generic. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* treewide: fix initramfs detectionRobert Marko2020-12-201-1/+1
| | | | | | | | | | | | | | | | Commit "initramfs: switch to tmpfs to fix ujail" switched initramfs to now use tmpfs, it causes $(rootfs_type) to now return tmpfs when running initramfs image instead of being empty. This broke initramfs detection which is required so that when installing on MikroTik devices firmware partition would first get erased fully before writing. So, lets test for $(rootfs_type) returning "tmpfs" instead. Fixes: 7fd3c68 ("initramfs: switch to tmpfs to fix ujail) Signed-off-by: Robert Marko <robimarko@gmail.com>
* ath79: move the squashfs feature to the parent targetRui Salvaterra2020-11-231-1/+1
| | | | | | | All subtargets define it. Move it to the parent target and remove it from all subtargets. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ath79: remove AT803X config symbol from subtargetsDavid Bauer2020-11-011-1/+0
| | | | | | | The AT803X_PHY kernel config symbol is already enabled target-wide. SO it does not have to be enabled for individual subtargets. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: mikrotik: use vmlinuz (zBoot ELF)John Thomson2020-10-291-0/+2
| | | | | | | | | | | - minimal built initramfs: 10MB vmlinux ELF -> 6MB vmlinuz - ~5 seconds for kernel decompression, which was equivalent to the additional time to load the uncompressed ELF from SPI NOR. - Removes requirement for lzma-loader, which may have been causing some image builds to fail to boot on Mikrotik mt7621. Suggested-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
* ath79: remove model name from LED labelsAdrian Schmutzler2020-10-022-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we request LED labels in OpenWrt to follow the scheme modelname:color:function However, specifying the modelname at the beginning is actually entirely useless for the devices we support in OpenWrt. On the contrary, having this part actually introduces inconvenience in several aspects: - We need to ensure/check consistency with the DTS compatible - We have various exceptions where not the model name is used, but the vendor name (like tp-link), which is hard to track and justify even for core-developers - Having model-based components will not allow to share identical LED definitions in DTSI files - The inconsistency in what's used for the model part complicates several scripts, e.g. board.d/01_leds or LED migrations from ar71xx where this was even more messy Apart from our needs, upstream has deprecated the label property entirely and introduced new properties to specify color and function properties separately. However, the implementation does not appear to be ready and probably won't become ready and/or match our requirements in the foreseeable future. However, the limitation of generic LEDs to color and function properties follows the same idea pointed out above. Generic LEDs will get names like "green:status" or "red:indicator" then, and if a "devicename" is prepended, it will be the one of an internal device, like "phy1:amber:status". With this patch, we move into the same direction, and just drop the boardname from the LED labels. This allows to consolidate a few definitions in DTSI files (will be much more on ramips), and to drop a few migrations compared to ar71xx that just changed the boardname. But mainly, it will liberate us from a completely useless subject to take care of for device support review and maintenance. To also drop the boardname from existing configurations, a simple migration routine is added unconditionally. Although this seems unfamiliar at first look, a quick check in kernel for the arm/arm64 dts files revealed that while 1033 lines have labels with three parts *:*:*, still 284 actually use a two-part labelling *:*, and thus is also acceptable and not even rare there. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: use wpad-basic-wolfssl as defaultPetr Štetiar2020-08-201-1/+1
| | | | | | | | | | | | | | | In order to support SAE/WPA3-Personal in default images. Replace almost all occurencies of wpad-basic and wpad-mini with wpad-basic-wolfssl for consistency. Keep out ar71xx from the list as it won't be in the next release and would only make backports harder. Build-tested (build-bot settings): ath79: generic, ramips: mt7620/mt76x8/rt305x, lantiq: xrx200/xway, sunxi: a53 Signed-off-by: Petr Štetiar <ynezz@true.cz> [rebase, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: mikrotik: erase firmware on SPI NOR before installThibaut VARÈNE2020-08-181-0/+3
| | | | | | | | | | | | | | On Mikrotik SPI NOR devices, the firmware partition must be erased when flashing from stock firmware, otherwise leftover bits (in particular a kernel signature) can trigger a boot loop. When booted from initramfs (the only way to install OpenWRT on these devices), this patch unconditionally erases the firmware partition in the do_upgrade() stage for all supported SPI NOR devices. This is forward-ported from ed49d0876 and 20452a8db Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath79/mikrotik: add function for loading ath9k caldataAdrian Schmutzler2020-08-131-8/+13
| | | | | | | | | | | | | The commands to read ath9k caldata on mikrotik subtarget are mostly repetitive, so let's put them into a function to make writing and reading them easier. This function will only be required when patching the MAC address. For cases where it is put correctly into the calibration data by the vendor, caldata_sysfsload_from_file can be used directly as done for ath10k at the moment. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik SXT 5nD r2 (SXT Lite5)Roger Pueyo Centelles2020-08-124-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik SXT Lite5 (product code RBSXT5nDr2, also SXT 5nD r2) is an outdoor 5GHz CPE with a 16 dBi integrated antenna built around the Atheros AR9344 SoC. It is based on the "sxt5n" board platform. Specifications: - SoC: Atheros AR9344 - RAM: 64 MB - Storage: 128 MB NAND - Wireless: Atheros AR9340 (SoC) 802.11a/n 2x2:2 - Ethernet: Atheros AR8229 switch (SoC), 1x 10/100 port, 8-32 Vdc PoE in - 6 user-controllable LEDs: · 1x power (blue) · 1x wlan (green) · 4x rssi (green) - 1 GPIO-controlled buzzer See https://mikrotik.com/product/RBSXT5nDr2 for more details. Notes: The device was already supported in the ar71xx target. There, the Ethernet port was handled by GMAC1. Here in ath79 it is handled by GMAC0, which allows to get link information (loss, speed, duplex) on the eth0 interface. Flashing: TFTP boot initramfs image and then perform sysupgrade. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Acknowledgments: Michael Pratt (@mpratt14) for helping on the network settings. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [rebase, use mikrotik LED label prefix, make names consistent, add reg for bootloader2, use led_user for boot indication etc., minor cosmetic changes] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik RouterBOARD 921GS-5HPacD-15sSven Roederer2020-08-123-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik RouterBOARD 921GS-5HPacD-15s (mANTBox 15s) is an outdoor antenna for 5 GHz with an built-in router. This ports the board from ar71xx. See https://mikrotik.com/product/RB921GS-5HPacD-15S for more info. Specifications: - SoC: Qualcomm Atheros QCA9558 (720 MHz) - RAM: 128 MB - Storage: 128 MB NAND - Wireless: external QCA9892 802.11a/ac 2x2:2 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE in - SFP: 1x host Working: - NAND storage detection - Ethernet - Wireless - 1x user LED (blinks during boot, sysupgrade) - Reset button - Sysupgrade Untested: - SFP cage (probably not working) Installation (untested): - Boot initramfs image via TFTP and then flash sysupgrade image As the embedded RB921-pcb is a stripped down version of the RB922 this patch adds a common dtsi for this series and includes this to the final dts-files. Signed-off-by: Sven Roederer <devel-sven@geroedel.de> [move ath10k-leds closer to ath10k definition in DTS files] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik RouterBOARD LHG 2nDRoger Pueyo Centelles2020-08-123-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik RouterBOARD LHG 2nD (sold as LHG 2) is a 2.4 GHz 802.11b/g/n outdoor device with a feed and an integrated dual polarization grid dish antenna based on the LHG-HB platform. See https://mikrotik.com/product/lhg_2 for more info. Specifications: - SoC: Qualcomm Atheros QCA9533 - RAM: 64 MB - Storage: 16 MB NOR - Wireless: Atheros AR9531 (SoC) 802.11b/g/n 2x2:2, 18 dBi antenna - Ethernet: Atheros AR8229 (SoC), 1x 10/100 port, 12-28 Vdc PoE in - 8 user-controllable LEDs: · 1x power (blue) · 1x user (green) · 1x lan (green) · 1x wlan (green) · 4x rssi (green) Note: The rssihigh LED is disabled, as it shares GPIO 16 with the reset button. Flashing: TFTP boot initramfs image and then perform sysupgrade. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [rebase, remove rssiled setup, adjust commit message, add DTSIs] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: mikrotik: use base mac on lan for RBwAPG-5HacT2HnDBjoern Dobe2020-07-251-0/+4
| | | | | | | | | The Mikrotik RBwAPG-5HacT2HnD has only a single ethernet interface (lan), and the vendor uses the base (label) MAC address for it. Signed-off-by: Bjoern Dobe <bjoern@dobecom.de> [commit title/message improvement] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: drop shebang from non-executable target filesAdrian Schmutzler2020-06-161-2/+0
| | | | | | | | | | | | | | This drops the shebang from all target files for /lib and /etc/uci-defaults folders, as these are sourced and the shebang is useless. While at it, fix the executable flag on a few of these files. This does not touch ar71xx, as this target is just used for backporting now and applying cosmetic changes would just complicate things. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik RouterBOARD 493G (rb4xx series)Christopher Hill2020-06-153-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RouterBOARD RB493G, ported from the ar71xx target. See https://routerboard.com/RB493G for details Specification: - SoC Qualcomm Atheros AR7161 - RAM: 256 MiB - Storage: 128MiB NAND - Ethernet: 9x 1000/100/10 Mbps - USB 1x 2.0 / 1.0 type A - PCIe: 3x Mini slot - MicroSD slot Working: - Board/system detection - Ethernet - SPI - NAND - LEDs - USB - Sysupgrade Enabled (but untested due to lack of hardware): - PCIe - ath79_pci_irq struct has the slot/pin/IRQ mappings if needed Installation methods: - tftp boot initramfs image, scp then flash via "sysupgrade -n" - nand boot existing OpenWrt, scp then flash via "sysupgrade -n" Notes: - initramfs image will not work if uncompressed image size over ~8.5Mb - The "rb4xx" drivers have been enabled Signed-off-by: Christopher Hill <ch6574@gmail.com>
* ath79/mikrotik: add missing kernel config symbol for 5.4Roger Pueyo Centelles2020-05-261-0/+1
| | | | | | | | The UBIFS_FS_ZSTD is exposed when UBIFS is enabled. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [adjust commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79/mikrotik: load caldata via sysfs loaderThibaut VARÈNE2020-05-082-4/+6
| | | | | | | | | | | | | This commit takes advantages of base-files 220 which introduces routines to perform caldata loading directly via the kernel sysfs loader helper. This has the benefits of not wasting flash space to store caldata. Memory footprint is reduced to the bare minimum: for devices that don't need MAC patching, the caldata is loaded directly, for devices that do need MAC patching, the caldata is extracted to /tmp, patched and then loaded. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath79/mikrotik: use standard caldata functionsThibaut VARÈNE2020-05-083-32/+9
| | | | | | | With the implementation of a sysfs interface to access WLAN data, this target no longer needs a special wrapper to extract caldata. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath79/mikrotik: don't use mtd-mac-address in DTSThibaut VARÈNE2020-05-081-0/+9
| | | | | | | | | | | | | | | | | | As evidenced here[1] the device MAC address can be stored at a random offset in the hard_config partition. Rely on sysfs to update the MAC address correctly. To match sticker and vendor OS behavior, WAN MAC is set to the device base MAC and LAN MAC is incremented from that. Note: this will trigger a harmless kernel message during boot: ag71xx 19000000.eth: invalid MAC address, using random address There is no clean workaround to prevent this message from being emitted. [1] https://github.com/openwrt/openwrt/pull/2850#issuecomment-610809021 Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath79/mikrotik: enable mikrotik platform driverThibaut VARÈNE2020-05-081-0/+2
| | | | Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath79/mikrotik: enable CONFIG_MTD_ROUTERBOOT_PARTSThibaut VARÈNE2020-05-081-0/+1
| | | | Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath79: MikroTik: fix missing nand on kernel 5.4Koen Vandeputte2020-04-161-0/+1
| | | | | | | | | | | | | | | | | | | | | Following symbol got renamed upstream: CONFIG_MTD_NAND --> CONFIG_MTD_RAW_NAND Also add this renamed symbol so NAND also works on kernel 5.4. After: [ 0.628372] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1 [ 0.634862] nand: Samsung NAND 128MiB 3,3V 8-bit [ 0.639554] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 0.647263] Scanning device for bad blocks [ 0.656228] random: fast init done [ 0.789652] 3 fixed-partitions partitions found on MTD device ar934x-nand [ 0.796550] Creating 3 MTD partitions on "ar934x-nand": [ 0.801874] 0x000000000000-0x000000040000 : "booter" [ 0.807715] 0x000000040000-0x000000400000 : "kernel" [ 0.813551] 0x000000400000-0x000008000000 : "ubi" Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: improve mikrotik-caldata.shThibaut VARÈNE2020-04-041-2/+7
| | | | | | | | | | Reduce unnecessary flash wear and be tidy: - Run the extraction only if necessary - Extract temporary file to /tmp - cleanup after execution Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath79: rename Mikrotik RB 922UAGS-5HPacD mtd partitionThibaut VARÈNE2020-03-271-1/+1
| | | | | | | | | | | | | | | | In RouterBOARD parlance there never was an "art" partition. This partition has always been named 'hard_config' on ar71xx. This partition contains more than just ART (Atheros Radio Test) data. It includes the hardware description (product code, serial, board identifier, name, hardware options, MAC address), as well as other bits affecting the operation of RouterBoot. To avoid confusion with regular ART data, this partition is renamed in line with historical ar71xx and ramips nomenclature as 'hard_config'. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix Mikrotik wAP G-5HacT2HnD mtd partitionsThibaut VARÈNE2020-03-272-3/+3
| | | | | | | | | | | | | | | | | | | | | | In RouterBOARD parlance there never was an "art" partition. This partition has always been named 'hard_config' on ar71xx. This partition contains more than just ART (Atheros Radio Test) data. It includes the hardware description (product code, serial, board identifier, name, hardware options, MAC address), as well as other bits affecting the operation of RouterBoot. To avoid confusion with regular ART data, this partition is renamed in line with historical ar71xx and ramips nomenclature as 'hard_config'. This commit fixes the previous support files and implements the nested RouterBoot partition scheme as already used by ramips-based SPI-NOR RouterBOARD DTSes, as previously reviewed and implemented in bbe2cf657ca7 ("ramips: fix RBM11G partitioning"). Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix execute bit for 02_network on mikrotik subtargetAdrian Schmutzler2020-03-171-0/+0
| | | | | | | | | | When creating the mikrotik subtarget, the execute bit on 02_network was not set. Fix it. Fixes: a66eee63368e ("ath79: add mikrotik subtarget") Reported-by: Christopher Hill <ch6574@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: get rid of BOARD_NAME for Mikrotik RouterBOARDAdrian Schmutzler2020-03-171-1/+7
| | | | | | | | | | | | | So far, specifying "BOARD_NAME := routerboard" is required by the upgrade code of Mikrotik NAND devices, as "sysupgrade-routerboard" is hardcoded in platform_do_upgrade_mikrotik_nand(). This patch replaces the latter with a grep for the name like it is already done in nand_upgrade_tar() in /lib/upgrade/nand.sh. By that, BOARD_NAME is obsolete now for this device. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add mikrotik subtargetRoger Pueyo Centelles2020-03-179-0/+222
This commit creates the ath79/mikrotik subtarget in order to support MikroTik devices based on Qualcomm Atheros MIPS SoCs. MikroTik devices need a couple of specific features: the split MiNOR firmware MTD format, which is not used by other devices, and the 4k sector erase size on SPI NOR storage, which can not be added to the ath79/generic and ath79/nand subtargets now. Additionally, the commit moves the two MikroTik devices already in the generic and nand subtargets to this new one. Tested on the RB922 board and the wAP AC router. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>