aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* lua5.3: backport CVE fixRosen Penev2024-02-17
| | | | | | Also refreshed some patches Signed-off-by: Rosen Penev <rosenp@gmail.com>
* lua: fix CVE-2014-5461Rosen Penev2024-02-17
| | | | | | | | Patch taken from Debian. Refresh patches Signed-off-by: Rosen Penev <rosenp@gmail.com>
* images: append to existing image with ubinize-image build cmdDaniel Golle2024-02-16
| | | | | | | | Let ubinize-image append the ubinized image to the existing image instead of replacing it. Fixes: 6c17d71973 ("scripts: ubinize-image.sh: support static volumes, make size optional") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: filogic: bpi-r3-mini: fix power on M.2 slotTianling Shen2024-02-16
| | | | | | | | | | One of the pins requiered by M.2 slot is conflict with spi1, however, spi1 seems unused so simply disable it for now, this matches the factory behavior [1]. 1. https://github.com/BPI-SINOVOIP/BPI-R3MINI-OPENWRT-V21.02.3/commit/9bd78779f267a21c04c5bb4d16c32e83aae8d1d3 Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* mediatek: filogic: bpi-r3-mini: bind WLAN LED-s to phy*-ap0Tianling Shen2024-02-16
| | | | | | For showing wlan status. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* mediatek: filogic: bpi-r3-mini: convert to new LED color/function formatTianling Shen2024-02-16
| | | | | | | | | | Conversion to new LED color/function format and drop label format. This was needed previously when the new format wasn't supported by leds.sh functions script. Now that is supported this property can be removed in favor of the new format. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* uboot-mediatek: bpi-r3-mini: fix typo in bootmenuDaniel Golle2024-02-16
| | | | | | | Fix typo in eMMC bootmenu. Fixes: bc25519f98 ("uboot-mediatek: add builds for BananaPi BPi-R3 mini") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ath79: generic: fix the alphabetical order in 02_networkFoica David2024-02-16
| | | | | | | This commit fixes the alphabetical order in 02_network. The 2 deco devices in ath79_setup_interfaces() were in the wrong place. Signed-off-by: Foica David <superh552@gmail.com>
* qualcommax: AW1000: add qca8081 PHY LED configurationChukun Pan2024-02-16
| | | | | | | | Since we can configure the PHY LED of the qca8081, add a configuration for this device. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Reviewed-by: Robert Marko <robimarko@gmail.com>
* qualcommax: AW1000: sync qca807x PHY dts changesChukun Pan2024-02-16
| | | | | | | | | The dts of Arcadyan AW1000 forgot to convert qca807x PHY to PHY package implementation. This commit fix it. Fixes: 0ab4b92 ("qualcommax: convert qca807x PHY to PHY package implementation") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Reviewed-by: Robert Marko <robimarko@gmail.com>
* build: fix opkg flags in rootfsJustin Klaassen2024-02-16
| | | | | | | | | | By default opkg sets the "user" flag when a package is installed, which resulted in most packages in the rootfs having this flag set incorrectly. This patch removes the "user" flag from all installed packages when preparing the rootfs image. Fixes: #14427 Signed-off-by: Justin Klaassen <justin@tidylabs.app>
* mediatek: filogic: bpi-r3-mini: fix generating ubinized imageDaniel Golle2024-02-16
| | | | | | | | Generate ubinized image as ARTIFACT and make use of now available generic 'ubinize-image' build step intended for that purpose. Fixes: b03d3644cf ("mediatek: filogic: add BananaPi BPi-R3 mini") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: filogic: bpi-r3-mini: fix NAND flash layoutDaniel Golle2024-02-16
| | | | | | | | Fix NAND flash layout which was out-of-sync with the definition in ARM TrustedFirmware-A which expects UBI to start at 0x200000. Fixes: b03d3644cf ("mediatek: filogic: add BananaPi BPi-R3 mini") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* scripts: ubinize-image.sh: fix on POSIX shell, allow custom imagesDaniel Golle2024-02-16
| | | | | | | | | | Make sure ubinize-image.sh also works with more simple POSIX Shell and allow creating complete custom images to be used as ARTIFACT/foo.img and thereby allow including uImage.FIT, TF-A FIP and what ever else is required on a specific board. Fixes: 6c17d71973 ("scripts: ubinize-image.sh: support static volumes, make size optional") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: mt76x8: fix build due to renamed U-Boot binaryDaniel Golle2024-02-16
| | | | | | | | | The U-Boot binary for the RAVPower RP-WD009 has been renamed. In order to be uniform with all other U-Boot binaries generated the SoC type has been prepended. Set that new name also in the image build recipe for that device in order to fix build. Fixes: 927334a8f7 ("uboot-mediatek: add basic build for ZBT-WG3526 (MT7621, 16M SPI-NOR)") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* imx: update default network config for ventanaTim Harvey2024-02-15
| | | | | | | | update the default network configuration for Gateworks Ventana boards such that the left-most front-panel NIC is WAN and any additional are in LAN bridge Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: add gpio-button-hotplug to ventana imagesTim Harvey2024-02-15
| | | | | | | Add the gpio-button-hotplug to Gateworks ventana images to support the on-board user pushbutton. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* mediatek: filogic: add BananaPi BPi-R3 miniDaniel Golle2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification ---------------------- SoC: MediaTek MT7986A 4x A53 Flash: 128MB SPI-NAND, 8GB eMMC RAM: 2GB DDR4 Ethernet: 2x 2.5GbE (Airoha EN8811H) WiFi: MediaTek MT7976C 2x2 2.4G + 3x3 5G Interfaces: * M.2 Key-M: PCIe 2.0 x2 for NVMe SSD * M.2 Key-B: USB 3.0 with SIM slot * front USB 2.0 port LED: Power, Status, WLAN2G, WLAN5G, LTE, SSD Button: Reset, internal boot switch Fan: PWM-controlled 5V fan Power: 12V Type-C PD Installation instructions for eMMC ---------------------------------- 0. Set boot switch to boot from SPI-NAND (assuming stock rom or immortalwrt running there). 1. Write GPT partition table to eMMC Move openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-gpt.bin to the device /tmp using scp and write it to /dev/mmcblk0: dd if=/tmp/openwrt-*-r3-mini-emmc-gpt.bin of=/dev/mmcblk0 2. Reboot (to reload partition table) 3. Write bootloader and OpenWrt images Move files to the device /tmp using scp: - openwrt-*-bananapi_bpi-r3-mini-emmc-preloader.bin - openwrt-*-bananapi_bpi-r3-mini-emmc-bl31-uboot.fip - openwrt-*-bananapi_bpi-r3-mini-initramfs-recovery.itb - openwrt-*-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb Write them to the appropriate partitions: echo 0 > /sys/block/mmcblk0boot0/force_ro dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-emmc-preloader.bin of=/dev/mmcblk0boot0 dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-emmc-bl31-uboot.fip of=/dev/mmcblk0p3 dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-initramfs-recovery.itb of=/dev/mmcblk0p4 dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb of=/dev/mmcblk0p5 sync 4. Remove the device from power, set boot switch to eMMC and boot into OpenWrt. The device will come up with IP 192.168.1.1 and assume the Ethernet port closer to the USB-C power connector as LAN port. 5. If you like to have Ethernet support inside U-Boot (eg. to boot via TFTP) you also need to write the PHY firmware to /dev/mmcblk0boot1: echo 0 > /sys/block/mmcblk0boot1/force_ro dd if=/lib/firmware/airoha/EthMD32.dm.bin of=/dev/mmcblk0boot1 dd if=/lib/firmware/airoha/EthMD32.DSP.bin bs=16384 seek=1 of=/dev/mmcblk0boot1 Installation instructions for NAND ---------------------------------- 0. Set boot switch to boot from eMMC (assuming OpenWrt is installed there by instructions above. Using stock rom or immortalwrt does NOT work!) 1. Write things to NAND Move files to the device /tmp using scp: - openwrt-*-bananapi_bpi-r3-mini-snand-preloader.bin - openwrt-*-bananapi_bpi-r3-mini-snand-bl31-uboot.fip - openwrt-*-bananapi_bpi-r3-mini-initramfs-recovery.itb - openwrt-*-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb Write them to the appropriate locations: mtd write /tmp/openwrt-*-bananapi_bpi-r3-mini-snand-preloader.bin /dev/mtd0 ubidetach -m 1 ubiformat /dev/mtd1 ubiattach -m 1 volsize=$(wc -c < /tmp/openwrt-*-bananapi_bpi-r3-mini-snand-bl31-uboot.fip) ubimkvol /dev/ubi0 -N fip -n 0 -s $volsize -t static ubiupdatevol /dev/ubi0_0 /tmp/openwrt-*-bananapi_bpi-r3-mini-snand-bl31-uboot.fip cd /lib/firmware/airoha cat EthMD32.dm.bin EthMD32.DSP.bin > /tmp/en8811h-fw.bin ubimkvol /dev/ubi0 -N en8811h-firmware -n 1 -s 147456 -t static ubiupdatevol /dev/ubi0_1 /tmp/en8811h-fw.bin ubimkvol /dev/ubi0 -n 2 -N ubootenv -s 126976 ubimkvol /dev/ubi0 -n 3 -N ubootenv2 -s 126976 volsize=$(wc -c < /tmp/openwrt-*-bananapi_bpi-r3-mini-initramfs-recovery.itb) ubimkvol /dev/ubi0 -n 4 -N recovery -s $volsize ubiupdatevol /dev/ubi0_4 /tmp/openwrt-*-bananapi_bpi-r3-mini-initramfs-recovery.itb volsize=$(wc -c < /tmp/openwrt-*-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb) ubimkvol /dev/ubi0 -n 4 -N recovery -s $volsize ubiupdatevol /dev/ubi0_4 /tmp/openwrt-*-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb 3. Remove the device from power, set boot switch to NAND, power up and boot into OpenWrt. Partially based on immortalwrt support for the R3 mini, big thanks for doing the ground work! Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: add driver for Airoha EN8811H PHY as moduleDaniel Golle2024-02-15
| | | | | | | | Add PHY driver for Airoha EN8811H PHY and package it as kernel module. The PHY needs to load firmware from rootfs, so there is no point in having the driver built-into the kernel. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add builds for BananaPi BPi-R3 miniDaniel Golle2024-02-15
| | | | | | | | The R3 mini comes with two Airoha EN8811H PHYs for 2.5G Ethernet. The driver added to U-Boot expects the firmware for the PHY to be stored inside UBI volume en8811h-fw or MMC boot1 hardware partition. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* linux-firmware: package firmware for Airoha EN8811H PHYDaniel Golle2024-02-15
| | | | | | | Add package with firmware for Airoha EN8811H 2.5G Ethernet PHY which needs to be loaded via MDIO before the PHY can be used. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* scripts: ubinize-image.sh: support static volumes, make size optionalDaniel Golle2024-02-15
| | | | | | | | | | | | | | | | In order to support devices having TF-A FIP image or UBI-aware U-Boot SPL we need to include a static volume for the bootloader. Introduce support for adding additional static volumes by prefixing the filename with ':', eg. UBINIZE_PARTS := fip:=$(STAGING_DIR_IMAGE)/u-boot.fip Also add support for rootfs-in-uImage.FIT setups which don't require a rootfs partition and make the (3rd) size parameter in UBINIZE_PARTS optional (see example above without declared size). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: update driver for MT7988 built-in 2.5G Ethernet PHYDaniel Golle2024-02-15
| | | | | | Sync driver for built-in 2.5G Ethernet PHY with MediaTek SDK. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* firmware: package firmware for built-in 2.5G PHY on MT7988Daniel Golle2024-02-15
| | | | | | | | Firmware for the built-in 2.5G Ethernet PHY of the MediaTek MT7988 SoC is now part of linux-firmware, so we can package it. Only a single file is needed with recent driver. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: modernize Linksys E8450 / Belkin RT3200 UBI buildDaniel Golle2024-02-15
| | | | | | | | | | | | | | | | | Move fip and factory into UBI static volumes. Use fitblk instead of partition parser. !! RUN INSTALLER FIRST !! Existing users of previous OpenWrt releases or snapshot builds will have to **re-run the updated installer** before upgrading to firmware after this commit. DO NOT flash or run even just the initramfs image unless you have run the updated installer which moves the content of the 'factory' partition into a UBI volume. tl;dr: DON'T USE YET! Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: convert unifi6lr-v{1,2,3}-ubootmod to fitblkDaniel Golle2024-02-15
| | | | | | No bootloader changes needed in this case, smooth transition. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: convert BPi-R64 to all-UBI layout and fitblkDaniel Golle2024-02-15
| | | | | | | Modernize bootloader and flash memory layout of the BPi-R64 similar to how it has also been done for the BPi-R3. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* arm-trusted-firmware-mediatek: add UBI-enabled builds for MT7622Daniel Golle2024-02-15
| | | | | | | Use custom UBI start address 0x80000 on MT7622 which is more than enough for a single bl2 (MT7622 BootROM doesn't support redundant bl2). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: BananaPi BPi-R3 bootloader updateDaniel Golle2024-02-15
| | | | | | | | | | | | | | | * Switch to all-UBI layout on SPI-NAND * use fitblk driver instead of uImage.FIT partition parser * adapt sysupgrade * bump COMPAT_VERSION Remove BROKEN mark now that all needed changes are done. Boards running images generated before this commit will require full reflash of the bootloader, re-install from SD card is the easiest way to achieve that. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-envtools: mediatek_filogic: update bpi-r3Daniel Golle2024-02-15
| | | | | | Unify env configuration now that BPi-R4 and BPi-R3 both use fitblk. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: bpi-r3: all-UBI NAND layout, use fitblkDaniel Golle2024-02-15
| | | | | | | | | | Modernize U-Boot to provide a better reference: * store fip image in UBI now that TF-A supports that * switch from uImage.FIT partition parser to new fitblk virtual firmware block driver (root=/dev/fit0) * automatically set root device according to boot_mode register Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* arm-trusted-firmware-mediatek: add mt7986-spim-nand-ubi-ddr4Daniel Golle2024-02-15
| | | | | | | Add UBI-enabled build for MT7986 with SPIM-NAND and DDR4 for use with the BananaPi R3 board. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: prepare BananaPi BPi-R3 for upcoming modernizationDaniel Golle2024-02-15
| | | | | | Mark board as broken until the complete boot stack has been updated. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-envtools: filogic: add support for BananaPi R4Daniel Golle2024-02-15
| | | | | | | | Add environment settings for the BananaPi BPI-R4 router board which can boot from (and store its bootloader environment on) micro SD card, SPI-NAND and eMMC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-envtools: filogic: de-duplicate UBI env settingsDaniel Golle2024-02-15
| | | | | | | Use function instead of duplicating the env settings on UBI for OpenWrt-built U-Boot over and over. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add support for BananaPi BPI-R4 boardDaniel Golle2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SOC: MediaTek MT7988A (4x Cortex-A73) RAM: 4 GiB DDR4 Flash: 128 MiB Winbond SPI-NAND MMC: 8 GiB eMMC *or* microSD (cannot be used both) ETH: 4x 1GE (1x WAN, 3x LAN) 2x SFP+ (10G, 5G, 2.5G, 1G) USB: on-board USB 3.2 4-port hub 1x USB 3.2 port (type A connector) 1x M.2 for 4G/5G modem 2x mPCIe for additional modems WiFi: optional MediaTek MT7996 Wi-Fi 7 module (using 2x PCIe gen3 x2 on the mPCIe slots and 12V power) Installation ------------ 1. Decompress and write the sdcard image to a micro SD card and use that to boot the R4 (both dip switches in upper position). 2. Use the bootloader menu accessible via the serial console to install to SPI-NAND. 3. Switch to boot from SPI-NAND and install to eMMC. Known issues ------------ - The RST button is hard-wired to the SoC reset and can't be read from software. This can be changed by modifying the board (ie. moving a 0-ohm resistor). However, in order to maintain compatibility with the board as it comes from factory the button isn't used by OpenWrt and the WPS button is used as factory/reset button instead. - various small things still need to be fixed in DT Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: update to U-Boot 2024.01 releaseDaniel Golle2024-02-15
| | | | | | | | Rebase local patches on top of quarterly timed release, allowing to drop numerous patches which have been accepted upstream since the release of U-Boot 2023.07.02. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add build for BPi-R4Daniel Golle2024-02-15
| | | | | | | Add build for the BananaPi R4 board which can boot from micro SD, SPI-NAND or eMMC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: mt7988: set rootdisk according to boot deviceDaniel Golle2024-02-15
| | | | | | | If nodes /chosen/rootdisk-${bootdevice} exists, set /chosen/rootdisk phandle according to boot device selected by the bootstrap pins. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: fix MMC erase timeoutDaniel Golle2024-02-15
| | | | | | | | When erasing large amounts of blocks at once this can take a long time on slow cards. Instead of a fixed timeout, wait longer if more blocks are being erased. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* uboot-mediatek: add basic build for ZBT-WG3526 (MT7621, 16M SPI-NOR)Daniel Golle2024-02-15
| | | | | | | | | Add basic U-Boot drop-in replacement compatible with the flash layout of the vendor loader of the Zbtlink WG3526 (16M) MT7621 router board. The idea here is a to have a reference build of uboot-mediatek also for a simple MIPS boards more popular than MT7621 RFB. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: add patch for xsphy driver to support pcie2 on MT7988Daniel Golle2024-02-15
| | | | | | | Import patch from MediaTek SDK which allows using the third PCIe host controller of the MT7988 SoC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: dts: mt7988: add uart1 and uart2Daniel Golle2024-02-15
| | | | | | Add device tree nodes for uart1 and uart2 of the MT7988 SoC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: pinctrl-mt7988: add additional uart1_2_lite groupDaniel Golle2024-02-15
| | | | | | | | Add UART pinctrl group for using only pins 80 and 81 for uart1. This is needed on the BPi-R4 as RTS/CTS signals are used for other on-board functions. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: pinctrl-mt7988: add pinconf mapDaniel Golle2024-02-15
| | | | | | Add pull-up/pull-down configuration for pins of MT7988. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: switch to pending XFI 10G Ethernet driversDaniel Golle2024-02-15
| | | | | | | | | Replace previous patch adding paths and SerDes modes with patch series pending upstream adding dedicated drivers for XFI T-PHY and USXGMII PCS, extends LynxI PCS to be a standalone platform driver and as a consequence makes much less changes to the actual Ethernet driver mtk_eth_soc. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: backport a hell of thermal commitsDaniel Golle2024-02-15
| | | | | | | Backport almost 50 commits from upstream Linux to improve thermal drivers for MediaTek SoCs and add new LVTS driver for MT7988. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: replace mt7988 clk files with accepted patchesDaniel Golle2024-02-15
| | | | | | Replace clock drivers for MT7988 with backported upstream commits. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: backport phylink changes from mainline LinuxDaniel Golle2024-02-15
| | | | | | | Let's pick a bunch of useful phylink changes which allow us to keep drivers in sync with mainline Linux. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: switch to Linux version 6.1Daniel Golle2024-02-15
| | | | | | Drop support for Linux 5.15 and switch to Linux 6.1. Signed-off-by: Daniel Golle <daniel@makrotopia.org>