openwrt/openwrt.git
5 years agobuild: label kernel and rootfs ext4 volumes
Yousong Zhou [Sun, 3 Nov 2019 04:10:12 +0000 (04:10 +0000)]
build: label kernel and rootfs ext4 volumes

UUID of ext4 volumes generated by make_ext4fs are determined by volume
label and it will all be 57f8f4bc-abf4-655f-bf67-946fc0f9f25b when label
is empty

Labeling them does not make them unique but tools like block command
from fstools have a better chance differentiating them

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agofstools: bump to version 2019-11-03
Yousong Zhou [Sun, 3 Nov 2019 02:18:33 +0000 (02:18 +0000)]
fstools: bump to version 2019-11-03

2f2a09a block: mount_device: err log only when mp deviates from spec
da4edc1 block: mount_device: skip extroot earlier
32c3126 block: mount_action: handle mount/umount deps
fb0700f block: support hierarchical mount/umount
1212b5b block: umount: skip / unless -a is given
eda8b3f block: use fsck.fat instead of dosfsck
d05276d libblkid-tiny: ntfs: fix use-after-free

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agolibubox: bump to version 2019-10-29
Yousong Zhou [Sun, 3 Nov 2019 02:16:56 +0000 (02:16 +0000)]
libubox: bump to version 2019-10-29

It contains a single change to vlist.h header file: "vlist: add more
macros for loop iteration".  This is needed for newer version of fstools

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agoubinize-image: set image sequence from SOURCE_DATE_EPOCH
Alexander Couzens [Sun, 3 Nov 2019 02:18:35 +0000 (03:18 +0100)]
ubinize-image: set image sequence from SOURCE_DATE_EPOCH

Set the image sequence number to SOURCE_DATE_EPOCH.
If not set, ubinize will use rand() as image sequence.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
5 years agoath79: revert erroneous second addition of files for WNDR4300
Adrian Schmutzler [Sat, 2 Nov 2019 23:43:23 +0000 (00:43 +0100)]
ath79: revert erroneous second addition of files for WNDR4300

There are two recent commits stating to add support for Netgear
WNDR4300, where the second one seems to be just leftover from
an earlier patch having been rebased.

Since the first patch already provides support in the most recent
state, just revert the second one.

This reverts commit cd87272eb241b1ea7955c1631ad2bb8d38e9fae9.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: fix Xiaomi MiWiFi Mini switch definition
Chih-Wei Chen [Wed, 16 Oct 2019 06:34:14 +0000 (14:34 +0800)]
ramips: fix Xiaomi MiWiFi Mini switch definition

Based on OpenWRT Table of Hardware > Xiaomi > Xiaomi Mi WiFi Mini

Switch Ports Defaults:
0, 1: LAN
4: WAN
6: CPU

Port in Web GUI (word printed on bottom of case)
WAN(Internet) map to switch port 4
LAN1(.) map to switch port 1
LAN2(..) map to switch port 0
CPU map to switch port 6

current setting is 1 WAN/ 4 LAN port, fix it.

