openwrt/openwrt.git
3 years agoath79: wlr-7100: remove device variant indicator
Tomasz Maciej Nowak [Tue, 1 Dec 2020 17:29:57 +0000 (18:29 +0100)]
ath79: wlr-7100: remove device variant indicator

As reported by user, the same image works on both device variants which
are v1 001 and v1 002.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agotegra: sysupgrade: write additional information to log output
Tomasz Maciej Nowak [Tue, 1 Dec 2020 17:29:15 +0000 (18:29 +0100)]
tegra: sysupgrade: write additional information to log output

This will explain what is actually occuring on dd invocations.
Additionally remove comments for steps which are described by printed
statements anyway.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agotegra: sysupgrade: use v function for writing logs
Tomasz Maciej Nowak [Tue, 1 Dec 2020 17:29:13 +0000 (18:29 +0100)]
tegra: sysupgrade: use v function for writing logs

Sync with x86 target changes.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agomvebu: sysupgrade: write additional information to log output
Tomasz Maciej Nowak [Tue, 1 Dec 2020 17:29:17 +0000 (18:29 +0100)]
mvebu: sysupgrade: write additional information to log output

This will explain what is actually occuring on dd invocations.
Additionally remove comments for steps which are described by printed
statements anyway.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agomvebu: sysupgrade: use v function for writing logs
Tomasz Maciej Nowak [Tue, 1 Dec 2020 17:29:16 +0000 (18:29 +0100)]
mvebu: sysupgrade: use v function for writing logs

Sync with x86 target changes.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agoprocd: update to git HEAD
Daniel Golle [Mon, 30 Nov 2020 00:49:36 +0000 (00:49 +0000)]
procd: update to git HEAD

 f3c3563 jail: improve seccomp BPF generator
 f67a66f jail: always call cgroups_free()
 4625350 jail: seccomp: improve code readability

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agobusybox: add check for capabilities file
Daniel Golle [Fri, 27 Nov 2020 23:45:54 +0000 (23:45 +0000)]
busybox: add check for capabilities file

Similar to the previous commit adding a check to the init script of
umdns, do a similar change for sysntpd, just to be on the safe side.

Inspired-by: 520403cd49 ("umdns: add check for seccomp list")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoumdns: add check for seccomp list
Jan Pavlinec [Fri, 27 Nov 2020 13:49:43 +0000 (14:49 +0100)]
umdns: add check for seccomp list

This should fix an issue when user have a router with enabled seccomp
and tries to run umdns package which was build with SDK with disabled
seccomp support.

Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
3 years agogeneric: ipeth: fix iOS 14 tethering
David Bauer [Sun, 29 Nov 2020 18:14:05 +0000 (19:14 +0100)]
generic: ipeth: fix iOS 14 tethering

This fixes tethering with devices using iOS 14. Prior to this patch,
connections to remote endpoints were not possible while data transfers
between the OpenWrt device and the iOS endpoints worked fine.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agohostapd: Add cell_density data rates option
Nick Lowe [Wed, 28 Oct 2020 11:04:32 +0000 (11:04 +0000)]
hostapd: Add cell_density data rates option

Add a cell_density option to configure data rates for normal, high and
very high cell density wireless deployments.

The purpose of using a minimum basic/mandatory data rate that is higher
than 6 Mb/s, or 5.5 Mb/s (802.11b compatible), in high cell density
environments is to transmit broadcast/multicast data frames using less
airtime or to reduce management overheads where significant co-channel
interference (CCI) exists and cannot be avoided.

Caution: Without careful design and validation, configuration of a too
high minimum basic/mandatory data rate can sacrifice connection stability
or disrupt the ability to reliably connect and authenticate for little to
no capacity benefit. This is because this configuration affects the
ability of clients to hear and demodulate management, control and
broadcast/multicast data frames.

Deployments that have not been specifically designed and validated are
usually best suited to use 6, 12 and 24 Mb/s as basic/mandatory data
rates.

Only usually seek to configure a 12 Mb/s, or 11 Mb/s (802.11b
compatible), minimum basic/mandatory rate in high cell density
deployments that have been designed and validated for this.

For many deployments, the minimum basic/mandatory data rate should not be
configured above 12 Mb/s to 18 Mb/s, 24 Mb/s or higher. Such a
configuration is only appropriate for use in very high cell density
deployment scenarios.

A cell_density of Very High (3) should only be used where a deployment
has a valid use case and has been designed and validated specifically for
this use, nearly always with highly directional antennas - an example
would be stadium deployments. For example, with a 24 Mb/s OFDM minimum
basic/mandatory data rate, approximately a -73 dBm RSSI is required to
decode frames. Many clients will not have roamed elsewhere by the time
that they experience -73 dBm and, where they do, they frequently may not
hear and be able to demodulate beacon, control or broadcast/multicast
data frames causing connectivity issues.

There is a myth that disabling lower basic/mandatory data rates will
improve roaming and avoid sticky clients. For 802.11n, 802.11ac and
802.11ax clients this is not correct as clients will shift to and use
lower MCS rates and not to the 802.11b or 802.11g/802.11a rates that are
able to be used as basic/mandatory data rates.

There is a myth that disabling lower basic/mandatory data rates will
ensure that clients only use higher data rates and that better
performance is assured. For 802.11n, 802.11ac and 802.11ax clients this
is not correct as clients will shift around and use MCS rates and not the
802.11b or 802.11g/802.11a rates that able to be used as basic/mandatory
data rates.

Cell Density

0 - Disabled (Default)
Setting cell_density to 0 does not configure data rates. This is the
default.

1 - Normal Cell Density
Setting cell_density to 1 configures the basic/mandatory rates to 6, 12
and 24 Mb/s OFDM rates where legacy_rates is 0. Supported rates lower
than the minimum basic/mandatory rate are not offered.
Setting cell_density to 1 configures the basic/mandatory rates to the 5.5
and 11 Mb/s DSSS rates where legacy_rates is 1. Supported rates lower
than the minimum basic/mandatory rate are not offered.

2 - High Cell Density
Setting the cell_density to 2 configures the basic/mandatory rates to the
12 and 24 Mb/s OFDM rates where legacy_rates is 0. Supported rates lower
than the minimum basic/mandatory rate are not offered.
Setting the cell_density to 2 configures the basic/mandatory rates to the
11 Mb/s DSSS rate where legacy_rates is 1. Supported rates lower than the
minimum basic/mandatory rate are not offered.

3 - Very High Cell Density
Setting the cell_density to 3 configures the basic/mandatory rates to the
24 Mb/s OFDM rate where legacy_rates is 0. Supported rates lower than the
minimum basic/mandatory rate are not offered.
Setting the cell_density to 3 only has effect where legacy_rates is 0,
else this has the same effect as being configured with a cell_density of 2.

Where specified, the basic_rate and supported_rates options continue to
override both the cell_density and legacy_rates options.

Signed-off-by: Nick Lowe <nick.lowe@gmail.com>
3 years agobase-files: fix alias more to properly detect /usr/bin/more
Huangbin Zhan [Fri, 27 Nov 2020 11:02:47 +0000 (19:02 +0800)]
base-files: fix alias more to properly detect /usr/bin/more

Package more is installed to /usr/bin rather than /bin.

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
3 years agolantiq: fix build of squashfs images
Aleksander Jan Bajkowski [Sat, 28 Nov 2020 21:57:06 +0000 (22:57 +0100)]
lantiq: fix build of squashfs images

This patch fixes build of squashfs image on lantiq. Currently the FEATURE
variable is overwritten by the subtarget.

Fixes: FS#3480
Fixes: f1c652337628 ("lantiq: clean up target/subtarget features")
Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
[reformat Fixes:]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for ASUS RT-N56U B1
Pavel Chervontsev [Mon, 2 Nov 2020 11:50:01 +0000 (14:50 +0300)]
ramips: add support for ASUS RT-N56U B1

Specifications:

