openwrt/openwrt.git
3 years agorules.mk: use -fPIC instead of -fpic on arm64
Stijn Tintel [Fri, 4 Dec 2020 16:32:46 +0000 (18:32 +0200)]
rules.mk: use -fPIC instead of -fpic on arm64

Some packages fail to build on arm64 when PKG_ASLR_PIE_ALL=y, due to
machine-specific size restrictions on the global offset table.
While the manual instructs to recompile with -fPIC if it fails with
-fpic, by doing this per package, there is still a risk of random
breakage due to version bumps or other changes, so let's use -fPIC on
arm64 by default.

While comparing the sizes of 141 packages built with -fpic vs -fPIC,
most packages are either equal or smaller in size. Only 9 of the
compared packages turned out slightly larger.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agoramips: remove redundant status for USB controllers
Adrian Schmutzler [Tue, 1 Dec 2020 13:48:42 +0000 (14:48 +0100)]
ramips: remove redundant status for USB controllers

mt7621, mt7628an and rt5350 have USB controllers (ehci/ohci or xhci)
enabled by default. Thus, this patch drops redundant status=okay
statements in derived device DTS files.

While at it, also drop an explicit status=okay in mt7621.dtsi, as
this is default.

Note:

For rt5350, about 50 % of the devices enabled ehci/ohci in the DTS
files, and there is actually no device actively disabling it.
It looks like only a few people are aware that the controllers are
enabled by default here.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: simplify status for ehci/ohci on mt7628 TP-Link devices
Adrian Schmutzler [Tue, 1 Dec 2020 13:48:41 +0000 (14:48 +0100)]
ramips: simplify status for ehci/ohci on mt7628 TP-Link devices

At the moment, ehci/ohci is enabled in mt7628an SoC DTSI, then
disabled in the TP-Link-specific DTSI files, and finally enabled
again in the DTS files of the devices needing it.

This on-off-on scheme is hard to grasp on a quick look. Thus, this
patch drops the status in the TP-Link-specific DTSI files, having
the TP-Link devices treated like the rest of mt7628an DTSes, i.e.
ehci/ohci is enabled by default and needs to be disabled explicitly
where needed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: add support for Belkin F9J1108v2 (AC1750 DB Wi-Fi)
Damien Mascord [Mon, 7 Dec 2020 02:01:38 +0000 (13:01 +1100)]
ath79: add support for Belkin F9J1108v2 (AC1750 DB Wi-Fi)

This device is the non-US build of the F9K1115 v2, with a different
firmware magic.

Specifications:

SoC: QCA9558
CPU: 720 MHz
Flash: 16 MiB NOR
RAM: 128 MiB
WiFi 2.4 GHz: QCA9558-AT4A 3x3 MIMO 802.11b/g/n
WiFi 5 GHz: QCA9880-2R4E 3x3 MIMO 802.11a/n/ac
Ethernet: 4x LAN and 1x WAN (all 1gbps)
USB: 1 x USB 2.0 (lower), 1 x USB 3.0 (upper)

MAC addresses based on OEM firmware:

Interface   Address   Location
---------   -------   --------
lan         *:5A      sometimes in 0x6
wan         *:5B      0x0
2.4Ghz      *:5A      0x1002
5Ghz        As per mini PCIe EEPROM

Flashing instructions:

The factory.bin can be flashed via the Belkin web UI or via the uboot
http upgrade page.
Once the factory.bin has been written, sysupgrade.bin will work as usual.

Signed-off-by: Damien Mascord <tusker@tusker.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[wrap commit message/code, adjust label-mac-device, whitespace fixes,
merge block in 02_network]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agofirmware-utils: tplink-safeloader: refactor meta-partition padding
Sander Vanheule [Sat, 15 Aug 2020 07:51:18 +0000 (09:51 +0200)]
firmware-utils: tplink-safeloader: refactor meta-partition padding

Because some padding values in the TP-Link safeloader image generation
were hardcoded, different values were sometimes used throughout a
factory image. TP-Link's upgrade images use the same value everywhere,
so let's do the same here.

Although a lot of TP-Link's safeloader images have padded partition
payloads, images for the EAP-series of AC devices don't. This padding is
therefore also made optional.

By replacing the type of the padding value byte with a wider datatype,
new values outside of the previously valid range become available. Use
these new values to denote that padding should not be performed.
Because char might be signed, also replace the char literals by a
numeric literal. Otherwise '\xff' might be sign extended to 0xffff.