Signed-off-by: Chih-Wei Chen <changeway@gmail.com>
[rebased after base-files split, fixed commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agox86: make profile titles more verbose
Paul Spooren [Wed, 31 Jul 2019 14:34:38 +0000 (16:34 +0200)]
x86: make profile titles more verbose

So far (nearly) all x86 profiles are called "Generic" which makes
it hard to distinguish them in special cases, like searching for a
specific profile (without pre-selecting target/subtarget).

To make this change locally working, remove the tmp/ folder to
force reload of menuconfig.

As these files are infrequently touched, the Copyright was updated
as well.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[changed commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: add support for TP-Link TL-WR1045ND v2
Rasim Kalimullin [Tue, 15 Oct 2019 14:05:17 +0000 (19:05 +0500)]
ath79: add support for TP-Link TL-WR1045ND v2

Specifications:
 - QCA9558 Soc
 - 720/800 (CPU/DDR)
 - 1x 10/100/1000 Mbps WAN Ethernet
 - 4x 10/100/1000 Mbps LAN Ethernet
 - 64 MB RAM (DDR2)
 - 8 MB FLASH
 - QCA9558 2.4 GHz 802.11bgn
 - 1x USB 2.0

Flash instruction
WebUI:
Download *-factory.bin image, rename to tp_firmware.bin and upload
it via the firmwary upgrade function of the stock firmware WebUI.

Tftp:
Rename OpenWRT or original firmware to wr1045v2_tp_recovery.bin and
Change your computer ip in 192.168.0.66 and subnet mask in 255.255.255.0.
Router will obtain IP 192.168.0.86 for a few seconds while loading,
when reset button pressed at power On.

Signed-off-by: Rasim Kalimullin <neutrino.vm@gmail.com>
[rebased onto base-files split]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: remove wmac mtd-mac-address for UniFi AC family
Roger Pueyo Centelles [Thu, 24 Oct 2019 13:29:14 +0000 (15:29 +0200)]
ath79: remove wmac mtd-mac-address for UniFi AC family

The MAC address for the wmac 2.4 GHz radio of the Ubiquiti UniFi AC
family of devices is actually embedded in the mtd-cal-data, so there
is no need for mtd-mac-address (which was incorrectly forcing wmac
to have the same MAC as eth0). This makes it coherent with the stock
firmware and the ar71xx target:

 · XX:XX:XX:X0:XX:XX eth0
 · XX:XX:XX:X1:XX:XX ath0/wlan1 (2.4 GHz)
 · XX:XX:XX:X2:XX:XX ath1/wlan0 (5 GHz)

Checked on a UniFi AC Mesh, a UniFi AC LR and a UniFi Lite.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
5 years agoath79: use nand_do_upgrade by default for nand subtarget
Adrian Schmutzler [Sun, 27 Oct 2019 23:15:29 +0000 (00:15 +0100)]
ath79: use nand_do_upgrade by default for nand subtarget

On nand subtarget, the default upgrade mechanism should be
nand_do_upgrade. This patch changes platform_do_upgrade()
accordingly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: split base-files into subtargets
Adrian Schmutzler [Tue, 22 Oct 2019 10:37:13 +0000 (12:37 +0200)]
ramips: split base-files into subtargets

While most of the target's contents are split into subtargets, the
base-files are maintained for the target as a whole.

However, OpenWrt already implements a mechanism that will use (and
even prefer) files in the subtargets' directories. This can be
exploited to make several scripts subtarget-specific and thus save
some space.

In certain cases, keeping files in parent (=target) base-files was
more convenient, and thus no splitting was performed for those.

Note that this will increase overall code lines, but reduce code
per subtarget.

base-files ipk size reduction:
master (mt7621)   60958 B
split (mt7620)    46358 B (- 14.3 kiB)
split (mt7621)    48759 B (- 11.9 kiB)
split (mt76x8)    44948 B (- 15.6 kiB)
split (rt288x)    43508 B (- 17.0 kiB)
split (rt305x)    45616 B (- 15.0 kiB)
split (rt3883)    44176 B (- 16.4 kiB)

Run-tested on:
GL.iNet GL-MT300N-V2 (mt76x8)
D-Link DWR-116 (mt7620)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: add newline for ASUS RT-ACx5P DTSes
Adrian Schmutzler [Fri, 25 Oct 2019 10:22:12 +0000 (12:22 +0200)]
ramips: add newline for ASUS RT-ACx5P DTSes

Those files are missing the newline at the end.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agorules.mk: remove "$(STAGING_DIR)/include"
Sebastian Kemper [Fri, 1 Nov 2019 09:18:30 +0000 (10:18 +0100)]
rules.mk: remove "$(STAGING_DIR)/include"

"$(STAGING_DIR)/include" was carried over from buildroot-ng to OpenWrt
in commit 60c1f0f64d23003a19a07d6b9638542130f6641d. buildroot has
dropped this directory a long time ago.

In OpenWrt the directory is still created by the PrepareStaging macro
and is part of the default TARGET_CPPFLAGS. But nothing at all installs
headers into this directory, nor should anything be installed under this
path.

Removing this directory from TARGET_CPPFLAGS will cut down the log noise
a bit. Not only will CPPFLAGS be shorter, there will be less warnings
set off by "-Wmissing-include-dirs" (or even failures when paired with
"-Werror"). After all the directory does not even _exist_ in the SDKs,
which are used on the build bots when building packages (see [1] and
[2]).

make[8]: Entering directory '/builder/shared-workdir/build/sdk/build_dir/target-aarch64_generic_musl/libmbim-1.20.0/src/common'
  CC       libmbim_common_la-mbim-common.lo
cc1: error: /builder/shared-workdir/build/sdk/staging_dir/target-aarch64_generic_musl/include: No such file or directory [-Werror=missing-include-dirs]
cc1: all warnings being treated as errors

[1] https://github.com/openwrt/packages/issues/10377
[2] https://github.com/openwrt/packages/pull/10378

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Acked-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: Rosen Penev <rosenp@gmail.com>
5 years agoath79: remove further redundant mtd-mac-address for wmac
Adrian Schmutzler [Thu, 31 Oct 2019 12:03:49 +0000 (13:03 +0100)]
ath79: remove further redundant mtd-mac-address for wmac

For several devices, wmac MAC address is set from art 0x1002
explicitly by using mtd-mac-address although mtd-cal-data is
pulled from art 0x1000.

With the MAC address in 0x1002, the driver should automatically
use it when reading caldata from 0x1000. Thus, remove the
redundant mtd-mac-address for those devices.

This patch addresses the cases where the calibration data partition
is not labelled art, having been overlooked in the first patch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoipq40xx: convert IMAGE_SIZE/KERNEL_SIZE/BLOCKSIZE to kiB
Adrian Schmutzler [Wed, 30 Oct 2019 18:44:17 +0000 (19:44 +0100)]
ipq40xx: convert IMAGE_SIZE/KERNEL_SIZE/BLOCKSIZE to kiB

This cosmetical patch converts IMAGE_SIZE, KERNEL_SIZE and
BLOCKSIZE definitions to kilobytes, as this is consistent and
easier to read/type.

An exception was made for asus_rt-ac58u, where the IMAGE_SIZE of
20439364 cannot be divided by 1024 (and also does not seem to
match anything in DTS).

Build-tested for all devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: fix several issues for ZyXEL NBG6716
Adrian Schmutzler [Sun, 27 Oct 2019 23:30:51 +0000 (00:30 +0100)]
ath79: fix several issues for ZyXEL NBG6716

This fixes several issues introduced with ZyXEL NBG6716 support:
- Inhomogeneous indent
- Wrong ath10k MAC patching function
- Wrong brackets for pad-to in nand.mk
- Add missing DEVICE_MODEL
- Remove k2t.sh include (copy/paste leftover)

Fixes: 99835e09992b ("ath79: add support for ZyXEL NBG6716")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: add support for Netgear WNDR4300
Michal Cieslakiewicz [Wed, 30 Oct 2019 11:32:21 +0000 (12:32 +0100)]
ath79: add support for Netgear WNDR4300

This patch adds ath79 support for Netgear WNDR4300.
Router was previously supported by ar71xx target only.
Note: device requires 'ar934x-nand' driver in kernel.

Specification
=============
  * Description: Netgear WNDR4300
  * Loader: U-boot
  * SOC: Atheros AR9344 (560 MHz)
  * RAM: 128 MiB
  * Flash: 128 MiB (NAND)
- U-boot binary: 256 KiB
- U-boot environment: 256 KiB
- ART: 256 KiB
- POT: 512 KiB
- Language: 2 MiB
- Config: 512 KiB
- Traffic Meter: 3 MiB
- Firmware: 25 MiB
- ART Backup: 256 KiB
- Reserved: 96 MiB
  * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8327)
  * Wireless:
- 2.4 GHz b/g/n (internal)
- 5 GHz a/n (AR9580)
  * USB: yes, 1 x USB 2.0
  * Buttons:
- Reset
- WiFi (rfkill)
- WPS
  * LEDs:
- Power (amber/green)
- WAN (amber/green)
- WLAN 2G (green)
- WLAN 5G (blue)
- 4 x LAN (amber/green)
- USB (green)
- WPS (amber/green)
  * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1
  * Power supply: DC 12V 2.5A
  * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2

Installation
============
  * TFTP recovery
  * TFTP via U-boot prompt
  * sysupgrade
  * Web interface

Note about partitioning: firmware partition offset (0x6c0000) is
hardcoded into vendor's u-boot, so this partition cannot be moved
and resized to include Netgear-specific flash areas (pot, language,
config, traffic_meter) not used by OpenWrt.

Test build configuration
========================
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_nand=y
CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr4300=y
CONFIG_ALL_KMODS=y
CONFIG_DEVEL=y
CONFIG_CCACHE=y
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_IMAGEOPT=y

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
5 years agohostapd: add IEEE 802.11k support
Kyle Copperfield [Thu, 31 Oct 2019 20:03:39 +0000 (20:03 +0000)]
hostapd: add IEEE 802.11k support

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Enables radio resource management to be reported by hostapd to clients.

Ref: https://github.com/lede-project/source/pull/1430
Co-developed-by: Lorenzo Santina <lorenzo.santina@edu.unito.it>
Signed-off-by: Lorenzo Santina <lorenzo.santina@edu.unito.it>
Signed-off-by: Kyle Copperfield <kmcopper@danwin1210.me>
5 years agoath79: add support for Netgear WNDR4300
Michal Cieslakiewicz [Thu, 31 Oct 2019 20:18:10 +0000 (21:18 +0100)]
ath79: add support for Netgear WNDR4300

This patch adds ath79 support for Netgear WNDR4300.
Router was previously supported by ar71xx target only.
Note: device requires 'ar934x-nand' driver in kernel.

Specification
=============
  * Description: Netgear WNDR4300
  * Loader: U-boot
  * SOC: Atheros AR9344 (560 MHz)
  * RAM: 128 MiB
  * Flash: 128 MiB (NAND)
- U-boot binary: 256 KiB
- U-boot environment: 256 KiB
- ART: 256 KiB
- POT: 512 KiB
- Language: 2 MiB
- Config: 512 KiB
- Traffic Meter: 3 MiB
- Firmware: 25 MiB
- ART Backup: 256 KiB
- Reserved: 96 MiB
  * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8327)
  * Wireless:
- 2.4 GHz b/g/n (internal)
- 5 GHz a/n (AR9580)
  * USB: yes, 1 x USB 2.0
  * Buttons:
- Reset
- WiFi (rfkill)
- WPS
  * LEDs:
- Power (amber/green)
- WAN (amber/green)
- WLAN 2G (green)
- WLAN 5G (blue)
- 4 x LAN (amber/green)
- USB (green)
- WPS (amber/green)
  * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1
  * Power supply: DC 12V 2.5A
  * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2

Installation
============
  * TFTP recovery
  * TFTP via U-boot prompt
  * sysupgrade
  * Web interface

Note about partitioning: firmware partition offset (0x6c0000) is
hardcoded into vendor's u-boot, so this partition cannot be moved
and resized to include Netgear-specific flash areas (pot, language,
config, traffic_meter) not used by OpenWrt.