SoC: MediaTek MT7621ST (880 MHz)
FLASH: 16 MiB (Macronix MX25L12835FM2I-10G)
RAM: 128 MiB (Nanya NT5CB64M16FP-DH)
WiFi: MediaTek MT7603EN bgn 2x2:2
WiFi: MediaTek MT7612EN an 2x2:2
BTN: Reset, WPS
LED: - Power
- WiFi 2.4 GHz
- WiFi 5 GHz
- WAN
- LAN {1-4}
- USB {1-2}
UART: UART is present as pin hole next to the aluminium capacitor.
3V3 - RX - GND - TX / 115200-8N1
3V3 is the nearest on the aluminium capacitor and nut hole (pin1).
USB: 2 ports
POWER: 12VDC, 1.5A (Barrel 5.5x2.1)

Installation:

Via TFTP:
    Set your computers IP-Address to 192.168.1.75
    Power up the Router with the Reset button pressed.
    Release the Reset button after 5 seconds.
    Upload OpenWRT sysupgrade image via TFTP:
    tftp -4 -v -m binary 192.168.1.1 -c put IMAGE

MAC addresses:

0x4     *:98  2g/wan, label
0x22    *:9c
0x28    *:98
0x8004  *:9c  5g/lan

Though addresses are written to 0x22 and 0x28, it appears that the
vendor firmware actually only uses 0x4 and 0x8004. Thus, we do the
same here.

Signed-off-by: Pavel Chervontsev <cherpash@gmail.com>
[add MAC address overview, add label-mac-device, fix IMAGE_SIZE]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath10k-firmware: remove unused package
Álvaro Fernández Rojas [Wed, 25 Nov 2020 10:39:57 +0000 (11:39 +0100)]
ath10k-firmware: remove unused package

All firmwares were added to linux-firmware, so there's no need to keep this
package definitions.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoath10k-ct-firmware: switch to linux-firmware board binaries
Álvaro Fernández Rojas [Wed, 25 Nov 2020 10:37:01 +0000 (11:37 +0100)]
ath10k-ct-firmware: switch to linux-firmware board binaries

Instead of duplicating board firmware binaries, which are exactly the same
as the ones from linux-firmware, add dependencies and remove duplicated
downloads.

Runtime-tested on ath79 (TP-Link Archer C7 v2) and ipq806x (Netgear R7800).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agolinux-firmware: ath10k: add board firmware packages
Álvaro Fernández Rojas [Wed, 25 Nov 2020 10:33:55 +0000 (11:33 +0100)]
linux-firmware: ath10k: add board firmware packages

Split ath10k firmwares into board and firmware packages.
This way we can add dependencies to ath10k-ct firmware packages.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agocmake.mk,rules.mk: fix host builds using CMake and ccache
Petr Štetiar [Fri, 27 Nov 2020 21:50:32 +0000 (22:50 +0100)]
cmake.mk,rules.mk: fix host builds using CMake and ccache

