Commit Graph

988 Commits

Author SHA1 Message Date
Bjørn Mork
2449a63208 ramips: mt7621: Add support for ZyXEL NR7101
The ZyXEL NR7101 is an 802.3at PoE powered 5G outdoor (IP68) CPE
with integrated directional 5G/LTE antennas.

Specifications:

 - SoC: MediaTek MT7621AT
 - RAM: 256 MB
 - Flash: 128 MB MB NAND (MX30LF1G18AC)
 - WiFi: MediaTek MT7603E
 - Switch: 1 LAN port (Gigabiti)
 - 5G/LTE: Quectel RG502Q-EA connected by USB3 to SoC
 - SIM: 2 micro-SIM slots under transparent cover
 - Buttons: Reset, WLAN under same cover
 - LEDs: Multicolour green/red/yellow under same cover (visible)
 - Power: 802.3at PoE via LAN port

The device is built as an outdoor ethernet to 5G/LTE bridge or
router. The Wifi interface is intended for installation and/or
temporary management purposes only.

UART Serial:

57600N1
Located on populated 5 pin header J5:

 [o] GND
 [ ] key - no pin
 [o] RX
 [o] TX
 [o] 3.3V Vcc

Remove the SIM/button/LED cover, the WLAN button and 12 screws
holding the back plate and antenna cover together. The GPS antenna
is fixed to the cover, so be careful with the cable.  Remove 4
screws fixing the antenna board to the main board, again being
careful with the cables.

A bluetooth TTL adapter is recommended for permanent console
access, to keep the router water and dustproof. The 3.3V pin is
able to power such an adapter.

MAC addresses:

OpenWrt OEM   Address          Found as
lan     eth2  08:26:97:*:*:BC  Factory 0xe000 (hex), label
wlan0   ra0   08:26:97:*:*:BD  Factory 0x4 (hex)
wwan0   usb0  random

WARNING!!

ISP managed firmware might at any time update itself to a version
where all known workarounds have been disabled.  Never boot an ISP
managed firmware with a SIM in any of the slots if you intend to use
the router with OpenWrt. The bootloader lock can only be disabled with
root access to running firmware. The flash chip is physically
inaccessible without soldering.

Installation from OEM web GUI:

- Log in as "supervisor" on https://172.17.1.1/
- Upload OpenWrt initramfs-recovery.bin image on the
  Maintenance -> Firmware page
- Wait for OpenWrt to boot and ssh to root@192.168.1.1
- (optional) Copy OpenWrt to the recovery partition. See below
- Sysupgrade to the OpenWrt sysupgrade image and reboot

Installation from OEM ssh:

- Log in as "root" on 172.17.1.1 port 22022
- scp OpenWrt initramfs-recovery.bin image to 172.17.1.1:/tmp
- Prepare bootloader config by running:
    nvram setro uboot DebugFlag 0x1
    nvram setro uboot CheckBypass 0
    nvram commit
- Run "mtd_write -w write initramfs-recovery.bin Kernel" and reboot
- Wait for OpenWrt to boot and ssh to root@192.168.1.1
- (optional) Copy OpenWrt to the recovery partition. See below
- Sysupgrade to the OpenWrt sysupgrade image and reboot

Copying OpenWrt to the recovery partition:

- Verify that you are running a working OpenWrt recovery image
  from flash
- ssh to root@192.168.1.1 and run:
    fw_setenv CheckBypass 0
    mtd -r erase Kernel2
- Wait while the bootloader mirrors Image1 to Image2

NOTE: This should only be done after successfully booting the OpenWrt
  recovery image from the primary partition during installation.  Do
  not do this after having sysupgraded OpenWrt!  Reinstalling the
  recovery image on normal upgrades is not required or recommended.

Installation from Z-Loader:

- Halt boot by pressing Escape on console
- Set up a tftp server to serve the OpenWrt initramfs-recovery.bin
  image at 10.10.10.3
- Type "ATNR 1,initramfs-recovery.bin" at the "ZLB>" prompt
- Wait for OpenWrt to boot and ssh to root@192.168.1.1
- Sysupgrade to the OpenWrt sysupgrade image