Test build configuration
========================
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_nand=y
CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr4300=y
CONFIG_ALL_KMODS=y
CONFIG_DEVEL=y
CONFIG_CCACHE=y
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_IMAGEOPT=y

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
5 years agoipq40xx: ipq4019: Add new device Compex WPJ419
Daniel Danzberger [Fri, 1 Nov 2019 11:27:13 +0000 (12:27 +0100)]
ipq40xx: ipq4019: Add new device Compex WPJ419

This device contains 2 flash devices. One NOR (32M) and one NAND (128M).
U-boot and caldata are on the NOR, the firmware on the NAND.

    SoC:    IPQ4019
    CPU:    4x 710MHz ARMv7
    RAM:    256MB
    FLASH:  NOR:32MB NAND:128MB
    ETH:    2x GMAC Gigabit
    POE:    802.3 af/at POE, IEEE802.3af/IEEE802.3at(48-56V)
    WIFI:   1x 2.4Ghz Atheros qca4019 2x2 MU-MIMO
            1x 5.0Ghz Atheros qca4019 2x2 MU-MIMO
    USB:    1x 3.0
    PCI:    1x Mini PCIe
    SIM:    1x Slot
    SD:     1x MicroSD slot
    BTN:    Reset
    LED:    - Power
            - Ethernet
    UART:  1x Serial Port 4 Pin Connector (UART)
           1x Serial Port 6 Pin Connector (High Speed UART)
    POWER: 12V 2A

Installation
------------
Initial flashing can only be done via u-boot using the following commands:

tftpboot openwrt-ipq40xx-generic-compex_wpj419-squashfs-nand-factory.ubi
nand erase.chip; nand write ${fileaddr} 0x0 ${filesize}
res

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
5 years agolibnl: update to 3.5.0
DENG Qingfang [Sun, 20 Oct 2019 14:12:03 +0000 (22:12 +0800)]
libnl: update to 3.5.0

Update libnl to 3.5.0

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agouboot-mvebu: add support for Macronix mx25u12835f flash
Vladimir Vid [Fri, 25 Oct 2019 15:46:41 +0000 (17:46 +0200)]
uboot-mvebu: add support for Macronix mx25u12835f flash

Some of A3700 boards use mx25u12835f, specifically uDPU and ESPRESSObin v7.

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
5 years agoustream-ssl: Update to latest git HEAD
Hauke Mehrtens [Fri, 1 Nov 2019 20:16:18 +0000 (21:16 +0100)]
ustream-ssl: Update to latest git HEAD

465f8dc wolfssl: adjust to new API in v4.2.0
3b06c65 Update example certificate & key, fix typo
1c38fd8 wolfssl: enable CN validation
33308ee ustream-io-cyassl.c: fix client-mode connections
79d91aa Remove CyaSSL, WolfSSL < 3.10.4 support

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agolantiq: Allow PKG_ASLR_PIE for DSL and voice drivers
Hauke Mehrtens [Sun, 27 Oct 2019 17:18:29 +0000 (18:18 +0100)]
lantiq: Allow PKG_ASLR_PIE for DSL and voice drivers

When ASLR_PIE was activated globally these drivers failed to build
because the user space LDFLAGS leaked into the kernel build process.
This was fixed in upstream Linux kernel commit ce99d0bf312d ("kbuild:
clear LDFLAGS in the top Makefile") which went into Linux 4.17. The
lantiq target is now on Linux 4.19 only and these exceptions are not
needed any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agoath79: add support for Netgear WNR2200
Michal Cieslakiewicz [Wed, 30 Oct 2019 09:07:27 +0000 (10:07 +0100)]
ath79: add support for Netgear WNR2200

This patch adds ath79 support for Netgear WNR2200.
Router was previously supported by ar71xx target only (8 MiB variant).
Netgear WNR2200 has two flash versions - 8MiB sold in EU, US etc. and
16 MiB for Russia and China markets. Apart from flash size both variants
share the same hardware specification.

Specification
=============
  * Description: Netgear WNR2200
  * Loader: U-boot
  * SOC: Atheros AR7241 (360 MHz)
  * RAM: 64 MiB
  * Flash: 8 MiB or 16 MiB (SPI NOR)
- U-boot binary: 256 KiB
- U-boot environment: 64 KiB
- Firmware: 7808 KiB or 16000 KiB
- ART: 64 KiB
  * Ethernet: 4 x 10/100 LAN + 1 x 10/100 WAN
  * Wireless: 2.4 GHz b/g/n (Atheros AR9287)
  * USB: yes, 1 x USB 2.0
  * Buttons:
- Reset
- WiFi (rfkill)
- WPS
  * LEDs:
- Power (amber/green)
- WAN (amber/green)
- WLAN (blue)
- 4 x LAN (amber/green)
- WPS (green)
  * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1
  * Power supply: DC 12V 1.5A
  * MAC addresses: LAN on case label, WAN +1, WLAN +2

Installation
============
  * TFTP recovery
  * TFTP via U-boot prompt
  * sysupgrade
  * Web interface

Test build configuration
========================
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_generic=y
CONFIG_TARGET_ath79_generic_DEVICE_netgear_wnr2200-8m=y
CONFIG_ALL_KMODS=y
CONFIG_DEVEL=y
CONFIG_CCACHE=y
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_IMAGEOPT=y
CONFIG_KERNEL_DEBUG_INFO=y
CONFIG_KERNEL_DEBUG_KERNEL=y

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
5 years agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Fri, 1 Nov 2019 07:32:52 +0000 (08:32 +0100)]
rpcd: update to latest Git HEAD

d442d62 plugin: fix double free in finish callback
ee26d83 main: exec_self: make clang analyzer happy
90e40bd file: exec: properly free memory on error
9ecfada uci: free configs list memory on return
32fba36 exec: always call finish_cb to allow plugin to free up memory
ca3e2d5 plugin: do not free method name separately
02c6e1d exec: properly free memory on rpc_exec() error
cc50263 plugin: exec: properly free memory on parse error
bd0ed25 uci: reset uci_ptr flags when merging set operations
37aa919 plugin: fix leaking invoked method name for exec plugins

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agodropbear: rebuild libs on config change
Yousong Zhou [Fri, 1 Nov 2019 06:57:03 +0000 (06:57 +0000)]
dropbear: rebuild libs on config change

Required as dependency on dropbear config headers is not tracked in
dropbear build system

Fixes FS#2275

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agokernel: bump 4.19 to 4.19.81
Koen Vandeputte [Wed, 30 Oct 2019 11:57:43 +0000 (12:57 +0100)]
kernel: bump 4.19 to 4.19.81

Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.151
Koen Vandeputte [Wed, 30 Oct 2019 11:57:20 +0000 (12:57 +0100)]
kernel: bump 4.14 to 4.14.151

Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.9 to 4.9.198
Koen Vandeputte [Wed, 30 Oct 2019 11:52:18 +0000 (12:52 +0100)]
kernel: bump 4.9 to 4.9.198

Refreshed all patches.

Compile-tested on: none
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: mark kmod-usb-serial-wwan as hidden
Yousong Zhou [Wed, 30 Oct 2019 12:41:34 +0000 (12:41 +0000)]
kernel: mark kmod-usb-serial-wwan as hidden

The kconfig symbol is an invisible one since its introduction.  It is
not supposed to be enabled on its own.

Resolves FS#1821

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agokernel: bump 4.19 to 4.19.80
Koen Vandeputte [Mon, 28 Oct 2019 13:16:20 +0000 (14:16 +0100)]
kernel: bump 4.19 to 4.19.80

Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.150
Koen Vandeputte [Mon, 28 Oct 2019 13:15:55 +0000 (14:15 +0100)]
kernel: bump 4.14 to 4.14.150

Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.9 to 4.9.197
Koen Vandeputte [Mon, 28 Oct 2019 13:13:13 +0000 (14:13 +0100)]
kernel: bump 4.9 to 4.9.197

