aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
Commit message (Collapse)AuthorAgeFilesLines
...
* mediatek: mt7623: rename gen_banana_pi_img.sh → gen_mtk_mmc_img.shDavid Woodhouse2020-07-263-11/+11
| | | | | | | As I buy more hardware and continue to work on consolidation, This will apply to a lot of MediaTek platforms; rename it accordingly. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: make gen_banana_pi_img.sh more genericDavid Woodhouse2020-07-262-15/+24
| | | | | | | | | | | This actually covers fairly much all the MediaTek platforms; they only have different images because they don't include the preloader and U-Boot, and rely on preinstalled stuff from the vendor. So this script can slowly take over the world as we complete the support for various other platforms, starting with UniElec U7623… Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: add scatter file for unbricking with SP Flash ToolDavid Woodhouse2020-07-262-0/+88
| | | | | | | | | | | | | | | | | | | | Many MediaTek SoCs can be unbricked by using the SP Flash Tool from http://spflashtool.com/ along with a "scatter list" file, which is just a text file listing which image gets loaded where. We use a trivial partition layout for the tool, with the whole eMMC image as a single "partition", which means users just need to unzip the sysupgrade image. Doing the real partition layout would be overly complex and would require the individual partitions to be shipped as artifacts — or users to extract them out of the sysupgrade image just for the tool to put them adjacent to each other on the eMMC anyway. The tool does require a copy of the preloader in order to operate, even when it isn't flashing the preloader to the eMMC boot region. So drop that into the bin directory as an artifact too. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: build lzma fit for bpi-r2Chuanhong Guo2020-07-261-3/+0
| | | | | | | | | bpi-r2 images are shipped with mainline u-boot which can extract lzma with no problem. remove custom kernel recipe to build lzma fit image instead of uncompressed fit with zboot. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: mt7623: prepare for full sysupgrade support on UniElec U7623David Woodhouse2020-07-262-88/+117
| | | | | | | | | | | | | | | | | An upcoming commit will add a full system image for U7623 which will contain the MBR partition table and U-Boot too. That contrasts with the current image which only owns the eMMC from sector 0xa00 onwards, and must start with a legacy uImage. Prepare for sysupgrade to the new images, and cope with the fact that the recovery partition will be /dev/mmcblk0p2 instead of /dev/mmcblk0p1 after the upgrade. This commit could potentially be backported to 19.07 to allow for direct sysupgrade to the new image layout. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: increase flexibility of finding recovery partitionDavid Woodhouse2020-07-261-8/+14
| | | | | | | I'm about to change the layout of the images for UniElec U7623 so make it find the recovery partition based on which the root partition is too. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: fix Ethernet setup for TRGMII modeDavid Woodhouse2020-07-261-0/+62
| | | | | | This fixes the TX performance issues seen on MT7623 boards. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: fix Ethernet support on UniElec U7623David Woodhouse2020-07-261-10/+4
| | | | | | | The definition of the switch in the device-tree was not correct. Make it look more like the Banana Pi R2, which works. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: fix sysupgrade from vendor OpenWrt on UniElec U7623David Woodhouse2020-07-263-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This board ships with an ancient 14.07-based OpenWrt using block2mtd, and the MBR partition table contains nonsense. It is possible to sysupgrade to an upstream OpenWrt image, but the legacy layout of the OpenWrt images start at 0xA00 in the eMMC, with a raw uImage. The legacy OpenWrt image doesn't "own" the beginning of the device, including the MBR and U-Boot. This means that when a user upgrades to upstream OpenWrt, it doesn't boot because it can't find the right partitions. So hard-code them on the kernel's command line using CONFIG_CMDLINE_PARTITION (for block). Additionally, the vendor firmware doesn't cope with images larger than about 36MiB, because it only overwrites the contents of its "firmware" MTD partition. The current layout of the legacy image wastes a lot of space, allowing over 32MiB for the kernel and another 10MiB for the FAT recovery file system which is only created as 3MiB. So pull those in to allow 4¾ MiB for the kernel, 3MiB for recovery, and then we have over 20MiB for the root file system. This doesn't affect the new images which ship with a full eMMC image including a different MBR layout and a partition for U-Boot, because our modern U-Boot can actually pass the command line to the kernel, and the built-in one doesn't get used anyway. Tested by upgrading from vendor OpenWrt to the current legacy image, from legacy to itself, to the previous legacy layout, and then to finally the full-system image. This commit probably wants backporting to 19.07, which also doesn't install over the vendor OpenWrt and doesn't even have a full-system installation option. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: add explicit console= to U7623 kernelDavid Woodhouse2020-07-261-1/+1
| | | | | | | The bootloader for legacy builds can't set it, so we end up unable to log in on the serial port. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: remove condition in Device/DefaultAdrian Schmutzler2020-07-252-16/+16
| | | | | | | | | | | | | | | | The current condition with part of the variables set dependent on the subtarget in Device/Default isn't really nice to read and also defeats the purpose of having a default node. This removes the special settings for mt7623 and moves them to the individual devices, which is not much of a problem as there are actually just two of them and they partly use different settings anyway. While at it, slightly adjust the order of variables and wrap some long lines. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 5.4 to 5.4.52John Audia2020-07-174-33/+16
| | | | | | | | | update_kernel.sh refreshed all patches, no human interaction was needed Build system: x86_64 Run-tested: Netgear R7800 (ipq806x) Signed-off-by: John Audia <graysky@archlinux.us>
* mediatek: backport latest pci/e driver from upstreamJohn Crispin2020-07-167-24/+1932
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: generate UBI images for the rev boardJohn Crispin2020-07-163-2/+48
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: minor fix to eip97 driverJohn Crispin2020-07-161-2/+2
| | | | | | This patch makes the driver work on the newer v2.3 core. Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: fix bashism in gen_banana_pi_img.shDavid Woodhouse2020-07-091-1/+1
| | | | | | | | There was a bashism in the script. This fixes the script so that it doesn't actually require bash, and can be run with any POSIX shell as its shebang suggests. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: re-add u3phy2 phy-switch patchSungbo Eo2020-07-091-0/+66
| | | | | | | | | This patch is required for pcie@2,0 in mt7623 to work. The patch was originally added in kernel 4.14, but it has not been ported to 4.19 and later. Fixes: FS#3217 Tested-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* mediatek: do not create device nodes in uci-defaults scriptSungbo Eo2020-07-091-16/+5
| | | | | | | | | Since commit 298814e6be76 ("base-files: config_generate: split macaddr with multiple ifaces") uci MAC address setup will create a device node for each member iface. But this script might override the device nodes and interfere with the MAC address setup. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* treewide: kernel: drop redundant USB_EHCI_HCD=n config symbolPetr Štetiar2020-07-095-5/+0
| | | | | | | | | Commit e53ec043bae1 ("kirkwood: move usb support to modules") has moved this config symbol into generic configs, so it could be removed from other configs. Suggested-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mediatek: Implement sysupgrade support for Banana Pi R2David Woodhouse2020-07-083-12/+128
| | | | | | Based on work by Alexey Loukianov <lx2@lexa2.ru> and others. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: store MAC address in boot partition on Banana Pi R2David Woodhouse2020-07-081-23/+36
| | | | | | | | | | | Like many boards, the Banana Pi R2 doesn't have permanant storage of its MAC address, and we store the first random one that the kernel generates in order to use it later and at least be consistent. Store it in the FAT boot partition, just as the U7623 board (and others) do. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: add SD card image creation for Banana Pi R2David Woodhouse2020-07-084-0/+257
| | | | | | Based on work by Alexey Loukianov <lx2@lexa2.ru> and others. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: enable SATA for mt7623David Woodhouse2020-07-082-3/+3
| | | | | | | The MT7623 SoC has the same SATA block as the MT7622, so enable it in MT7623 builds too and add it to the DEVICE_PACKAGES for those boards. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek/mt7623: unify features and packages, add ext4 and usbDavid Woodhouse2020-07-082-3/+5
| | | | | | | | The supported MT7623 boards are mostly identical (what with being a System-on-Chip and all), so unify the DEVICE_PACKAGES for them, and add ext4 and usb support for them. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* mediatek: mt7623: refresh 5.4 kernel configDavid Woodhouse2020-07-081-0/+3
| | | | | | | Some options were not explicitly specified, causing the kernel build to drop to interactive mode. Set the missing options. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* kernel: Update kernel 5.4 to version 5.4.50Hauke Mehrtens2020-07-041-1/+1
| | | | | | | Run tested: ath79, ipq40xx Build tested: ath79, ipq40xx Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Update kernel 4.19 to version 4.19.131Hauke Mehrtens2020-07-042-15/+15
| | | | | | | | | | | | | Fixes: - CVE-2020-10757 The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was backported which needed some adaptations to other code. Run tested: ath79 Build tested: ath79 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mediatek: mt7623: refresh kernel 5.4 configSungbo Eo2020-06-161-44/+7
| | | | | | By running make kernel_oldconfig and selecting relevant options. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* mediatek: fix IPv4-only corner case and commit in 99-net-psAdrian Schmutzler2020-06-161-1/+4
| | | | | | | | | | | | | | | | The uci config section network.globals set up in /bin/config_generate will only be created if /proc/sys/net/ipv6 exists. Correspondingly, lacking IPv6 support, the command uci set network.globals.packet_steering=1 will fail with "uci: Invalid argument" as the network.globals config has not been set up. Fix that by adding the setup there as well. While at it, limit the uci commit to the network config file. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: drop shebang from non-executable target filesAdrian Schmutzler2020-06-164-6/+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>
* kernel: bump 5.4 to 5.4.45Petr Štetiar2020-06-097-336/+320
| | | | | | | | | | | | | | | | | | | Fixes CVE-2020-10757 via upstream commit df4988aa1c96 ("mm: Fix mremap not considering huge pmd devmap"). Resolved merge conflict in the following patches: bcm27xx: 950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch Refreshed patches, removed upstreamed patch: generic: 751-v5.8-net-dsa-mt7530-set-CPU-port-to-fallback-mode.patch generic: 754-v5.7-net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch Run tested: qemu-x86-64 Build tested: x86/64, imx6, sunxi/a53 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mediatek: fix image/mt7622.mkJohn Crispin2020-06-071-1/+1
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: add mt7531 DSA supportJohn Crispin2020-06-078-38/+2028
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: add bpi-r64 emmc supportJohn Crispin2020-06-075-8/+638
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: make emmc image generation work on mt7622John Crispin2020-06-072-1/+20
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: switch over to extended upstream eip97 driverJohn Crispin2020-06-073-0/+5514
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: tidy up image subtarget MakefilesSungbo Eo2020-06-072-24/+23
| | | | | | | | | | - sort device recipes alphabetically - adjust board name of ELECOM WRC-2533GENT - harmonize line wrapping Signed-off-by: Sungbo Eo <mans0n@gorani.run> [rebased] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/mediatek: select kmod-mt7615-firmware where kmod-mt7615e is selectedFelix Fietkau2020-06-042-2/+3
| | | | | | | The new mt76 version splits out the firmware, because the driver can also be used for MT7663/MT7613 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: bump 5.4 to 5.4.39Petr Štetiar2020-05-073-22/+19
| | | | | | | | | Refreshed patches. Run tested: qemu-x86-64 Build tested: x86/64, imx6, sunxi/a53, layerscape/armv7+armv8_64b Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mediatek: fix image buildingJohn Crispin2020-05-044-24/+8
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: update patchesJohn Crispin2020-05-043-19/+125
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: fix compile error caused by upstreamed mtk_m32 functionYong-hyu, Ban2020-04-271-23/+17
| | | | | | | | | | | | | | | | | | | | This fixes following compile error: ``` CC drivers/net/ethernet/mediatek/mtk_eth_soc.o drivers/net/ethernet/mediatek/mtk_eth_soc.c:70:5: error: conflicting types for 'mtk_m32' u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned reg) ^~~~~~~ In file included from drivers/net/ethernet/mediatek/mtk_eth_soc.c:25: drivers/net/ethernet/mediatek/mtk_eth_soc.h:964:6: note: previous declaration of 'mtk_m32' was here void mtk_m32(struct mtk_eth *eth, u32 clear, u32 set, unsigned reg); ^~~~~~~ ``` which caused by 5.4.34 mainlining of mtk_m32 function. Fixes: faf668be354a ("kernel: bump 5.4 to 5.4.34") Signed-off-by: Yong-hyu, Ban <perillamint@quendi.moe>
* mediatek: disable the unused pcie port for elecom wrc-2533gentFelix Fietkau2020-04-221-4/+0
| | | | | | Fixes MSI support for the primary device Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: bump 5.4 to 5.4.34Petr Štetiar2020-04-213-18/+18
| | | | | | | | | Refreshed patches. Run tested: qemu-x86-64, apalis, a64-olinuxino Build tested: x86/64, imx6, sunxi/a53 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* kernel: bump 5.4 to 5.4.31Petr Štetiar2020-04-0911-77/+52
| | | | | | | | | | | | | Refreshed patches, removed upstreamed patches: oxnas: 003-ARM-dts-oxnas-Fix-clear-mask-property.patch generic: 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch Run tested: apu2, qemu-x86-64, apalis Build tested: sunxi/a53, imx6, x86/64, ipq40xx Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> [apu2] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mediatek: set v5.4 as defaultJohn Crispin2020-04-061-1/+1
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: add hw flow table offloadingJohn Crispin2020-04-061-0/+1251
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: add support for rtl8367cJohn Crispin2020-04-06127-0/+93948
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: drop v4.14 supportJohn Crispin2020-04-06142-24602/+0
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* mediatek: more v5.4 fixesJohn Crispin2020-04-064-13/+118
| | | | | | These are all backports and/or on their way upstream. Signed-off-by: John Crispin <john@phrozen.org>