This results in factory images differing by 1 byte for:
* C2600
* ARCHER-C5-V2
* ARCHERC9
* TLWA850REV2
* TLWA855REV1
* TL-WPA8630P-V2-EU
* TL-WPA8630P-V2-INT
* TL-WPA8630P-V2.1-EU
* TLWR1043NDV4
* TL-WR902AC-V1
* TLWR942NV1
* RE200-V2
* RE200-V3
* RE220-V2
* RE305-V1
* RE350-V1
* RE350K-V1
* RE355
* RE450
* RE450-V2
* RE450-V3
* RE500-V1
* RE650-V1

The following factory images no longer have padding, shrinking the
factory images by a few bytes for:
* EAP225-OUTDOOR-V1
* EAP225-V3
* EAP225-WALL-V2
* EAP245-V1
* EAP245-V3

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agofirmware-utils: tplink-safeloader: refactor meta-partition generation
Sander Vanheule [Wed, 5 Aug 2020 18:49:44 +0000 (20:49 +0200)]
firmware-utils: tplink-safeloader: refactor meta-partition generation

TP-Link safeloader firmware images contain a number of (small)
partitions with information about the device. These consist of:
* The data length as a 32-bit integer
* A 32-bit zero padding
* The partition data, with its length set in the first field

The OpenWrt factory image partitions that follow this structure are
soft-version, support-list, and extra-para. Refactor the code to put all
common logic into one allocation call, and let the rest of the data be
filled in by the original functions.

Due to the extra-para changes, this patch results in factory images that
change by 2 bytes (not counting the checksum) for three devices:
* ARCHER-A7-V5
* ARCHER-C7-V4
* ARCHER-C7-V5

These were the devices where the extra-para blob didn't match the common
format. The hardcoded data also didn't correspond to TP-Link's (recent)
upgrade images, which actually matches the meta-partition format.

A padding byte is also added to the extra-para partition for EAP245-V3.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 years agolzo: remove
Rosen Penev [Sat, 5 Dec 2020 03:20:14 +0000 (19:20 -0800)]
lzo: remove

This is not used by any package in base. It will be moved to packages.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agomtd-utils: remove lzo build dependency
Rosen Penev [Sun, 6 Dec 2020 08:36:05 +0000 (00:36 -0800)]
mtd-utils: remove lzo build dependency

The build option `--withouth-lzo` is added in the Makefile which makes
the existence of lzo obsolete. To remove the lzo package from
openwrt.git entirely, remove the legacy dependency.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[improved commit message]
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agokernel: kmod-lib-zstd: enable crypto API support
Rui Salvaterra [Tue, 27 Oct 2020 09:42:31 +0000 (09:42 +0000)]
kernel: kmod-lib-zstd: enable crypto API support

Zstd is supported by the crypto API since Linux 4.18. Enable this feature and
reveal the package in the configuration section, so the user can select it.
This allows zstd to be used as a compression algorithm in zram, for example.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agohostapd: Disable 802.11b data rates by default
Nick Lowe [Fri, 4 Dec 2020 17:47:47 +0000 (17:47 +0000)]
hostapd: Disable 802.11b data rates by default

Set legacy_rates to 0 by default to disable 802.11b data rates by default.

The time has long come where 802.11b DSSS/CCK data rates should be disabled
by default in OpenWRT. Users in need of 802.11b client support can reasonably
enable these where they are needed.

The balance of equities has significantly, and for a long time, tipped
such that dropping backwards compatibility by default with 802.11b
devices is appropriate, proportionate and justified. By doing so,
management and control traffic is moved by default to a 20
MHz wide 6 Mb/s OFDM data rate instead of a 22 MHz wide 1 Mb/s DSSS data
rate. This is significantly more airtime efficient.

Signed-off-by: Nick Lowe <nick.lowe@gmail.com>
3 years agobcm63xx: fix ADB P.DG A4001N A-000-1A1-AX LEDs
Álvaro Fernández Rojas [Sun, 6 Dec 2020 18:20:04 +0000 (19:20 +0100)]
bcm63xx: fix ADB P.DG A4001N A-000-1A1-AX LEDs

There's no eth0.2 since all ethernet ports as configured as LAN.
LAN LED is unneeded since all ethernet ports have their own LED.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: add support for Technicolor TG582n
Daniele Castro [Thu, 10 Sep 2020 19:14:11 +0000 (21:14 +0200)]
bcm63xx: add support for Technicolor TG582n

Technicolor TG582n has a similar PCB as the OpenWrt's ADB P.DG A4001N1
with LEDs connected to different GPIO PINs in active low configuration.

Hardware:
* Board ID: DANT-1
* SoC: Broadcom BCM6328 (rev b0) @ 320MHz, CPU BMIPS4350
* RAM DDR2: 64 Mbyte - Winbond W9751G6KB-25
* Serial flash: 16 Mbyte - MXIC MX25L6445EMI
* Ethernet: 4x Ethernet 10/100 baseT
* Wifi 2.4GHz: Broadcom Corporation BCM43227 Wireless Network Adapter (rev 30)
* LEDs: 2x Power, 1x Ethernet, 1x Broadband, 2x Wi-Fi, 2x WPS, 4x ethernet
* Buttons: 1x Reset, 1x WPS, 1x WiFi
* UART: 1x TTL 115200n8, VCC GND TX RX, on J3 connector (short R62 and R63)