NOTE: ATNR will write the recovery image to both primary and recovery
  partitions in one go.

Booting from RAM:

- Halt boot by pressing Escape on console
- Type "ATGU" at the "ZLB>" prompt to enter the U-Boot menu
- Press "4" to select "4: Entr boot command line interface."
- Set up a tftp server to serve the OpenWrt initramfs-recovery.bin
  image at 10.10.10.3
- Load it using "tftpboot 0x88000000 initramfs-recovery.bin"
- Boot with "bootm  0x8800017C" to skip the 380 (0x17C) bytes ZyXEL
  header

This method can also be used to RAM boot OEM firmware. The warning
regarding OEM applies!  Never boot an unknown OEM firmware, or any OEM
firmware with a SIM in any slot.

NOTE: U-Boot configuration is incomplete (on some devices?). You may
  have to configure a working mac address before running tftp using
   "setenv eth0addr <mac>"

Unlocking the bootloader:

If you are unebale to halt boot, then the bootloader is locked.

The OEM firmware locks the bootloader on every boot by setting
DebugFlag to 0.  Setting it to 1 is therefore only temporary
when OEM firmware is installed.

- Run "nvram setro uboot DebugFlag 0x1; nvram commit" in OEM firmware
- Run "fw_setenv DebugFlag 0x1" in OpenWrt

  NOTE:
    OpenWrt does this automatically on first boot if necessary

  NOTE2:
    Setting the flag to 0x1 avoids the reset to 0 in known OEM
    versions, but this might change.

  WARNING:
    Writing anything to flash while the bootloader is locked is
    considered extremely risky. Errors might cause a permanent
    brick!

Enabling management access from LAN:

Temporary workaround to allow installing OpenWrt if OEM firmware
has disabled LAN management:

- Connect to console
- Log in as "root"
- Run "iptables -I INPUT -i br0 -j ACCEPT"

Notes on the OEM/bootloader dual partition scheme

The dual partition scheme on this device uses Image2 as a recovery
image only. The device will always boot from Image1, but the
bootloader might copy Image2 to Image1 under specific conditions. This
scheme prevents repurposing of the space occupied by Image2 in any
useful way.

Validation of primary and recovery images is controlled by the
variables CheckBypass, Image1Stable, and Image1Try.

The bootloader sets CheckBypass to 0 and reboots if Image1 fails
validation.

If CheckBypass is 0 and Image1 is invalid then Image2 is copied to
Image1.

If CheckBypass is 0 and Image2 is invalid, then Image1 is copied to
Image2.

If CheckBypass is 1 then all tests are skipped and Image1 is booted
unconditionally.  CheckBypass is set to 1 after each successful
validation of Image1.

Image1Try is incremented if Image1Stable is 0, and Image2 is copied to
Image1 if Image1Try is 3 or larger.  But the bootloader only tests
Image1Try if CheckBypass is 0, which is impossible unless the booted
image sets it to 0 before failing.

The system is therefore not resilient against runtime errors like
failure to mount the rootfs, unless the kernel image sets CheckBypass
to 0 before failing. This is not yet implemented in OpenWrt.

Setting Image1Stable to 1 prevents the bootloader from updating
Image1Try on every boot, saving unnecessary writes to the environment
partition.

