openwrt/openwrt.git
3 years agobuild: store SOURCE_DATE_EPOCH in JSON info files
Paul Spooren [Sun, 1 Nov 2020 21:53:39 +0000 (11:53 -1000)]
build: store SOURCE_DATE_EPOCH in JSON info files

The source date epoch is the only reproducible date close to the actual
build date. It can be used for tooling like the firmware wizard to show
the image age.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agorpcd: remove file when applied
Huangbin Zhan [Wed, 4 Nov 2020 09:29:30 +0000 (17:29 +0800)]
rpcd: remove file when applied

Make sure exit value of this script is zero. Or the file won't be deleted.

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
3 years agoca-certificates: canonical the build dir
Jianhui Zhao [Thu, 5 Nov 2020 14:28:37 +0000 (22:28 +0800)]
ca-certificates: canonical the build dir

The previous build directory "build_dir/target-xx/work/"
contaminated the entire build directory.

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
3 years agobusybox: Let procd respawn cron
Bruno Randolf [Mon, 9 Nov 2020 10:43:10 +0000 (10:43 +0000)]
busybox: Let procd respawn cron

On some systems I see the issue that crond dies after a few days.
Simply letting procd respawn the process is a simple safety-net.

Signed-off-by: Bruno Randolf <br1@einfach.org>
3 years agoglibc: update to latest 2.32 commit (BZ #25399)
Hans Dedecker [Thu, 12 Nov 2020 16:40:39 +0000 (17:40 +0100)]
glibc: update to latest 2.32 commit (BZ #25399)

5c36293f06 resolv: Serialize processing in resolv/tst-resolv-txnid-collision
2dfa659a66 resolv: Handle transaction ID collisions in parallel queries (bug 26600)
05c025abca support: Provide a way to clear the RA bit in DNS server responses
f688bcd83d support: Provide a way to reorder responses within the DNS test server
eba0ce6058 Remove __warndecl
5337b2af4b Remove __warn_memset_zero_len [BZ #25399]
c6e794640c aarch64: Add unwind information to _start (bug 26853)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agouboot-envtools: support Xiaomi Mi Router 3G v2/4A Gigabit
Antonis Kanouras [Thu, 29 Oct 2020 19:58:42 +0000 (21:58 +0200)]
uboot-envtools: support Xiaomi Mi Router 3G v2/4A Gigabit

Add support for the following devices:

- Xiaomi Mi Wi-Fi Router 3G v2
- Xiaomi Mi Router 4A Gigabit Edition

Signed-off-by: Antonis Kanouras <antonis@metadosis.eu>
[add explicit case for 4A, bump PKG_RELEASE,
improve commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add Xiaomi Mi Router 4A Gigabit explicitly
Adrian Schmutzler [Thu, 12 Nov 2020 15:00:10 +0000 (16:00 +0100)]
ramips: add Xiaomi Mi Router 4A Gigabit explicitly

This device has previously been supported by the image
for Xiaomi Mi Router 3G v2. Since this is not obvious, the
4A is marketed as a new major revision and it also seems to
have a different bootloader, this will be both more tidy and
more helpful for the users.

Apart from that, note that there also is a 100M version of
the device that uses mt7628 platform, so a specifically named
image will also prevent confusion in this area.

Specifications:

- SoC:      MediaTek MT7621
- Flash:    16 MiB NOR SPI
- RAM:      128 MiB DDR3
- Ethernet: 3x 10/100/1000 Mbps (switched, 2xLAN + WAN)
- WIFI0:    MT7603E 2.4GHz 802.11b/g/n
- WIFI1:    MT7612E 5GHz 802.11ac
- Antennas: 4x external (2 per radio), non-detachable
- LEDs:     Programmable "power" LED (two-coloured, yellow/blue)
            Non-programmable "internet" LED (shows WAN activity)
- Buttons:  Reset

Installation:

Bootloader won't accept any serial input unless "boot_wait" u-boot
environment variable is changed to "on".

Vendor firmware won't accept any serial input until "uart_en" is
set to "1".

Using the https://github.com/acecilia/OpenWRTInvasion exploit you
can gain access to shell to enable these options:

To enable uart keyboard actions - 'nvram set uart_en=1'
To make uboot delay boot work - 'nvram set boot_wait=on'
Set boot delay to 5 - 'nvram set bootdelay=5'

Then run 'nvram commit' to make the changes permanent.

Once in the shell (following the OpenWRTInvasion instructions) you
can then run the following to flash OpenWrt and then reboot:

'cd /tmp; curl https://downloads.openwrt.org/...-sysupgrade.bin
  --output firmware.bin; mtd -e OS1 -r write firmware.bin OS1'

Suggested-by: David Bentham <db260179@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolayerscape: make restool depend on TARGET_layerscape_armv8_64b
Yangbo Lu [Wed, 28 Oct 2020 02:33:34 +0000 (10:33 +0800)]
layerscape: make restool depend on TARGET_layerscape_armv8_64b

The restool is for Layerscape DPAA2 platforms which are
ARMv8 platforms.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
3 years agoath79: add support for Qxwlan E600G v2 / E600GAC v2
张鹏 [Sat, 31 Oct 2020 01:35:21 +0000 (09:35 +0800)]
ath79: add support for Qxwlan E600G v2 / E600GAC v2

E600G v2 based on Qualcomm/Atheros QCA9531

Specification:

 - 650/600/200 MHz (CPU/DDR/AHB)
 - 128/64 MB of RAM (DDR2)
 - 8/16 MB of FLASH (SPI NOR)
 - 2T2R 2.4 GHz
 - 2 x 10/100 Mbps Ethernet(RJ45)
 - 1 x MiniPCI-e
 - 1 x SIM (3G/4G)
 - 5 x LED , 1 x Button(SW2-Reset Buttun), 1 x power input
 - UART(J100) header on PCB(115200 8N1)

E600GAC v2 based on Qualcomm/Atheros QCA9531 + QCA9887

Specification:

 - 650/600/200 MHz (CPU/DDR/AHB)
 - 128/64 MB of RAM (DDR2)
 - 8/16 MB of FLASH (SPI NOR)
 - 2T2R 2.4 GHz
 - 1T1R 5 GHz
 - 2 x 10/100 Mbps Ethernet(RJ45)
 - 6 x LED (one three-color led), 2 x Button(SW2-Reset Buttun),1 x power input
 - UART (J100)header on PCB(115200 8N1)

Flash instruction:

1.Using tftp mode with UART connection and original OpenWrt image
 - Configure PC with static IP 192.168.1.10 and tftp server.
 - Rename "openwrt-ath79-generic-xxx-squashfs-sysupgrade.bin"
   to "firmware.bin" and place it in tftp server directory.
 - Connect PC with one of LAN ports, power up the router and press
   key "Enter" to access U-Boot CLI.
 - Use the following commands to update the device to OpenWrt:
   run lfw
 - After that the device will reboot and boot to OpenWrt.
 - Wait until all LEDs stops flashing and use the router.

2.Using httpd mode with Web UI connection and original OpenWrt image
 - Configure PC with static IP 192.168.1.xxx(2-255) and tftp server.
 - Connect PC with one of LAN ports,press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   leds flashing.
 - Open your browser and enter 192.168.1.1,You will see the upgrade
   interface, select "openwrt-ath79-generic-xxx-squashfs-
   sysupgrade.bin" and click the upgrade button.
 - After that the device will reboot and boot to OpenWrt.
 - Wait until all LEDs stops flashing and use the router.

Signed-off-by: 张鹏 <sd20@qxwlan.com>
[rearrange in generic.mk, fix one case in 04_led_migration, update
commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agosunxi: fix board.d/01_leds permissions and drop include
Piotr Jurkiewicz [Thu, 12 Nov 2020 01:41:24 +0000 (02:41 +0100)]
sunxi: fix board.d/01_leds permissions and drop include

The file lacks executable permissions, which makes it not being applied
during the first boot.

While at it, drop unneeded include.

Signed-off-by: Piotr Jurkiewicz <piotr.jerzy.jurkiewicz@gmail.com>
[do not touch board name handling, update commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agowireguard: bump to 1.0.20201112
Jason A. Donenfeld [Thu, 12 Nov 2020 09:14:18 +0000 (10:14 +0100)]
wireguard: bump to 1.0.20201112

* noise: take lock when removing handshake entry from table

This is a defense in depth patch backported from upstream to account for any
future issues with list node lifecycles.

* netns: check that route_me_harder packets use the right sk

A test for an issue that goes back to before Linux's git history began. I've
fixed this upstream, but it doesn't look possible to put it into the compat
layer, as it's a core networking problem. But we still test for it in the
netns test and warn on broken kernels.

* qemu: drop build support for rhel 8.2

We now test 8.3+.

* compat: SYM_FUNC_{START,END} were backported to 5.4
* qemu: bump default testing version

The real motivation for this version bump: 5.4.76 made a change that broke our
compat layer.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agolibnl-tiny: update to the latest version
Felix Fietkau [Wed, 5 Aug 2020 17:59:12 +0000 (19:59 +0200)]
libnl-tiny: update to the latest version

2584ebc642b2 libnl-tiny: install pkgconfig file
c291088f631d unl: add support for connecting to rtnl

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: add minstrel fixes that fix mt76 issues in legacy mode
Felix Fietkau [Wed, 11 Nov 2020 18:49:54 +0000 (19:49 +0100)]
mac80211: add minstrel fixes that fix mt76 issues in legacy mode

Remove deferred sampling code which does not work well with rate tables +
probing.
Fix tx status handling if the first invalid rate idx is not set to -1

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: backport the new tasklet API
Felix Fietkau [Wed, 11 Nov 2020 18:48:45 +0000 (19:48 +0100)]
mac80211: backport the new tasklet API

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agonetifd: update to the latest version
Felix Fietkau [Mon, 9 Nov 2020 13:06:12 +0000 (14:06 +0100)]
netifd: update to the latest version

3023b0cc7352 bridge: add support for defining port member vlans via hotplug ops
a3016c451248 vlan: add pass-through hotplug ops that pass the VLAN info to the bridge
d59f3ddcbaf0 vlandev: add pass-through hotplug ops that pass the VLAN info to the bridge
dd5e61153636 bridge: show vlans in device status
a56e14afa612 bridge: preserve hotplug ports on vlan update if config is unchanged
d1e8884f8911 bridge: fix use-after-free bug on bridge member free
3a2b21001c3c system-dummy: set present state only for simple devices
ed11f0c0ffe4 bridge: only overwrite implicit vlan assignment if vlans are configured

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agodnsmasq: 'ipset' config sections
Aleksandr Mezin [Fri, 23 Oct 2020 05:02:37 +0000 (11:02 +0600)]
dnsmasq: 'ipset' config sections

Allow configuring ipsets with dedicated config sections:

    config ipset
        list name 'ss_rules_dst_forward'
        list name 'ss_rules6_dst_forward'
        list domain 't.me'
        list domain 'telegram.org'

instead of current, rather inconvenient syntax:

    config dnsmasq
        ...
        list ipset '/t.me/telegram.org/ss_rules_dst_forward,ss_rules6_dst_forward'

Current syntax will still continue to work though.

With this change, a LuCI GUI for DNS ipsets should be easy to implement.

Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
3 years agoramips: add support for D-Link DIR-2640 A1
James McGuire [Thu, 5 Nov 2020 05:13:19 +0000 (21:13 -0800)]
ramips: add support for D-Link DIR-2640 A1

This patch adds support for D-Link DIR-2640 A1.

Specifications:
* Board: AP-MTKH7-0002
* SoC: MediaTek MT7621AT
* RAM: 256 MB (DDR3)
* Flash: 128 MB (NAND)
* WiFi: MediaTek MT7615N (x2)
* Switch: 1 WAN, 4 LAN (Gigabit)
* Ports: 1 USB 2.0, 1 USB 3.0
* Buttons: Reset, WPS
* LEDs: Power (blue/orange), Internet (blue/orange), WiFi 2.4G (blue),
        WiFi 5G (blue), USB 3.0 (blue), USB 2.0 (blue)

Notes:
* WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips

Installation:
* D-Link Recovery GUI: power down the router, press and hold the reset
  button, then re-plug it. Keep the reset button pressed until the power
  LED starts flashing orange, manually assign a static IP address under
  the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1

* Some modern browsers may have problems flashing via the Recovery GUI,
  if that occurs consider uploading the firmware through cURL:

    curl -v -i -F "firmware=@file.bin" 192.168.0.1

MAC addresses:

lan   factory 0xe000     *:a7 (label)
wan   factory 0xe006     *:aa
2.4   factory 0xe000 +1  *:a8
5.0   factory 0xe000 +2  *:a9

Seems like vendor didn't replace the dummy entries in the calibration data.

Signed-off-by: James McGuire <jamesm51@gmail.com>
[fix device definition title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agox86: upgrade: make code comment appear as log lines
Yousong Zhou [Tue, 3 Nov 2020 03:41:44 +0000 (11:41 +0800)]
x86: upgrade: make code comment appear as log lines

The comment content can be useful for readers of both the log and code

Previously when dd command "records in/out" messages are not filtered
like now with get_image_dd, it's not clear that these messages are for
extracting boot sectors.  E.g.

Before

  == upgrade: Reading partition table from bootdisk...
  37+26 records in
  37+26 records out
  == upgrade: Reading partition table from image...

After

  == upgrade: Reading partition table from bootdisk...
  == upgrade: Extract boot sector from the image
  37+26 records in
  37+26 records out
  == upgrade: Reading partition table from image...

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agox86: upgrade: use get_image_dd
Yousong Zhou [Tue, 3 Nov 2020 03:39:59 +0000 (11:39 +0800)]
x86: upgrade: use get_image_dd

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3140
Reported-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Reviewed-By: Philip Prindeville <philipp@redfish-solutions.com>
3 years agox86: upgrade: use v function for writting logs
Yousong Zhou [Tue, 3 Nov 2020 03:03:31 +0000 (11:03 +0800)]
x86: upgrade: use v function for writting logs

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agobase-files: bump PKG_RELEASE
Yousong Zhou [Tue, 3 Nov 2020 08:55:13 +0000 (16:55 +0800)]
base-files: bump PKG_RELEASE

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agobase-files: upgrade: stage2: use v for log lines
Yousong Zhou [Tue, 3 Nov 2020 08:54:13 +0000 (16:54 +0800)]
base-files: upgrade: stage2: use v for log lines

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agobase-files: upgrade: fwtool.sh: rewording logs
Yousong Zhou [Tue, 3 Nov 2020 08:22:58 +0000 (16:22 +0800)]
base-files: upgrade: fwtool.sh: rewording logs

The intent is to make it sound more like info level message, not some
error like "404 not found".  x86 target at the moment makes image with
only signature but no metadata (ref commit f8141216 "x86: append
metadata to combined images").

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Reviewed-By: Philip Prindeville <philipp@redfish-solutions.com>
3 years agobase-files: upgrade: fwtool.sh: use v for log lines
Yousong Zhou [Tue, 3 Nov 2020 06:15:35 +0000 (14:15 +0800)]
base-files: upgrade: fwtool.sh: use v for log lines

This will have at least the following effects

 - Log lines will have common prefix
 - They will be output to stderr instead of stdout

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agobase-files: upgrade: add get_image_dd()
Yousong Zhou [Tue, 3 Nov 2020 03:38:06 +0000 (11:38 +0800)]
base-files: upgrade: add get_image_dd()

This is mainly to handle stderr message "Broken pipe", "F+P records
in/out" by common pattern "xcat | dd .."

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3140
Reported-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Reviewed-By: Philip Prindeville <philipp@redfish-solutions.com>
3 years agobase-files: upgrade: use stdin redirection to replace cat command
Yousong Zhou [Tue, 3 Nov 2020 03:26:21 +0000 (11:26 +0800)]
base-files: upgrade: use stdin redirection to replace cat command

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agobase-files: upgrade: add vn and variants
Yousong Zhou [Tue, 10 Nov 2020 13:30:29 +0000 (21:30 +0800)]
base-files: upgrade: add vn and variants

To be used with in the following pattern

  vn "Remaining: "
  for p in $xx; do
    _vn "$p"
  done
  _v

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agobase-files: upgrade: log with date prefix
Yousong Zhou [Tue, 3 Nov 2020 02:20:26 +0000 (10:20 +0800)]
base-files: upgrade: log with date prefix

And log to stderr

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agokernel: bump 5.4 to 5.4.75
John Audia [Thu, 5 Nov 2020 15:31:15 +0000 (10:31 -0500)]
kernel: bump 5.4 to 5.4.75

Manually rebased patches:
  bcm27xx:
    patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
  bcm53xx:
    patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
  layerscape:
    patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch
    patches-5.4/808-i2c-0002-MLK-10893-i2c-imx-add-irqf_no_suspend.patch
    patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch

Removed since could be reverse-applied by quilt:
  mediatek:
    patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch

All modifications made by update_kernel.sh

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

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86_64]
Rebase of 802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
3 years agotools: fakeroot: rework relocatable patch to avoid LD_LIBRARY_PATH usage
Jo-Philipp Wich [Mon, 9 Nov 2020 20:46:01 +0000 (21:46 +0100)]
tools: fakeroot: rework relocatable patch to avoid LD_LIBRARY_PATH usage

Due to the use of LD_LIBRARY_PATH, the programs running in the fakeroot
environment may end up loading bundled SDK libraries using the system
ld.so.

Rework the relocatability patch to avoid meddling with LD_LIBRARY_PATH
and construct the paths to faked and libfakeroot.so directly.

Fixes: f93cb5c2c8 ("fakeroot: make fakeroot script relocatable")
Reviewed-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agortl838x: fine tune default package set
Petr Štetiar [Mon, 9 Nov 2020 17:15:53 +0000 (18:15 +0100)]
rtl838x: fine tune default package set

Althought most of the switches aren't routers, they can be used as such,
so let's add some of the packages from the router's DEVICE_TYPE. While
at it, remove swconfig package which is not needed on DSA targets.

Acked-by: John Crispin <john@phrozen.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agodnsmasq: explictly set ednspacket_max value
Jan Pavlinec [Mon, 9 Nov 2020 14:58:39 +0000 (15:58 +0100)]
dnsmasq: explictly set ednspacket_max value

This is related to DNS Flag Day 2020. It sets default
ends buffer size value to 1232.

Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
3 years agorefpolicy: add variant that builds modular policy
W. Michael Petullo [Sun, 1 Nov 2020 13:44:56 +0000 (07:44 -0600)]
refpolicy: add variant that builds modular policy

This adds a variant of refpolicy that builds the modular form of the
policy. While this requires more memory on the target device, along with
some tricks to deal with OpenWrt's volatile /var directory, it is useful
for experiementing with SELinux policy.

Signed-off-by: W. Michael Petullo <mike@flyn.org>
3 years agoimagebuilder: fix sstrip
Paul Spooren [Mon, 2 Nov 2020 21:35:39 +0000 (11:35 -1000)]
imagebuilder: fix sstrip

Without an absolute path to staging_dir/host/bin/sstrip the Makefile
tries to run a host installed version of sstrip, which is likely not
available.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agouhttpd: use P-256 for certs
Paul Spooren [Mon, 31 Aug 2020 21:39:39 +0000 (11:39 -1000)]
uhttpd: use P-256 for certs

The uhttpd package takes care of creating self-signed certificates if
px5g is installed. This improves the security of router management as it
encrypts the LuCI connection.

The EC P-256 curve is faster than RSA which which improves the user
experience on embedded devices. EC P-256 is support for as old devices
as Android 4.4.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoscripts: mkhash fail on hashing a folder
Paul Spooren [Fri, 17 Jul 2020 08:19:32 +0000 (22:19 -1000)]
scripts: mkhash fail on hashing a folder

mkhash currently returns the hash of an empty input when trying to hash
a folder. This can be missleading in caseswhere e.g. an env variable is
undefined which should contain a filename. `mkhash ./path/to/$FILE`
would exit with code 0 and return a legit looking checksum.

A better behaviour would be to fail with exit code 1, which imitates the
behaviour of `md5sum` and `sha256sum`.

To avoid hashing of folders the `stat()` is checked.

Hashing empty inputs result in the following checksums:
md5: d41d8cd98f00b204e9800998ecf8427e
sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoscripts: mkhash fix return code handling
Paul Spooren [Fri, 17 Jul 2020 08:19:31 +0000 (22:19 -1000)]
scripts: mkhash fix return code handling

If hashing a file fails mkhash shouldn't just silently fail. Now check
after each call of `hash_file()` the return and exit early in case of
errors. The return value which was previously ignored and would always
return 0.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoscripts: mkhash show -n option in usage
Paul Spooren [Fri, 17 Jul 2020 03:43:30 +0000 (17:43 -1000)]
scripts: mkhash show -n option in usage

The -n option prints the filename of hashed files next to the calculated
checksum. Reflect that in the usage message.

user@dawn:~/src/openwrt/openwrt$ ./a.out md5 -n .config
eb06db36e7b6751cb18801945e46bf5d .config

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agortl838x: dts: use macros for phy and switch definitions
Petr Štetiar [Wed, 4 Nov 2020 15:20:17 +0000 (16:20 +0100)]
rtl838x: dts: use macros for phy and switch definitions

It's quite more readable, saves some tedious copy&pasting, not so
error prone etc.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agortl838x: rtl838x.dtsi: fix missing interrupt-parent for uart0
Petr Štetiar [Wed, 4 Nov 2020 15:53:47 +0000 (16:53 +0100)]
rtl838x: rtl838x.dtsi: fix missing interrupt-parent for uart0

Fixes following dtc warning:

 Warning (interrupts_property): /uart@b8002000: Missing interrupt-parent

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agortl838x: rtl838x.dtsi: remove reg property from root node
Petr Štetiar [Wed, 4 Nov 2020 15:43:16 +0000 (16:43 +0100)]
rtl838x: rtl838x.dtsi: remove reg property from root node

Fixes following dtc warning:

 ../dts/rtl838x.dtsi:38.3-145.3: Warning (reg_format): /: Root node has a "reg" property

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agortl838x: add support for D-Link DGS-1210-28
Petr Štetiar [Wed, 4 Nov 2020 10:37:42 +0000 (11:37 +0100)]
rtl838x: add support for D-Link DGS-1210-28

 Hardware specification
 ----------------------

 * RTL8382M SoC, 1 MIPS 4KEc core @ 500MHz
 * 128MB DRAM
 * 32MB NOR Flash (MX25L25635E)
 * 24 x 10/100/1000BASE-T ports
    - Internal PHY with 8 ports (RTL8218B)
    - Two external PHYs with 8 ports each (RTL8218B)
 * 4 x Gigabit RJ45/SFP Combo ports
    - External PHY with 4 SFP ports (RTL8214FC)
 * Power LED
 * Reset button on front panel
 * UART (115200 8N1) via unpopulated standard 0.1" pin header marked J6

 UART pinout
 -----------

  [oooo]J3 [o]ooo|J6
    |       ^ ||`------ GND
    |       | |`------- RX
    |       | `-------- TX
    |       `---------- Vcc (3V3)
    |
    `------------------ J3 is power input connector nearby J6 UART

 Boot initramfs image from U-Boot
 --------------------------------

  1. Press Escape key during `Hit Esc key to stop autoboot` prompt
  2. Press CTRL+C keys to get into real U-Boot prompt
  3. Init network with `rtk network on` command
  4. Load image with `tftpboot 0x8f000000 openwrt-rtl838x-generic-d-link_dgs-1210-28-initramfs-kernel.bin` command
  5. Boot the image with `bootm` command

To install, upload the sysupgrade image to the OEM webpage or sysupgrade
from the system running from initramfs image.

It has been developed and tested on device with F1 revision.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agortl838x: d-link_dgs-1210: refactor common family bits
Petr Štetiar [Wed, 4 Nov 2020 09:39:42 +0000 (10:39 +0100)]
rtl838x: d-link_dgs-1210: refactor common family bits

So the common bits can be easily shared with other boards in the family
and while at it add missing SPDX license identifiers into the DTS files
and fixed alphabetic sorting of the devices in the images.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agortl838x: clean whitespace issues in rtl8382_d-link_dgs-1210-16.dts
Petr Štetiar [Wed, 4 Nov 2020 07:01:04 +0000 (08:01 +0100)]
rtl838x: clean whitespace issues in rtl8382_d-link_dgs-1210-16.dts

So it's tidy.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agohostapd: add a hostapd-basic-wolfssl variant
Rui Salvaterra [Tue, 3 Nov 2020 20:08:03 +0000 (20:08 +0000)]
hostapd: add a hostapd-basic-wolfssl variant

If only AP mode is needed, this is currently the most space-efficient way to
provide support for WPA{2,3}-PSK, 802.11w and 802.11r.

openwrt-ath79-generic-ubnt_nanostation-loco-m-squashfs-sysupgrade.bin sizes:

4719426 bytes (with wpad-basic-wolfssl)
4457282 bytes (with hostapd-basic-wolfssl)

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agoglibc: update to latest stable version 2.32
Hans Dedecker [Sun, 25 Oct 2020 17:55:24 +0000 (18:55 +0100)]
glibc: update to latest stable version 2.32

refresh patches :
050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch
00-fix_cross_rpcgen.patch

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agoprocd: bump to git HEAD
Daniel Golle [Sat, 7 Nov 2020 06:03:12 +0000 (06:03 +0000)]
procd: bump to git HEAD

 b0de894 jail: fix capabilities

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoocteon: add support for Ubiquiti EdgeRouter 4
Roman Kuzmitskii [Thu, 22 Oct 2020 21:20:05 +0000 (21:20 +0000)]
octeon: add support for Ubiquiti EdgeRouter 4

Ubiquiti EdgeRouter 4 is 4 port Octeon Cavium 7130 powered router.
It has internal power supply and needs c13 power cord.
There are three 10/100/1000 Mbps RJ45/Copper ports and
one 1000 Mbps SFP port connected directly to a SoC.

SoC:
  Octeon Cavium 7130 (Cavium 3)
  Clocked at 1000Mhz

Memory:
  1 GiB (SK hynix H5TQ4G63CFR-RDC × 2)
  DDR3, clocked at 533 Mhz (1066Mhz effective)
Flash:
  - mtd:
    8 MiB (Macronix MX25L6408EMI-12G)
    used for uboot/eeprom
  - emmc:
    4 GiB (SanDisk SDIN7DP2-4G)
    used for kernel+rootfs
Leds: 1x for power status (white/blue, controllable)
  and 4x for ethernet and sfp ports (no control over them)
Buttons: 1x Reset (from SOC)
Serial: 1x RJ45 port on front panel. 115200 baud, 8N1 (from SoC)
USB: 1x USB3.0 on front panel (from SoC)
MII: 1x QSGMII from SoC is used
PHY: 1x Vitesse VSC8504 of which 4x ports is used

All physical port numbers are properly mapped inside OS and
named by lanX instead of ethX.

There is also special purpose four(4) loopX ports available.
That loopX ports are currently hardcoded by linux kernel
and exact use case of them is currently unknown. We leave them
to the linux kernel and octeon board defaults.

All four (4) physical ports are connected to the same QSGMII.
vsc8504 is used for phys and only 4, 5, 6 and 7 phys are used.

Phy mapping:
 - Phy5 is connected to physical eth0 port
 - Phy6 is connected to physical eth1 port
 - Phy7 is connected to physical eth2 port
 - Phy4 is connected to physical eth3 port

Why this device needs external dts:
 - faster boot time since need to initialize less device tree nodes.
 - to add actual indication with LED about boot/failure/upgrade.
   i.e. user could know when to enter failsafe mode or if upgrade is done
 - reset button support so user can reset their device in case off failure
 - sfp port indication in dmesg with information about sfp module
   it also indicates when module inserted or removed

Octeon quirks:
 - There is no port status available before it interface brought up
 - SFP port can not be tied to actual phy due to octeon-ethernet state
   and currently we can only get reports a about SFP state in dmesg

How to flash the firmware:
  - copy openwrt-octeon-ubnt_edgerouter-4-initramfs-kernel.bin and
    openwrt-octeon-ubnt_edgerouter-4-squashfs-sysupgrade.tar to
    USB flash drive that is formatted to vfat/fat32
  - connect USB flash drive to edgerouter 4 front USB port
  - connect serial cable using front RJ45 port (115200 baud, 8N1)
  - connect power to cable to edgerouter 4
  - connect terminal to the console to see uboot boot process
  - interrupt boot by pressing button(s) on your keyboard to log in to the uboot
  - detect usb connected flash drives by typing to the console:
    usb start
  - after drive is detected load initramfs+kernel to the memory by typing:
    fatload usb 0:1 0x20000000 openwrt-octeon-ubnt_edgerouter-4-initramfs-kernel.bin
  - after initramfs+kernel is loaded to the memory load it by typing:
    bootoctlinux 0 numcores=4 endbootargs mem=0
  - boot process should finish and you will be greeted with console after pressing enter
  - create directory to mount usb flash drive to by typing:
    mkdir /tmp/sda
  - mount flash drive to that directory by typing:
    mount /dev/sda1 /tmp/sda
  - flash firmware to router internal storage by typing:
    sysupgrade /tmp/sda/openwrt-octeon-ubnt_edgerouter-4-squashfs-sysupgrade.tar
  - device will reboot and after it gets up you will have edgerouter 4 running openwrt

Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
Tested-by: Johannes Kimmel <fff@bareminimum.eu>
Signed-off-by: Roman Kuzmitskii <damex.pp@icloud.com>
3 years agoocteon: honor disabled sgmii device tree nodes
Roman Kuzmitskii [Sun, 1 Nov 2020 20:46:05 +0000 (20:46 +0000)]
octeon: honor disabled sgmii device tree nodes

adds patch to octeon ethernet driver that lets sgmii interface
device tree node to be disabled and that disabled interface
won't be unnecessarily initialized.

It solves the problem with octeon boards that have 8 sgmii or more ports
initialized but have nothing connected to them.

Tested-by: Johannes Kimmel <fff@bareminimum.eu>
Signed-off-by: Roman Kuzmitskii <damex.pp@icloud.com>
3 years agoocteon: implement interface rename by label from device tree
Roman Kuzmitskii [Wed, 28 Oct 2020 19:23:49 +0000 (19:23 +0000)]
octeon: implement interface rename by label from device tree

adds patch to octeon ethernet driver that to rename interface
name by label from device tree

Tested-by: Johannes Kimmel <fff@bareminimum.eu>
Signed-off-by: Roman Kuzmitskii <damex.pp@icloud.com>
3 years agogeneric: add support for vsc8504 phy
Roman Kuzmitskii [Thu, 5 Nov 2020 14:16:15 +0000 (14:16 +0000)]
generic: add support for vsc8504 phy

adds support for vsc8504 phy.
patch have use on 5.4 kernel and has
to be dropped after since phy is supported by
CONFIG_MICROSEMI_PHY on newer LTS kernels.

Tested-by: Johannes Kimmel <fff@bareminimum.eu>
Signed-off-by: Roman Kuzmitskii <damex.pp@icloud.com>
3 years agoprocd: bump to git HEAD
Daniel Golle [Thu, 5 Nov 2020 02:15:20 +0000 (02:15 +0000)]
procd: bump to git HEAD

 2f381fe jail: guard boolean blobmsg attributes
 602b8fa jail: add option for pidfile
 bba6de7 jail: handle mount propagation flags
 6963d50 jail: relax seccomp unknown syscall handling
 e1fcfdc jail: add support for absolute root path in OCI spec
 257f29b jail: don't fail if maskedPath cannot be found
 75f2374 uxc: mimic runc cmdline by using getopt_long

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agogdb: fix building with NLS enabled
Daniel Golle [Thu, 5 Nov 2020 00:30:04 +0000 (00:30 +0000)]
gdb: fix building with NLS enabled

Building gdb failed with CONFIG_BUILD_NLS enabled. Use nls.mk and
add the necessary dependencies for libintl and libiconv.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoath79: streamline image-generation for OCEDO boards
David Bauer [Wed, 4 Nov 2020 23:00:37 +0000 (00:00 +0100)]
ath79: streamline image-generation for OCEDO boards

Use the default sysupgrade generation procedure provided
by the target. The previously generated images had the rootfs not
aligned to an eraseblock.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agomac80211: ath9k: enable OEM cards support on x86
Rafał Dzięgiel [Sat, 1 Aug 2020 21:09:20 +0000 (23:09 +0200)]
mac80211: ath9k: enable OEM cards support on x86

A lot of devices running OpenWrt x86 arch (32 or 64 bit) are either
"home-made routers" or devices that use PC class OEM components.

This commit enables OEM cards support on those devices by default.

Signed-off-by: Rafał Dzięgiel <rafostar.github@gmail.com>
[reformat commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agorockchip: remove unused config symbols
David Bauer [Sat, 1 Aug 2020 20:41:37 +0000 (22:41 +0200)]
rockchip: remove unused config symbols

Remove MDIO and I2C bitbangig support from the kernel.

These functionalities are currently not used by any board in the target.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agorockchip: fix NanoPi R2S GMAC clock name
David Bauer [Sun, 4 Oct 2020 22:01:12 +0000 (00:01 +0200)]
rockchip: fix NanoPi R2S GMAC clock name

This commit fixes the name for the GMAC clock to gmac_clkin, as this is
the name of the clock provided by the rk3328-clk driver.

Without this commit, the GMAC will not work in TX direction.

Suggested-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agomediatek: update uboot to latest patchset provided by MTK
John Crispin [Wed, 4 Nov 2020 19:32:52 +0000 (20:32 +0100)]
mediatek: update uboot to latest patchset provided by MTK

MTK sent us their latest version of the staging uboot. Lets merge the patches.

Signed-off-by: John Crispin <john@phrozen.org>
3 years agoramips: fix kernel oops in `mt7621_nfc_write_page_hwecc`
Anton Ryzhov [Sun, 1 Nov 2020 15:06:26 +0000 (16:06 +0100)]
ramips: fix kernel oops in `mt7621_nfc_write_page_hwecc`

`mt7621_nfc_write_page_hwecc` may be called with `buf=NULL`, but
`mt7621_nfc_check_empty_page` always tries to read it.
That caused Oops:
`Unable to handle kernel paging request at virtual address 00000000`

Fixes: FS#3416
Signed-off-by: Anton Ryzhov <anton@ryzhov.me>
3 years agobase-files: add board.d support for bridge device
John Crispin [Tue, 3 Nov 2020 16:43:22 +0000 (17:43 +0100)]
base-files: add board.d support for bridge device

Latest netifd allows us to setup network bridges with implicit vlan
tagging. For this to work, we need to setup several additional uci
sections. This feature is particularly usefull for DSA tupe devices.
Add board.d and uci-defaults support for generating the sections.

Signed-off-by: John Crispin <john@phrozen.org>
3 years agoath79: remove redundant setup of wmac for ubnt WA devices
Adrian Schmutzler [Tue, 3 Nov 2020 17:03:01 +0000 (18:03 +0100)]
ath79: remove redundant setup of wmac for ubnt WA devices

Several Ubiquiti WA devices set up &wmac again in their DTS files,
although this is already done in ar9342_ubnt_wa.dtsi.

Fixes: fa3c2676ab0c ("ath79: Add support for Ubiquiti Nanostation AC")
Fixes: cf5a1abe46fc ("ath79: define 2.4GHz radio for nanostation ac loco")
Fixes: 09804da80a99 ("ath79: define 2.4GHz radio for litebeam ac gen2")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: create DTSI files for ubnt WA 1-/2-port devices
Nick Hainke [Sun, 25 Oct 2020 11:58:30 +0000 (12:58 +0100)]
ath79: create DTSI files for ubnt WA 1-/2-port devices

The ar9342 Ubiquiti WA devices appear to only have two different
network setups, based on the number of ethernet ports.
Create DTSI files for them to consolidate duplicate definitions.

Signed-off-by: Nick Hainke <vincent@systemli.org>
[rephrase commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: fix nanobeam ac ethernet interface
Nick Hainke [Sun, 25 Oct 2020 14:25:01 +0000 (15:25 +0100)]
ath79: fix nanobeam ac ethernet interface

In 4.14 the delays were not cleared, so setting "rgmii" as phy-mode
did not affect delays set by the bootloader. With 5.4 kernel the
situation changed and the ethernet interface stopped working.

"rgmii" requires rx and tx delays depending on the hardware circuit
and wiring. The mac or the phy can add these delays.
- "rgmii":  delays are controlled by the mac
- "rgmii-id": delays are controlled by the phy
More Information in Linux Kernel Tree:
Documentation/devicetree/bindings/net/ethernet-controller.yaml

"rgmii" should be the preferred mode, which allows the mac layer to
turn off the dealys completely if they are not needed. However, the
delays are not set correctly, which causes the ethernet interface
to be broken. Just taking the ethernetpart from the litebeam ac gen2
will fix the issue.

Explained-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Nick Hainke <vincent@systemli.org>
3 years agortl838x: remove the swconfig setup from the board.d code
John Crispin [Tue, 3 Nov 2020 16:45:52 +0000 (17:45 +0100)]
rtl838x: remove the swconfig setup from the board.d code

the code currently sets up uci for swconfig which we do not use.

Signed-off-by: John Crispin <john@phrozen.org>
3 years agoopkg: clean up and fix performance regression
Daniel Golle [Tue, 3 Nov 2020 04:42:32 +0000 (04:42 +0000)]
opkg: clean up and fix performance regression

 da9746a libopkg: clean up handling of unresolved dependencies

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoopkg: fix yet another dependency resolution bug
Daniel Golle [Mon, 2 Nov 2020 23:22:26 +0000 (23:22 +0000)]
opkg: fix yet another dependency resolution bug

The previous fix of a fix caused yet another problem leading to
`opkg show-upgradable` ending up in an infinite loop.
Fix that.

Fixes: 4a2b1ff7fb ("opkg: fix dependency resolution")
Reported-by: Huangbin Zhan <zhanhb88@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoopkg: fix dependency resolution
Daniel Golle [Mon, 2 Nov 2020 20:46:03 +0000 (20:46 +0000)]
opkg: fix dependency resolution

The previous commit broke opkg in a way that it would no longer
include dependencies when installing a package, effectively leading
to broken images and unusable systems.
Fix that by making sure dependencies are still going to be checked.
Also reduce size of struct abstract_pkg as suggested by @jow- while at
it.

Fixes: 1445d333aa ("opkg: bump to git HEAD")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agozram-swap: use new extra_command wrapper
Florian Eckert [Fri, 24 Jul 2020 07:34:41 +0000 (09:34 +0200)]
zram-swap: use new extra_command wrapper

Use new `extra_command` wrapper to fix the alignement.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agodropbear: use new extra_command wrapper
Florian Eckert [Fri, 24 Jul 2020 07:33:59 +0000 (09:33 +0200)]
dropbear: use new extra_command wrapper

Use new `extra_command` wrapper to fix the alignement.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoltq-vdsl-app: use new extra_command wrapper
Florian Eckert [Fri, 24 Jul 2020 07:33:42 +0000 (09:33 +0200)]
ltq-vdsl-app: use new extra_command wrapper

Use new `extra_command` wrapper to fix the alignement.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoltq-adsl-app: use new extra_command wrapper
Florian Eckert [Fri, 24 Jul 2020 07:55:37 +0000 (09:55 +0200)]
ltq-adsl-app: use new extra_command wrapper

Use new `extra_command` wrapper to fix the alignement.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agobase-files: fix rc.common help alignment
Florian Eckert [Fri, 24 Jul 2020 06:44:03 +0000 (08:44 +0200)]
base-files: fix rc.common help alignment

This commit introduces a new function `extra_command` to better format
the help text without having to calculate the indentation in every startup
script that wants to add a new command. So far it looks weird and is not
formatted correctly on some startup scripts.

After using the new `extra_command` wrapper the alignement looks correctly.

And if the indentation is not sufficient in the future, this can be
changed in the function extra_command at a central location.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agokernel: add disabled CONFIG_IP6_NF_TARGET_MASQUERADE
Adrian Schmutzler [Mon, 2 Nov 2020 16:33:01 +0000 (17:33 +0100)]
kernel: add disabled CONFIG_IP6_NF_TARGET_MASQUERADE

In kernel commit adf82accc5f5 ("netfilter: x_tables: merge ip and
ipv6 masquerade modules") the config symbols IP_NF_TARGET_MASQUERADE
and IP6_NF_TARGET_MASQUERADE have been demoted to simple backwards-
compat options for NETFILTER_XT_TARGET_MASQUERADE.

In netfilter.mk, this has already been updated in OpenWrt commit
d1592306cc07 ("netfilter.mk: use CONFIG_NETFILTER_XT_TARGET_MASQUERADE"),
having us use the new config symbol.

However, enabling IP_NF_NAT or IP6_NF_NAT still makes the relevant
legacy options selectable, so we need to disable them in generic
config (and forget about them afterwards).
Since CONFIG_IP_NF_TARGET_MASQUERADE is already present there, this
just adds the missing CONFIG_IP6_NF_TARGET_MASQUERADE.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: drop obsolete symbol CONFIG_NF_NAT_IPV6
Adrian Schmutzler [Mon, 2 Nov 2020 16:27:05 +0000 (17:27 +0100)]
kernel: drop obsolete symbol CONFIG_NF_NAT_IPV6

Kernel has removed the symbols CONFIG_NF_NAT_IPV4 and
CONFIG_NF_NAT_IPV6 in favor of CONFIG_NF_NAT in commit
3bf195ae6037 ("netfilter: nat: merge nf_nat_ipv4,6 into nat core").

This drops the obsolete symbol CONFIG_NF_NAT_IPV6 from generic
config-5.4.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: ubnt-unifi: make u-boot-env partition read-only
Lech Perczak [Wed, 26 Aug 2020 21:38:25 +0000 (23:38 +0200)]
ath79: ubnt-unifi: make u-boot-env partition read-only

This partition isn't normally modified during boot process. Make it
read-only to prevent accidental overwrite.
If needed this can be overriden with installing kmod-mtd-rw; the same
way as for installing modified U-boot.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
3 years agoath79: ubnt-xm: make u-boot-env partition read-only
Lech Perczak [Wed, 26 Aug 2020 21:35:37 +0000 (23:35 +0200)]
ath79: ubnt-xm: make u-boot-env partition read-only

This partition isn't normally modified during boot process. Make it
read-only to prevent accidental overwrite.
If needed this can be overriden with installing kmod-mtd-rw; the same
way as for installing modified U-boot.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
3 years agokernel: bump 5.4 to 5.4.74
John Audia [Sun, 1 Nov 2020 16:37:10 +0000 (11:37 -0500)]
kernel: bump 5.4 to 5.4.74

Removed upstreamed patches:
 mvebu/patches-5.4
   409-phy-marvell-comphy-Convert-internal-SMCC-firmware-re.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711, x86_64
Run-tested: ipq806x/R7800, x86_64, lantiq/Easybox 904 xDSL

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86_64 build/run]
[added lantiq test report]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agox86: fix touching bootloader "upgraded" mark
Yousong Zhou [Mon, 2 Nov 2020 13:04:24 +0000 (21:04 +0800)]
x86: fix touching bootloader "upgraded" mark

The mount point is "/tmp/boot", the path in the boot partition is
"/boot/grub/upgraded".

Origin of this mark b9c1cf16 ("x86: add preinit hook for bootloader
upgrade")

Fixes 32f675ca ("x86: fix grub-bios-setup fail during sysupgrade")

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3140
Reported-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agoscripts: bundle-libraries.sh: fix broken SDK compiler
Petr Štetiar [Sun, 1 Nov 2020 13:40:02 +0000 (14:40 +0100)]
scripts: bundle-libraries.sh: fix broken SDK compiler

Recent versions (> 5.33) of `file` report liblto_plugin.so as
executable:

 $ file liblto_plugin.so
 liblto_plugin.so.0.0.0: ELF 64-bit LSB pie executable ...

Which then leads to improper packaging of the plugin, resulting in the
broken compiler:

 configure: checking whether the C compiler works
 mips-openwrt-linux-musl/bin/ld: liblto_plugin.so: error loading plugin: liblto_plugin.so: invalid ELF header

As the LTO compiler plugin library is incorrectly packaged as SDK
executable:

 $ head -1 ~/staging_dir/toolchain...libexec/gcc/.../liblto_plugin.so
 #!/usr/bin/env bash

Fix this by filtering out shared libraries from the patching.

Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1296868
Acked-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agosdk: fix missing include directories
Petr Štetiar [Sun, 1 Nov 2020 16:31:40 +0000 (17:31 +0100)]
sdk: fix missing include directories

It's not possible to compile some applications which are using
`-Werror=missing-include-dirs` compiler flags with the SDK as some
target directories are missing in the SDK tarball:

 cc1: error: staging_dir/target/usr/include: No such file or directory [-Werror=missing-include-dirs]
 cc1: error: staging_dir/target/include: No such file or directory [-Werror=missing-include-dirs]

Fix this by adding the missing directories in the SDK.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agoscripts/getver.sh: silence rev-list errors
Petr Štetiar [Tue, 3 Mar 2020 11:47:07 +0000 (12:47 +0100)]
scripts/getver.sh: silence rev-list errors

Shallow copies are quite common on CI platforms nowadays, making REBOOT
tag unavailable, thus producing following confusing errors in the build
logs:

 fatal: Invalid revision range ee53a240ac902dc83209008a2671e7fdcf55957a..HEAD
 fatal: Invalid revision range ee53a240ac902dc83209008a2671e7fdcf55957a..0493d57e04774d47921a7d2014b567455d5dc16b

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agolinux-firmware: update to 20201022
John Audia [Sun, 25 Oct 2020 10:54:19 +0000 (06:54 -0400)]
linux-firmware: update to 20201022

git log --pretty=oneline --abbrev-commit 20200918..20201022
dae4b4c (HEAD -> main, tag: 20201022, origin/master, origin/main, origin/HEAD) Merge branch 'v1.1.5' of https://github.com/irui-wang/linux_fw_vpu_v1.1.5 into main
04f71fe cypress: add Cypress firmware and clm_blob files
4d0755b Merge https://github.com/shahasit/bt-linux-firmware into main
2a262bb Merge https://github.com/shahasit/video-linux-firmware into main
c024640 Merge tag 'iwlwifi-fw-2020-10-14' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware into main
09e8cff rtl_bt: Update RTL8821C BT FW to 0xAA6C_A99E
d7904d5 ath10k: add SDIO firmware for QCA9377 WiFi
ecdc272 Merge branch 'dg1_dmc_v2_02' of git://anongit.freedesktop.org/drm/drm-firmware into main
c86361d ice: update package file to 1.3.16.0
76ceac8 mediatek: separate venc service thread
8877322 QCA : Updated firmware file for WCN3991
4f41e9d iwlwifi: update and add new FWs from core56-54 release
346057d iwlwifi: update 3168, 7265D, 8000C and 8265 firmwares
a140ef3 i915: Add DG1 DMC v2.02
a09b728 qcom : updated venus firmware files for v5.4
58d41d0 ice: Add comms package file for Intel E800 series driver
c1bef9e copy-firmware: Always write Link: entries
b95e230 Merge commit 'ad1da95d52f1a9206da3ef52f3484f3b89ec6615' of https://github.com/shahasit/linux-firmware-bt into main
0b884ec amdgpu: update vega20 firmware for 20.40
bca0233 amdgpu: update vega12 firmware for 20.40
8652e02 amdgpu: update vega10 firmware for 20.40
9f46d48 amdgpu: update renoir firmware for 20.40
e667605 amdgpu: update raven2 firmware for 20.40
a487f2f amdgpu: update raven firmware for 20.40
aa7b732 amdgpu: update picasso firmware for 20.40
a18981e amdgpu: update navi14 firmware for 20.40
1696e2e amdgpu: update navi12 firmware for 20.40
6b8a6ea amdgpu: update navi10 firmware for 20.40
5b30b38 linux-firmware: Add new VPDMA firmware 1b8.bin
ad1da95 QCA : Updated firmware files for WCN3991
b78a66c linux-firmware: Update firmware for Cadence MHDP8546 DP bridge
afbfb5f linux-firmware: Update firmware patch for Intel Bluetooth 7265 (D1)
a38b8ed Mellanox: Add new mlxsw_spectrum firmware xx.2008.1312
1487a8a linux-firmware: nvidia: move firmware symlinks to WHENCE
bdd5617 linux-firmware: move i915 firmware symlinks to WHENCE
ab69b57 linux-firmware: move iwlwifi-7265D-10.ucode symlink to WHENCE
49c4ff5 Merge branch 'mrvl-prestera' of https://github.com/PLVision/linux-firmware into main
7a02212 linux-firmware: Update Marvell Switchdev firmware with ABI changes

Signed-off-by: John Audia <graysky@archlinux.us>
3 years agokernel: Activate KERNEL_MIPS_FP_SUPPORT for pistachio target
Hauke Mehrtens [Sat, 31 Oct 2020 17:20:33 +0000 (18:20 +0100)]
kernel: Activate KERNEL_MIPS_FP_SUPPORT for pistachio target

The pistachio target uses a MIPS CPU with FPU and OpenWrt uses a
toolchain with hard FPU support. MIPS FPU support needs the FPU
emulation code in the kernel.

Fixes: ac5671f46cb4 ("kernel: remove obsolete kernel version switches for 4.19")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agogdb: Disable tests
Hauke Mehrtens [Sat, 24 Oct 2020 21:34:49 +0000 (23:34 +0200)]
gdb: Disable tests

We do not use the tests or ubsan in our gdb package.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agogdb: Always use system zlib
Hauke Mehrtens [Sat, 24 Oct 2020 21:34:18 +0000 (23:34 +0200)]
gdb: Always use system zlib

Instead of using the system zlib when the package is selected and using
the internal zlib if it is not selected in OpenWrt, just activate it
always. This should make the package more deterministic.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agogdb: Update to version 10.1
Hauke Mehrtens [Sat, 24 Oct 2020 18:21:05 +0000 (20:21 +0200)]
gdb: Update to version 10.1

gdb 10.1 adds many new features for example gdbserver support for
  - ARC GNU/Linux
  - RISC-V GNU/Linux

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agotoolchain: gdb: Remove ARC patches
Hauke Mehrtens [Sat, 31 Oct 2020 23:16:22 +0000 (00:16 +0100)]
toolchain: gdb: Remove ARC patches

The ARC specific gdb was removed some time ago.

Fixes: 969690b33c56 ("toolchain/gdb: Don't use gdb-arc")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agotoolchain: gdb: Disable tests
Hauke Mehrtens [Sat, 24 Oct 2020 21:35:13 +0000 (23:35 +0200)]
toolchain: gdb: Disable tests

Instead of patching the tests out, just remove them with a configure
option.
No files were generates in the testsuite and unit-test directories.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agotoolchain: gdb: Update to version 10.1
Hauke Mehrtens [Sat, 24 Oct 2020 18:20:54 +0000 (20:20 +0200)]
toolchain: gdb: Update to version 10.1

gdb 10.1 adds many new features for example gdbserver support for
  - ARC GNU/Linux
  - RISC-V GNU/Linux

Removed this patch, because similar changes are now integrated upstream:
toolchain/gdb/patches/100-no_extern_inline.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoodhcpd: fix compile problem on 64-bit systems
Hans Dedecker [Sun, 1 Nov 2020 19:23:04 +0000 (20:23 +0100)]
odhcpd: fix compile problem on 64-bit systems

735c783 dhcpv6: fix size_t fields in syslog format

Fixes 5cdc65f6d1

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agoipq40xx: enable RX hash / CTAG TX offloading for single-phy
David Bauer [Mon, 26 Oct 2020 20:59:47 +0000 (21:59 +0100)]
ipq40xx: enable RX hash / CTAG TX offloading for single-phy

This re-enables offloading features disabled by
commit 9da2b567605b ("ipq40xx: fix ethernet vlan double tagging").

Single-PHY devices use port-based VLANs on the switch, therefore no
S-TAG magic is involved here. Re-enabling these features restores
throughput back to 950 Mbit/s.

Reported-by: Jannis Pinter <jannis@pinterjann.is>
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: use correct firmware name for UniFi AP
David Bauer [Sat, 31 Oct 2020 15:41:04 +0000 (16:41 +0100)]
ath79: use correct firmware name for UniFi AP

The Ubiquiti UniFi AP does not have a AHB connected radio but a PCI one.
Also the EEPROM ist only 0x440 bytes of length.

Reported-by: Martin Weinelt <martin@darmstadt.freifunk.net>
Tested-by: Martin Weinelt <martin@darmstadt.freifunk.net>
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: remove AT803X config symbol from subtargets
David Bauer [Fri, 30 Oct 2020 00:22:47 +0000 (01:22 +0100)]
ath79: remove AT803X config symbol from subtargets

The AT803X_PHY kernel config symbol is already enabled target-wide. SO
it does not have to be enabled for individual subtargets.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: drop upstreamed patch
David Bauer [Fri, 30 Oct 2020 00:03:09 +0000 (01:03 +0100)]
ath79: drop upstreamed patch

Patch was upstreamed a long time ago (over 2 years) as commit
a08227a206b8d ("MIPS: ath79: select the PINCTRL subsystem").

When porting this patch to a newer kernel, nobody noticed we now patch a
Broadcom platform. This is clearly not intended. So drop this patch and
pretend nothing ever happened.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agokernel: bump 5.4 to 5.4.73
John Audia [Sat, 31 Oct 2020 11:35:12 +0000 (07:35 -0400)]
kernel: bump 5.4 to 5.4.73

Removed upstreamed patches:
 generic/pending-5.4
   445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch
   446-mtd-spinand-gigadevice-Add-QE-Bit.patch
 pistachio/patches-5.4
   150-pwm-img-Fix-null-pointer-access-in-probe.patch

Manually rebased:
 layerscape/patches-5.4
   801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch
   801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch
   801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch
   820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
              mvebu (mamba, rango), x86_64, ramips/mt7621
Run-tested: ipq806x/R7800, mvebu (mamba, rango), x86_64, ramips (RT-AC57U)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[alter 820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoodhcpd: update to latest git HEAD
Hans Dedecker [Sat, 31 Oct 2020 20:23:45 +0000 (21:23 +0100)]
odhcpd: update to latest git HEAD

5700919 dhcpv6: add explicit dhcpv4o6 server address
e4f4e62 dhcpv6: add DHCPv4-over-DHCPv6 support
aff290b dhcpv6: check message type
2677fa1 router: fix advertisement interval option

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agohostapd: enable OWE for the basic-{openssl, wolfssl} variants
Rui Salvaterra [Sat, 31 Oct 2020 11:59:48 +0000 (11:59 +0000)]
hostapd: enable OWE for the basic-{openssl, wolfssl} variants

Opportunistic Wireless Encryption is needed to create/access encrypted networks
which don't require authentication.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agolibselinux: remove dependency on musl-fts for non-musl builds
Daniel Golle [Sat, 31 Oct 2020 00:06:53 +0000 (00:06 +0000)]
libselinux: remove dependency on musl-fts for non-musl builds

Suggested-by: Curtis Deptuck <curtdept@users.noreply.github.com>
Tested-by: Curtis Deptuck <curtdept@users.noreply.github.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agotarget: remove obsolete kernel version switches for 4.19
Adrian Schmutzler [Thu, 1 Oct 2020 15:02:47 +0000 (17:02 +0200)]
target: remove obsolete kernel version switches for 4.19

This removes unneeded kernel version switches from the targets after
kernel 4.19 has been dropped.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: remove obsolete kernel version switches for 4.19
Adrian Schmutzler [Thu, 1 Oct 2020 14:47:34 +0000 (16:47 +0200)]
kernel: remove obsolete kernel version switches for 4.19

This removes switches dependent on kernel version 4.19 as well as
several packages/modules selected only for that version.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>