Commit f98878e4c17d ("cmake.mk: set C/CXX compiler for host builds as
well") has introduced regression as it didn't taken usage of ccache into
the account so fix it by handling ccache use cases as well.

In order to get this working we need to export HOSTCXX_NOCACHE in
rules.mk as well.

Fixes: f98878e4c17d ("cmake.mk: set C/CXX compiler for host builds as well")
Reported-by: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agolibnetfilter-cthelper: remove
Rosen Penev [Sat, 28 Nov 2020 07:11:06 +0000 (23:11 -0800)]
libnetfilter-cthelper: remove

conntrack was moved to packages where this is used. This will be moved
there as well.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibnetfilter-cttimeout: remove
Rosen Penev [Sat, 28 Nov 2020 07:10:10 +0000 (23:10 -0800)]
libnetfilter-cttimeout: remove

conntrack was moved to packages where this is used. This will be moved
there as well.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibnetfilter-log: remove
Rosen Penev [Sat, 28 Nov 2020 07:10:00 +0000 (23:10 -0800)]
libnetfilter-log: remove

ulogd in the packages feed is the only user of this. It will be moved
there.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibnetfilter-queue: remove
Rosen Penev [Sat, 28 Nov 2020 06:27:48 +0000 (22:27 -0800)]
libnetfilter-queue: remove

Nothing in base uses this. This will be moved to packages where it is
used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoinclude/subdir: on build failure always print error
Karel Kočí [Fri, 13 Nov 2020 07:07:02 +0000 (08:07 +0100)]
include/subdir: on build failure always print error

It is impossible to locate package that failed the build just from log
once more build is run in parallel (that is more than one make job). The
only way is to scout log files for failed package going back trough log.

This change makes it so error is printed for package that failed every
time.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
3 years agobuild: mkhash on FreeBSD
Piotr Stefaniak [Fri, 7 Aug 2020 16:28:41 +0000 (18:28 +0200)]
build: mkhash on FreeBSD

Apply patch from
https://bugs.openwrt.org/index.php?do=details&task_id=971
in order to make it easier to build OpenWRT on FreeBSD.

Signed-off-by: Piotr Stefaniak <pstef@freebsd.org>
3 years agomvebu: fixup Turris Omnia U-Boot environment
Klaus Kudielka [Fri, 27 Dec 2019 13:26:37 +0000 (14:26 +0100)]
mvebu: fixup Turris Omnia U-Boot environment

Fixup dfa357a3de "mvebu: base-files: Update Turris Omnia U-Boot
environment" which should have included this file as well.

By rebasing the initial patch this file somehow disappeared.

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Tested-by: W. Michael Petullo <mike@flyn.org> (Turris Omnia "2020")
Tested-by: Klaus Kudielka <klaus.kudielka@gmail.com> (Turris Omnia)
[explain fixup in commit message]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agodownload.pl: properly cleanup intermediate .hash file
Petr Štetiar [Fri, 27 Nov 2020 20:56:30 +0000 (21:56 +0100)]
download.pl: properly cleanup intermediate .hash file

It seems like after a build the /dl dir seems to now contain a .hash
file for each source file due to inproper cleanup so fix it by removing
those intermediate files before leaving the download action.

Fixes: 4e19cbc55335 ("download: handle possibly invalid local tarballs")
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agotools: always create $STAGING_DIR/usr/{include,lib}
Andre Heider [Thu, 20 Aug 2020 06:06:37 +0000 (08:06 +0200)]
tools: always create $STAGING_DIR/usr/{include,lib}

rules.mk always passes these as -I/-L to the toolchain.

Fixes rare errors like:
cc1: error: staging_dir/target-aarch64_cortex-a53_musl/usr/include: No such file or directory [-Werror=missing-include-dirs]

Signed-off-by: Andre Heider <a.heider@gmail.com>
Acked-by: Paul Spooren <mail@aparcar.org>
Acked-by: Rosen Penev <rosenp@gmail.com>
3 years agorules.mk: remove redundant target flags
Petr Štetiar [Fri, 27 Nov 2020 08:56:16 +0000 (09:56 +0100)]
rules.mk: remove redundant target flags

We're patching the GCC specs [1], [2] to implicitly add
$STAGING_DIR/usr/lib to the linker and $STAGING_DIR/usr/include to the
CPP flags. There is no need to globally pass these as -I and -L flags
respectively.

1. https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=toolchain/gcc/final/Makefile#l86
2. https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=scripts/patch-specs.sh#l37

Ref: https://patchwork.ozlabs.org/project/openwrt/patch/20200820060637.533293-1-a.heider@gmail.com/#2511505
Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agokernel: sfc,sfc-falcon: fix kernel config symbols
Petr Štetiar [Thu, 26 Nov 2020 09:23:35 +0000 (10:23 +0100)]
kernel: sfc,sfc-falcon: fix kernel config symbols

I've just noticed on i.mx6 target, that there are missing kernel symbols
so I'm fixing it.

Fixes: 3c5d70ad26ed ("kernel: add module support Solarflare network adapter")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agocmake.mk: set C/CXX compiler for host builds as well
Rosen Penev [Thu, 26 Nov 2020 00:08:57 +0000 (16:08 -0800)]
cmake.mk: set C/CXX compiler for host builds as well

Without this, cmake will use whatever CC/CXX is set to, which could be
clang. In that case, at least libjson-c/host will fail to compile.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agotoolchain: kernel-headers: kernel Git tree mirror hash
Petr Štetiar [Sat, 21 Nov 2020 14:59:50 +0000 (15:59 +0100)]
toolchain: kernel-headers: kernel Git tree mirror hash

Allow setting of mirror hash for Git kernel tree.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agotoolchain: kernel-headers: fix check target for kernel Git tree
Petr Štetiar [Sat, 21 Nov 2020 15:05:08 +0000 (16:05 +0100)]
toolchain: kernel-headers: fix check target for kernel Git tree

Currently the check target fails if the kernel Git tree is used:

 $ make toolchain/kernel-headers/{download,check}

  make[2]: Entering directory 'toolchain/kernel-headers'
  Makefile:105: *** ERROR: Unknown pack format for file openwrt/tmp/dl/.  Stop.
  make[2]: Leaving directory 'toolchain/kernel-headers'
  toolchain/Makefile:100: recipe for target 'toolchain/kernel-headers/check' failed

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agodownload: handle possibly invalid local tarballs
Petr Štetiar [Thu, 19 Nov 2020 15:32:46 +0000 (16:32 +0100)]
download: handle possibly invalid local tarballs

Currently it's assumed, that already downloaded tarballs are always
fine, so no checksum checking is performed and the tarball is used even
if it might be corrupted.

From now on, we're going to always check the downloaded tarballs before
considering them valid.

Steps to reproduce:

 1. Remove cached tarball

   rm dl/libubox-2020-08-06-9e52171d.tar.xz

 2. Download valid tarball again

   make package/libubox/download

 3. Invalidate the tarball

   sed -i 's/PKG_MIRROR_HASH:=../PKG_MIRROR_HASH:=ff/' package/libs/libubox/Makefile

 4. Now compile with corrupt tarball source

   make package/libubox/{clean,compile}

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agolibroxml: remove
Rosen Penev [Fri, 27 Nov 2020 07:54:49 +0000 (23:54 -0800)]
libroxml: remove

This will be moved to the packages feed as nothing here uses it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agobase-files: merge /etc/passwd on rw-rootfs
Imran Khan [Fri, 27 Nov 2020 06:19:02 +0000 (06:19 +0000)]
base-files: merge /etc/passwd on rw-rootfs

Support installations without root-overlayfs (and hence without /rom)
when migrating user accounts.

Signed-off-by: Imran Khan <gururug@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[simplified patch, bumped PKG_RELEASE, cleaned message]

3 years agomvebu: base-files: Update Turris Omnia U-Boot environment
Klaus Kudielka [Fri, 27 Dec 2019 13:26:37 +0000 (14:26 +0100)]
mvebu: base-files: Update Turris Omnia U-Boot environment

Move the update procedure from sysupgrade to first boot, which is much
more convenient in the sysupgrade case (otherwise the environment is
always one generation behind).

Check whether we have an old U-Boot release installed, and update the
environment only if necessary.

Some notes on the U-Boot environment:

The first 9 lines are a copy of the default environment of the old U-Boot
release - only modified, to run "distro_bootcmd", in case "mmcboot" fails
to boot the factory OS.

The remaining 16 lines are a backport of the default environment of the
new U-Boot release (shipped with CZ11NIC23). The main entry point is
"distro_bootcmd", which eventually sources boot.scr. This way, we have
a unified boot protocol for all Turris Omnia revisions so far.

This commit also fixes a shortcoming of previous Turris Omnia support:

Users may install OpenWrt with the Turris Omnia in factory state
(i.e. invalid environment store). In that case, neither fw_setenv, nor
U-Boot itself, would import the default environment from the image -
screwing up the rescue system, at least!

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Tested-by: W. Michael Petullo <mike@flyn.org> (Turris Omnia "2020")
Tested-by: Klaus Kudielka <klaus.kudielka@gmail.com> (Turris Omnia)
3 years agomvebu: Add turris-omnia.bootscript
Klaus Kudielka [Mon, 23 Dec 2019 07:34:49 +0000 (08:34 +0100)]
mvebu: Add turris-omnia.bootscript

In contrast to the U-Boot version shipped with older versions of Turris
Omnia (CZ11NIC13, CZ11NIC20), the version shipped with Turris Omnia 2019
(CZ11NIC23) relies on the existence of /boot.scr.

Consequently, add a suitable boot script to the sysupgrade image.

Flash instructions for Turris Omnia 2019:
- Download openwrt-...-sysupgrade.img.gz, gunzip it, and copy the resulting
  .img file to the root of a USB flash drive (FAT32 or ext2/3/4).
- Enter a rescue shell: Either via 5-LED reset and ssh root@192.168.1.1
  on LAN port 4, or via 7-LED reset and the serial console.
- Insert the USB drive and mount it:
  mkdir /mnt; mount /dev/sda1 /mnt
- Flash the OpenWrt image to eMMC:
  dd if=/mnt/openwrt-...-sysupgrade.img of=/dev/mmcblk0 bs=4096 conv=fsync
- Reboot.

Flash instructions using a temporary "medkit" installation were written for
the older versions of Turris Omnia, and will *not* work on the Turris Omnia
2019.

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Tested-by: W. Michael Petullo <mike@flyn.org> (Turris Omnia "2020")
3 years agoscripts/feeds: silence git warning by selecting pull style
Hannu Nyman [Sat, 14 Nov 2020 09:33:00 +0000 (11:33 +0200)]
scripts/feeds: silence git warning by selecting pull style

Silence the warning in git 2.27 about undefined fast-forward style
in git pull. Define "ff-only" as the style.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agobuild: use mkhash for IPK metadata checksums
Paul Spooren [Thu, 16 Jul 2020 20:34:11 +0000 (10:34 -1000)]
build: use mkhash for IPK metadata checksums

When setting the option IPK_FILES_CHECKSUMS the build system stores
checksums of all package file as metadata. In combination with pkg_check
this allows to see if a package is broken, e.g. caused by bad flash.

To create those checksums the tool `sha256sum` were used while the rest
of OpenWrt uses `mkhash`, a small & fast implementation of sha256. As
the build system does not check the existence of `sha256sum` and the
stderr output is moved to /dev/null, a situation where the option is
enabled but no actual checksum are created may occur.

Instead of adding `sha256sum` as a requirement, this replaces it with
`mkhash sha256` and adapts the `sed` pipe command to fit spacing.

CC: Xu Wang <xwang1498@gmx.com>
CC: Michal Hrusecky <Michal@Hrusecky.net>
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoumdns: update seccomp filter rules
Daniel Golle [Thu, 26 Nov 2020 20:49:16 +0000 (20:49 +0000)]
umdns: update seccomp filter rules

Add 'writev' syscall to list of allowed syscalls.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoprocd: update to git HEAD
Daniel Golle [Fri, 27 Nov 2020 01:14:31 +0000 (01:14 +0000)]
procd: update to git HEAD

 3019f50 jail: leak less memory
 7e01453 jail: fix segfault on missing name and refactor
 5abee8f jail: fix and simplify userns uid/gid maps from OCI
 4ba72ec jail: relax /etc/resolv.conf creation
 db5ef86 jail: don't use NULL arguments for mount syscall
 19ac9df jail: don't fail if can't mount-bind /etc/resolv.conf
 acf36f2 jail: seteuid before clone(CLONE_NEWUSER)
 e40828f jail: fix typo in usage output
 b87984b jail: don't attempt to mount /sys with noatime
 b275b11 jail: enter existing cgroups namespace if given
 31e0a46 jail: properly initialize timens_fd

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoinitramfs: switch to tmpfs to fix ujail
Daniel Golle [Fri, 27 Nov 2020 00:00:31 +0000 (01:00 +0100)]
initramfs: switch to tmpfs to fix ujail

Hauke wrote:
> We want to run some processes in the procd-ujail, this works when we
> use a SquashFS image and an overlay file system, but when we use an
> initramfs it does not work.
> [...]
> When we switch from initramfs to tmpfs, it is working, we added this
> code to target/linux/generic/other-files/init to make [it] work.

Move files to newly mounted tmpfs and then use switch_root to chroot
into new rootfs and free initramfs.

Suggested-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agolibiconv-full: Makefile polishing
Rosen Penev [Thu, 26 Nov 2020 00:45:56 +0000 (16:45 -0800)]
libiconv-full: Makefile polishing

Added PKG_INSTALL to avoid using an explicit define Build/Compile

Added PKG_BUILD_PARALLEL for faster compilation.

Removed TARGET_CLAFGS. They are no longer necessary.
fPIC is default now. So is gnu99. -DUSE_DOS is a hack to include old
and mostly unused conversions.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibiconv-full: update to version 1.16
Josef Schlehofer [Mon, 20 Jul 2020 13:47:31 +0000 (15:47 +0200)]
libiconv-full: update to version 1.16

- Removed following patches:
100-strip_charsets.patch - makes the full variant slim.
101-autotools.patch - this one fails to apply because it was backported
from newer versions for 1.11.1.
103-configure_ac_fix.patch - backported from newer versions
200-work-with-libtool2.patch - is not needed anymore, it is done
differently in upstream
300-fortify-source-compat.patch - these files are not there anymore

- TVHeadend requires working iconv library e.g. transliteration to ASCII
and this does not work with libiconv-full currently.

There is a simple test, which requires to install iconv package.

Before applying this update:
root@turris:/# echo ŽluťoučkýKůň | iconv -t ASCII//TRANSLIT//IGNORE
luoukK

After applying this update:
root@turris:~# echo ŽluťoučkýKůň | iconv -t ASCII//TRANSLIT//IGNORE
Zlutouck'yKun

- Makefile changes:
Use HTTPS for their website
Fixed deprecated SPDX License Identifier
Move PKG_MAINTAINER above PKG_LICENSE

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Tested-by: Rosen Penev <rosenp@gmail.com> [malta]
3 years agotools/sstrip: update to latest version
Rui Salvaterra [Wed, 25 Nov 2020 21:28:17 +0000 (21:28 +0000)]
tools/sstrip: update to latest version

Drop our local sstrip copy and use the current ELFKickers upstream
version.

Patch the original makefile in order to avoid building elftoc, since it
fails with musl's elf.h. This is fine, since we only need sstrip anyway.

Finally, add the possibility to pass additional arguments to sstrip and
pass -z (remove trailing zeros) by default, which matches the behaviour
of the previous version.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
[shorten long commit msg lines]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agonettle: fix build on macos xcode 12
Kevin Darbyshire-Bryant [Mon, 16 Nov 2020 08:52:49 +0000 (08:52 +0000)]
nettle: fix build on macos xcode 12

compiler warns that exit() isn't defined so checks for build system
compiler fail.

include <stdlib.h> to define exit()

Tested under macos Catalina & Big Sur

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
3 years agokernel: clean up patch fuzz
Kevin Darbyshire-Bryant [Thu, 26 Nov 2020 14:22:11 +0000 (14:22 +0000)]
kernel: clean up patch fuzz

Recent kernel bumps & target patch refactors have left some patch fuzz
around.  Refreshed kernel patches using update_kernel script.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
3 years agokernel: add GS110TPPV1 support to mtdsplit_uimage
John Crispin [Thu, 26 Nov 2020 12:27:00 +0000 (13:27 +0100)]
kernel: add GS110TPPV1 support to mtdsplit_uimage

The ID is used be a Realtek based switch made by Netgear.

Signed-off-by: John Crispin <john@phrozen.org>
3 years agorealtek: update the tree to the latest refactored version
John Crispin [Thu, 26 Nov 2020 11:02:21 +0000 (12:02 +0100)]
realtek: update the tree to the latest refactored version

* rename the target to realtek
* add refactored DSA driver
* add latest gpio driver
* lots of arch cleanups
* new irq driver
* additional boards

Signed-off-by: Bert Vermeulen <bert@biot.com>
Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: John Crispin <john@phrozen.org>
3 years agokernel: bump 5.4 to 5.4.80
John Audia [Tue, 24 Nov 2020 16:34:10 +0000 (11:34 -0500)]
kernel: bump 5.4 to 5.4.80

Removed since could be reverse-applied by quilt and found to be
included upstream:
  backport-5.4/789-net-usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711, ath79/generic
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86_64 build/run]
3 years agoramips: mt7621: replace missing custom-initramfs-uimage
Sander Vanheule [Thu, 26 Nov 2020 08:01:26 +0000 (09:01 +0100)]
ramips: mt7621: replace missing custom-initramfs-uimage