Keeping an OpenWrt initramfs recovery as Image2 is recommended
primarily to avoid unwanted OEM firmware boots on failure. Ref the
warning above. It enables console-less recovery in case of some
failures to boot from Image1.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-05-09 09:15:44 +02:00
Daniel Golle
cc201759b6
uboot-mediaktek: add support for PSTORE and check it on boot
Add support for pstore/ramoops now that DRAM content is preserved
over reboot on MT7622. On each boot, check pstore and boot to recovery
image in case there are records stored in it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-05-08 23:35:38 +01:00
Daniel Golle
c91c0c1f85
arm-trusted-firmware-mediatek: update to git HEAD
Most notably this enabled use of pstore/ramoops on MT7622 as DRAM
content is now preserved over reboot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-05-08 23:27:38 +01:00
Daniel Golle
f990bddf6f
uboot-envtools: change size for unifi-6-lr
The previous commit increased the U-Boot environment size of the
UniFi 6 LR to 0x4000. Also change it uboot-envtools accordingly.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-05-07 22:50:22 +01:00
Daniel Golle
af3a1adee0
uboot-mediatek: unifi-6-lr: fix erase of production parition
mtd erase needs to be aligned with erase blocks. Use padded image size
for erasing the production volume.
As the environment grew above the current size of 0x1000 bytes by
introducing the new padding function, increase the env size to 0x4000.
While at it, clean up reset button function to work to more reliable on
that board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-05-07 22:50:15 +01:00
Daniel Golle
fbcfa895a8
uboot-mediatek: bpi-r64: add TFTP update options to eMMC bootmenu
Just like on SPI-NAND, also allow updating the bootloader comfortably
on eMMC installations.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-05-01 22:55:22 +01:00
Mauri Sandberg
addf47a9a8 uboot-envtools: add support for Buffalo WZR-HP-G300NH
This adds an entries for wzr-hp-g300nh-rb and wzr-hp-g300nh-s.

Signed-off-by: Mauri Sandberg <sandberg@mailfence.com>
2021-04-30 23:51:23 +02:00
Chen Minqiang
43dad22025
uboot-mediatek: unifi6lr: mtd erase before write to flash
Erase firmware ereas before writing to recovery or production partition
when updating them via the bootloader menu.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-28 20:54:43 +01:00
Daniel Golle
ebed523ee8
arm-trusted-firmware-mediatek: fix boot hang on unifi-6-lr
The Ubiquiti Networks UniFi 6 LR access point comes with a total of
512 MB RAM provided by 2x 8-bit DDR3 SDRAM. This combination lead to
problems with the DDR calibration on boot resulting in occasional hang
on boot. Use updated calibration binary provided by MediaTek to make
boot on that device more reliable.
The binary has also been tested on the BananaPi BPi-R64 board and that
also works just fine with the new binary.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-28 20:51:53 +01:00
David Bauer
b832ebb886 uboot-rockchip: update to v2021.04
Update the uboot-rockchip to the latest upstream release.
Remove upstreamed patches.

Tested-on: FriendlyElec NanoPi R2S

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-20 13:15:45 +02:00
Daniel González Cabanelas
4f8da19572 uboot-envtools: mvebu: add Buffalo LS421DE
The Buffalo Linkstation LS421DE NAS lacks an uboot env config file.

Create it via scripts.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2021-04-17 22:44:09 +01:00
Zoltan HERPAI
d6cf997bd7 uboot-sunxi: update ATF dependencies for 3 boards
Fix 3 board definitions that were missed in the process of moving
to the a64/h6 ATF blobs.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2021-04-15 00:24:50 +02:00
Zoltan HERPAI
9aa66b8ce7 sunxi: add support for Banana Pi M2 Berry
CPU: Allwinner V40 quad-core Cortex A7 @ 1.2GHz
Memory: 1GB DDR3
Storage: SDcard, native SATA
Network: 10/100/1000M ethernet, Ampak AP6212 wifi + BT
USB: 4x USB 2.0

Installation:
Use the standard sunxi installation to an SD-card.

While the board is very similar to the M2 Ultra board
(the V40 is the automotive version of the R40), as both
the u-boot and kernel supports them separately, and some
pins are different, let's add a separate device spec.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2021-04-12 14:02:02 +02:00
Daniel Golle
d0adc4865c
uboot-mediatek: minor fixes for bpi-r64 spi-nand default env
* check image checksums before writing to flash
 * only bootmenu_0...9 are working, remove bootmenu_a entry

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-11 22:48:36 +01:00
Zoltan HERPAI
3225241c2b sunxi: add support for H6 boards and OrangePiOnePlus
Specifications:

SoC	Allwinner H6 @ 1.8 Ghz
DRAM	1Gb LPDDR3
Power	DC 5V @ 3A
Video	HDMI (Type 2.0A - full)
Audio	HDMI, on-board microphone
Network	10/100/1000Mbps Ethernet (Realtek RTL8211)
Storage	microSD
USB	1 USB2.0 Host, 1 USB2.0 OTG
Debug	Serial UART