Refreshed all patches.

Compile-tested on: none
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agobase-files: hotplug-call: exit success when dir is absent
Yousong Zhou [Mon, 28 Oct 2019 09:41:08 +0000 (09:41 +0000)]
base-files: hotplug-call: exit success when dir is absent

"block mount" invokes "hotplug-call mount".  It emits the following
error when mount is not present

hotplug-call call failed

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agokernel: fix swconfig compilation with kernels 5.2+
Rafał Miłecki [Mon, 28 Oct 2019 15:59:49 +0000 (16:59 +0100)]
kernel: fix swconfig compilation with kernels 5.2+

This is related to the upstream kernel change 3b0f31f2b8c9 ("genetlink:
make policy common to family").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agonetfilter: fix NAT packaging with kernels 5.2+
Rafał Miłecki [Mon, 28 Oct 2019 07:39:02 +0000 (08:39 +0100)]
netfilter: fix NAT packaging with kernels 5.2+

It's related to the upstream kernel commit adf82accc5f5 ("netfilter:
x_tables: merge ip and ipv6 masquerade modules").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agoath79: fix incorrect identation in qca9557.dtsi
David Bauer [Sun, 27 Oct 2019 15:44:40 +0000 (16:44 +0100)]
ath79: fix incorrect identation in qca9557.dtsi

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath79: move base-files for ZyXEL NBG6716
Adrian Schmutzler [Sun, 27 Oct 2019 13:40:37 +0000 (14:40 +0100)]
ath79: move base-files for ZyXEL NBG6716

Due to rebase of the base-files split patch after adding support
for the ZyXEL NBG6716, its base-files were added to the generic
subtarget, although the device belongs to the nand subtarget.

This moves the definitions to their proper locations.

Fixes: 0130022baec0 ("ath79: split base-files into subtargets")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[improve commit message, rebase]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath79: add support for Aerohive HiveAP 121
David Bauer [Sun, 27 Oct 2019 14:49:18 +0000 (15:49 +0100)]
ath79: add support for Aerohive HiveAP 121

This commit adds support for the Aerohive HiveAP-121. It was previously
already supported in the ar71xx subtarget.

The following is copied from the commit which added ar71xx support:

Specification:
- SoC: Atheros AR9344-BC2A at 560MHz
- WiFi 1: 2.4GHz Atheros AR9340? - SoC
- WiFi 2: 5.0GHz Atheros AR9382-AL1A
- Memory: 128MB from 2x Nanya NT5TU32M16DG-AC
- SPI: 1MB Macronix MX25L8006E
- NAND: 128MB Hynix H27U1G8F2BTR-BC
- Ethernet: Atheros AR8035-A
- USB: 1x 2.0
- TPM: Atmel SC3204

Flashing:
1. Hook into UART (9600 baud) and enter U-Boot. You may need to enter
a password of administrator or AhNf?d@ta06 if prompted.
2. Once in U-Boot, download and flash LEDE factory image over tftp:

dhcp;
setenv serverip tftp-server-ip;
tftpboot 0x81000000 lede-ar71xx-nand-hiveap-121-squashfs-factory.bin;
nand erase 0x800000 0x800000;
nand write 0x81000000 0x800000 0x800000;
reset;

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath79: enable PCI for whole target
David Bauer [Wed, 23 Oct 2019 10:15:18 +0000 (12:15 +0200)]
ath79: enable PCI for whole target

This commit adds PCI support for the whole ath79 target. Previously,
this was only done in the generic and tiny subtargets.

With the introduction of the HiveAP-121, PCI will be a requirement for
all subtargets, thus moving PCI support to the target configuration.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath79: remove redundant mtd-mac-address for wmac
Adrian Schmutzler [Fri, 25 Oct 2019 11:38:37 +0000 (13:38 +0200)]
ath79: remove redundant mtd-mac-address for wmac

For several devices, wmac MAC address is set from art 0x1002
explicitly by using mtd-mac-address although mtd-cal-data is
pulled from art 0x1000.

With the MAC address in 0x1002, the driver should automatically
use it when reading caldata from 0x1000. Thus, remove the
redundant mtd-mac-address for those devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Jeff Kletsky <git-commits@allycomm.com>
Tested-by: Karl Palsson <karlp@etactica.com>
5 years agoath79: disable delays on AT803X config init
David Bauer [Thu, 24 Oct 2019 13:13:24 +0000 (15:13 +0200)]
ath79: disable delays on AT803X config init

Until upstream commit 6d4cd041f0af("net: phy: at803x: disable delay
only for RGMII mode"), delays were not disabled on driver probe
for the Atheros AR803x PHYs, although the RX delay is enabled on
soft and hard reset.

In addition, the TX delay setting is retained on soft-reset.

This patch disables both delays on config init to align the behavior
with kernel 5.1 and higher. It can be safely dropped with kernel 5.1.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath10k-firmware: update wave 1 firmware to 10.2.4-1.0-00047
David Bauer [Sat, 5 Oct 2019 10:27:44 +0000 (12:27 +0200)]
ath10k-firmware: update wave 1 firmware to 10.2.4-1.0-00047

This fixes frequent crashes observed on a UniFi AC Mesh using OpenWrt
master and 19.07. 18.06 seems not affected from our testing.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath10k-firmware: retrieve wave 1 firmware from kvalo
David Bauer [Sat, 5 Oct 2019 00:12:56 +0000 (02:12 +0200)]
ath10k-firmware: retrieve wave 1 firmware from kvalo

This commit changes the source of the Wave 1 ath10k-firmware
from linux-firmware to Kall Valos ath10k-firmware repository.

This is necessary as the firmware selected in linux-firmware produces
frequent crashes in some circumstances.

This patch can be removed as soon as linux-firmware carries
10.2.4-1.0-00047 firmware.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agobuild: have scripts/feeds honor all toplevel .mk-files of a feed
Sven Roederer [Sat, 9 Mar 2019 14:00:15 +0000 (15:00 +0100)]
build: have scripts/feeds honor all toplevel .mk-files of a feed

The luci and freifunk feed having a common Makefile included by the
individual packages. Currently a change to this file will be ignored
when running "scripts/feeds update".
When we are updating for a feed, add a dependency for all .mk files
in the root of it.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
5 years agoutil-linux: Disable utils requiring libpam
Rosen Penev [Tue, 22 Oct 2019 18:55:48 +0000 (11:55 -0700)]
util-linux: Disable utils requiring libpam

When the build system finds libpam, it enables building of these tools,
causing linker failures. Explicitly disable them as they are unused.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agoath79: split base-files into subtargets
Adrian Schmutzler [Tue, 22 Oct 2019 19:46:57 +0000 (21:46 +0200)]
ath79: split base-files into subtargets

While most of the target's contents are split into subtargets, the
base-files are maintained for the target as a whole.

However, OpenWrt already implements a mechanism that will use (and
even prefer) files in the subtargets' directories. This can be
exploited to make several scripts subtarget-specific and thus save
some space (especially helpful for the tiny devices).

The only script remaining in parent base-files is
/etc/hotplug.d/ieee80211/00-wifi-migration, everything else is
moved/split.

Note that this will increase overall code lines, but reduce code
per subtarget.

base-files ipk size reduction:
master (generic)   49135 B
split (generic)    48533 B (- 0.6 kiB)
split (tiny)       43337 B (- 5.7 kiB)
split (nand)       44423 B (- 4.6 kiB)

Tested on TL-WR1043ND v4 (generic) and TL-WR841N v12 (tiny).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: ethernet: Replace random_ether_addr with eth_hw_addr_random
Rosen Penev [Wed, 13 Mar 2019 21:05:44 +0000 (14:05 -0700)]
ramips: ethernet: Replace random_ether_addr with eth_hw_addr_random

eth_hw_addr_random additionally sets addr_assign_type to NET_ADDR_RANDOM.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agoipq40xx: add label MAC address for Netgear EX6100v2/EX6150v2
Adrian Schmutzler [Mon, 21 Oct 2019 11:36:28 +0000 (13:36 +0200)]
ipq40xx: add label MAC address for Netgear EX6100v2/EX6150v2

This is based on the EX6150v2, which should be identical to
the EX6100v2:

The device bears two MAC addresses ("MAC 1" and "MAC 2") that
correspond to phy0 and phy1.

The ethernet MAC address (gmac0) is the same as phy0.
As this one is accessible via local-mac-address in gmac0, the
latter is used for label-mac-device.

(Although this is a one-port, gmac1 also has a local-mac-address
assigned. This has the same vendor part as the other addresses,
but completely different data for the device part.)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoipq40xx: use DEVICE_VARIANT for Unielec U4019 flash size
Adrian Schmutzler [Mon, 21 Oct 2019 11:20:15 +0000 (13:20 +0200)]
ipq40xx: use DEVICE_VARIANT for Unielec U4019 flash size

If flash size is used as part of a device's title, it should be
specified as DEVICE_VARIANT like for the other devices so far.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: fix remaining IMAGE_SIZE issues
Adrian Schmutzler [Tue, 22 Oct 2019 11:08:25 +0000 (13:08 +0200)]
ath79: fix remaining IMAGE_SIZE issues

This fixes the remaining IMAGE_SIZE issues in ath79 target.
All devices in target have been checked, so together with
previous patches this target should be "clean" afterwards.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: fix IMAGE_SIZE for common TP-Link definitions
Adrian Schmutzler [Tue, 22 Oct 2019 11:08:24 +0000 (13:08 +0200)]
ath79: fix IMAGE_SIZE for common TP-Link definitions

So far, IMAGE_SIZE is set as follows:
tplink-4m*   3904k  0x3d0000
tplink-8m*   7936k  0x7c0000
tplink-16m* 15872k  0xf80000

However, based on the size of firmware partitions in DTS it should
be:
tplink-4m*   3904k  0x3d0000
tplink-8m*   8000k  0x7d0000
tplink-16m* 16192k  0xfd0000

All (!) 8m*/16m* devices actually follow the latter scheme, which
is also consistent in terms of left free space for other
partitions. Thus, fix it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: tidy up and fix IMAGE_SIZE for Ubiquiti devices
Adrian Schmutzler [Tue, 22 Oct 2019 11:08:23 +0000 (13:08 +0200)]
ath79: tidy up and fix IMAGE_SIZE for Ubiquiti devices

This addresses IMAGE_SIZE inconsistencies in generic_ubnt.mk by:

1. (cosmetical) Move IMAGE_SIZE out of top definition ("ubnt"),
   since despite two all subdefinition have different values.
2. (change) Fix IMAGE_SIZE for ubnt-xm and ubnt-bz (7552k->7488k).
3. (cosmetical) Move IMAGE_SIZE of ubnt-wa devices to parent node
   since all have same size (it is defined in parent DTSI ...).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: wnr1000v2: fix image header information
Michal Cieslakiewicz [Tue, 22 Oct 2019 13:26:12 +0000 (15:26 +0200)]
ath79: wnr1000v2: fix image header information

Factory image generated for Netgear WNR1000 v2 has incorrect device
and hardware ID information in header due to missing makefile
variables. This fix adds them to device section.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
5 years agoath79: add support for ZyXEL NBG6716
André Valentin [Wed, 23 Oct 2019 09:30:30 +0000 (11:30 +0200)]
ath79: add support for ZyXEL NBG6716

Attention: Kernel partition size has been enlarged to 4MB.
To switch, you must update to latest ar71xx-nand snapshort and flash the
sysupgrade-4M-Kernel.bin:

zcat openwrt-ath79-nand-zyxel_nbg6716-squashfs-sysupgrade-4M-Kernel.bin | mtd -r -e ubi write - firmware; reboot -f
You will end up with a fresh config if you do not inject config into the image.

The NBG6716 may come with 128MB or 256MB NAND. ar71xx was able to use all, but
ath79 can only use the first 128MB. Therefore the complete NAND needs to be
overwritten. If not, the old UBI may make problems and lead to reboot loop.

Access the real u-boot shell:
ZyXEL uses a proprietary loader/shell on top of u-boot: "ZyXEL zloader v2.02"
When the device is starting up, the user can enter the the loader shell
by simply pressing a key within the 3 seconds once the following string
appears on the serial console:

|   Hit any key to stop autoboot:  3

The user is then dropped to a locked shell.

|NBG6716> HELP
|ATEN    x[,y]     set BootExtension Debug Flag (y=password)
|ATSE    x         show the seed of password generator
|ATSH              dump manufacturer related data in ROM
|ATRT    [x,y,z,u] RAM read/write test (x=level, y=start addr, z=end addr, u=iterations)
|ATGO              boot up whole system
|ATUR    x         upgrade RAS image (filename)
|NBG6716>

In order to escape/unlock a password challenge has to be passed.
Note: the value is dynamic! you have to calculate your own!

First use ATSE $MODELNAME (MODELNAME is the hostname in u-boot env)
to get the challange value/seed.

|NBG6716> ATSE NBG6716
|012345678901

This seed/value can be converted to the password with the help of this
bash script (Thanks to http://www.adslayuda.com/Zyxel650-9.html authors):

- tool.sh -
ror32() {
  echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) ))
}
v="0x$1"
a="0x${v:2:6}"
b=$(( $a + 0x10F0A563))
c=$(( 0x${v:12:14} & 7 ))
p=$(( $(ror32 $b $c) ^ $a ))
printf "ATEN 1,%X\n" $p
- end of tool.sh -