custom-initramfs-uimage was replaced by calls to uImage, but apparently
mtc_wr1201 was missed in the transistion. Use uImage for this device
too.

Fixes: 9f574b1b875c "ramips: mt7621: drop custom uImage function"
Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agoopkg: cleanup man pages and md5 fixup
Paul Spooren [Wed, 25 Nov 2020 21:49:33 +0000 (11:49 -1000)]
opkg: cleanup man pages and md5 fixup

66f458d fix md5sum calculation
02eaf9c man: remove obsolete manual pages

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agohostapd: fix "sh: out of range" errors
Stijn Tintel [Thu, 26 Nov 2020 00:04:02 +0000 (02:04 +0200)]
hostapd: fix "sh: out of range" errors

Several variables in hostapd.sh can be used uninitialized in numerical
comparisons, causing errors in logread:

netifd: radio24 (1668): sh: out of range

Set defaults for those variables to silence those errors.

Fixes: b518f07d4b8a ("hostapd: remove ieee80211v option")
Fixes: cc80cf53c50d ("hostapd: add FTM responder support")
Fixes: e66bd0eb0469 ("hostapd: make rrm report independent of ieee80211k setting")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agolldpd: bump to 1.0.7
Stijn Tintel [Wed, 25 Nov 2020 22:25:25 +0000 (00:25 +0200)]
lldpd: bump to 1.0.7

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agoath10k-ct: switch to driver version 5.8
Stijn Tintel [Wed, 2 Sep 2020 19:10:38 +0000 (22:10 +0300)]
ath10k-ct: switch to driver version 5.8

Since we are using mac80211 5.8, let's also switch the ath10k-ct driver
to the new 5.8 version.

Modify patches so they patch the new ath10k-ct driver version.
Adapt 164-ath10k-commit-rates-from-mac80211.patch.
Drop upstreamed 205-ath10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch.

Drop the other options for CT_KVER from the comment, as it is incorrect
and there are too many versions to sum up and maintain there.

Runtime-tested on ath79 (D-Link DAP-2695-A1, TP-Link EAP245-v3).

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agotreewide: add space before SPDX identifier
Adrian Schmutzler [Wed, 25 Nov 2020 18:16:51 +0000 (19:16 +0100)]
treewide: add space before SPDX identifier

Strictly, an SPDX identifier requires a space between the comment
marker and the identifier itself. The choice of the comment marker
itself is irrelevant.

Correct:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

Wrong:

//SPDX-License-Identifier: GPL-2.0-or-later OR MIT

Fix that in the whole tree (actually, only ramips contained wrong
uses).

Found by checkpatch.pl

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for Xiaomi Mi Router 4C
Ataberk Özen [Wed, 19 Aug 2020 18:43:54 +0000 (21:43 +0300)]
ramips: add support for Xiaomi Mi Router 4C

This commit adds support for Xiaomi's Mi Router 4C device.

Specifications:

- CPU: MediaTek MT7628AN (580MHz)
- Flash: 16MB
- RAM: 64MB DDR2
- 2.4 GHz: IEEE 802.11b/g/n with Integrated LNA and PA
- Antennas: 4x external single band antennas
- WAN: 1x 10/100M
- LAN: 2x 10/100M
- LEDs: 2x yellow/blue. Programmable (labelled as power on case)
                      - Non-programmable (shows WAN activity)
- Button: Reset

How to install:

1- Use OpenWRTInvasion to gain telnet and ftp access.
2- Push openwrt firmware to /tmp/ using ftp.
3- Connect to router using telnet. (IP: 192.168.31.1 -
   Username: root - No password)
4- Use command "mtd -r write /tmp/firmware.bin OS1" to flash into
   the router..
5- It takes around 2 minutes. After that router will restart itself
   to OpenWrt.

Signed-off-by: Ataberk Özen <ataberkozen123@gmail.com>
[wrap commit message, bump PKG_RELEASE for uboot-envtools, remove
dts-v1 from DTS, fix LED labels]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobusybox: enable find -mmin support by default
Lukas Tribus [Tue, 10 Nov 2020 18:12:43 +0000 (19:12 +0100)]
busybox: enable find -mmin support by default