Flashing instructions:
 Standard sunxi SD card installation procedure - copy image to SD card,
 insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2021-04-11 23:14:55 +02:00
Zoltan HERPAI
c2163530db arm-trusted-firmware-sunxi: move to use the common tf-a build code and bump to latest version
Create a -a64 package for now. Moving to the latest ATF was tested on a
SoPine A64 board.

U-Boot SPL 2020.04 (Feb 19 2021 - 11:28:19 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.4(release):reboot-15854-g42b39a13d2
NOTICE:  BL31: Built : 22:45:53, Feb 22 2021
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x4090a28, model: SoPine with baseboard
NOTICE:  PSCI: System suspend is unavailable

U-Boot 2020.04 (Feb 19 2021 - 11:28:19 +0000) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: SoPine with baseboard
DRAM:  2 GiB

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2021-04-11 23:14:54 +02:00
Zoltan HERPAI
c75d441f20 uboot-sunxi: add ATF variable for specifying which flavour to use
In preparation for H6 support (which requires a separate ATF blob), add
an envvar to the A64 boards specifying which ATF blob to use.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2021-04-11 23:14:52 +02:00
Daniel Golle
dcdafbfc1a
uboot-envtools: support environment in spi-nand on bpi-r64
Default to U-Boot env in UBI if root device is not mmc block device.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2021-04-11 20:19:49 +01:00
Daniel Golle
987562bad2
uboot-mediatek: add spi-nand build for bananapi bpi-r64
Some of bpi-r64 boards have serial NAND attached to SPI bus.
Build U-Boot for booting from SPI-NAND.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2021-04-11 20:19:34 +01:00
Oskari Lemmela
cd7a9909d5 mediatek: fix writing bananapi bpi-r64 env
Use generic functions to get env partition.

Fixes: 7043e4334f ("mediatek: mt7622: improve sysupgrade on MMC")
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2021-04-11 14:55:35 +01:00
Oskari Lemmela
d05051774e mediatek: bpi-r64: use separate partition for emmc bootloader
eMMC booloader is stored to separate partition.
FIP size is increased to 2MB.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2021-04-11 14:55:35 +01:00
Piotr Dymacz
012a9aa00b uboot-envtools: oxnas: drop redundant space after case keywords
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-04-10 15:18:48 +02:00
Piotr Dymacz
7cde7d2131 uboot-envtools: layerscape: drop redundant space after case keywords
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-04-10 15:18:41 +02:00
Piotr Dymacz
6ab80b04fa uboot-envtools: ipq806x: drop redundant space after case keywords
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-04-10 15:18:32 +02:00
Piotr Dymacz
156a27eddf uboot-envtools: ipq40xx: drop redundant space after case keywords
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-04-10 15:18:27 +02:00
Piotr Dymacz
8c11597783 uboot-envtools: imx6: drop redundant space after case keywords
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-04-10 15:18:21 +02:00
Piotr Dymacz
914563e286 uboot-envtools: drop shebang from uci-defaults and lib files
These files are sourced and non-executable, a shebang is redundant.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-04-10 15:18:14 +02:00
Piotr Dymacz
8c3383799a uboot-imx6: define 'BUILD_DEVICES' for Toradex Apalis
Without 'BUILD_DEVICES' defined, the U-Boot related package won't be
automatically selected when building for Toradex Apalis device.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-04-10 15:18:09 +02:00
Piotr Dymacz
15e801041a uboot-imx6: align indent size in Makefile
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-04-10 15:18:04 +02:00
Piotr Dymacz
e94d1db91e uboot-imx6: drop support for Nitrogen6x/SABRE devices
These devices never got officially supported in the tree thus it doesn't
make much sense to waste our infrastructure resources and keep building
dedicated U-Boot images for them.

CC: Petr Štetiar <ynezz@true.cz>
CC: Luka Perkov <luka.perkov@sartura.hr>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Acked-by: Petr Štetiar <ynezz@true.cz>
2021-04-10 15:17:59 +02:00
Daniel Golle
be41fd9489
uboot-envtools: add env settings for ubnt,unifi-6-lr-ubootmod
Add settings for fw_printenv/fw_setenv for the Ubiquiti UniFi 6 LR
when running OpenWrt's version of U-Boot. The settings should work
equally with the unmodified version, but that has not yet been
tested.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-09 16:04:51 +01:00
Daniel Golle
e9ad412049
uboot-mediatek: add build for Ubiquiti Networks UniFi 6 LR
Add U-Boot build for the Ubiquiti Networks UniFi 6 LR access point.
This allows updating the bootchain to modern ARM Trusted Firmware 2.4
and U-Boot 2021.04 while keeping as much of the existing flash layout
as possible (u-boot-env, factory and eeprom partitions are retained),
gaining robust recovery vs. production dual-boot mechanism.
Add info for the Winbond W25Q512JV SPI NOR flash used in the device
and wait for GPIOs to settle after reset before checking for reset
button.
I2C connected LED controller is not supported yet.
Writing large amounts of data to SPI flash currently doesn't work due
to watchdog timeout causing reset before data write completes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-09 16:04:46 +01:00
Daniel Golle
d37aaf3ee2
arm-trusted-firmware-mediatek: increase NOR bl3 size
Use bl3 size of 0xa0000 instead of 0x80000 in NOR flash.
This results in bl3 ending at 0xc0000 which is where the legacy
bootchain typically puts U-Boot environment.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-09 16:04:40 +01:00
Daniel Golle
0268f76bbb
uboot-mediatek: bpi-r64: erase eMMC environment on installation
Erase U-Boot environment partition on eMMC on installation to make sure
chages are applied.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-09 16:04:20 +01:00
Bjørn Mork
b7154fabf0 uboot-envtools: add wrapper scripts for alternate config
Now that we can create an alternate configuration file, add two
wrapper scripts for simple access to it using the alternate
alternate application names `fw_printsys' and `fw_setsys'.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-04-08 09:20:59 +02:00
Bjørn Mork
a3e9fd7e5b uboot-envtools: add support for multiple config partitions
Most (all?) of the realtek devices have two u-boot config partitions
with a different set of variables in each. The U-Boot shell provides
two sets of apps to manipulate these:

 printenv- print environment variables
 printsys- printsys - print system information variables
 saveenv - save environment variables to persistent storage
 savesys - savesys - save system information variables to persistent storage
 setenv  - set environment variables
 setsys  - setsys  - set system information variables

Add support for multiple ubootenv configuration types, allowing
more than one configuration file.

Section names are not suitable for naming the different
configurations since each file can be the result of multiple sections
in case of backup partitions.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-04-08 09:20:59 +02:00
Daniel Golle
5e7d6d5ba4
uboot-mediatek: update to v2021.04
Remove patches merged upstream and refresh the remaining ones.
Runtime tested on
 * Bananapi BPi-R64 (eMMC and SD Card)
 * Linksys E8450 (SPI-NAND)
 * Ubiquiti UniFi 6 LR (SPI-NOR)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-05 18:57:51 +01:00
Daniel Golle
1db4681617 uboot-mediatek: bpi-r64: no longer force recovery on first-boot
Now that sdcard.gz image contains everything needed to boot straight
into production image, no longer force booting into recovery image on
first boot by removing the logic which implemented that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-04 10:51:25 +01:00
Daniel Golle
5ea7fabdb3
uboot-mediatek: adapt root= cmdline arg for bpi-r64
Adapt to FIT partition parser changes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-31 22:54:17 +01:00
Rosen Penev
85fa8ad8af kexec-tools: update to 2.0.21
kdump was removed in 7acd257ae67b4ca94f8c23cb8bda0ee0709b9216

gdb can be used as an alternative.

Remove autoreconf. It's not needed as the configure files are already
generated.

Remove upstreamed patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-03-19 01:25:26 +01:00
Daniel Golle
81edc842f6
uboot-mediatek: don't rely in 'lzma' cmdline
Use 'xz --format=lzma' instead.
Fixes build for mt7629.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-18 04:19:48 +00:00
Hauke Mehrtens
0e3f6fbe10 mediatek: Fix writing U-Boot env on Buffalo WSR-2533DHP2
This fixes writing to the U-Boot environment by making the partition
writable and setting the correct flash sector size of 128K.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-03-17 22:39:59 +00:00
Daniel Golle
a29f71c380 uboot-mediatek: fix default environment of bpi-r64 emmc
The emmc variant used the default environment of the sdmmc variant.
Fix that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-17 22:36:58 +00:00
Daniel Golle
41af8735d4 uboot-mediatek: bpi-r64: make use of FIT configuration selection
Allow selecting either SATA or PCIE functionality using uImage.FIT
configurations and device-tree overlays.
By default, PCIE1 is selected (as it has been before this change).
To select SATA instead, you can do this now:

fw_setenv bootconf config-mt7622-bananapi-bpi-r64-sata

and reboot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-17 19:55:38 +00:00
INAGAKI Hiroshi
74f15628dd mediatek: add support for Buffalo WSR-2533DHP2
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: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-03-15 17:02:17 +01:00
Daniel Golle
8dae189c7e
uboot-mediatek: also install production image to eMMC
Make installation to eMMC more convenient on the BPi-R64 by also
copying the production image (if valid) from SD Card to eMMC.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-14 22:15:47 +00:00
Daniel Golle
578c73fea3
uboot-mediatek: select matching U-Boot for board
Instead of building all U-Boot variants by default, build only those
needed by the selected board(s).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-14 22:00:05 +00:00
Hauke Mehrtens
e6ba970b6e realtek: Add ZyXEL GS1900-8
The ZyXEL GS1900-8 is a 8 port switch without any PoE functionality or
SFP ports, but otherwise similar to the other GS1900 switches.

Specifications
--------------
* Device:    ZyXEL GS1900-8 v1.2
* SoC:       Realtek RTL8380M 500 MHz MIPS 4KEc
* Flash:     Macronix MX25L12835F 16 MiB
* RAM:       Nanya NT5TU128M8GE-AC 128 MiB DDR2 SDRAM
* Ethernet:  8x 10/100/1000 Mbit
* LEDs:      1 PWR LED (green, not configurable)
             1 SYS LED (green, configurable)
             8 ethernet port status LEDs (green, SoC controlled)
* Buttons:   1 on-off glide switch at the back (not configurable)
             1 reset button at the right side, behind the air-vent
               (not configurable)
             1 reset button on front panel (configurable)
* Power      12V 1A barrel connector
* UART:      1 serial header (JP2) with populated standard pin connector on
             the left side of the PCB, towards the back. Pins are labelled:
             + VCC (3.3V)
             + TX (really RX)
             + RX (really TX)
             + GND
             the labelling is done from the usb2serial connector's point of
             view, so RX/ TX are mixed up.

Serial connection parameters for both devices: 115200 8N1.

Installation
------------
Instructions are identical to those for the GS1900-10HP and GS1900-8HP.

* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).
* Set up a TFTP server on your client and make it serve the initramfs
  image.