Installation via CFE:
* Stock CFE has to be overwritten with a generic 6328 one that can upload
  .bin images with no signature check (cfe6328_configured.bin)
* Connect a serial port to the board
* Stop the CFE boot process after power on by pressing enter
* Set static IP 192.168.2.10 and subnet mask 255.255.255.0
* Navigate to http://192.168.2.50/
* Upload the OpenWrt image file

PCB:   |GPIO:   |TG582n:

LED2R  |488(08) |red    Power
LED2G  |484(04) |green  Power

LED10R |486(06) |
LED13G |485(05) |green  Ethernet

LED11R |494(14) |
LED14G |491(11) |green  Broadband

LED5R  |487(07) |red    Internet
LED5G  |481(01) |green  Internet

LED12R |498(18) |
LED12G |499(19) |

LED6R  |482(02) |red    Wi-Fi
LED6G  |483(03) |green  Wi-Fi

LED7R  |490(10) |red    WPS
LED7G  |489(09) |green  WPS

LED4   |508(28) |ethernet port 4
LED3   |507(27) |ethernet port 3

LED9   |506(26) |ethernet port 2
LED8   |505(25) |ethernet port 1

SW3    |503(23) |key Reset

SW5    |504(24) |key WPS

SW4    |495(15) |key Wi-Fi

SW6    |493(13) |

SW1    |492(12) |

Signed-off-by: Daniele Castro <danielecastro@hotmail.it>
[Fix base-files, refresh patch]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: add support for Technicolor TG582n Telecom Italia branded
Daniele Castro [Tue, 8 Sep 2020 15:16:06 +0000 (17:16 +0200)]
bcm63xx: add support for Technicolor TG582n Telecom Italia branded

Technicolor TG582n Telecom Italia branded a.k.a.
Telecom Italia ADSL2+ Wi-Fi N (AGTWI)
has the same PCB as the unbranded Technicolor TG582n with LEDs
connected to different GPIO PINs in active low configuration and
different LED names. It has a PCB similar to the OpenWrt's ADB P.DG A4001N1 one.

Hardware:
* Board ID: DANT-V
* SoC: Broadcom BCM6328 (rev b0) @ 320MHz, CPU BMIPS4350
* RAM DDR2: 64 Mbyte - EtronTech EM68B16CWQD-25H
* Serial flash: 16 Mbyte - Spansion FL 128SAIF00
* Ethernet: 4x Ethernet 10/100 baseT
* Wifi 2.4GHz: Broadcom Corporation BCM43227 Wireless Network Adapter (rev 30)
* LEDs: 2x Power, 1x ADSL, 2x Internet, 2x Wi-Fi, 2x Service, 4x ethernet
* Buttons: 1x Reset, 1x WPS (named WiFi/LED)
* UART: 1x TTL 115200n8, VCC GND TX RX, on J3 connector (short R62 and R63)

Installation via CFE:
* Stock CFE has to be overwritten with a generic 6328 one that can upload
  .bin images with no signature check (cfe6328_configured.bin)
* Connect a serial port to the board
* Stop the CFE boot process after power on by pressing enter
* Set static IP 192.168.2.10 and subnet mask 255.255.255.0
* Navigate to http://192.168.2.50/
* Upload the OpenWrt image file

PCB:   |GPIO:   |TG582n:          |AGTWI:

LED2R  |488(08) |red    Power     |red   Power
LED2G  |484(04) |green  Power     |green Power

LED10R |486(06) |                 |missing R85 end LED
LED13G |485(05) |green  Ethernet  |green ADSL

LED11R |494(14) |                 |red   Internet
LED14G |491(11) |green  Broadband |green Internet

LED5R  |487(07) |red    Internet  |red   Wi-Fi
LED5G  |481(01) |green  Internet  |green Wi-Fi

LED12R |498(18) |                 |red   Service
LED12G |499(19) |                 |green Service

LED6R  |482(02) |red    Wi-Fi     |missing R108 end LED
LED6G  |483(03) |green  Wi-Fi     |missing R107 end LED

LED7R  |490(10) |red    WPS       |missing R91 end LED
LED7G  |489(09) |green  WPS       |missing R92 end LED

LED4   |508(28) |ethernet port 4  |ethernet port 4
LED3   |507(27) |ethernet port 3  |ethernet port 3

LED9   |506(26) |ethernet port 2  |ethernet port 2
LED8   |505(25) |ethernet port 1  |ethernet port 1