|# bash ./tool.sh 012345678901
|
|ATEN 1,879C711

copy and paste the result into the shell to unlock zloader.

|NBG6716> ATEN 1,0046B0017430

If the entered code was correct the shell will change to
use the ATGU command to enter the real u-boot shell.

|NBG6716> ATGU
|NBG6716#

Signed-off-by: André Valentin <avalentin@marcant.net>
5 years agoar71xx: fix bug in NBG6716 kernelpacking, add firmware partition
André Valentin [Wed, 23 Oct 2019 09:30:29 +0000 (11:30 +0200)]
ar71xx: fix bug in NBG6716 kernelpacking, add firmware partition

-Fix the kernel image generation (more robust)
-Add a firmware partition table allowing easy upgrade to ath79

Signed-off-by: André Valentin <avalentin@marcant.net>
5 years agotools/mkrasimage: Add support for 128k header size
André Valentin [Wed, 23 Oct 2019 09:30:28 +0000 (11:30 +0200)]
tools/mkrasimage: Add support for 128k header size

128k header size support is needed for ZyXEL NBG6716.

Signed-off-by: André Valentin <avalentin@marcant.net>
5 years agoramips: add support for Xiaomi Mi Wi-Fi Router 3G v2
Paul Fertser [Fri, 25 Oct 2019 10:18:43 +0000 (13:18 +0300)]
ramips: add support for Xiaomi Mi Wi-Fi Router 3G v2