* Connect serial, power up the switch, interrupt U-boot by hitting the
  space bar, and enable the network:
  > rtk network on
* Since the GS1900-10HP is a dual-partition device, you want to keep the
  OEM firmware on the backup partition for the time being. OpenWrt can
  only boot off the first partition anyway (hardcoded in the DTS). To
  make sure we are manipulating the first partition, issue the following
  commands:
  > setsys bootpartition 0
  > savesys
* Download the image onto the device and boot from it:
  > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-generic-zyxel_gs1900-8-initramfs-kernel.bin
  > bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
  > sysupgrade /tmp/openwrt-realtek-generic-zyxel_gs1900-8-squashfs-sysupgrade.bin

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-03-14 15:07:30 +01:00
Daniel Golle
79b6a4bd3c
uboot-mediatek: import fix for AHCI and enable SATA
Import patch form Frank Wunderlich <frank-w@public-files.de> to fix
build of MediaTek AHCI SATA driver.
Enable that driver on Bananapi BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-13 20:16:03 +00:00
Daniel Golle
997ff740dc
uboot-mediatek: fix build on Mac OS X
Copy patch added to uboot-sunxi by commit 3cc57ba462
("uboot-sunxi: add missing type __u64") also to uboot-mediatek.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-13 13:41:04 +00:00