SW3    |503(23) |key Reset        |key Reset

SW5    |504(24) |key WPS          |key Wi-Fi/LED

SW4    |495(15) |key Wi-Fi        |missing R127 end key

SW6    |493(13) |                 |missing R171 end key

SW1    |492(12) |                 |missing R1 end key

Signed-off-by: Daniele Castro <danielecastro@hotmail.it>
[DT fixes, base-files fixes and device variant]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoopenssl: use --cross-compile-prefix in Configure
Eneas U de Queiroz [Sat, 28 Nov 2020 21:06:33 +0000 (18:06 -0300)]
openssl: use --cross-compile-prefix in Configure

This sets the --cross-compile-prefix option when running Configure, so
that that it will not use the host gcc to figure out, among other
things, compiler defines.  It avoids errors, if the host 'gcc' is
handled by clang:

mips-openwrt-linux-musl-gcc: error: unrecognized command-line option
'-Qunused-arguments'

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Tested-by: Rosen Penev <rosenp@gmail.com>
3 years agobcm63xx: add support for ADB P.DG A4101N A-000-1A1-AE
Daniele Castro [Wed, 9 Sep 2020 01:21:14 +0000 (03:21 +0200)]
bcm63xx: add support for ADB P.DG A4101N A-000-1A1-AE

ADB P.DG A4101N A-000-1A1-AE has a similar PCB as the OpenWrt's ADB P.DG A4001N1
with LEDs connected to different GPIO PINs in active low configuration.

Hardware:
* Board ID: 96328avngv
* SoC: Broadcom BCM6328 (rev b0) @ 320MHz, CPU BMIPS4350
* RAM DDR2: 64 Mbyte - Winbond W9751G6KB-25
* Serial flash: 16 Mbyte - Winbond 25Q128BVFG
* Ethernet: 4x Ethernet 10/100 baseT
* Wifi 2.4GHz: Broadcom Corporation BCM43225 Wireless Network Adapter (rev 23)
* LEDs: 1x Power, 1x DSL, 1x Internet, 4x ETH, 1x USB, 1x WLAN, 1x WPS, 1x TEL
* Buttons: 1x Reset, 1x WPS, 1x unnamed
* UART: 1x TTL 115200n8, VCC RX TX GND, on J502 connector

Installation via CFE:
* Stock CFE has to be overwritten with a generic 6328 one that can upload
  .bin images with no signature check (cfe6328_configured.bin)
* Connect a serial port to the board
* Stop the cfe boot process after power on by pressing enter
* Set static IP 192.168.2.10 and subnet mask 255.255.255.0
* Navigate to http://192.168.2.50/
* Upload the OpenWrt image file

A4101N GPIO LAYOUT:

Power            always on
DSL              GPIO483(03)
Internet         GPIO491(11)
ETH1             GPIO505(25)
ETH2             GPIO506(26)
ETH3             GPIO507(27)
ETH4             GPIO508(28)
USB              GPIO490(10)
WLAN             controlled by BCM43225
WPS              GPIO489(09)
TEL              GPIO511(31)

Key RESET        GPIO503(23)
Key WPS          GPIO504(24)
Key unnamed      GPIO492(12)