Enable busybox's find -mmin time support, which is extremely small,
however also very useful in scripts:

https://github.com/mirror/busybox/commit/72d1a2357d2168f241458e4d6cebb7589ac82f4f

Comparing package sizes...
Change  Local Remote  Package
+7 229009 229002 busybox

Signed-off-by: Lukas Tribus <lukas@ltri.eu>
[fix commit message long line and missing size change]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoconfig: clean double whitespace in Config-build.in
Paul Spooren [Sun, 22 Nov 2020 23:19:43 +0000 (13:19 -1000)]
config: clean double whitespace in Config-build.in

Trivial cosmetic cleanup. This also helps for script that parse for
options in Config files.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Reviewed-by: Petr Štetiar <ynezz@true.cz>
3 years agotegra: sysupgrade: use get_image_dd wrapper
Tomasz Maciej Nowak [Wed, 25 Nov 2020 16:33:40 +0000 (17:33 +0100)]
tegra: sysupgrade: use get_image_dd wrapper

This function eliminates false-positive errors emitted by dd.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
[drop argument check changes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotegra: sysupgrade: remove redundant MBR check
Tomasz Maciej Nowak [Wed, 25 Nov 2020 16:33:38 +0000 (17:33 +0100)]
tegra: sysupgrade: remove redundant MBR check

This is already done by get_partitions.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
[add "redundant" to title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: sysupgrade: use get_image_dd wrapper
Tomasz Maciej Nowak [Wed, 25 Nov 2020 16:33:36 +0000 (17:33 +0100)]
mvebu: sysupgrade: use get_image_dd wrapper

This function eliminates false-positive errors emitted by dd.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agomvebu: sysupgrade: remove redundant MBR check
Tomasz Maciej Nowak [Wed, 25 Nov 2020 16:33:34 +0000 (17:33 +0100)]
mvebu: sysupgrade: remove redundant MBR check

This is already done by get_partitions.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
[add "redundant" to title, remove declaration of magic variable]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobase-files: functions.sh: replace [^...] with [!...] in case
Rosen Penev [Thu, 15 Oct 2020 05:58:26 +0000 (22:58 -0700)]
base-files: functions.sh: replace [^...] with [!...] in case

Strictly speaking, ash does not support it.

From https://wiki.ubuntu.com/DashAsBinSh#A.5B.5E.5D

Not to be confused by sed's and other program's regular expression
syntax. Uses of [^...] in case (parameter/word expansion in general) need
to be replaced with [!...].

Found with shellcheck: https://github.com/koalaman/shellcheck/wiki/SC2169

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[minor commit title/message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agortl838x: drop custom mkimage build function
Sander Vanheule [Wed, 4 Nov 2020 09:21:17 +0000 (10:21 +0100)]
rtl838x: drop custom mkimage build function

UIMAGE_MAGIC is now supported by Build/uImage, in addition to
UIMAGE_NAME. This removes the need for a custom mkimage call, so let's
remove it.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agoath79: netgear: trim down uImage customisations
Sander Vanheule [Wed, 4 Nov 2020 09:21:16 +0000 (10:21 +0100)]
ath79: netgear: trim down uImage customisations

Replace NETGEAR_KERNEL_MAGIC by UIMAGE_MAGIC to better match the
variable's purpose. This allows to drop the custom
Build/netgear-uImage.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
[keep UIMAGE_MAGIC definitions even for default value]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobuild: add UIMAGE_MAGIC to device variables
Sander Vanheule [Wed, 4 Nov 2020 09:21:15 +0000 (10:21 +0100)]
build: add UIMAGE_MAGIC to device variables

Allow a device recipe to specify a custom UIMAGE_MAGIC value, as used by
OpenWrt's -M flag for mkimage. This allows to automatically customize
the magic bytes in all calls to Build/uImage for this device, similar to
the behaviour of UIMAGE_NAME. Since the -M argument is inserted before
the user arguments, it can be overriden.

The following example would use 0x87654321 for the KERNEL image, but
0x12345678 for the KERNEL_INITRAMFS image:

  define Device/MyDevice
    UIMAGE_MAGIC := 0x87654321
    KERNEL := ... | uImage lzma
    KERNEL_INITRAMFS := ... | uImage lzma -M 0x12345678
    ...
  endef

Fixes: df8e6be59a1f ("rtl838x: add new architecture")
[UIMAGE_MAGIC was not declared as a device variable]

Signed-off-by: Sander Vanheule <sander@svanheule.net>
[rebase, improve formatting of "Fixes"]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: mt7621: drop custom uImage function
Sander Vanheule [Wed, 4 Nov 2020 09:21:14 +0000 (10:21 +0100)]
ramips: mt7621: drop custom uImage function

Use the mkimage argument overrides provided by uImage to implement the
customisations required for the initramfs, instead of the near-identical
custom function.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agobuild: uImage: separate arguments into individual lines
Adrian Schmutzler [Wed, 25 Nov 2020 14:48:40 +0000 (15:48 +0100)]
build: uImage: separate arguments into individual lines

Having one line per argument increases overview dramatically.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobuild: uImage: allow override of default arguments
Sander Vanheule [Wed, 4 Nov 2020 09:21:13 +0000 (10:21 +0100)]
build: uImage: allow override of default arguments

For some build recipes, the argument to Build/uImage is used to sneak in
extra arguments for mkimage, whereas this appears to have been intended
to specificy the compression method only.

Use the first provided word for -C to be backwards compatible with
current calls to Build/uImage. Use the rest of the call arguments to
override the provided defaults. Only the input file name (-d) and the
output file name cannot overriden.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agomvebu: base-files: move additional files to subtargets
Tomasz Maciej Nowak [Mon, 23 Nov 2020 14:17:30 +0000 (15:17 +0100)]
mvebu: base-files: move additional files to subtargets

Both of these scripts are only relevant to cortexa9, therefore move them
there.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 years agomvebu: sort patches
Tomasz Maciej Nowak [Mon, 23 Nov 2020 13:59:45 +0000 (14:59 +0100)]
mvebu: sort patches

Sort patches according to target/linux/generic/PATCHES. Additionally:
- replace hashes in backported patches with the ones from main Linux tree
- add descriptions to some patches

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
[remove 004-add_sata_disk_activity_trigger.patch separately]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: remove redundant patch for Linksys LED trigger
Adrian Schmutzler [Wed, 25 Nov 2020 12:48:01 +0000 (13:48 +0100)]
mvebu: remove redundant patch for Linksys LED trigger

Remove 004-add_sata_disk_activity_trigger.patch, as the trigger is
already added in shared dtsi.

Suggested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for TP-Link MR6400 v5
Filip Moc [Tue, 24 Nov 2020 21:15:26 +0000 (22:15 +0100)]
ramips: add support for TP-Link MR6400 v5

TL-MR6400v5 is very similar to TL-MR6400v4. Main differences are:
  - smaller form factor
  - different LED GPIOs
  - different switch connections

You can flash via tftp recovery:
 - serve tftp-recovery image as /tp_recovery.bin on 192.168.0.225/24
 - connect to any ethernet port
 - power on the device while holding the reset button
 - wait at least 8 seconds before releasing reset button

Flashing via OEM web interface does not work.

LTE module does not support DHCP so it must be configured via QMI.

Hardware Specification (v5.0 EU):
 - SoC: MT7628NN
 - Flash: Winbond W25Q64JVS (8MiB)
 - RAM: ESMT M14D5121632A (64MiB)
 - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
 - Ethernet: 1NIC (4x100M)
 - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
 - Power: DC 9V 0.85A

Signed-off-by: Filip Moc <lede@moc6.cz>
3 years agoath79: add support for Senao Engenius EAP300 v2
Michael Pratt [Thu, 5 Nov 2020 00:32:27 +0000 (19:32 -0500)]
ath79: add support for Senao Engenius EAP300 v2

FCC ID: A8J-EAP300A

Engenius EAP300 v2 is an indoor wireless access point with a
100/10-BaseT ethernet port, 2.4 GHz wireless, internal antennas,
and 802.3af PoE.

**Specification:**

  - AR9341
  - 40 MHz reference clock
  - 16 MB FLASH MX25L12845EMI-10G
  - 64 MB RAM
  - UART at J1 (populated)
  - Ethernet port with POE
  - internal antennas
  - 3 LEDs, 1 button (power, eth, wlan) (reset)

**MAC addresses:**

  phy0  *:d3   art 0x1002 (label)
  eth0  *:d4   art 0x0/0x6

**Installation:**

  - if you get Failsafe Mode from failed flash:
      only use it to flash Original firmware from Engenius
      or risk kernel loop or halt which requires serial cable

  Method 1: Firmware upgrade page:

  OEM webpage at 192.168.1.1
  username and password "admin"
  Navigate to "Firmware" page from left pane
  Click Browse and select the factory.bin image
  Upload and verify checksum
  Click Continue to confirm and wait 3 minutes

  Method 2: Serial to load Failsafe webpage:

  After connecting to serial console and rebooting...
  Interrupt uboot with any key pressed rapidly
  execute `run failsafe_boot` OR `bootm 0x9fdf0000`
  wait a minute
  connect to ethernet and navigate to
  "192.168.1.1/index.htm"
  Select the factory.bin image and upload
  wait about 3 minutes

**Return to OEM:**

  If you have a serial cable, see Serial Failsafe instructions

  *DISCLAIMER*
  The Failsafe image is unique to Engenius boards.
  If the failsafe image is missing or damaged this will not work
  DO NOT downgrade to ar71xx this way, can cause kernel loop or halt

  The easiest way to return to the OEM software is the Failsafe image
  If you dont have a serial cable, you can ssh into openwrt and run

  `mtd -r erase fakeroot`

  Wait 3 minutes
  connect to ethernet and navigate to 192.168.1.1/index.htm
  select OEM firmware image from Engenius and click upgrade

**TFTP recovery** (unstable / not reliable):

  rename initramfs to 'vmlinux-art-ramdisk'
  make available on TFTP server at 192.168.1.101
  power board while holding or pressing reset button repeatedly

  NOTE: for some Engenius boards TFTP is not reliable
  try setting MTU to 600 and try many times

**Format of OEM firmware image:**

  The OEM software of EAP300 v2 is a heavily modified version
  of Openwrt Kamikaze. One of the many modifications
  is to the sysupgrade program. Image verification is performed
  simply by the successful ungzip and untar of the supplied file
  and name check and header verification of the resulting contents.
  To form a factory.bin that is accepted by OEM Openwrt build,
  the kernel and rootfs must have specific names
  and begin with the respective headers (uImage, squashfs).
  Then the files must be tarballed and gzipped.
  The resulting binary is actually a tar.gz file in disguise.
  This can be verified by using binwalk on the OEM firmware images,
  ungzipping then untaring.

  The OEM upgrade script is at /etc/fwupgrade.sh.

  OKLI kernel loader is required because the OEM software
  expects the kernel size to be no greater than 1536k
  and otherwise the factory.bin upgrade procedure would
  overwrite part of the kernel when writing rootfs.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
[clarify MAC address section, bump PKG_RELEASE for uboot-envtools]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolantiq: clean up target/subtarget features
Rui Salvaterra [Wed, 25 Nov 2020 09:38:51 +0000 (09:38 +0000)]
lantiq: clean up target/subtarget features

The feature "squashfs" is defined for target and all subtargets
individually. Remove the redundant entries in the subtargets.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
[split patch, adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoapm821xx: clean up target/subtarget features
Rui Salvaterra [Wed, 25 Nov 2020 09:38:51 +0000 (09:38 +0000)]
apm821xx: clean up target/subtarget features

Move features common to all subtargets to the parent target.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
[split patch to make it target-specific, adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add license to TP-Link MR6400 v4's DTS
Filip Moc [Tue, 24 Nov 2020 21:27:44 +0000 (22:27 +0100)]
ramips: add license to TP-Link MR6400 v4's DTS

Signed-off-by: Filip Moc <lede@moc6.cz>
3 years agolibusb-compat: remove
Rosen Penev [Wed, 25 Nov 2020 06:26:17 +0000 (22:26 -0800)]
libusb-compat: remove

No package in base relies on this library. This library will be moved
to packages where it is needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolinux-firmware: brcm: use RPI 4B NVRAM file
Álvaro Fernández Rojas [Wed, 25 Nov 2020 09:37:24 +0000 (10:37 +0100)]
linux-firmware: brcm: use RPI 4B NVRAM file

Use the dedicated RPI 4B NVRAM file introduced in 20191215.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoprereq-build: add python 3.9 support
Rosen Penev [Thu, 29 Oct 2020 07:12:16 +0000 (00:12 -0700)]
prereq-build: add python 3.9 support

Fixes unmet dependency issue.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agocypress-nvram: add proper package conflicts
Álvaro Fernández Rojas [Wed, 25 Nov 2020 09:27:02 +0000 (10:27 +0100)]
cypress-nvram: add proper package conflicts

There are linux firmware packages for all RPIs NVRAMs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agocypress-firmware: add proper package conflicts
Álvaro Fernández Rojas [Wed, 25 Nov 2020 09:25:01 +0000 (10:25 +0100)]
cypress-firmware: add proper package conflicts

There are linux firmwares packages for 43362, 43430 and 43455 which shouldn't
be installed at the same time as Cypress firmwares.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoath10k-ct-firmware: add conflicts and better provides
Karel Kočí [Mon, 19 Oct 2020 10:32:49 +0000 (12:32 +0200)]
ath10k-ct-firmware: add conflicts and better provides

This expands packages to define not only provides but also conflicts.
These packages provides same files so they should specify conflicts.

Second expansion is that *-ct-htt and *-ct-full-htt firmwares can also
provide *-ct variant as that allows explicit dependency on CT variant
with various firmware modifications.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
[Bump PKG_RELEASE and format PROVIDES/CONFLICTS]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoexfat: update to 5.10.1
Rosen Penev [Thu, 15 Oct 2020 03:02:46 +0000 (20:02 -0700)]
exfat: update to 5.10.1

Remove tar hacks and use PKG_BUILD_DIR.

Added missing URL.

Changelog:

d5eb2e1 exfat: remove useless check in exfat_move_file()
8cb2bc3 exfat: use i_blocksize() to get blocksize
4cd0435 exfat: fix misspellings using codespell tool
485d677 exfat: fix use of uninitialized spinlock on error path
03b3db6 exfat: remove 'rwoffset' in exfat_inode_info
90797eb exfat: replace memcpy with structure assignment
d144149 exfat: remove useless directory scan in exfat_add_entry()
fc67230 exfat: eliminate dead code in exfat_find()
7c25c64 exfat: fix pointer error checking
bfea1fb exfat: retain 'VolumeFlags' properly

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoopkg: purge package from cache on hash mismatch
Paul Spooren [Wed, 25 Nov 2020 08:06:37 +0000 (22:06 -1000)]
opkg: purge package from cache on hash mismatch

61b3c62 opkg_verify_integrity: better logging and error conditions
f73d42f download: purge cached packages that have incorrect checksum
1c1480e download: factor out the logic for building cache filenames
293b1ce libopkg: factor out checksum and size verification
a786e25 download: remove compatibility with old cache naming scheme

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agotcpdump: patch CVE-2020-8037
Jan Pavlinec [Wed, 25 Nov 2020 01:04:00 +0000 (02:04 +0100)]
tcpdump: patch CVE-2020-8037

This PR backports upstream fix for CVE-2020-8037.  This fix is only
relevant for tcpdump package, tcpdump-mini is not affeted by this issue.

Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agoscripts: add size_compare.sh
Paul Spooren [Mon, 16 Nov 2020 19:26:02 +0000 (09:26 -1000)]
scripts: add size_compare.sh

As package size changes are a continuous topic on the mailing list this
scripts helps developers to compare their local package modifications
against latest upstream.

The script downloads the latest package indexes based on env variables
or the `.config` file. The script compares the actual installed size
(data.tar.gz) or the IPK package size.

An example output is found below:

```
user@dawn:~/src/openwrt/openwrt$ ./scripts/size_compare.sh
Compare packages of ath79/tiny/mips_24kc:
dropbear busybox iw ubus

Checking configuration difference
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   554  100   554    0     0    336      0  0:00:01  0:00:01 --:--:--   336

 --- start config diff ---
--- /tmp/config.DDjwVh-LOCAL 2020-11-23 09:08:28.913203068 -1000
+++ /tmp/config.DDjwVh-UPSTREAM 2020-11-23 09:08:36.369240887 -1000
@@ -1,5 +1,9 @@
+CONFIG_ALL_KMODS=y
+CONFIG_ALL_NONSHARED=y
 CONFIG_AUTOREBUILD=y
+CONFIG_AUTOREMOVE=y
--- 8< ---
 CONFIG_BINARY_FOLDER=""
+CONFIG_BUILDBOT=y
+CONFIG_TARGET_ALL_PROFILES=y
 CONFIG_TARGET_ROOTFS_DIR=""
 CONFIG_USE_SSTRIP=y
 CONFIG_USE_UCLIBCXX=y
 --- end config diff ---

Checking installed size

Fetching latest package indexes...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 80634  100 80634    0     0  33499      0  0:00:02  0:00:02 --:--:-- 33485
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 54082  100 54082    0     0  24252      0  0:00:02  0:00:02 --:--:-- 24252

Comparing package sizes...
Change  Local Remote  Package
+271 51386 51115 base-files
+123 705241 705118 bnx2-firmware
+86 17209 17123 fstools
+22 47989 47967 procd
+21 208311 208290 busybox
+19 67181 67162 netifd

```

I plan to integrate this script into the CI so we have a summary how
sizes change over different architectures.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoimagebuilder: fix partition signature
Matthew Gyurgyik [Fri, 13 Nov 2020 19:21:29 +0000 (11:21 -0800)]
imagebuilder: fix partition signature

When building images with the imagebuilder, the partition signature
never changes. The signature is generated by hashing SOURCE_DATE_EPOCH
and LINUX_VERMAGIC which are undefined. Prepopulate these variables, as
done by the SDK.

Signed-off-by: Matthew Gyurgyik <matthew@gyurgyik.io>
3 years agoath10k-ct: update to latest version
Álvaro Fernández Rojas [Mon, 23 Nov 2020 14:09:45 +0000 (15:09 +0100)]
ath10k-ct: update to latest version

1d28d17 ath10k-ct: Fix RSSI reporting for wave-1 firmware.
0c2949e ath10k-ct: fwcfg allows configuring dma-burst setting.
13319ff ath10k-ct: stable patches, debugfs crashdump, 5.8 driver

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agouqmi: set plmn only if necessary
Martin Schiller [Wed, 28 Aug 2019 05:24:33 +0000 (07:24 +0200)]
uqmi: set plmn only if necessary

Setting the plmn to '0' (auto) will implicitly lead to a (delayed)
network re-registration, which could further lead to some timing
related issues in the qmi proto handler.

On the other hand, if you switch back from manual plmn selection
to auto mode you have to set it to '0', because this setting is
permanently "saved" in the wwan module.

Conclusion:
If plmn is configured, check if it's already set euqally in the module.
If so, do nothing. Otherwise set it.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agotreewide: update email address of Tomasz Maciej Nowak
Tomasz Maciej Nowak [Fri, 20 Nov 2020 18:46:35 +0000 (19:46 +0100)]
treewide: update email address of Tomasz Maciej Nowak

Replace my o2.pl email address.

I'm still available at the old address.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[rephrase commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: bump 5.4 to 5.4.79
John Audia [Thu, 19 Nov 2020 15:30:16 +0000 (10:30 -0500)]
kernel: bump 5.4 to 5.4.79

Manually rebased patches:
  ath79/patches-5.4/910-unaligned_access_hacks.patch
  bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch
  bcm27xx/patches-5.4/950-0414-SQUASH-Fix-spi-driver-compiler-warnings.patch
  ipq806x/patches-5.4/093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch

Removed since could be reverse-applied by quilt and found to be included upstream:
  ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[refresh altered targets after rebase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: move device specific nodes to DTS files for Devolo 1xxx
Yanase Yuki [Tue, 24 Nov 2020 03:45:09 +0000 (12:45 +0900)]
ath79: move device specific nodes to DTS files for Devolo 1xxx

qca9558_devolo_dvl1xxx.dtsi contains device specific nodes which
are inherited for some DTS files and overwritten for others.

This is considered confusing, so move the relevant nodes/properties
to the devices and only keep the shared stuff in the DTSI.

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
[clarify commit title/message, move &gmac_config in DTS]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: support for TP-Link EAP225 v3
Sander Vanheule [Fri, 10 Jul 2020 11:41:21 +0000 (13:41 +0200)]
ath79: support for TP-Link EAP225 v3

TP-Link EAP225 v3 is an AC1350 (802.11ac Wave-2) ceiling mount access
point. Serial port access for debricking requires fine soldering.

Device specifications:
* SoC: QCA9563 @ 775MHz
* RAM: 128MiB DDR2
* Flash: 16MiB SPI-NOR
* Wireless 2.4GHz (SoC): b/g/n, 3x3
* Wireless 5Ghz (QCA9886): a/n/ac, 2x2 MU-MINO
* Ethernet (AR8033): 1× 1GbE, 802.3at PoE

Flashing instructions:
* ssh into target device and run `cliclientd stopcs`
* Upgrade with factory image via web interface

Debricking:
* Serial port can be soldered on PCB J3 (1: TXD, 2: RXD, 3: GND, 4: VCC)
    * Bridge unpopulated resistors R225 (TXD) and R237 (RXD).
      Do NOT bridge R230.
    * Use 3.3V, 115200 baud, 8n1
* Interrupt bootloader by holding CTRL+B during boot
* tftp initramfs to flash via LuCI web interface
    setenv ipaddr 192.168.1.1 # default, change as required
    setenv serverip 192.168.1.10 # default, change as required
    tftp 0x80800000 initramfs.bin
    bootelf $fileaddr

MAC addresses:
MAC address (as on device label) is stored in device info partition at
an offset of 8 bytes. ath9k device has same address as ethernet, ath10k
uses address incremented by 1.
From OEM boot log:

    Using interface ath0 with hwaddr b0:...:3e and ssid "..."
    Using interface ath10 with hwaddr b0:...:3f and ssid "..."

Tested by forum user blinkstar88

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agoath79: support for TP-Link EAP225-Outdoor v1
Sander Vanheule [Tue, 7 Jul 2020 16:04:37 +0000 (18:04 +0200)]
ath79: support for TP-Link EAP225-Outdoor v1

TP-Link EAP225-Outdoor v1 is an AC1200 (802.11ac Wave-2) pole or wall
mount access point. Debricking requires access to the serial port, which
is non-trivial.

Device specifications:
* SoC: QCA9563 @ 775MHz
* Memory: 128MiB DDR2
* Flash: 16MiB SPI-NOR
* Wireless 2.4GHz (SoC): b/g/n 2x2
* Wireless 5GHz (QCA9886): a/n/ac 2x2 MU-MIMO
* Ethernet (AR8033): 1× 1GbE, PoE

Flashing instructions:
* ssh into target device with recent (>= v1.6.0) firmware
* run `cliclientd stopcs` on target device
* upload factory image via web interface

Debricking:
To recover the device, you need access to the serial port. This requires
fine soldering to test points, or the use of probe pins.
* Open the case and solder wires to the test points: RXD, TXD and TPGND4
  * Use a 3.3V UART, 115200 baud, 8n1
* Interrupt bootloader by holding ctrl+B during boot
* upload initramfs via built-in tftp client and perform sysupgrade
    setenv ipaddr 192.168.1.1 # default, change as required
    setenv serverip 192.168.1.10 # default, change as required
    tftp 0x80800000 initramfs.bin
    bootelf $fileaddr

MAC addresses:
MAC address (as on device label) is stored in device info partition at
an offset of 8 bytes. ath9k device has same address as ethernet, ath10k
uses address incremented by 1.
From stock ifconfig:

    ath0      Link encap:Ethernet  HWaddr D8:...:2E
    ath10     Link encap:Ethernet  HWaddr D8:...:2F
    br0       Link encap:Ethernet  HWaddr D8:...:2E
    eth0      Link encap:Ethernet  HWaddr D8:...:2E

Tested by forum user PolynomialDivision on firmware v1.7.0.
UART access tested by forum user arinc9.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agoath79: support for TP-Link EAP245 v1
Sander Vanheule [Fri, 17 Jul 2020 10:06:03 +0000 (12:06 +0200)]
ath79: support for TP-Link EAP245 v1

TP-Link EAP245 v1 is an AC1750 (802.11ac Wave-1) ceiling mount access point.

Device specifications:
* SoC: QCA9563 @ 775MHz
* RAM: 128MiB DDR2
* Flash: 16MiB SPI-NOR
* Wireless 2.4GHz (SoC): b/g/n, 3x3
* Wireless 5Ghz (QCA9880): a/n/ac, 3x3
* Ethernet (AR8033): 1× 1GbE, 802.3at PoE

Flashing instructions:
* Upgrade the device to firmware v1.4.0 if necessary
* Exploit the user management page in the web interface to start telnetd
  by changing the username to `;/usr/sbin/telnetd -l/bin/sh&`.
* Immediately change the malformed username back to something valid
  (e.g. 'admin') to make ssh work again.
* Use the root shell via telnet to make /tmp world writeable (chmod 777)
* Extract /usr/bin/uclited from the device via ssh and apply the binary
  patch listed below. The patch is required to prevent `uclited -u` in
  the last step from crashing.
* Copy the patched uclited programme back to the device at /tmp/uclited
  (via ssh)
* Upload the factory image to /tmp/upgrade.bin (via ssh)
* Run `chmod +x /tmp/uclited && /tmp/uclited -u` to install OpenWrt.

    --- xxd uclited
    +++ xxd uclited-patched
    @@ -53796,7 +53796,7 @@
     000d2240: 8c44 0000 0320 f809 0000 0000 8fbc 0010  .D... ..........
     000d2250: 8fa6 0a4c 02c0 2821 8f82 87b8 0000 0000  ...L..(!........
    -000d2260: 8c44 0000 0c13 45e0 27a7 0018 8fbc 0010  .D....E.'.......
    +000d2260: 8c44 0000 2402 0000 0000 0000 8fbc 0010  .D..$...........
     000d2270: 1040 001d 0000 1821 8f99 8374 3c04 0058  .@.....!...t<..X
     000d2280: 3c05 0056 2484 a898 24a5 9a30 0320 f809  <..V$...$..0. ..

Debricking:
* Serial port can be soldered on PCB J3 (1: TXD, 2: RXD, 3: GND, 4: VCC)
    * Bridge unpopulated resistors R225 (TXD) and R237 (RXD).
      Do NOT bridge R230.
    * Use 3.3V, 115200 baud, 8n1
* Interrupt bootloader by holding CTRL+B during boot
* tftp initramfs to flash via the LuCI web interface
    setenv ipaddr 192.168.1.1 # default, change as required
    setenv serverip 192.168.1.10 # default, change as required
    tftp 0x80800000 initramfs.bin
    bootelf $fileaddr

Tested on the EAP245 v1 running the latest firmware (v1.4.0). The binary
patch might not apply to uclited from other firmware versions.

EAP245 v1 device support was originally developed and maintained by
Julien Dusser out-of-tree. This patch and "ath79: prepare for 1-port
TP-Link EAP2x5 devices" are based on that work.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agoath79: prepare for 1-port TP-Link EAP2x5 devices
Sander Vanheule [Thu, 16 Jul 2020 19:27:06 +0000 (21:27 +0200)]
ath79: prepare for 1-port TP-Link EAP2x5 devices

TP-Link has developed a number of access points based on the AP152
reference board. In the EAP-series of 802.11ac access points, this
includes the following devices with one ethernet port:
* EAP225 v1/v2
* EAP225 v3
* EAP225-Outdoor v1
* EAP245 v1

Since the only differences between these devices are the ath10k wireless
radios and LEDs, a common base is provided for the overlapping support
requirements.

Hardware commonalities:
* SoC: QCA9563-AL3A MIPS 74kc v5.0 @ 775MHz, AHB @ 258MHz
* RAM: 128MiB DDR2 @ 650MHz
* Flash: 16MiB SPI NOR
* Wi-Fi 2.4GHz: provided by SoC
* Wi-Fi 5Ghz: ath10k chip on PCIe
* Ethernet: AR8033-AL1A, one 1GbE port (802.3at PoE)

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agoath79: add QCA956x SERDES init workaround
Julien Dusser [Wed, 1 Jul 2020 21:56:01 +0000 (23:56 +0200)]
ath79: add QCA956x SERDES init workaround

This commit add a workaround for non working SGMII link observed on some
QCA956x SoCs. The workaround originates part from the U-Boot source code
from QCA, part from the implementation from TP-Link found in the GPL
tarball for the EAP245v1.

Extends commit 0d416a8d3b990e3b78628f0e7546527709c877f7 for QCA956x.
Note that reset is the same on QCA955x and QCA956x, same register offset
and values.

Auto calibration is done on u-boot, but always fall back to default value
0x7. Add a DTS entry serdes-cal in case a device require another value.

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
[Sander Vanheule:
    Minor code style fixes,
    Remove hunk adding qca956x-serdes-fixup to a missing DTS,
    Remove variable err that was only assigned,
    Rename function to sgmii_serdes_init,
    Lower priority of serdes call message to pr_debug]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agoath79: ensure QCA956x gmac0 mux selects sgmii
Sander Vanheule [Sun, 19 Jul 2020 18:01:48 +0000 (20:01 +0200)]
ath79: ensure QCA956x gmac0 mux selects sgmii

Some bootloaders do not set up gmac0 properly, leaving it disconnected
from the sgmii interface. If the user specificies phy-mode sgmii, then
use the gmac-config/device node to ensure the mux is configured
correctly.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agomvebu: add initial support for Globalscale ESPRESSObin-Ultra
Vladimir Vid [Mon, 1 Jun 2020 15:51:37 +0000 (17:51 +0200)]
mvebu: add initial support for Globalscale ESPRESSObin-Ultra

This patch adds support for Globalscale ESPRESSObin-Ultra. Device uses
the same Armada-3720 SoC with extended hardware support.

- SoC: Armada-3720
- RAM: 1 GB DDR4
- Flash: 4MB SPI NOR (mx25u3235f) + 8 GB eMMC
- Ethernet: Topaz 6341 88e6341 (4x GB LAN + 1x WAN with 30W PoE)
- WiFI: 2x2 802.11ac Wi-Fi marvell (88w8997 PCIe+USB)
- 1x USB 2.0 port
- 1x USB 3.0 port
- 1x microSD slot
- 1x mini-PCIe slot (USB [with nano-sim slot])
- 1x mini-USB debug UART
- 1x RTC Clock and battery
- 1x reset button
- 1x power button
- 4x LED (RGBY)
- Optional 1x M.2 2280 slot

** Installation **

Copy dtb from build_dir to bin/ and run tftpserver there:
$ cp ./build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/
linux-5.4.65/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dtb
bin/targets/mvebu/cortexa53/
$ in.tftpd -L -s bin/targets/mvebu/cortexa53/

Connect to the device UART via microUSB port on the back side and power on the device.

Power on the device and hit any key to stop the autoboot.

Set serverip (host IP) and ipaddr (any free IP address on the same subnet), e.g:
$ setenv serverip 192.168.1.10 # Host
$ setenv ipaddr 192.168.1.15 # Device

Ping server to confirm network is working:
$ ping $serverip
Using neta@30000 device
host 192.168.1.15 is alive

Tftpboot the firmware:
$ tftpboot $kernel_addr_r openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-initramfs-kernel.bin
$ tftpboot $fdt_addr_r armada-3720-espressobin-ultra.dtb

Set the console and boot the image:
$ setenv bootargs $console
$ booti $kernel_addr_r - $fdt_addr_r

Once the initramfs is booted, transfer openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-squashfs-sdcard.img.gz
to /tmp dir on the device.

Gunzip and dd the image:
$ gunzip /tmp/openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-squashfs-sdcard.img.gz
$ dd if=/tmp/openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-squashfs-sdcard.img of=/dev/mmcblk0 && sync

Reboot the device.

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>