- CMIIT ID: 2019AP2581
- SoC:      MediaTek MT7621
- Flash:    16MiB NOR SPI (GigaDevice GD25Q128B)
- RAM:      128MiB DDR3 (ESMT M15T1G1664A)
- Serial:   As marked on PCB, 3V3 logic, baudrate is 115200, 8n1
- 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 (looks like
an illegal OpenWrt fork) won't accept any serial input unless
"uart_en" is set to "1". Tricks to force u-boot to use default
environment do not help as it's restricted in the same way.

With bootloader unlocked the easiest way would be to TFTP the
sysupgrade image or to sysupgrade after loading an initramfs one.

For porting the flash contents were changed externally with an SPI
programmer (after lifting Vcc flash IC pin away from the PCB).

Forum thread [0] indicates that this device is identical to "Xiaomi Mi
Router 4A Gigabit Edition".

[0] https://forum.openwrt.org/t/xiaomi-mi-router-4a-gigabit-edition-r4ag-r4a-gigabit-fully-supported-but-requires-overwriting-spi-flash-with-programmer/36685

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
5 years agoocteontx: fix thunderx BGX underflow irq name
Tim Harvey [Fri, 25 Oct 2019 21:27:31 +0000 (14:27 -0700)]
octeontx: fix thunderx BGX underflow irq name

request_irq requires irq names to be static/allocated and not on the stack

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
5 years agoramips: remove phy0tpt trigger from RT-AC65P/RT-AC85P power LED
Adrian Schmutzler [Fri, 25 Oct 2019 12:19:12 +0000 (14:19 +0200)]
ramips: remove phy0tpt trigger from RT-AC65P/RT-AC85P power LED

This patch removes a phy0tpt trigger from the power LED, which
seems to have been added by mistake.

WiFi LEDs using phy0radio and phy1radio triggers are present and
used correctly.

Cc: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: remove redundant mtd-eeprom in mt76x8 DTS files
Adrian Schmutzler [Fri, 25 Oct 2019 12:06:45 +0000 (14:06 +0200)]
ramips: remove redundant mtd-eeprom in mt76x8 DTS files

In mt7628an.dtsi, calibration data for wmac is already defined:
mediatek,mtd-eeprom = <&factory 0x0>;

Thus, this patch removes redundant entries of this property in
derived DTS files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: remove redundant mtd-mac-address for WiFi
Adrian Schmutzler [Fri, 25 Oct 2019 12:06:44 +0000 (14:06 +0200)]
ramips: remove redundant mtd-mac-address for WiFi

When caldata locations are defined with mediatek,mtd-eeprom the
MAC address is automatically read from offset +4. Thus, specifying
that location explicitly is redundant.

This patch removes those redundant definitions.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agokernel: mtd: spinand: Backport chip definitions
Jeff Kletsky [Thu, 24 Oct 2019 16:54:11 +0000 (09:54 -0700)]
kernel: mtd: spinand: Backport chip definitions

generic: Add/rename patches for upstream consistency

ipq40xx: generic-level patch replaces same-source patches-4.19/
         082-v4.20-mtd-spinand-winbond-Add-support-for-W25N01GV.patch

The SPI-NAND framework from Linux uses common driver code that is then
"tuned" by a tiny struct of chip-specific data that describes
available commands, timing, and layout (data and OOB data). Several
manufacturers and chips have been added since 4.19, several of which
are used in devices already supported by OpenWrt (typically with no or
"legacy" access to their NAND memory). This commit catches up the
supported-chip definitions through Linux 5.2-rc6 and linux/next.

The driver is only compiled for platforms with CONFIG_MTD_SPI_NAND=y.
This presently includes ipq40xx and pistachio, with the addition of
ath79-nand in these commits (and not ath79-generic or ath79-tiny).

Upstream patches refreshed against 4.19.75

Build-tested-on: ipq40xx
Run-tested-on: ath79-nand

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years agoath79: uboot-envtools: Add GL-AR300M-Lite
Jeff Kletsky [Wed, 23 Oct 2019 17:02:19 +0000 (10:02 -0700)]
ath79: uboot-envtools: Add GL-AR300M-Lite

Add the GL.iNet GL-AR300M-Lite to the list of supported boards.

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years agoath79: Refactor GL.iNet GL-AR300M-series generic.mk
Jeff Kletsky [Wed, 23 Oct 2019 16:56:47 +0000 (09:56 -0700)]
ath79: Refactor GL.iNet GL-AR300M-series generic.mk

Rework DEVICE_VENDOR, DEVICE_MODEL, and DEVICE_VARIANT
for the GL-AR300M series on the ath79-generic target.

Changes GL-AR300M-Lite to the current form with
DEVICE_VARIANT := Lite (board name is unchanged)

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years agoath79: GL-AR750S: Add I2C Support
Jeff Kletsky [Wed, 23 Oct 2019 16:55:02 +0000 (09:55 -0700)]
ath79: GL-AR750S: Add I2C Support

The GL-AR750S has an internal header for I2C.

Provide DTS definitions for the i2c-gpio driver.

The I2C drivers; kmod-i2c-core, kmod-i2c-gpio
consume ~20 kB of flash and can be loaded as modules,

Default clock measured ~11.2 ms period, ~89 kHz

The board has well-labeled (unpopulated) headers for serial and I2C
along the front edge of the board (the edge with the LEDs). Looking
from the top, rear of the unit (behind Ethernet jacks)

  -------------------------------------------
       5G_LED        2G_LED      PWR_LED

                 O O O O O O O

                 3 S S G T R G
                 V C D N X X N
                 3 L A D     D

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years agoath79: GL-AR300M series: Add I2C Support
Jeff Kletsky [Wed, 23 Oct 2019 16:55:01 +0000 (09:55 -0700)]
ath79: GL-AR300M series: Add I2C Support

The GL-AR300M series have an internal header for I2C.

Provide DTS definitions for the i2c-gpio driver.

The I2C drivers; kmod-i2c-core, kmod-i2c-gpio
consume ~20 kB of flash and can be loaded as modules,

Default clock measured ~11.4 ms period, ~88 kHz

The board has two sets of (unpopulated) headers.  While facing the
back of the board (looking into the Ethernet jacks), and looking from
the top, the one on the left edge of the baord with four holes is the
I2C header. It appears to be labeled J8 on "GL-AR300M-V1.4.0" boards.

    | (Patch antenna)
    |
    |
    |  O   GND
    |  O   SDA / GPIO 17
    |  O   SCL / GPIO 16
    |  ⊡   3V3 (square land)
    |
    | (Ethernet jacks)

https://docs.gl-inet.com/en/3/hardware/ar300m/#pcb-pinout states
"Note: I2C is not working in some early version of the router."

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years agoramips: add support for Asus RT-AC65P
Gabor Varga [Tue, 22 Oct 2019 19:44:09 +0000 (21:44 +0200)]
ramips: add support for Asus RT-AC65P

The Asus RT-AC65P router is identical with the RT-AC85P, but better to make separate images for it.

On both routers the installation can be done also via SSH:

Note: The user/password for SSH is identical with the one used in the
Web-interface.

1. Complete the initial setup wizard.
2. Activate SSH under "Administration" -> "System".
3. Transfer the OpenWrt factory image via scp:
 > scp openwrt-ramips-mt7621-asus_rt-ac65p-squashfs-factory.bin admin@192.168.50.1:/tmp
4. Connect via SSH to the router.
 > ssh admin@192.168.50.1
5. Write the OpenWrt image to flash.
 > mtd-write -i
/tmp/openwrt-ramips-mt7621-asus_rt-ac65p-squashfs-factory.bin -d linux
6. Reboot the router
 > reboot

Changelog:

v3: removed [] from filename, rebased to latest master
v2: Rebased to latest master
v1: Initial release

