Skip to content
Snippets Groups Projects
  1. Aug 11, 2021
  2. Aug 10, 2021
  3. Aug 04, 2021
  4. May 08, 2021
  5. Apr 23, 2021
  6. Apr 21, 2021
  7. Apr 16, 2021
  8. Mar 18, 2021
  9. Mar 15, 2021
    • INAGAKI Hiroshi's avatar
      mediatek: add support for Buffalo WSR-2533DHP2 · 74f15628
      INAGAKI Hiroshi authored
      
      This adds support for the Buffalo WSR-2533DHP2.
      
      The device uses the Broadcom TRX image format with a special magic. To
      be able to boot the images or load them they have to be wrapped with
      different headers depending how it is loaded.
      
      There are multiple ways to install OpenWrt on this device.
      Boot ramdisk from U-Boot
      ----------------------------
      This will load the image and not write it into the flash.
      
      1. Stop boot menu with "space" key
      2. Select "System Load Linux to SDRAM via TFTP."
      3. Load this image:
         openwrt-mediatek-mt7622-buffalo_wsr-2533dhp2-initramfs-kernel.bin
      4. The system boots the image
      
      Write to flash from U-Boot
      -----------------------------
      This will load the image over tftp and directly write it into the flash.
      
      1. Stop boot menu with "space" key
      2. Select "System Load Linux Kernel then write to Flash via TFTP."
      3. Load this image:
         openwrt-mediatek-mt7622-buffalo_wsr-2533dhp2-squashfs-factory-uboot.bin
      4. The system writes this image into the flash and boots into it.
      
      Write to flash from Web UI
      -----------------------------
      This will load the image over over the Web UI and write it into the flash
      
      1. Open the Web UI
      2. Go to "管理" -> "ファームウェア更新"
      3. Select "ローカルファイル指定" and click "更新実行"
      4. Load this image:
         openwrt-mediatek-mt7622-buffalo_wsr-2533dhp2-squashfs-factory.bin
      5. The system writes this image into the flash and boots into it.
      
      Specifications
      -------------------
      * SoC:       MT7622 (4x4 2.4 GHz Wifi)
      * Wifi:      MT7615 (4x4 5 GHz Wifi)
      * Flash:     Winbond W29N01HZ 128MB SLC NAND
      * RAM        256MB
      * Ethernet:  Realtek RTL8367S (5 x 1GBit/s, SoC via 2.5GBit/s)
      
      Co-Developed-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarINAGAKI Hiroshi <musashino.open@gmail.com>
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      74f15628
  10. Mar 01, 2021
  11. Feb 28, 2021
    • Daniel Golle's avatar
      mediatek: rework support for BananaPi BPi-R64 · dfa0a38d
      Daniel Golle authored
      
      **What's new**
      
       * Bring support for the Bananapi BPi-R64 to the level desirable for
         a nice hackable routerboard.
       * Use ARM Trusted Firmware A from source. (goodbye binary preloader)
       * Use Das U-Boot from source. (see previous commit)
       * Assemble SD-card image using OpenWrt image-commands.
         (no gen_sd_cruz_foo.sh added, this is not Raspbian)
       * Updated kernel options to support root filesystem.
       * Updated DTS to match OpenWrt LAN ports, known LEDs, buttons, ...
       * Detect root device, handle sysupgrade, config restore, ...
       * Wire up (known) LEDs and buttons in OpenWrt-fashion.
       * Build one set of images from SD-card and eMMC.
       * Hopefully provide a good example of how things can be done right
         from scratch.
      
      **Installation and images**
      
       * Have an empty SD-card at hand
       * Write stuff to the card, as root (card device is /dev/mmcblkX)
         - write header, gpt, bl2, atf, u-boot and recovery kernel:
           `cat *bpi-r64-boot-sdcard.img *bpi-r64-initramfs-recovery.fit > /dev/mmcblkX`
         - rescan partitions:
           `blockdev --rereadpt /dev/mmcblkX`
         - write main system to production partition:
           `cat *bpi-r64-squashfs-sysupgrade.fit > /dev/mmcblkXp5`
      
       * Installation to eMMC works using SD-card bootloader via TFTP
         When running OpenWrt of SD-card, issue this to trigger installation
         to eMMC:
         `fw_setenv bootcmd run emmc_init`
         Be prepared to serve the content of bin/targets/mediatek/mt7622 on
         TFTP server address 192.168.1.254.
      
      **What's missing**
      
       * The red LED is always on, probably a hardware bug.
       * AHCI (probably needs DTS changes)
       * Ship SD-card image ready with every needed for eMMC install.
       * The eMMC has a second, currently unused boot partition. This would
         be ideal to store the WiFi EEPROM and Ethernet MAC address(es).
         @sinovoip ideas?
      
      Thanks to Thomas Hühn @thuehn for providing the hardware!
      
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      dfa0a38d
    • Daniel Golle's avatar
      mediatek: add alternative UBI NAND layout for Linksys E8450 · 02351861
      Daniel Golle authored
      The vendor flash layout of the Linksys E8450 is problematic as it uses
      the SPI-NAND chip without any wear-leveling while at the same time
      wasting a lot of space for padding.
      Use an all-UBI layout instead, storing the kernel+dtb+squashfs in
      uImage.FIT standard format in UBI volume 'fit', the read-write
      overlay in UBI volume 'rootfs_data' as well as reduntant U-Boot
      environments 'ubootenv' and 'ubootenv2', and a 'recovery'
      kernel+dtb+initramfs uImage.FIT for dual-boot.
      
      ** WARNING **
      THIS PROCEDURE CAN EASILY BRICK YOUR DEVICE PERMANENTLY IF NOT CARRIED
      OUT VERY CAREFULLY AND EXACTLY AS DESCRIBED!
      
      Step 0
      
       * Configure your PC to have the static IPv4 address 192.168.1.254/24
       * Provide bin/targets/mediatek/mt7622 via TFTP
      
      Now continue EITHER with step 1A or 1B, depending on your preference
      (and on having serial console wired up or not).
      
      Step 1A (Using the vendor web interface (or non-UBI OpenWrt install))
      
      In order to update to the new bootloader and UBI-based firmware,
      use the web browser of your choice to open the routers web-interface
      accessible on http://192.168.1.1
      
      
      
       * Navigate to
         'Configuration' -> 'Administration' -> 'Firmware Upgrade'
      
       * Upload the file
          openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb
         and proceed with the upgrade.
      
       * Once OpenWrt comes up, use SCP to upload the new bootloader files to
         /tmp on the router:
          *-mt7622-linksys_e8450-ubi-preloader.bin
          *-mt7622-linksys_e8450-ubi-bl31-uboot.fip
      
       * Connect via SSH as you will now need to replace the bootloader in
         the Flash.
      
          ssh root@192.168.1.1
          (the usual warnings)
      
       * First of all, backup all the flash now:
      
          for mtd in /dev/mtdblock*; do
           dd if=$mtd of=/tmp/$(basename $mtd);
          done
      
       * Then use SCP to copy /tmp/mtdblock* from the router and keep them
         safe. You will need them should you ever want to return to the
         factory firmware!
      
       * Now flow the uploaded files:
          mtd -e /dev/mtd0 write /tmp/*linksys_e8450-ubi-preloader.bin /dev/mtd0
          mtd -e /dev/mtd1 write /tmp/*linksys_e8450-ubi-bl31-uboot.fip /dev/mtd1
      
         If and only if both writes look like the completed successfully
         reboot the router. Now continue with step 2.
      
      Step 1B (Using the vendor bootloader serial console)
      
       * Use the serial to backup all /dev/mtd* devices before using the
         stock firmware (you got root shell when connected to serial).
      
       * Then reboot and select 'U-Boot Console' in the boot menu.
      
       * Copy the following lines, one by one:
      
      tftpboot 0x40080000 openwrt-mediatek-mt7622-linksys_e8450-ubi-preloader.bin
      tftpboot 0x40100000 openwrt-mediatek-mt7622-linksys_e8450-ubi-bl31-uboot.fip
      nand erase 0x0 0x180000
      nand write 0x40080000 0x0 0x180000
      reset
      
      Now continue with step 2
      
      Step 2
      
      Once the new bootchain comes up, the loader will initialize UBI and the
      ubootenv volumes. It will then of course fail to find any bootable
      volume and hence resort to load kernel via TFTP from server
      192.168.1.254 while giving itself the address 192.168.1.1
      
      The requested file is called
      openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb
      and your TFTP server should provide exactly that :)
      It will be written to UBI as recovery image and booted.
      You can then continue and flash the production OS image, either
      by using sysupgrade in the booted initramfs recovery OS, or by using
      the bootloader menu and TFTP.
      
      That's it. Go ahead and mess around with a bootchain built almost
      completely from source (only DRAM calibration blobs are fitted in bl2,
      and the irreplacable on-chip ROM loader remains, of course).
      And enjoy U-Boot built with many great features out-of-the-box.
      
      You can access the bootloader environment from within OpenWrt using the
      'fw_printenv' and 'fw_setenv' commands. Don't be afraid, once you got
      the new bootchain installed the device should be fairly unbrickable
      (holding reset button before and during power-on resets things and
      allows reflashing recovery image via TFTP)
      
      Special thanks to @dvn0 (Devan Carpenter) for providing amazingly fast
      infra for test-builds, allowing for `make clean ; make -j$(nproc)` in
      less than two minutes :)
      
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      02351861
    • Felix Fietkau's avatar
      mediatek: mt7622: add Linux 5.10 support · c46ccb69
      Felix Fietkau authored
      
      Switch mt7622 subtarget to Linux 5.10, it has been tested by many of us
      on several devices for a couple of weeks already.
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      c46ccb69
    • Felix Fietkau's avatar
      11425c9d
  12. Feb 24, 2021
  13. Feb 18, 2021
    • David Bauer's avatar
      mediatek: add support for Ubiquiti UniFi 6 LR · 634c13c1
      David Bauer authored
      
      Hardware
      --------
      
      MediaTek MT7622
      512MB DDR3 RAM
      64M SPI-NOR Flash (Winbond W25Q512JV)
      MediaTek MT7622 802.11bgn 4T4R WMAC
      MediaTek MT7915 802.11ax 4T4R
      Marvell AQR1112 100/1000/2500 NBase-T PHY
      Holtek HT32F52241 LED controller
      Reset Switch
      
      UART
      ----
      
      CPU UART0 at the pinout next to the Holtek MCU.
      
      Pinout (first pin next to SoC / MCU)
      
      0 3V3
      1 RX
      2 TX
      3 GND
      
      Settings are 115200 8N1.
      
      Opening the case
      ----------------
      
      Opening the case is not a nice task, as itis glued together. Insert a
      flat knife between the front and back casing below the ethernet port.
      Open up a gap this way and insert a flat scredriver, remove the knife.
      
      Work your way around the casing by applying force to seperate the front
      and back casing. This losens the glue and opens the plastic clips. Be
      gentle, as these clips are very cheap and break quickly.
      
      Installation
      ------------
      
      1. Connect to the booted device at 192.168.1.20 using username/password
         "ubnt".
      
      2. Transfer the OpenWrt sysupgrade image to the device using SCP.
      
      3. Check the mtd partition number for bs / kernel0 / kernel1
      
         $ cat /proc/mtd
      
      4. Set the bootselect flag to boot from kernel0
      
         $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock6
      
      5. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1
      
         $ dd if=openwrt.bin of=/dev/mtdblock8
         $ dd if=openwrt.bin of=/dev/mtdblock9
      
      6. Reboot the device. It should boot into OpenWrt.
      
      Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
      634c13c1
    • David Bauer's avatar
      mediatek: add Ubiquiti LED driver · c9137e2d
      David Bauer authored
      
      Add a driver for controlling the RGB LED via Ubiquitis own "LEDBAR" LED
      controller based on the Holtek HT32F52241 MCU.
      
      This driver is initially used by the Ubiquiti UniFi 6 LR, however
      judging from FCC pictures the MCU is also found on the U6-Mesh as well
      as the U6-Extender.
      
      Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
      c9137e2d
  14. Jan 25, 2021
  15. Jan 03, 2021
  16. Dec 22, 2020
  17. Sep 22, 2020
  18. Sep 06, 2020
  19. Sep 04, 2020
  20. Aug 10, 2020
  21. Jul 16, 2020
  22. Jul 09, 2020
  23. Jun 07, 2020
  24. Apr 06, 2020
  25. Mar 27, 2020
  26. Mar 10, 2020
  27. Feb 29, 2020
  28. Feb 28, 2020
  29. Nov 24, 2019
  30. Oct 12, 2019
  31. Sep 15, 2019
  32. Aug 02, 2019
  33. May 11, 2019
    • Hauke Mehrtens's avatar
      kernel: Remove CONFIG_COMPAT · 46af22de
      Hauke Mehrtens authored
      
      This removes support for executing old 32 bit applications on 64 bit ARM
      and MIPS kernels.
      On OpenWrt we normally compile all the user space applications on our
      own and do not support third party binary only modules especial not 32
      bit applications on 64 bit CPUs.
      
      This reduces the attack surface on such systems and should also save
      some memory.
      
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      46af22de
    • Hauke Mehrtens's avatar
      kernel: Activate CONFIG_ARM64_SW_TTBR0_PAN · 32eb6688
      Hauke Mehrtens authored
      
      This activates "Emulate Privileged Access Never using TTBR0_EL1
      switching" on ARM64.
      
      This should prevent the kernel from reading code from user space in
      kernel context.
      
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      32eb6688
Loading