Signed-off-by: Daniele Castro <danielecastro@hotmail.it>
[Amend commit description, DTS improvements, refresh patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoprocd: also depend on jshn
Sven Roederer [Sat, 5 Dec 2020 22:15:53 +0000 (23:15 +0100)]
procd: also depend on jshn

fixes "file no found" error on stripped down images, caused by prod.sh:43.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
3 years agobuild: reduce cleanup binary calls in rootfs.mk
Paul Spooren [Mon, 21 Sep 2020 22:43:43 +0000 (12:43 -1000)]
build: reduce cleanup binary calls in rootfs.mk

Both `find` and `rm` only need to be called once for folders and files.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoopenvpn: remove
Rosen Penev [Tue, 1 Dec 2020 20:37:02 +0000 (12:37 -0800)]
openvpn: remove

This will be moved to packages.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Paul Spooren <mail@aparcar.org>
3 years agoopenvpn-easy-rsa: remove
Rosen Penev [Tue, 1 Dec 2020 20:37:01 +0000 (12:37 -0800)]
openvpn-easy-rsa: remove

This will be moved to packages.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoglibc: update to latest 2.32 commit (BZ# 26224)
Hans Dedecker [Sat, 5 Dec 2020 19:52:27 +0000 (20:52 +0100)]
glibc: update to latest 2.32 commit (BZ# 26224)

050022910b iconv: Accept redundant shift sequences in IBM1364 [BZ #26224]
ac0a6929c5 sh: Add sh4 fpu Implies folder
3ea24955bf struct _Unwind_Exception alignment should not depend on compiler flags

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agoodhcp6c: update to git HEAD
Hans Dedecker [Sat, 5 Dec 2020 19:45:29 +0000 (20:45 +0100)]
odhcp6c: update to git HEAD

faed29a dhcpv6: only refresh timers when reconfigure is valid
9c50975 dhcpv6: fix printing identity association id
a7b2221 dhcpv6: avoid sending continuous renew/rebind messages
d7afa2b dhcpv6: add extra syslog info traces
f5728e4 odhcp6c_find_entry: exclude priority from the list of fields that must match

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agobuild: make testing kernel decompression more portable
Felix Fietkau [Thu, 26 Nov 2020 15:12:12 +0000 (16:12 +0100)]
build: make testing kernel decompression more portable

On non-GNU systems, zcat often does not handle gzip decompression.
Use gzip -dc like the regular unpack command

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: remove an unused callback from the ip17xx switch driver
Felix Fietkau [Thu, 26 Nov 2020 16:29:11 +0000 (17:29 +0100)]
kernel: remove an unused callback from the ip17xx switch driver

Also remove the leftover kernel hack that adds support for it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobcm63xx: Add support for D-Link DSL-2750u rev C1
Ahmed Naseef [Tue, 18 Aug 2020 12:22:20 +0000 (17:52 +0530)]
bcm63xx: Add support for D-Link DSL-2750u rev C1

This adds support for the D-Link DSL-2750u rev C1.
(https://deviwiki.com/wiki/D-Link_DSL-2750U_rev_C1)

It uses the same hardware as ADB P.DG A4001N.
CPU:   Broadcom BCM63281 (320 MHz)
RAM:   32M (Winbond W9725G6JB)
Flash:   8M (MXIC MX25L6445E)
Ethernet:   4x 100 Mbps
Wireless:   802.11b/g/n: BCM43225
USB:   1x 2.0

Flash instructions:

1.  Assign static IP 192.168.1.100 to PC
2.  Unplug the power source
3.  Press the RESET button at the router, don't release it yet!
4.  Plug the power source.Wait some seconds
5.  Release the RESET button
6.  Browse to http://192.168.1.1
7.  Send the openwrt-bcm63xx-generic-DSL2750U-C1-squashfs-cfe.bin and
    wait some minutes until the firmware upgrade finish.

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
[DTS improvements, proper board patch, refresh patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: A4001N A-000-1A1-AX: remove PSI (nvram) partition
Daniele Castro [Sat, 5 Sep 2020 15:33:23 +0000 (17:33 +0200)]
bcm63xx: A4001N A-000-1A1-AX: remove PSI (nvram) partition

ADB P.DG A4001N A-000-1A1-AX a.k.a. Telecom Italia ADSL2+ Wi-Fi N (AGPWI)
is a Telecom Italia braded router and it seems that there are no public
available unbranded versions of this router.

The stock Telecom Italia braded firmware has many partitions and the
partition layout changes with every firmware relase.

The PSI nvram partition is present in the stock firmware under the
"UNKNOWN" name but it's empty, full of FFs. Since removing partitions
does not cause problems with the stock firmware reflashing procedure,
I removed from the dts the PSI nvram partition from OpenWrt, expanded
the rootfs one and added the NVRAM partition contained in the
cfe bootloader.

Furthermore this router's flash needs to be entirely reprogrammed
and a new generic bcm6328 cfe must be flashed to boot OpenWrt. The
same process takes place when reflashing the stock firmware.

Here follows the original flash layout for AGPWI_1.1.0_013, the last
stock Telecom Italia braded firmware for which we have root
credentials (admin/riattizzati).

Flash layout:

Section 00 Type BOOT       Range 0x00000000-0x00020000 MaxSize 0x00020000
        No more information.

Section 01 Type IMAGE      Range 0x00020000-0x007C0000 MaxSize 0x0079FF6C
        Uninitialized.

Section 02 Type IMAGE      Range 0x00800000-0x00FA0000 MaxSize 0x0079FF6C
        Uninitialized.

Section 03 Type CONF       Range 0x00FA0000-0x00FC0000 MaxSize 0x0001FF6C
        Size 0x0000841E Name 'rg_conf'
        Checksum 0x0041E03B Counter 0x0000051F Start Offset 0x00000000

Section 04 Type CONF       Range 0x00FC0000-0x00FE0000 MaxSize 0x0001FF6C
        Size 0x0000838E Name 'rg_conf'
        Checksum 0x00419A5A Counter 0x00000522 Start Offset 0x00000000

Section 05 Type FACTORY    Range 0x00FE0000-0x00FF0000 MaxSize 0x0000FF6C
        Size 0x00000554 Name 'rg_factory'
        Checksum 0x0001255E Counter 0x000004D3 Start Offset 0x00000000

Section 06 Type UNKNOWN    Range 0x00FF0000-0x01000000 MaxSize 0x00010000
        No more information.

Total 7 sections found.

The last AGPWI firmware relase should be AGPWI_4.0.6 and it has much more
partitions than AGPWI_1.1.0_013.

The cfe partition in the stock firmware is 0x00020000 bytes long unlike the
OpenWrt dts in wich it's 0x00010000 bytes long because from 0x00010000 to
0x00020000 in the stock cfe there are only 00s and also because the cfe must
anyway be reflashed with a generic bcm6328 cfe 0x00010000 bytes long to
run OpenWrt.

Signed-off-by: Daniele Castro <danielecastro@hotmail.it>
[Amend commit, remove unneeded cfe_nvram partition]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: support xmit_more in BQL
Sieng Piaw Liew [Thu, 12 Nov 2020 18:21:07 +0000 (02:21 +0800)]
bcm63xx: support xmit_more in BQL

Support bulking hardware TX queue by using xmit_more.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[Amend commit description, fix kernel xmit_more exceptions]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: add BQL support
Sieng Piaw Liew [Thu, 12 Nov 2020 18:20:30 +0000 (02:20 +0800)]
bcm63xx: add BQL support

Add Byte Queue Limits support to reduce/remove bufferbloat in bcm63xx target.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[Amend commit description]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoath79: add support for TP-Link TL-WDR7500 v3
Adrian Schmutzler [Fri, 14 Aug 2020 11:09:12 +0000 (13:09 +0200)]
ath79: add support for TP-Link TL-WDR7500 v3

This ports support for the TP-Link TL-WDR7500 v3 from ar71xx to ath79.

The basic features appear to be identical to the Archer C7 v1, however
it has the (supported) QCA9880-BR4A chip of the C7 v2.

Specifications:

  SoC:       QCA9558
  CPU:       720 MHz
  Flash:     8 MiB
  RAM:       128 MiB
  WLAN:      2.4 GHz b/g/n, 5 GHz a/n/ac
             Qualcomm Atheros QCA9880-BR4A
  Ethernet:  5x Gbit ports
  USB:       2x 2.0 ports

Flashing instructions:

Upload the factory image via the OEM firmware GUI.

TFTP recovery appears to be available as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: bump 5.4 to 5.4.81
John Audia [Wed, 2 Dec 2020 11:45:04 +0000 (06:45 -0500)]
kernel: bump 5.4 to 5.4.81

All modifications made by update_kernel.sh/no human intervention needed

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>
[another refresh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: drop redundant status for gpio/gpio0
Adrian Schmutzler [Tue, 1 Dec 2020 13:14:59 +0000 (14:14 +0100)]
ramips: drop redundant status for gpio/gpio0

The first gpio controller (gpio or gpio0) is always enabled by
default in the SoC DTSI files. No need to set status=okay in the
device DTS files a second time.

Remove the redundant statements.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: drop num-cs for SPI controller
Adrian Schmutzler [Sun, 29 Nov 2020 17:03:48 +0000 (18:03 +0100)]
ath79: drop num-cs for SPI controller

None of the spi drivers on ath79 uses the num-cs property.

Cc: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Chuanhong Guo <gch981213@gmail.com>
3 years agoath79: remove num-chipselects from SPI controller
Adrian Schmutzler [Sun, 29 Nov 2020 16:07:17 +0000 (17:07 +0100)]
ath79: remove num-chipselects from SPI controller

The num-chipselects property is only valid for bit-banged spi-gpio [1].

For the generic SPI controller bindings, num-cs would be the correct
property [2].

Since num-cs is not required on ath79 either, just drop the lines.

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-gpio.yaml
[2] https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-controller.yaml

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoprocd: output warning if user 'ubus' doesn't exist
Daniel Golle [Fri, 4 Dec 2020 14:39:40 +0000 (14:39 +0000)]
procd: output warning if user 'ubus' doesn't exist

 6acc48c early: fall-back to run ubus as root if user can't be found

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoubus: make sure ubusd starts in case user 'ubus' doesn't exist
Daniel Golle [Fri, 4 Dec 2020 14:38:24 +0000 (14:38 +0000)]
ubus: make sure ubusd starts in case user 'ubus' doesn't exist

 d1d9ddf ubusd: attempt to create socket folder

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agox86: enable CONFIG_MMC_SDHCI_ACPI for x86_64
Mengyang Li [Sat, 24 Oct 2020 00:07:18 +0000 (17:07 -0700)]
x86: enable CONFIG_MMC_SDHCI_ACPI for x86_64

Some x86_64 single board computer (including Atomic Pi)
has onboard emmc, but requires CONFIG_MMC_SDHCI_ACPI driver
to use or boot from it.

Here is boot message for the mmc device

[    2.838008] mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA
[    2.857536] mmc1: SDHCI controller on ACPI [80860F14:01] using ADMA
[    2.950019] mmc0: new HS200 MMC card at address 0001
[    3.158271] mmcblk0: mmc0:0001 M52516 14.6 GiB
[    3.170290] mmcblk0boot0: mmc0:0001 M52516 partition 1 4.00 MiB
[    3.177191] mmcblk0boot1: mmc0:0001 M52516 partition 2 4.00 MiB
[    3.183963] mmcblk0rpmb: mmc0:0001 M52516 partition 3 4.00 MiB, \
chardev (248:0)

Other lines changed in this config file are introduced by menuconfig.

Signed-off-by: Mengyang Li <mayli.he@gmail.com>
3 years agobase-files: informative service command in /etc/shinit. service command shows service...
Stan Grishin [Mon, 12 Oct 2020 22:03:15 +0000 (22:03 +0000)]
base-files: informative service command in /etc/shinit. service command shows services enabled/disabled and running status, when the service command is invoked with no/invalid arguments, like this:

Usage: service <service> [command]
The following services are available:
/etc/init.d/acme                   enabled         stopped
/etc/init.d/boot                   enabled         stopped
/etc/init.d/cron                   enabled         running
/etc/init.d/dnsmasq                enabled         running
...

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agobrcm63xx: add USB status LED in 01_leds for ADP P.DG A4001N
Daniele Castro [Mon, 14 Sep 2020 01:49:30 +0000 (03:49 +0200)]
brcm63xx: add USB status LED in 01_leds for ADP P.DG A4001N

Add a status LED in 01_leds for USB 2-1 connected devices.

Signed-off-by: Daniele Castro <danielecastro@hotmail.it>
3 years agobuild: Extract trusted-firmware-a.mk
Hauke Mehrtens [Wed, 23 Sep 2020 01:25:30 +0000 (03:25 +0200)]
build: Extract trusted-firmware-a.mk

The include/trusted-firmware-a.mk file is based on the
include/u-boot.mk file and should be used to build a Trusted Firmware-A
(TFA) which was previously named Arm trusted firmware.

This is useful for targets where the TFA is board specific like for
Marvell SoCs and probably also NXP Layerscape SoCs.

This also makes use of this abstraction in the
arm-trusted-firmware-mvebu package to build board specific ATF binaries.

The ATF binaries will be automatically activated and build when the
board is selected in the normal build or all boards are selected. This
should also activate the build when build bot creates images.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agotoolchain: musl: refresh patches
Hauke Mehrtens [Wed, 2 Dec 2020 21:06:34 +0000 (22:06 +0100)]
toolchain: musl: refresh patches

Refresh the musl patches

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agoath79: remove ar934x MDIO reset from MAC node
David Bauer [Sun, 29 Nov 2020 13:48:15 +0000 (14:48 +0100)]
ath79: remove ar934x MDIO reset from MAC node

Remove the MDIO reset from the MAC mode for the AR934x SoC family.
The reset is currently also defined for the MDIO node, where the reset
is acquired exclusively.

In case the ethernet node is enabled, this triggers a warning, as the
reset is already acquired by the MAC.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agobcm63xx: enetsw: switch to netdev_alloc_skb_ip_align
Sieng Piaw Liew [Mon, 2 Nov 2020 03:12:19 +0000 (11:12 +0800)]
bcm63xx: enetsw: switch to netdev_alloc_skb_ip_align

Increases packet processing performance by 30%.
Tested on BCM6328 320 MHz and iperf3 -M 512 for packet/sec performance.

Before:
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-30.00  sec   120 MBytes  33.7 Mbits/sec  277             sender
[  4]   0.00-30.00  sec   120 MBytes  33.5 Mbits/sec                  receiver

After:
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-30.00  sec   155 MBytes  43.3 Mbits/sec  354             sender
[  4]   0.00-30.00  sec   154 MBytes  43.1 Mbits/sec                  receiver

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[Merge patches, amend commit and add patch description]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: batch process RX path
Sieng Piaw Liew [Mon, 30 Nov 2020 03:32:18 +0000 (11:32 +0800)]
bcm63xx: batch process RX path

Use netif_receive_skb_list to batch process skb in RX.
Tested on BCM6328 320 MHz using iperf3 -M 512, increasing performance by 12.5%.

Before:
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-30.00  sec   120 MBytes  33.7 Mbits/sec  277             sender
[  4]   0.00-30.00  sec   120 MBytes  33.5 Mbits/sec                  receiver

After:
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-30.00  sec   136 MBytes  37.9 Mbits/sec  203             sender
[  4]   0.00-30.00  sec   135 MBytes  37.7 Mbits/sec                  receiver

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[Amend commit description]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoath79: enable LNA for all ar9344 TPLink CPE devices
Thomas Huehn [Wed, 2 Dec 2020 10:24:07 +0000 (11:24 +0100)]
ath79: enable LNA for all ar9344 TPLink CPE devices

The TPLink CPE devices CPE210/CPE510 based on ar9344 have a build-in
Low Noise Amplifier on both of the 2x2 mimo rx chains.
This patch activates those two LNAs in the respective receiving chains
and hence improves the RX sensitivity by about 20dB.

Tested on CPE510 v2 & v3.

Signed-off-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Acked-by: Robert Marko <robimarko@gmail.com>
3 years agonetifd: update to the latest version
Felix Fietkau [Wed, 2 Dec 2020 11:08:17 +0000 (12:08 +0100)]
netifd: update to the latest version

d6bd1047d004 vlandev: dump vlan id in device status
e0c838bd06a6 vlandev: support bridge-vlan aliases in the vid config parameter
574dc4a17105 system-dummy: print configured mac address
14f0e8ff928f system-linux: simplify mask check in system_if_apply_settings
524310276f20 system-linux: move device settings handling to device.c
42c48866f1c1 config: parse default mac address from board.json

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agorealtek: fix SFP ports on the dlink 10port switch
John Crispin [Wed, 2 Dec 2020 09:41:19 +0000 (10:41 +0100)]
realtek: fix SFP ports on the dlink 10port switch

Signed-off-by: John Crispin <john@phrozen.org>
3 years agorealtek: add zyxel_gs1900-10hp support
John Crispin [Tue, 1 Dec 2020 16:13:39 +0000 (17:13 +0100)]
realtek: add zyxel_gs1900-10hp support

Signed-off-by: John Crispin <john@phrozen.org>
3 years agorealtek: cleanup package selection
John Crispin [Sat, 28 Nov 2020 10:50:43 +0000 (11:50 +0100)]
realtek: cleanup package selection

Signed-off-by: John Crispin <john@phrozen.org>
3 years agorealtek: clean up board.json generation
John Crispin [Sat, 28 Nov 2020 10:44:44 +0000 (11:44 +0100)]
realtek: clean up board.json generation

In this new setup the switch is treated as wan, lan1.100 is used as
our mgmt vlan.

The board mac is applied to eth0, switch and switch.1

The board mac is assigned with the LA bit set to all lan ports while
incrementing it.

Signed-off-by: John Crispin <john@phrozen.org>
3 years agobase-files: allow setting device and bridge macs
John Crispin [Sat, 28 Nov 2020 10:43:47 +0000 (11:43 +0100)]
base-files: allow setting device and bridge macs

Add code for setting mac addresses inside board.json and rendering
them out to uci. On switches we want to have a unique MAC on each port.
With 48 port switches that would require 48 device sections in
/etc/config/network. Doing so via board.json is easier.

Signed-off-by: John Crispin <john@phrozen.org>
3 years agouboot-envtools: add support for the realtek target
John Crispin [Sat, 28 Nov 2020 10:46:47 +0000 (11:46 +0100)]
uboot-envtools: add support for the realtek target

On most boards the MAC is located inside the u-boot-env.

Signed-off-by: John Crispin <john@phrozen.org>
3 years agoREADME: mv logo.svg include/logo.{png,svg}
Paul Spooren [Fri, 27 Nov 2020 09:23:41 +0000 (23:23 -1000)]
README: mv logo.svg include/logo.{png,svg}

Some Git hoster (e.g. sr.ht) disable hosting of svg images (xml) to
avoid XSS attacks. To show the logo correctly on all code hosters use a
"safe" PNG image.

Also move logo(s) to include/ folder to lower autocomplete churn with
the `logs/` folder. While at it, replace absolute logo path and make it
relative, as this may break other code hosters as well.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoath79: restore sysupgrade support for ja76pf2 and routerstations
Tomasz Maciej Nowak [Tue, 1 Dec 2020 17:30:27 +0000 (18:30 +0100)]
ath79: restore sysupgrade support for ja76pf2 and routerstations

Because the bug described in FS#2428 has been fixed with bf2870c1d9e1
("kernel: fix mtd partition erase < parent_erasesize writes") these
devices can now safely do sysupgrade.

Restore sysupgrade support disabled in:

0cc87b3bacee ("ath79: image: disable sysupgrade images for routerstations
and ja76pf2")

cc5256a8bfa0 ("ath79: base-files: disable sysupgrade for routerstations
and ja76pf2")

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
[move Build block, remove check-size argument, wrap sysupgrade line,
make commit message easier to read]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
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>