Signed-off-by: Gabor Varga <vargagab@gmail.com>
5 years agokernel: netfilter: reuse kconfig and files info from include dir
Yousong Zhou [Wed, 23 Oct 2019 13:24:42 +0000 (13:24 +0000)]
kernel: netfilter: reuse kconfig and files info from include dir

Less chance of missing out kconfig symbols at least

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agotoolchain: gcc: enable sanitizers for glibc toolchain
Yousong Zhou [Sat, 19 Oct 2019 12:00:43 +0000 (12:00 +0000)]
toolchain: gcc: enable sanitizers for glibc toolchain

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agotools: keep stamp file in $(STAGING_DIR_HOST)
Yousong Zhou [Thu, 24 Oct 2019 11:31:50 +0000 (11:31 +0000)]
tools: keep stamp file in $(STAGING_DIR_HOST)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agoar71xx: add model detection for UniFi AC-LR
Andreas Ziegler [Tue, 22 Oct 2019 20:44:29 +0000 (22:44 +0200)]
ar71xx: add model detection for UniFi AC-LR

This commit adds correct model detection for UniFi
AC-LR. Previously, said device was incorrectly detected
as UniFi-AC-LITE/MESH.

The Information about the device is stored at 0xC in the EEPROM
partition. It corresponds to the sysid in /etc/board.info of the
Ubiquiti stock firmware.

Signed-off-by: Andreas Ziegler <dev@andreas-ziegler.de>
[adjust naming style of target to existing ones]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoipq40xx: add support for AVM FRITZ!Repeater 1200
David Bauer [Tue, 10 Sep 2019 19:07:23 +0000 (21:07 +0200)]
ipq40xx: add support for AVM FRITZ!Repeater 1200

Hardware
--------
SoC:   Qualcomm IPQ4019
RAM:   256M DDR3
FLASH: 128M NAND
WiFi:  2T2R IPQ4019 bgn
       2T2R IPQ4019 a/n/ac
ETH:   Atheros AR8033 RGMII PHY
BTN:   1x Connect (WPS)
LED:   Power (green/red/yellow)

Installation
------------

1. Grab the uboot for the Device from the 'u-boot-fritz1200'
   subdirectory. Place it in the same directory as the 'eva_ramboot.py'
   script. It is located in the 'scripts/flashing' subdirectory of the
   OpenWRT tree.

2. Assign yourself the IP address 192.168.178.10/24. Connect your
   Computer to one of the boxes LAN ports.

3. Connect Power to the Box. As soon as the LAN port of your computer
   shows link, load the U-Boot to the box using following command.

   > ./eva_ramboot.py --offset 0x85000000 192.168.178.1 uboot-fritz1200.bin

4. The U-Boot will now start. Now assign yourself the IP address
   192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP
   server root directory and rename it to 'FRITZ1200.bin'.

5. The Box will now boot OpenWRT from RAM. This can take up to two
   minutes.

6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using
   scp. SSH into the Box and first write the Bootloader to both previous
   kernel partitions.

   > mtd write /path/to/uboot-fritz1200.bin uboot0
   > mtd write /path/to/uboot-fritz1200.bin uboot1

7. Remove the AVM filesystem partitions to make room for our kernel +
   rootfs + overlayfs.

   > ubirmvol /dev/ubi0 --name=avm_filesys_0
   > ubirmvol /dev/ubi0 --name=avm_filesys_1

8. Flash OpenWRT peristently using sysupgrade.

   > sysupgrade -n /path/to/openwrt-sysupgrade.bin

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoipq-wifi: add AVM FRITZ!Repeater 1200 bdf
David Bauer [Sat, 21 Sep 2019 16:59:28 +0000 (18:59 +0200)]
ipq-wifi: add AVM FRITZ!Repeater 1200 bdf

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agouboot-fritz4040: update to latest HEAD
David Bauer [Tue, 15 Oct 2019 16:06:57 +0000 (18:06 +0200)]
uboot-fritz4040: update to latest HEAD

f92be9d add support for AVM FRITZ!Repeater 1200
d651302 enable support for Atheros AR8033 PHY
e4c857c add machtype override hack

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoipq40xx: add missing backslash in 11-ath10k-caldata
David Bauer [Tue, 22 Oct 2019 23:15:05 +0000 (01:15 +0200)]
ipq40xx: add missing backslash in 11-ath10k-caldata

This adds a missing backslash in the caldata-extraction script. Without
this fix, caldata extraction fails for every device.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoipq40xx: fix ethernet probe abort on missing phy-reset
David Bauer [Tue, 22 Oct 2019 22:26:23 +0000 (00:26 +0200)]
ipq40xx: fix ethernet probe abort on missing phy-reset

This commit completely fixes the abortion of the ipq40xx ethernet driver
probe in case no phy-reset is defined.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agobrcm63xx: split up DEVICE_TITLE
Moritz Warning [Wed, 11 Sep 2019 19:15:01 +0000 (21:15 +0200)]
brcm63xx: split up DEVICE_TITLE

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT
Uses DEVICE_ALT* variables for alternative vendor/retailer names.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agoprocd: update to latest git HEAD
Hans Dedecker [Tue, 22 Oct 2019 19:42:25 +0000 (21:42 +0200)]
procd: update to latest git HEAD

258aa04 procd: Add cached and available to memory table

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agobrcm63xx: fix build with GCC 8.3
Jonas Gorski [Tue, 22 Oct 2019 19:33:22 +0000 (21:33 +0200)]
brcm63xx: fix build with GCC 8.3

Fixes the following build error when building when using GCC 8.3:

In file included from ./include/linux/string.h:19,
                 from ./include/linux/bitmap.h:9,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/mips/include/asm/processor.h:15,
                 from ./arch/mips/include/asm/thread_info.h:16,
                 from ./include/linux/thread_info.h:38,
                 from ./include/asm-generic/preempt.h:5,
                 from ./arch/mips/include/generated/asm/preempt.h:1,
                 from ./include/linux/preempt.h:81,
                 from ./include/linux/spinlock.h:51,
                 from ./include/linux/mmzone.h:8,
                 from ./include/linux/bootmem.h:8,
                 from arch/mips/bcm63xx/prom.c:10:
arch/mips/bcm63xx/prom.c: In function 'prom_init':
./arch/mips/include/asm/string.h:162:11: error: '__builtin_memcpy' forming offset [2, 32] is out of the bounds [0, 1] of object 'bmips_smp_movevec' with type 'char' [-Werror=array-bounds]
   __ret = __builtin_memcpy((dst), (src), __len); \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/bcm63xx/prom.c:97:3: note: in expansion of macro 'memcpy'
   memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20);
   ^~~~~~
In file included from arch/mips/bcm63xx/prom.c:14:
./arch/mips/include/asm/bmips.h:80:13: note: 'bmips_smp_movevec' declared here
 extern char bmips_smp_movevec;

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
5 years agomac80211: fix build of rtw88
David Bauer [Tue, 22 Oct 2019 13:16:41 +0000 (15:16 +0200)]
mac80211: fix build of rtw88

This commit fixes failing builds because of an incorrect configuration
for the kmod-rtw88 package.

RTW88_8822BE as well as RTW88_8822CE have to bes selected as "y" even
when building the driver as a module.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: fix LAN/WAN MAC addresses of Xiaomi MiWiFi Mini board
Adrian Schmutzler [Mon, 21 Oct 2019 13:40:32 +0000 (15:40 +0200)]
ramips: fix LAN/WAN MAC addresses of Xiaomi MiWiFi Mini board

Based on stock firmware tests, both LAN and WAN ports use the
MAC address from 0x28 on factory partition.

