Commit Graph

983 Commits

Author SHA1 Message Date
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
Daniel Golle
0183ee2eb9
uboot-mediatek: update configs for MT7622 devies
* make sure USB 2.0 works (useful for UEFI-booting eg. memtest86)
 * include more useful U-Boot config options on BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-12 00:18:58 +00:00
Daniel Golle
9dfc2b3ca4
uboot-mediatek: update to 2021.04-rc3 with MediaTek's patches
MediaTek published their current U-Boot patchset on github:
https://github.com/mtk-openwrt/u-boot/commits/mtksoc

Import the platform patches from there (`00-mtk-*.patch`), arrange,
them nicely, drop no longer needed local patches and rebase on top of
U-Boot 2021.04-rc3.

Tested and works well on Linksys E8450 (snand-1ddr) as well as
Bananapi BPi-R64 (sdmmc-2ddr, emmc-2ddr).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-11 16:24:53 +00:00
Daniel Golle
e2cffbb805
arm-trusted-firmware-mediatek: update to 2021-03-10
Most prominently this adds changes which allow replacing the binary-
only 'bromimage' tool by U-Boot's 'mkimage' (see previous commit).
This fixes build on non-Linux and/or non-x86 platforms.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-11 16:24:48 +00:00
Daniel Golle
ce19e8fa43
tools: mkimage: add patches for 64-bit MediaTek BootROM
Add patches for mkimage to allow using it instead of the binary-only
'bromimage' tool to generate bl2 for MT7622.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-11 16:24:20 +00:00
Daniel Golle
bff84f3e8e arm-trusted-firmware-mediatek: fix typo SPI-SNAND -> SPI-NAND
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-08 21:27:35 +00:00