In OpenWrt, this one is already set in DTS. This patch removes the
local bit set in 02_network previously, and adjusts LAN/WAN
addresses as on stock firmware.

Note that in tests we found a MAC address in 0x2e that is the one
in 0x28 plus 1. Since stock firmware does not use it though, we
do not use it either.

Thanks to Chih-Wei Chen for testing this on his device.

ref: https://github.com/openwrt/openwrt/pull/2497

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agobase-files: uci-defaults: do config flush in one shot
Roman Yeryomin [Mon, 21 Oct 2019 21:10:20 +0000 (00:10 +0300)]
base-files: uci-defaults: do config flush in one shot

Moving a file between tmpfs and other fs is neither
faster nor safer, thus no point in doing it in two steps.
Use new jshn option to write output directly to file.

Originally discussed here:
http://lists.openwrt.org/pipermail/openwrt-devel/2017-December/010127.html

Signed-off-by: Roman Yeryomin <roman@advem.lv>
5 years agolibubox: update to latest git HEAD
Roman Yeryomin [Mon, 21 Oct 2019 21:10:04 +0000 (00:10 +0300)]
libubox: update to latest git HEAD

eb30a03 libubox, jshn: add option to write output to a file

Signed-off-by: Roman Yeryomin <roman@advem.lv>
5 years agofirmware: add Realtek RTL8822BE/RTL8822CE firmware
David Bauer [Fri, 18 Oct 2019 18:22:27 +0000 (20:22 +0200)]
firmware: add Realtek RTL8822BE/RTL8822CE firmware

This commit adds packages for the Realtek RTl8822BE/RTL8822CE firmware
to be used with the rtw88 driver.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agomac80211: add rtw88 driver
David Bauer [Fri, 18 Oct 2019 18:21:39 +0000 (20:21 +0200)]
mac80211: add rtw88 driver

This commits adds packaging for the new RTW88 driver from Realtek.
It supports the Realtek 8822BE/8822CE PCIe wireless chips.

For operation, the complementary firmware has to be loaded.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoipq40xx: fix optional gpio-reset
John Crispin [Mon, 21 Oct 2019 21:57:41 +0000 (23:57 +0200)]
ipq40xx: fix optional gpio-reset

If a gpio reset pin was not defined we should not bog out.

Signed-off-by: John Crispin <john@phrozen.org>
5 years agourngd: update to latest Git head
Petr Štetiar [Mon, 21 Oct 2019 08:37:51 +0000 (10:37 +0200)]
urngd: update to latest Git head

 * 40f939d57c67 Tag version 1.0.1
 * 9e758e6e6aec jitterentropy-rngd: update to version v1.1.0 + clang compile fix
 * 193586a25adc Fix wrong types in format strings used in debug build
 * d474977bb611 Add initial GitLab CI support

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoar71xx: improve support for TP-Link CPE510 v2
Adrian Schmutzler [Tue, 6 Aug 2019 10:20:05 +0000 (12:20 +0200)]
ar71xx: improve support for TP-Link CPE510 v2

This fixes commit bae927c551fd ("ar71xx: add support for TP-LINK CPE510
V2.0") where the support for this device wasn't optimal.

Device support for the CPE510v2 so far has been a hack to enable
flashing with CPE510v1 images. Those even have different hardware (e.g.
additional ethernet port).

With this patch, we provide proper support for this device in ar71xx.

Installation:
- Flash factory image through stock firmware WEB UI or through TFTP
- To get to TFTP recovery just hold reset button while powering on
  for around 4-5 seconds and release.
- Rename factory image to recovery.bin
- Stock TFTP server IP: 192.168.0.100
- Stock device TFTP address: 192.168.0.254

Fixes: bae927c551fd ("ar71xx: add support for TP-LINK CPE510 V2.0")
Signed-off-by: Andrew Cameron <apcameron@softhome.net>
[Rebased onto revert commit, changed comments in mach-cpe510.c,
changed commit title and description, fixed eth0 MAC address,
removed eth1 initialization]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[squashed revert, added fixes tag]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoramips: fix TARGET_DEVICES after UniElec rename
Adrian Schmutzler [Mon, 21 Oct 2019 15:51:29 +0000 (17:51 +0200)]
ramips: fix TARGET_DEVICES after UniElec rename

Device node names were updated, but updating TARGET_DEVICES
was overlooked.

Fixes: 4408723d42e0 ("ramips: remove RAM size from device name
for UniElec devices")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoRevert "build: separate signing logic"
John Crispin [Mon, 21 Oct 2019 14:26:07 +0000 (16:26 +0200)]
Revert "build: separate signing logic"

This reverts commit 4a45e69d190f72ed94878487b271ed7651dd9efa.

This broke the buildbots

Signed-off-by: John Crispin <john@phrozen.org>
5 years agoramips: remove RAM size from device name for UniElec devices
Adrian Schmutzler [Fri, 16 Aug 2019 12:05:53 +0000 (14:05 +0200)]
ramips: remove RAM size from device name for UniElec devices

UniElec devices are the last ones in ramips target still having
the RAM size in device name although RAM size is auto-detected.

Remove this from device name, compatible, etc., as it's not
required and might be misleading to users and developers adding
device support copying those devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: base-files: disable sysupgrade for routerstations and ja76pf2
Tomasz Maciej Nowak [Fri, 6 Sep 2019 15:02:36 +0000 (17:02 +0200)]
ath79: base-files: disable sysupgrade for routerstations and ja76pf2

Previous commit 0cc87b3 "ath79: image: disable sysupgrade images for
routerstations and ja76pf2" doesn't remedy completely the posibility of
bricking the device, since user could try to downgrade with an older
image. Therefore disable sysupgrade code for these boards with a small
note.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agoath79: apply alphabetical sorting to entries in 10_fix_wifi_mac
Adrian Schmutzler [Thu, 5 Sep 2019 13:25:26 +0000 (15:25 +0200)]
ath79: apply alphabetical sorting to entries in 10_fix_wifi_mac

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: remove empty default case in 10_fix_wifi_mac
Adrian Schmutzler [Thu, 5 Sep 2019 13:25:25 +0000 (15:25 +0200)]
ath79: remove empty default case in 10_fix_wifi_mac

This removes a useless empty default case.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: fix whitespaces in 10_fix_wifi_mac
Adrian Schmutzler [Thu, 5 Sep 2019 13:25:24 +0000 (15:25 +0200)]
ath79: fix whitespaces in 10_fix_wifi_mac

This converts leading whitespaces to tabs and removes a double
newline at the end of the file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips/mt762x: convert devices to interrupt-driven gpio-keys
Adrian Schmutzler [Fri, 20 Sep 2019 12:03:02 +0000 (14:03 +0200)]
ramips/mt762x: convert devices to interrupt-driven gpio-keys

This converts all remaining devices to use interrupt-driven
gpio-keys compatible instead of gpio-keys-polled.
The poll-interval is removed.

While at it, add/remove newlines in keys and leds node where
necessary.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agobuild: call Host/Uninstall before wiping the host build dir
Andre Heider [Sat, 28 Sep 2019 11:10:59 +0000 (13:10 +0200)]
build: call Host/Uninstall before wiping the host build dir

Uninstall targets may depend on build artefacts, like `make uninstall`
or `ninja uninstall`.

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoath79: add LED migration for several Archer Cxx devices
Adrian Schmutzler [Tue, 17 Sep 2019 12:43:00 +0000 (14:43 +0200)]
ath79: add LED migration for several Archer Cxx devices

Several Archer Cxx devices were using board-specific LED names in
ar71xx, which were changed to "tp-link:*" in ath79.

This patch adds migration for them.

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