Petr Štetiar [Thu, 14 Nov 2019 15:50:18 +0000 (16:50 +0100)]
build: prereq: simplify Python 3 version checks
We don't need to check if python3.5 binary is actually Python 3.5+.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Peter Stadler [Tue, 12 Nov 2019 14:54:53 +0000 (15:54 +0100)]
base-files: rc.common: fix missing EXTRA_HELP texts
Commit
ed5b9129d7a4 ("base-files: implement generic service_running")
has added EXTRA_HELP variable, thus overriding already available
EXTRA_HELP text available in other init scripts, resulting in the
missing help text from services like dropbear for example.
So fix this regression by appending EXTRA_HELP text provided by the
other init scripts into the one provided by the script itself.
Fixes:
ed5b9129d7a4 ("base-files: implement generic service_running")
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
[commit title/description facelift, fixes tag, fixed From:, pkg bump]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Mon, 11 Nov 2019 21:14:21 +0000 (22:14 +0100)]
ath79: remove obsolete OF PCI related config symbols
Those symbols were removed in kernel 4.16:
commit
4670d610d59233b017a6ea1fa25bbf06dabbff42
Author: Rob Herring <robh@kernel.org>
PCI: Move OF-related PCI functions into PCI core
Fixes: FS#2588
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Mon, 11 Nov 2019 20:37:45 +0000 (21:37 +0100)]
kernel-build: fix kernel_menuconfig breakage by forcing YACC
Commit
965f341aa9fd ("build: fix host menu config targets using
ncurses") has moved host's path with pkg-config (usually /usr/bin) at
the first place in PATH variable, which is now causing issues with bison
as BISON_PKGDATADIR points into STAGING_DIR_HOST, but the actual bison
used is the one under host PATH (usually /usr/bin/bison), leading to the
following strange failures:
$ make target/linux/clean kernel_menuconfig V=sc
export MAKEFLAGS= ;make -C /somewhere/linux-4.19.81 menuconfig
make -f ./scripts/Makefile.build obj=scripts/kconfig menuconfig
...
bison -oscripts/kconfig/zconf.tab.c -t -l scripts/kconfig/zconf.y
staging_dir/host/bin/m4: cannot open `staging_dir/host/share/bison/bison.m4': No such file or directory
staging_dir/host/bin/m4: cannot open `staging_dir/host/share/bison/c-skel.m4': No such file or directory
...
gcc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d <...snip...> -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c
gcc: error: scripts/kconfig/zconf.tab.c: No such file or directory
gcc: fatal error: no input files
Fix this by forcing usage of bison under STAGING_DIR_HOST/bin via YACC
make variable.
Cc: Thomas Albers <thomas.gameiro@gmail.com>
Cc: Stijn Tintel <stijn@linux-ipv6.be>
Cc: Eneas U de Queiroz <cotequeiroz@gmail.com>
Tested-by: Ivan Revyakin <LovingFox@GMail.com>
Tested-by: Thomas Albers <thomas.gameiro@googlemail.com>
Ref: https://forum.openwrt.org/t/bpi-r64-kernel-4-19-kernel-menuconfig-error
Fixes:
965f341aa9fd ("build: fix host menu config targets using ncurses")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Sungbo Eo [Mon, 11 Nov 2019 16:16:28 +0000 (01:16 +0900)]
kernel: fix typo in fb-sys-fops autoload
AutoLoad parameter must match the exact kernel module name. Fix it.
Fixes:
125f1ce9ad0c ("kernel: video: add DRM core and IMX DRM support for HDMI/LVDS")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Roger Pueyo Centelles [Wed, 13 Nov 2019 15:18:59 +0000 (09:18 -0600)]
ath79: include rssileds package for ubnt devices with LEDs
Some Ubiquiti devices had the RSSI LEDs configured in 01_leds but
were missing the rssileds package, while others that don't have
RSSI LEDS had the package included.
This commit includes the rssileds package only for those devices
that need it.
Tested on a NanoStation M XW.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Daniel Golle [Thu, 14 Nov 2019 13:02:56 +0000 (14:02 +0100)]
mac80211: restore mac80211_interface_cleanup()
Changes introduced for dynamic wifi reconfiguration left behind
unmanaged interface types. Restore parts of the old function to
also clean (unencrypted, non-DFS) mesh and ad-hoc interfaces.
Fixes:
a5bc9787d4 ("mac80211: add support for dynamically
reconfiguring wifi")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Jeff Kletsky [Sun, 2 Jun 2019 15:18:34 +0000 (08:18 -0700)]
ath79: GL-AR750S: provide NAND support; increase kernel to 4 MB
The GL.iNet GL-AR750S has been supported by the ar71xx and ath79
platforms with access to its 16 MB NOR flash, but not its 128 MB
SPI NAND flash.
This commit provides support for the NAND through the upstream
SPI-NAND framework.
At this time, the OEM U-Boot appears to only support loading the
kernel from NOR. This configuration is preserved as this time,
with the glinet,gl-ar750s-nand name reserved for a potential,
future, NAND-only boot.
The family of GL-AR750S devices on the ath79 platform now includes:
* glinet,gl-ar750m-nor-nand "nand" target
* glinet,gl-ar750m-nor "nand" target (NAND-aware)
NB: This commit increases the kernel size from 2 MB to 4 MB
"Force-less" sysupgrade is presently supported from the current
versions of following NOR-based firmwre images to the version of
glinet,gl-ar750s-nor firmware produced by this commit:
* glinet,gl-ar750s -- OpenWrt 19.07 ar71xx
* glinet,gl-ar750s -- OpenWrt 19.07 ath79
Users who have sucessfully upgraded to glinet,gl-ar750m-nor may then
flash glinet,gl-ar750m-nor-nand with sysupgrade to transtion to the
NAND-based variant.
Other upgrades to these images, including directly to the NAND-based
glinet,gl-ar750s-nor-nand firmware, can be accomplished through U-Boot.
NB: See "ath79: restrict GL-AR750S kernel build-size to 2 MB" which
enables flashing of NAND factory.img with the current GL-iNet U-Boot,
"U-Boot
1.1.4-gcf378d80-dirty (Aug 16 2018 - 07:51:15)"
The GL-AR750S OEM U-Boot allows upload and flashing of either NOR
firmware (sysupgrade.bin) or NAND firmware (factory.img) through its
HTTP-based GUI. Serial connectivity is not required.
The glinet,gl-ar750s-nor and glinet,gl-ar750s-nor-nand images
generated after this commit flash each other directly.
This commit changes the control of the USB VBUS to gpio-hog from
regulator-fixed introduced by commit
0f6b944c92. This reduces the
compressed kernel size by ~14 kB, with no apparent loss of
functionality. No other ath79-nand boards are using regulator-fixed
at this time.
Note: mtd_get_mac_binary art 0x5006 does not return the proper MAC
and the GL.iNet source indicates that only the 0x0 offset is valid
The ar71xx targets are unmodified.
Cc: Alexander Wördekemper <alexwoerde@web.de>
Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Jeff Kletsky [Sun, 2 Jun 2019 13:43:00 +0000 (06:43 -0700)]
ath79: add GL.iNet GL-AR300M16 as NOR-only board
The GL.iNet GL-AR300M series of devices includes variants without NAND
and only the 16 MB NOR flash. These include the GL-AR300M16 and the
GL-AR300M-Lite (already with its own board name).
This board-name addition provides disambiguation from the NAND-bearing
GL-AR300M devices, both for OpenWrt code and for end users.
Kernel and firmware support for NAND and UBI will add ~320 kB to the
overall firmware size at this time. This NOR-only option continues to
provide more compact firmware for both the GL-AR300M16 as well as
those who wish to use it as an alternate or primary, NOR-resident
firmware on the GL-AR300M.
The ar71xx targets are unmodified.
Installation
------------
Install through OEM U-Boot (HTTP-based) or `sysupgrade --force` when
booted from NOR and running OEM or OpenWrt, NOR-based firmware.
As one of the intentions is disambiguation from NAND-bearing units,
users who have flashed this firmware onto a device with NAND would
need to use U-Boot or `sysupgrade --force` to flash firmware that
again supports NAND.
There are no additional SUPPORTED_DEVICES as it is not possible to
determine if a device does or does not have NAND based on
either the OEM's or OpenWrt's board names prior to this patch.
Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Jeff Kletsky [Sun, 2 Jun 2019 00:51:17 +0000 (17:51 -0700)]
ath79: GL-AR300M: provide NAND support; increase to 4 MB kernel
The GL.iNet GL-AR300M has been supported by the ar71xx and ath79
platforms with access to its 16 MB NOR flash, but not its 128 MB
SPI NAND flash.
This commit provides support for the NAND through the upstream
SPI-NAND framework. Devices with both NOR and NAND flash can support
independent firmware on each, with U-Boot able to boot from either.
The OEM U-Boot will fall back to the NOR firmware after three
"unsuccessful" boots.
The family of GL-AR300M devices on the ath79 platform now includes:
* glinet,gl-ar300m-lite "generic" target, NOR-only board
* glinet,gl-ar300m-nand "nand" target
* glinet,gl-ar300m-nor "nand" target (NAND-aware)
NB: This commit increases the kernel size from 2 MB to 4 MB
"Force-less" sysupgrade is presently supported from the current
versions of following NOR-based firmwre images to the version of
glinet,gl-ar300m-nor firmware produced by this commit:
* gl-ar300m -- OEM v3 NOR ar71xx (openwrt-ar300m16-*.bin)
* gl-ar300m -- OpenWrt 18.06 ar71xx
* gl-ar300m -- OpenWrt 19.07 ar71xx
Other upgrades to these images should be performed through U-Boot.
The GL-AR300M OEM U-Boot allows upload and flashing of either NOR
firmware (sysupgrade.bin) or NAND firmware (factory.img) through its
HTTP-based GUI. Serial connectivity is not required.
The glinet,gl-ar300m-nand and glinet,gl-ar300m-nor images generated
after this commit should safely flash each other using sysupgrade.
The boot counter is implemented by the OEM using u-boot-env. At this
time, it does not appear that the switch on the side of the unit can
be used to select NOR vs. NAND boot and the fail-over is only from
NAND to NOR. To save flash wear, it is only reset when running the
glinet,gl-ar300m-nand firmware.
NAND-specific base-files are used to remove impact on existing
generic and tiny targets.
As there is now no "generic" build appropriate for the GL-AR300M16,
(or for users of the GL-AR300M that do not need access to NAND)
it will be introduced in a subsequent commit.
Note: `mtd_get_mac_binary art 0x6` does not return the proper MAC
and the GL.iNet source indicates that only the 0x0 offset is valid
The ar71xx targets are unmodified.
Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Jeff Kletsky [Tue, 14 May 2019 16:47:40 +0000 (09:47 -0700)]
ath79: prepare NAND subtarget for upstream support of SPI NAND
Linux 4.19 supplies the upstream spi-nand framework,
permitting porting and support of boards with SPI NAND.
* Adjusted nand/target.mk to provide FEATURES += squashfs nand
* Updated config-default to provide current MTD and UBI support
Defaults selected for:
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_LIMIT=20
# CONFIG_MTD_UBI_FASTMAP is not set
# CONFIG_MTD_UBI_GLUEBI is not set
The bad-block reservation limit technically should be 21 for Paragon
SPI NAND but most other devices in the class are 20 blocks per Gbit.
In Linux 5.2 this is specified on a per-chip basis through NAND_MEMORG
Contents adjusted to remove declarations provided at the target level
by commit
08a134820f5 (Oct 23, 2019) ath79: enable PCI for whole target
Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Tested-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Piotr Dymacz [Sun, 3 Nov 2019 11:17:52 +0000 (12:17 +0100)]
uboot-envtools: ramips: add support for ALFA Network Quad-E4G
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Piotr Dymacz [Sun, 3 Nov 2019 11:12:44 +0000 (12:12 +0100)]
ramips: add support for ALFA Network Quad-E4G
ALFA Network Quad-E4G is a universal Wi-Fi/4G platform, which offers
three miniPCIe (PCIe, USB 2.0, SIM) and a single M.2 B-key (dual-SIM,
USB 3.0) slots, RTC and five Gigabit Ethernet ports with PoE support.
Specification:
- MT7621A (880 MHz)
- 256/512 MB of RAM (DDR3)
- 16/32+ MB of FLASH (SPI NOR)
- optional second SPI flash (8-pin WSON/SOIC)
- 1x microSD (SDXC) flash card reader
- 5x 10/100/100 Mbps Ethernet, with passive PoE support (24 V) in LAN1
- optional 802.3at/af PoE module for WAN
- 3x miniPCIe slot (with PCIe and USB 2.0 buses, micro SIM and 5 V)
- 1x M.2/NGFF B-key 3042 (USB 3.0/2.0, mini + micro SIM)
- RTC (TI BQ32002, I2C bus) with backup battery (CR2032)
- external hardware watchdog (EM Microelectronic EM6324)
- 1x USB 2.0 Type-A
- 1x micro USB Type-B for system serial console (Holtek HT42B534)
- 11x LED (5 for Ethernet, 5 driven by GPIO, 1x power indicator)
- 3x button (reset, user1, user2)
- 1x I2C (4-pin, 2.54 mm pitch) header on PCB
- 4x SIM (6-pin, 2.00 mm pitch) headers on PCB
- 2x UART2/3 (4-pin, 2.54 mm pitch) headers on PCB
- 1x mechanical power switch
- 1x DC jack with lock (24 V)
Other:
- U-Boot selects default SIM slot, based on value of 'default_sim' env
variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This board
has additional logic circuit for M.2 SIM switching. The 'sim-select'
will work only if both SIM slots are occupied. Otherwise, always slot
with SIM inside is selected, no matter 'sim-select' value.
- U-Boot enables power in all three miniPCIe and M.2 slots before
loading the kernel
- this board supports 'dual image' feature (controlled by 'dual_image'
U-Boot environment variable)
- all three miniPCIe slots have additional 5 V supply on pins 47 and 49
- the board allows to install up to two oversized miniPCIe cards (vendor
has dedicated MediaTek MT7615N/D cards for this board)
- this board has additional logic circuit controlling PERSTn pins inside
miniPCIe slots. By default, PERSTn (GPIO19) is routed to all miniPCIe
slots but setting GPIO22 to high allows PERSTn control per slot, using
GPIO23-25 (value is inverted)
You can use the 'sysupgrade' image directly in vendor firmware which is
based on OpenWrt (make sure to not preserve settings - use 'sysupgrade
-n -F ...' command). Alternatively, use web recovery mode in U-Boot:
1. Power the device with reset button pressed, the modem LED will start
blinking slowly and after ~3 seconds, when it starts blinking faster,
you can release the button.
2. Setup static IP 192.168.1.2/24 on your PC.
3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Piotr Dymacz [Fri, 1 Nov 2019 20:40:37 +0000 (21:40 +0100)]
ramips: mt7621: refresh kernel config
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Piotr Dymacz [Wed, 30 Oct 2019 21:55:42 +0000 (22:55 +0100)]
ramips: provide label MAC for ALFA Network Tube-E4G
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Piotr Dymacz [Wed, 30 Oct 2019 20:48:09 +0000 (21:48 +0100)]
uboot-envtools: ramips: add support for ALFA Network R36M-E4G
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Piotr Dymacz [Tue, 29 Oct 2019 23:10:40 +0000 (00:10 +0100)]
ramips: add support for ALFA Network R36M-E4G
ALFA Network R36M-E4G is a dual-SIM, N300 Wi-Fi, compact size platform
based on MediaTek MT7620A WiSoC. This product is designed for operation
with 4G modem (can be bought in bundle with Quectel EC25, EG25 or EP06)
but supports also Wi-Fi modules (miniPCIe slot has USB and PCIe buses).
Specification:
- MT7620A (580 MHz)
- 64/128/256 MB of RAM (DDR2)
- 16/32+ MB of FLASH (SPI NOR)
- 2x 10/100 Mbps Ethernet, with passive PoE support (24 V)
- 2T2R 2.4 GHz (MT7620A), with ext. LNA (RFFM4227)
- 1x miniPCIe slot (with PCIe and USB 2.0 buses and optional 5 V)
- 2x SIM slot (mini, micro) with detect and switch driven by GPIO
- 2x u.fl antenna connectors (for Wi-Fi)
- 8x LED (7 driven by GPIO)
- 2x button (reset, wifi)
- 2x UART (4-pin/2.54 mm pitch, 10-pin/1.27 mm pitch) headers on PCB
- 1x I2C (4-pin, 1.27 mm pitch) header on PCB
- 1x LED (8-pin, 1.27 mm pitch) header on PCB
- 1x DC jack with lock (12 V)
Other:
- there is a dedicated, 4-pin connector for optional RTC module (Holtek
HT138x) with 'enable' input, not available at the time of preparing
support for this board
- miniPCIe slot supports additional 5 V supply on pins 47 and 49 but a
jumper resistor (R174) is not installed by default
- U-Boot selects default SIM slot, based on value of 'default_sim' env
variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This will
work only if both slots are occupied, otherwise U-Boot will always
select slot with SIM card inside (user can override it later, in
user-space)
- U-Boot resets the modem, using PERSTn signal, before starting kernel
- this board supports 'dual image' feature (controlled by 'dual_image'
U-Boot environment variable)
Flash instruction:
You can use the 'sysupgrade' image directly in vendor firmware which is
based on OpenWrt (make sure to not preserve settings - use 'sysupgrade
-n -F ...' command). Alternatively, use web recovery mode in U-Boot:
1. Power the device with reset button pressed, the modem LED will start
blinking slowly and after ~3 seconds, when it starts blinking faster,
you can release the button.
2. Setup static IP 192.168.1.2/24 on your PC.
3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Piotr Dymacz [Tue, 29 Oct 2019 22:25:56 +0000 (23:25 +0100)]
ramips: support dual image feature on ALFA Network boards
New U-Boot version for MediaTek MT76x8/MT762x based ALFA Network boards
includes support for a 'dual image' feature. Users can enable it using
U-Boot environment variable 'dual_image' ('1' -> enabled).
When 'dual image' feature is enabled, U-Boot will modify DTB and divide
the original 'firmware' flash area into two, equal in size and aligned
to 64 KB partitions: 'firmware' and 'backup'. U-Boot will also adjust
size of 'firmware' area to match installed flash chip size.
U-Boot will load kernel from active partition which is marked with env
variable 'bootactive' ('1' -> first partition, '2' -> second partition)
and rename both partitions accordingly ('firmware' <-> 'backup').
There are 3 additional env variables used to control 'dual image' mode:
- bootlimit - maximum number of unsuccessful boot tries (default: '3')
- bootcount - current number of boot tries
- bootchanged - flag which informs that active partition was changed; if
it is set and 'bootcount' reaches 'bootlimit' value,
U-Boot will start web-based recovery which then updates
both partitions with provided image
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Russell Senior [Tue, 12 Nov 2019 23:33:48 +0000 (15:33 -0800)]
base-files: add /usr/share/libubox/jshn.sh to sysupgrade stage2
Discovered recent changes had broken sysupgrade for ar71xx mikrotik
rb-493g, traced the problem to missing /usr/share/libubox/jshn.sh after
switching to tmpfs.
Signed-off-by: Russell Senior <russell@personaltelco.net>
Sungbo Eo [Wed, 13 Nov 2019 14:23:17 +0000 (23:23 +0900)]
ramips: add usb-ledtrig-usbport to DEVICE_PACKAGES of CY-SWR1100
CY-SWR1100 has a USB LED but kmod-usb-ledtrig-usbport is missing
in default images. This commit adds it.
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[changed commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Sungbo Eo [Wed, 13 Nov 2019 14:47:14 +0000 (23:47 +0900)]
ramips: change status LED of Samsung CY-SWR1100
Use power LED for status indication and free WPS LED for other uses.
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Sungbo Eo [Wed, 13 Nov 2019 14:29:21 +0000 (23:29 +0900)]
ramips: improve Samsung CY-SWR1100 support
This patch does the following:
- rename "devdata" flash partition and make it read-only
- switch from gpio-keys-polled to gpio-keys
- add missing power LED
- set correct PCI ID to compatible string in wifi node
- remove ralink,5ghz property in wifi node
- provide label MAC address
Rename devdata partition to devconf as indicated in the stock firmware
partition table:
00030000-
00040000: "devdata"
00040000-
00050000: "devconf"
Power LED can be controlled by SoC GPIO. Add it in the dts leds node.
RT3092L supports only bgn mode, so it is unnecessary to disable 5GHz band.
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Sungbo Eo [Wed, 13 Nov 2019 14:22:54 +0000 (23:22 +0900)]
ramips: fix MAC address setup for Samsung CY-SWR1100
Ethernet MAC address setup has been broken since
c3e420f28cf1. Restore
original setting.
Fixes:
c3e420f28cf1 ("ramips: Add support for D-Link DCH-M225")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Adrian Schmutzler [Wed, 13 Nov 2019 14:05:29 +0000 (15:05 +0100)]
ar71xx: fix MAC addresses for Archer C5 v1, C7 v1/v2, WDR4900 v2
As discussed in
1d18a14a90c7 ("ath79: really fix TP-Link Archer C7
v2 MAC address"), stock firmware MAC address assignment is
actually as follows:
wlan0 (5GHz) : -1
wlan1 (2.4GHz) : 0
eth1 (LAN) : 0
eth0 (WAN) : 1
This has never been fixed for ar71xx, so let's do it now.
Note that with WDR4900 v2 even both wlan0 and wlan1 where assigned
to basemac-1 before ...
Fixes: FS#408
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sun, 10 Nov 2019 23:22:33 +0000 (00:22 +0100)]
ath79: read label MAC address from flash instead of using phy0/phy1
This replaces all uses of $(cat /sys/class/ieee80211/phyX/macaddress)
by retrieval from the proper flash locations. This will make
02_network independent of WiFi setup again.
For future reference:
The MAC addresses of the FRITZ!WLAN Repeater 300E can be extracted
from the urlader key value store:
maca *:6B
macb *:6C
macwlan *:6D
macdsl *:6E
and be set by e.g.
addr=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sun, 10 Nov 2019 23:18:45 +0000 (00:18 +0100)]
ramips: read label MAC address from flash instead of using phy0/phy1
This replaces all uses of $(cat /sys/class/ieee80211/phyX/macaddress)
by retrieval from the proper flash locations. This will make
02_network independent of WiFi setup again.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Thu, 7 Nov 2019 21:29:21 +0000 (22:29 +0100)]
base-files: remove shebang from uci-defaults files
uci-defaults are sourced and non-executable, so they do not require
a shebang.
While at it, apply consistent naming scheme.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Kevin Darbyshire-Bryant [Tue, 12 Nov 2019 14:27:06 +0000 (14:27 +0000)]
build: image: posix compatibility cut v head
Replace 2 instances of non posix use of 'head' with posix compliant
'cut'.
'head -c n' cuts 'n' bytes from the passed string and happens to work on
Linux & Mac OS X even though '-c' is not posix.
'head --bytes n' does the same thing and happens to work on linux but
not on Mac OS X and is also not posix.
'cut -b1-8' cuts the first 8 bytes from the passed string and is posix
compliant, hence works on Linux & Mac OS X.
Our usage of 'head --bytes' was particularly unfortunate since it was
used to calculated the RootFS UUID passed to grub - the net result being
a non-functioning system waiting for the root file system to appear.
Thanks to karlp, ynezz & others for pointers on solving this.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
John Crispin [Wed, 30 Oct 2019 15:59:14 +0000 (16:59 +0100)]
base-files: add 'wifi reconf'
Now that netifd and hostapd allow dynamic reconfiguration, add a
command to trigger it.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
John Crispin [Wed, 30 Oct 2019 15:58:19 +0000 (16:58 +0100)]
mac80211: add support for dynamically reconfiguring wifi
Change scripts to use ubus interface of hostapd/wpa_supplicant to
add/remove/modify wireless interfaces instead of (re-)starting the
services.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
John Crispin [Wed, 30 Oct 2019 15:57:22 +0000 (16:57 +0100)]
hostapd: add ubus reload
Add ubus interface to hostapd and wpa_supplicant to allow dynamically
reloading wiface configuration without having to restart the hostapd
process.
As a consequence, both hostapd and wpa_supplicant are now started
persistently on boot for each wifi device in the system and then
receive ubus calls adding, modifying or removing interface
configuration.
At a later stage it would be desirable to reduce the services to one
single instance managing all radios.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle [Thu, 31 Oct 2019 10:30:11 +0000 (11:30 +0100)]
netifd: add dynamic wireless reconfiguration
7a723d0 wireless: add ubus method for reloading configuration
e15147c wireless: make reconf opt-in and allow serializing configuration
Set new option 'reconf' in 'wifi-device' section to enable dynamic
re-configuration on that radio.
If necessary, also set option 'serialize' which forced netifd to
configure interfaces of wireless devices one-by-one.
Both options are disabled by default.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Koen Vandeputte [Wed, 6 Nov 2019 16:19:11 +0000 (17:19 +0100)]
kernel: bump 4.19 to 4.19.82
Refreshed all patches.
Remove upstreamed:
- 950-0295-sc16is7xx-Fix-for-Unexpected-interrupt-8.patch
Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Koen Vandeputte [Wed, 6 Nov 2019 16:18:34 +0000 (17:18 +0100)]
kernel: bump 4.14 to 4.14.152
Refreshed all patches.
Altered patches:
- 301-arch-support-layerscape.patch
Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Koen Vandeputte [Wed, 6 Nov 2019 16:11:03 +0000 (17:11 +0100)]
kernel: bump 4.9 to 4.9.199
Refreshed all patches.
Compile-tested on: none
Runtime-tested on: none
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Adrian Schmutzler [Mon, 11 Nov 2019 18:03:20 +0000 (19:03 +0100)]
ath79: fix SUPPORTED_DEVICES for TP-Link TL-WR1043ND v3
In ar71xx, the board name for the TL-WR1043ND v3 is equal to v2:
tl-wr1043nd-v2
Fix SUPPORTED_DEVICES for v3 in ath79 accordingly.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Manuel Kock [Mon, 11 Nov 2019 12:01:33 +0000 (13:01 +0100)]
lantiq: remove redundant WiFi LED on FRITZ!Box 7320
The led wireless trigger is already set correctly to phy0tpt through the
alias in the device tree.
Signed-off-by: Manuel Kock <github.web@manu.li>
[rephrased commit title]
Signed-off-by: David Bauer <mail@david-bauer.net>
Petr Štetiar [Sat, 9 Nov 2019 13:33:13 +0000 (14:33 +0100)]
fwtool: update to latest Git head
Includes following changes:
9d9d4c284786 fix possible garbage in unitialized char* struct members
dbc1b1b71b24 fix possible copy of null buffer and validation of unitialized header
76d53deef8bb crc32: add missing stdint.h dependency
e5666ed3b47c add cram based unit tests
abe0cf7de053 add initial GitLab CI support
e43042507b4f iron out extra compiler warnings
5df0cd6e1523 convert into CMake project
a7dc0526f819 refactor into separate Git project
adds missing PKG_LICENSE field and converts the package build to utilize
CMake.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Paul Spooren [Mon, 4 Nov 2019 20:55:23 +0000 (10:55 -1000)]
x86,tegra,mvebu: image: use common reproducible IMG_PART_SIGNATURE
These targets are currently using more or less same SIGNATURE variable
which provides unique partition ID/signature, so it makes sense to
refactor it out into common IMG_PART_SIGNATURE variable which could be
reused by all targets.
This is another step in the direction of reproducible OpenWrt images.
Signed-off-by: Paul Spooren <mail@aparcar.org>
[split into separate commit, renamed to IMG_PART_SIGNATURE]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Paul Spooren [Mon, 4 Nov 2019 20:55:23 +0000 (10:55 -1000)]
build: image: add common and reproducible IMG_PART_SIGNATURE variable
x86, mvebu and tegra targets are currently using more or less same
SIGNATURE variable which provides unique partition ID/signature, so it
makes sense to refactor it out into common variable which could be
reused by all targets. While at it, make the content of the variable
reproducible.
Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-March/016148.html
Signed-off-by: Paul Spooren <mail@aparcar.org>
Suggested-by: Jo-Philipp Wich <jo@mein.io>
[renamed to IMG_PARTSIGNATURE, reworked with epoch+vermagic hash]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Adrian Schmutzler [Mon, 11 Nov 2019 13:48:17 +0000 (14:48 +0100)]
ramips: split further base-files across subtargets
As started in
19724e28c81e ("ramips: split base-files into
subtargets"), this moves some smaller left-over files to the
appropriate base-files folder of their subtarget:
- /etc/init.d/bootcount
- /etc/uci-defaults/04_led_migration
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sun, 10 Nov 2019 23:15:36 +0000 (00:15 +0100)]
ath79: fix identifier for Nanostation M in ath9k caldata extraction
When Nanostation M was renamed from ubnt,nano-m to ubnt,nanostation-m
in commit
f1396ac753cc ("ath79: align naming of Ubiquiti Nanostation M"),
the caldata extraction in 10-ath9k-eeprom was overlooked.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Zoltan HERPAI [Sat, 9 Nov 2019 12:01:50 +0000 (13:01 +0100)]
firmware: intel-microcode: bump to
20190918
* New upstream microcode datafile
20190918
*Might* contain mitigations for INTEL-SA-00247 (RAMBleed), given
the set of processors being updated.
* Updated Microcodes:
sig 0x000306d4, pf_mask 0xc0, 2019-06-13, rev 0x002e, size 19456
sig 0x000306f4, pf_mask 0x80, 2019-06-17, rev 0x0016, size 18432
sig 0x00040671, pf_mask 0x22, 2019-06-13, rev 0x0021, size 14336
sig 0x000406f1, pf_mask 0xef, 2019-06-18, rev 0xb000038, size 30720
sig 0x00050654, pf_mask 0xb7, 2019-07-31, rev 0x2000064, size 33792
sig 0x00050657, pf_mask 0xbf, 2019-08-12, rev 0x500002b, size 51200
sig 0x00050662, pf_mask 0x10, 2019-06-17, rev 0x001c, size 32768
sig 0x00050663, pf_mask 0x10, 2019-06-17, rev 0x7000019, size 24576
sig 0x00050664, pf_mask 0x10, 2019-06-17, rev 0xf000017, size 24576
sig 0x00050665, pf_mask 0x10, 2019-06-17, rev 0xe00000f, size 19456
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Jo-Philipp Wich [Sun, 10 Nov 2019 20:33:47 +0000 (21:33 +0100)]
rpcd: update to latest Git HEAD
77ad0de plugin: avoid truncating numeric values
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
David Bauer [Sun, 10 Nov 2019 19:54:38 +0000 (20:54 +0100)]
ramips: correct Netgear WNDR3700v5 button flag
This adjusts the GPIO state flag to ACTIVE_LOW as FCC pictures indicate
the base board is identical to the one of the R6220.
Fixes commit
3459013257e0 ("ramips: correct R6220 button flag")
Signed-off-by: David Bauer <mail@david-bauer.net>
Zoltan HERPAI [Sun, 25 Aug 2019 20:34:13 +0000 (22:34 +0200)]
firmware: intel-microcode: bump to
20190618
* Implements MDS mitigation (RIDL, Fallout, Zombieload), INTEL-SA-00223
CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091
* Updated Microcodes:
sig 0x000206d6, pf_mask 0x6d, 2019-05-21, rev 0x061f, size 18432
sig 0x000206d7, pf_mask 0x6d, 2019-05-21, rev 0x0718, size 19456
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Zoltan HERPAI [Thu, 16 May 2019 10:32:14 +0000 (12:32 +0200)]
firmware: intel-microcode: bump to
20190514
* New Microcodes:
sig 0x00030678, pf_mask 0x02, 2019-04-22, rev 0x0838, size 52224
sig 0x00030678, pf_mask 0x0c, 2019-04-22, rev 0x0838, size 52224
sig 0x00030679, pf_mask 0x0f, 2019-04-23, rev 0x090c, size 52224
sig 0x000406c3, pf_mask 0x01, 2019-04-23, rev 0x0368, size 69632
sig 0x000406c4, pf_mask 0x01, 2019-04-23, rev 0x0411, size 68608
sig 0x00050657, pf_mask 0xbf, 2019-02-27, rev 0x5000021, size 47104
sig 0x000806e9, pf_mask 0x10, 2018-10-18, rev 0x009e, size 98304
sig 0x000806eb, pf_mask 0xd0, 2018-10-25, rev 0x00a4, size 99328
sig 0x000806ec, pf_mask 0x94, 2019-02-12, rev 0x00b2, size 98304
sig 0x000906ec, pf_mask 0x22, 2018-09-29, rev 0x00a2, size 98304
sig 0x000906ed, pf_mask 0x22, 2019-02-04, rev 0x00b0, size 97280
* Updated Microcodes:
sig 0x000206a7, pf_mask 0x12, 2019-02-17, rev 0x002f, size 12288
sig 0x000306a9, pf_mask 0x12, 2019-02-13, rev 0x0021, size 14336
sig 0x000306c3, pf_mask 0x32, 2019-02-26, rev 0x0027, size 23552
sig 0x000306d4, pf_mask 0xc0, 2019-03-07, rev 0x002d, size 19456
sig 0x000306e4, pf_mask 0xed, 2019-03-14, rev 0x042e, size 16384
sig 0x000306e7, pf_mask 0xed, 2019-03-14, rev 0x0715, size 17408
sig 0x000306f2, pf_mask 0x6f, 2019-03-01, rev 0x0043, size 34816
sig 0x000306f4, pf_mask 0x80, 2019-03-01, rev 0x0014, size 18432
sig 0x00040651, pf_mask 0x72, 2019-02-26, rev 0x0025, size 21504
sig 0x00040661, pf_mask 0x32, 2019-02-26, rev 0x001b, size 25600
sig 0x00040671, pf_mask 0x22, 2019-03-07, rev 0x0020, size 14336
sig 0x000406e3, pf_mask 0xc0, 2019-04-01, rev 0x00cc, size 100352
sig 0x000406f1, pf_mask 0xef, 2019-03-02, rev 0xb000036, size 30720
sig 0x00050654, pf_mask 0xb7, 2019-04-02, rev 0x200005e, size 32768
sig 0x00050662, pf_mask 0x10, 2019-03-23, rev 0x001a, size 32768
sig 0x00050663, pf_mask 0x10, 2019-03-23, rev 0x7000017, size 24576
sig 0x00050664, pf_mask 0x10, 2019-03-23, rev 0xf000015, size 23552
sig 0x00050665, pf_mask 0x10, 2019-03-23, rev 0xe00000d, size 19456
sig 0x000506c9, pf_mask 0x03, 2019-01-15, rev 0x0038, size 17408
sig 0x000506ca, pf_mask 0x03, 2019-03-01, rev 0x0016, size 15360
sig 0x000506e3, pf_mask 0x36, 2019-04-01, rev 0x00cc, size 100352
sig 0x000506f1, pf_mask 0x01, 2019-03-21, rev 0x002e, size 11264
sig 0x000706a1, pf_mask 0x01, 2019-01-02, rev 0x002e, size 73728
sig 0x000806e9, pf_mask 0x10, 2019-04-01, rev 0x00b4, size 98304
sig 0x000806e9, pf_mask 0xc0, 2019-04-01, rev 0x00b4, size 99328
sig 0x000806ea, pf_mask 0xc0, 2019-04-01, rev 0x00b4, size 99328
sig 0x000806eb, pf_mask 0xd0, 2019-03-30, rev 0x00b8, size 98304
sig 0x000806ec, pf_mask 0x94, 2019-03-30, rev 0x00b8, size 97280
sig 0x000906e9, pf_mask 0x2a, 2019-04-01, rev 0x00b4, size 99328
sig 0x000906ea, pf_mask 0x22, 2019-04-01, rev 0x00b4, size 98304
sig 0x000906eb, pf_mask 0x02, 2019-04-01, rev 0x00b4, size 99328
sig 0x000906ec, pf_mask 0x22, 2019-02-14, rev 0x00ae, size 98304
sig 0x000906ed, pf_mask 0x22, 2019-03-17, rev 0x00b8, size 97280
* Implements MDS mitigation (RIDL, Fallout, Zombieload), INTEL-SA-00223
CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Hauke Mehrtens [Sat, 9 Nov 2019 19:10:58 +0000 (20:10 +0100)]
mac80211: Fix dependencies of kmod-rsi91x-usb
Instead of depending on kmod-usb2 make it depend on the normal USB
dependencies. This should hopefully fix some problems seen in the build
bot builds for powerpc_8540.
In addition also activate DRIVER_11N_SUPPORT support.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sat, 9 Nov 2019 19:07:18 +0000 (20:07 +0100)]
strace: Fix build on PowerPC
This patch breaks building on PowerPC, like the mpc85xx_generic
target for me.
Fixes: FS#2585
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
David Bauer [Sat, 9 Nov 2019 18:10:51 +0000 (19:10 +0100)]
ramips: correct R6220 button flag
All buttons on the Netgear R6220 are active-low while they are flagged
as active-high.
The GPIO status reads the following for no buttons pressed:
root@64367-r6220:~# cat /sys/kernel/debug/gpio
gpio-7 ( |wps ) in hi
gpio-8 ( |wifi ) in hi
gpio-14 ( |reset ) in hi
Signed-off-by: David Bauer <mail@david-bauer.net>
Rosen Penev [Sun, 3 Nov 2019 02:54:04 +0000 (19:54 -0700)]
nghttp2: Fix pkgconfig file
lib and includedir point to the host, not staging_dir.
Note that prefix and exec_prefix is overriden to point to staging_dir.
As CMAKE_INSTTALL is passed, switched InstallDev to use cmake.mk's rule.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Rosen Penev [Sat, 2 Nov 2019 21:37:26 +0000 (14:37 -0700)]
libevent2: Fix pkgconfig directories
includedir and libdir are set to /usr/include and /usr/lib . This breaks
compilation with packages such as tmux that use pkgconfig to find libevent
Also added PKG_LICENSE_FILES.
Simplified the InstallDev section by using cmake.mk's default rule.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
DENG Qingfang [Mon, 4 Nov 2019 12:16:31 +0000 (20:16 +0800)]
ipset: update to 7.4
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Hauke Mehrtens [Thu, 7 Nov 2019 20:01:40 +0000 (21:01 +0100)]
uboot-envtools: Add TARGET_LDFLAGS to fix PIE and RELRO
Forward the OpenWrt TARGET_LDFLAGS to the linker of the fw_printenv tool.
In addition also use the more standard make invocation script.
With this change the fw_printenv tool is built with PIE and Full RELRO
support when activated globally in OpenWrt.
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
Rosen Penev [Thu, 7 Nov 2019 22:55:10 +0000 (14:55 -0800)]
xfsprogs: Fix compilation with newer musl
Backported upstream patch.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Hannu Nyman [Sat, 2 Nov 2019 17:59:44 +0000 (19:59 +0200)]
busybox: update to 1.31.1
Update busybox to 1.31.1
Small bug fix release. Fixes for dc, ash (PS1 expansion fix),
hush, dpkg-deb, telnet and wget.
No need to refresh patches or config.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Álvaro Fernández Rojas [Sat, 14 Sep 2019 07:39:52 +0000 (09:39 +0200)]
brcm63xx: add linux 4.19 support
Boot tested on Comtrend AR-5387un:
https://gist.github.com/Noltari/
57e5030455da8dc38e61f8c3a5922254
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[jonas.gorski: make 4.19 an optional testing version; add gcc 8.3 fix]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Michael Heimpold [Mon, 4 Nov 2019 23:39:42 +0000 (00:39 +0100)]
mxs: start a console on USB gadget serial ports
The I2SE Duckbill devices are pen-drive like and thus the usage
of the USB gadget subsystem is highly indicated.
Spawning a console if a serial gadget is configured saves
us from connecting a physical debug uart.
On Olimex OLinuXino Maxi/Mini boards, this does not hurt.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Michael Heimpold [Mon, 4 Nov 2019 23:39:41 +0000 (00:39 +0100)]
mxs: switch to askconsole
Remove the dedicated tty name and use askconsole to spawn the console
on serial debug uart.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Michael Heimpold [Mon, 4 Nov 2019 23:39:40 +0000 (00:39 +0100)]
procd: start additional consoles during hotplugging
Now that 'start-console' procd command has reached the main repo,
we can add a rule to start consoles on serial devices which are
created when USB gadget driver reports creation with hotplugging.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Michael Heimpold [Mon, 4 Nov 2019 23:15:14 +0000 (00:15 +0100)]
mxs: add support and switch to kernel 4.19
Also remove kernel 4.14 support and the meanwhile obsolete patch.
This was run-tested on I2SE Duckbill device and
Olimex OLinuXino Maxi board.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Tested-by: Zoltan HERPAI <wigyori@uid0.hu>
Michael Heimpold [Mon, 4 Nov 2019 23:14:55 +0000 (00:14 +0100)]
uboot-mxs: bump to v2019.10
Also update the U-Boot BSP patch for I2SE Duckbill devices.
Run tested on I2SE Duckbill and Olimex OLinuXino Maxi boards.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Hauke Mehrtens [Sun, 27 Oct 2019 21:38:53 +0000 (22:38 +0100)]
usign: Activate LTO compile option
This decreases the size of the usign application by 16% on MIPS BE.
old:
24,597 /usr/bin/usign
new:
20,501 /usr/bin/usign
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sun, 27 Oct 2019 21:35:30 +0000 (22:35 +0100)]
swconfig: Activate LTO compile option
This decreases the size of the swconfig application by 25% on MIPS BE.
old:
16,916 /sbin/swconfig
new:
12,565 /sbin/swconfig
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sun, 27 Oct 2019 21:32:59 +0000 (22:32 +0100)]
mtd: Activate LTO compile option
This decreases the size of the mtd application by 25% on MIPS BE.
old:
20,597 /sbin/mtd
new:
16,421 /sbin/mtd
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sun, 27 Oct 2019 20:17:39 +0000 (21:17 +0100)]
dnsmasq: Activate LTO
This decreases the binary size when PIE ASLR is activated by 8% on MIPS BE.
old:
202,020 /usr/sbin/dnsmasq
new:
185,676 /usr/sbin/dnsmasq
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Fri, 8 Nov 2019 22:56:43 +0000 (23:56 +0100)]
uci: update to latest to version 2019-11-08
fc417e8 build: Add -Wclobbered to detect problems with longjmp
2c8e4a3 util: Fix error path
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Adrian Schmutzler [Fri, 8 Nov 2019 16:51:44 +0000 (17:51 +0100)]
ramips: create shared DTSI for Netgear EX2700 and WN3000RP v3
This moves shared code of the named devices into a common DTSI.
Remove setting status="okay" for &gpio0 as it's not disabled in
mt7620a.dtsi.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Frederik Noe-Sdun [Fri, 9 Aug 2019 04:42:25 +0000 (06:42 +0200)]
ramips: increase max SPI frequency to 50 MHz for EX3700/EX6130
Based on Macronix MX25L3205DM2I datasheet this is maximum
supported speed.
Signed-off-by: Frederik Noe-Sdun <Frederik.Sdun@googlemail.com>
[rebased, improved commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Frederik Noe-Sdun [Mon, 29 Jul 2019 18:23:28 +0000 (20:23 +0200)]
ramips: add support for Netgear EX6130
Specifications:
* SoC: MT7620A
* RAM: 64 MB DDR
* Flash: 8MB NOR SPI flash
* WiFi: MT7612E (5Ghz) and builtin MT7620A (2.4GHz)
* LAN: 1x100M
The -factory images can be flashed from the
device's web interface or via nmrpflash.
The device seems to use base PCB as EX3700/EX3800,
but supporting AC1200 using MT7612E.
MAC adresses:
5.0 GHz 0x8004 *:9a
2.4 GHz 0x4 *:9b
lan 0x28 *:9b
wan 0x2e *:9c
Since this is a one-port device, although wan MAC address is
set in flash, it is not used in OpenWrt setup.
Signed-off-by: Frederik Noe-Sdun <Frederik.Sdun@googlemail.com>
[rebased, extended commit message, tiny DTS style fixes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
南浦月 [Thu, 19 Sep 2019 09:41:01 +0000 (17:41 +0800)]
ar71xx: fix tl-wdr3320-v2 upgrade
Fix the error that tl-wdr3320-v2 can't upgrade firmware via web
interface by using magic_ver="0200" for this device.
Signed-off-by: 南浦月 <nanpuyue@gmail.com>
[commit message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Michal Cieslakiewicz [Wed, 6 Nov 2019 09:43:14 +0000 (10:43 +0100)]
ar71xx: update uboot-envtools for Netgear WNR routers
Boards added: WNR1000v2, WNR2000v3, WNR2200, WNR612v2, WNDR4300.
Boards changed: WNDR3700 (u-boot env size is 2 sectors not 1).
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Michal Cieslakiewicz [Wed, 6 Nov 2019 09:44:10 +0000 (10:44 +0100)]
ath79: update uboot-envtools for Netgear WNR routers
Boards added: WNR1000v2, WNR2000v3, WNR612v2, WNDR3700.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Petr Štetiar [Tue, 5 Nov 2019 22:57:37 +0000 (23:57 +0100)]
build: image: fix build breakage of some images
Commit
881ed09ee6e2 ("build: create JSON files containing image info")
has removed the crucial empty new line from the image copy step
resulting in the following errors during make function expansion:
GZ_SUFFIX :=
bash: GZ_SUFFIX: command not found
Makefile:86: recipe for target 'openwrt-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin' failed
Fixes:
881ed09ee6e2 ("build: create JSON files containing image info")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Kristian Evensen [Thu, 7 Nov 2019 16:34:18 +0000 (17:34 +0100)]
ipq40xx: u4019: use reset-gpios instead of phy-reset-gpio
Use reset-gpio instead of the custom phy-reset-gpio property to do phy
reset on the U4019. phy-reset-gpio was incorrectly introduced when we
added support for the U4019, and will be deprecated.
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Daniel Danzberger [Wed, 6 Nov 2019 13:06:39 +0000 (14:06 +0100)]
ipq40xx: wpj419: use reset-gpios property for phy reset
The old GPIO based phy reset (phy-reset-gpio) will be removed form
the ipq40xx mdio driver in the future.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
DENG Qingfang [Thu, 31 Oct 2019 15:33:41 +0000 (23:33 +0800)]
ipq40xx: mdio: remove support for phy-reset-gpio
Commit
6f6c00cfc95f ("ipq40xx: Add support for Unielec U4019") has
introduced support for `phy-reset-gpio` DT property, which isn't needed
as the MDIO already supports `reset-gpios`[1] which could be used instead.
1. https://elixir.bootlin.com/linux/v4.19.81/source/Documentation/devicetree/bindings/net/mdio.txt
Ref: PR#2511
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[commit title and description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Henrique de Moraes Holschuh [Fri, 1 Nov 2019 11:56:50 +0000 (08:56 -0300)]
busybox: disable default config option FEATURE_SUID=y
Commit
ad7c6102f209 ("busybox: fix missing install with suid bit set if
FEATURE_SUID=y") actually fixes BUSYBOX_CONFIG_FEATURE_SUID option and
thus would install busybox setuid root by default which would result in
possibly unwanted change of current behaviour, so let's disable this
option by default in order to preserve the current status-quo.
For the record: disabling FEATURE_SUID to preserve the status-quo does
*not* imply the current status-quo is "safer", or for that matter, in
any way desireable. That is a discussion to be had on the mailing
lists.
Switching the FEATURE_SUID default to "n" is simply a compromise to
facilitate the merge of the changes that unbreak FEATURE_SUID.
Ref: PR#2502
Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
[commit title/description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Henrique de Moraes Holschuh [Fri, 18 Oct 2019 11:31:30 +0000 (08:31 -0300)]
busybox: fix missing install with suid bit set if FEATURE_SUID=y
With FEATURE_SUID=y one can install busybox binary belonging to root
with the suid bit set, enabling some applets to perform root-level
operations even when run by ordinary users. Busybox then drops
privileges for applets that don't need root access, before entering
their main() function.
Currently we don't install busybox binary with suid bit set, rendering
this feature unusable.
Note that we can't just "chmod u+s /bin/busybox" at runtime as a
"cheaper" solution: it would waste approximately 200KiB of FLASH (the
whole /bin/busybox binary gets copied into the overlay).
Ref: PR#2502
Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
[commit title/description facelift, use INSTALL_SUID variable]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Adrian Schmutzler [Thu, 7 Nov 2019 17:16:46 +0000 (18:16 +0100)]
Revert "base-files: rename hostname with EUI of mac address"
This reverts commit
6170c46b477d4953f91b99e805a276de444913cf.
There has been demand for further evaluation of the impact of a
changed hostname, so this is reverted for now. The default hostname
will be "OpenWrt" again after this commit.
The macaddr_geteui() function is not removed by this revert.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Rosy Song [Mon, 4 Nov 2019 19:44:41 +0000 (20:44 +0100)]
base-files: rename hostname with EUI of mac address
If a label MAC address is provided for device, system
will rename the hostname with OpenWrt_{eui mac address}.
This helps to distinguish between different devices.
Since it's no good idea to nest json_* functions, this code does
not use get_mac_label directly, but only get_mac_label_dt as
external resource.
Signed-off-by: Rosy Song <rosysong@rosinson.com>
[merged with commit introducing macaddr_geteui, rebased on updated
label MAC address storage, extended commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Mon, 4 Nov 2019 19:44:41 +0000 (20:44 +0100)]
base-files: don't store label MAC address in uci system config
If set, label MAC address is available from one of two sources,
device tree or board.json. So far, the function get_mac_label
was meant for retrieving the address, while an option in uci
system config was specified only for case 2 (board.json).
The uci config option has several drawbacks:
- it is only used for a fraction of devices (those not in DT)
- label MAC address is a device property, while config implies
user interaction
- label_macaddr option will only be set if /etc/config/system
does not exist (i.e. only for new installations)
Thus, this patch changes the behavior of get_mac_label:
Instead of writing the value in board.json to uci system config
and reading from this location afterwards, get_mac_label now
extracts data from board.json directly. The uci config option
won't be used anymore.
In addition, two utility functions for extraction only from DT
or from board.json are introduced.
Since this is only changing the access to the label MAC address, it
won't interfere with the addresses stored in the code base so far.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Thu, 7 Nov 2019 16:07:01 +0000 (17:07 +0100)]
ramips: rename keys node formerly named button
For some devices, the keys node is named "button". Change name to
match the rest of the target.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Thu, 7 Nov 2019 16:03:50 +0000 (17:03 +0100)]
ath79: replace generic button node names
In several DTS files, button nodes are just named buttonX or
xxx_button. This replaces the names with more specific names matching
the majority of key definitions.
While at it, fix name of keys node in one case.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Martin Schiller [Fri, 25 Oct 2019 07:22:29 +0000 (09:22 +0200)]
kernel: fix LED netdev trigger on interface rename
This fixes the netdev LED trigger for interfaces, which are renamed
during initialization (e.g. ppp interfaces).
Fixes: FS#2193
Fixes: FS#2239
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Eneas U de Queiroz [Wed, 6 Nov 2019 21:22:51 +0000 (18:22 -0300)]
kernel: add crypto_user mod to crypto-user pkg
This is needed to export crypto information to netfilter, allowing
the alt. afalg openssl engine to obtain information about the drivers
being used.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Eneas U de Queiroz [Wed, 6 Nov 2019 21:22:52 +0000 (18:22 -0300)]
wolfssl: update to v4.2.0-stable
Many bugs were fixed--2 patches removed here.
This release of wolfSSL includes fixes for 5 security vulnerabilities,
including two CVEs with high/critical base scores:
- potential invalid read with TLS 1.3 PSK, including session tickets
- potential hang with ocspstaping2 (always enabled in openwrt)
- CVE-2019-15651: 1-byte overread when decoding certificate extensions
- CVE-2019-16748: 1-byte overread when checking certificate signatures
- DSA attack to recover DSA private keys
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Paul Spooren [Wed, 6 Nov 2019 21:15:21 +0000 (11:15 -1000)]
ramips, mt7620: reproducible elecom-header uid/gid
The elecom-header renames the firmware image to v_0.0.0.bin, stores its
MD5 sum as v_0.0.0.md5 and tars both files again.
Both v_0.0.0 files are created as the build user making it harder to
reproduce.
This commit sets the owner/group of both files to root by adding extra
options to the final tar command.
Before:
0 buildbot (101) buildbot (102)
3932164 2019-11-05 14:43:22.000000 v_0.0.0.bin
0 buildbot (101) buildbot (102) 33 2019-11-05 14:43:22.000000 v_0.0.0.md5
After:
0 root (0) root (0)
3932164 2019-11-05 23:43:08.000000 v_0.0.0.bin
0 root (0) root (0) 33 2019-11-05 23:43:08.000000 v_0.0.0.md5
Signed-off-by: Paul Spooren <mail@aparcar.org>
Petr Štetiar [Mon, 7 Oct 2019 14:34:17 +0000 (16:34 +0200)]
libnl-tiny: update to latest Git head
Includes following changes:
0230d0698e59 add initial GitLab CI support
5e13b797a988 iron out all extra compiler warnings
802fbd4d6f39 cmake: enable extra compiler checks
050bb5c4431b convert into CMake project
5b350e42d1fd refactor into separate Git project
and converts the package build to utilize CMake.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Adrian Schmutzler [Wed, 24 Jul 2019 18:38:36 +0000 (20:38 +0200)]
ath79: specify N and ND subversions of TL-WR941 with ALT0_MODEL
TP-Link's TL-WR941 is sold with detachable antennas
internationally (ND version), but with fixed antennas in China
(N version). While hardware and images are similar for both
variants of v2 and v4, they are different for v6.
Having both explicitly will make it easier for user to identify
the correct image, and most importantly will raise awareness
that N and ND are not necessarily always the same as for
TL-WR841 series.
With an image selection webpage, using ALT0_MODEL as in this
patch will provide the option to list versions for N and ND
separately.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Thu, 24 Oct 2019 11:36:47 +0000 (13:36 +0200)]
ramips: reorganize DTSI files for Netgear R devices
This reorganizes DTSI files for the Netgear R devices in mt7621
(and the WNDR3700 v5). It creates a common DTSI for all R (sercomm)
devices and distributes the remaining code in r6220.dtsi to R6220
and WNDR3700 v5.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Sungbo Eo [Mon, 7 Oct 2019 12:36:05 +0000 (21:36 +0900)]
ramips: improve support for WeVO 11AC NAS and W2914NS v2
- remove WAN port index
- load WAN MAC address directly from the flash
- provide label MAC address
- increase flash's SPI frequency to 80MHz
- add mt76 led nodes to make WiFi LEDs work
- drop unnecessary pinmux groups
The factory partition scheme for MAC addresses (verified on both devices):
0x4 : WiFi 2.4GHz (label_mac-9)
0x28 : unused
0x2e : WAN (label_mac)
0x8004: WiFi 5GHz (label_mac-5)
0xe000: LAN (label_mac-1)
0xe006: unused
By improving flash speed,
`time dd if=/dev/mtdblock3 of=/dev/null bs=64k`
has been reduced from 14.51s to 3.11s.
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[rebased]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Wed, 6 Nov 2019 12:51:20 +0000 (13:51 +0100)]
ath79: move eth0 to parent DTSI for ar9344 TP-Link CPE devices
The ð0 node is the same for all TP-Link CPE devices in ar9344,
so move it to parent DTSI. While at it, do some minor DTS
harmonizations.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Andrew Cameron [Sat, 26 Oct 2019 01:29:36 +0000 (20:29 -0500)]
ath79: add support for the TP-LINK CPE220 V3
This adds support for a popular low-cost 2.4GHz N based AP
Specifications:
SoC: Qualcomm Atheros QCA9533 (650MHz)
RAM: 64MB
Storage: 8 MB SPI NOR
Wireless: 2.4GHz N based built into SoC 2x2
Ethernet: 2x 100/10 Mbps, integrated into SoC
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 adress:192.168.0.254
This also applies some minor changes to the common DTSI:
- use &wmac for label-mac-device, as this one is actually set up in
common DTSI
- move ð0 to parent DTSI
- fix several leading spaces, added/removed newlines
Signed-off-by: Andrew Cameron <apcameron@softhome.net>
[DTS style fixes/improvements, updated commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Tue, 22 Oct 2019 17:04:27 +0000 (19:04 +0200)]
ramips: remove default case for MAC address assignment
So far, MAC address assignment in ramips has contained a default
case, which defined wan_mac = eth0 + 1 for _every_ device not
having an explicit case there.
This is not desirable, as many device supporters will just not
care or know about this definition, so another MAC address will be
introduced by accident. In some cases the wan_mac is assigned
although it is not needed, in other cases even addresses not
dedicated to the device will be used (e.g. wan_mac actually is
eth0 - 1, but during support nobody cared, so eth0 + 1 is used now,
which might actually belong to another device ...).
Thus, in this PR the former default case is converted to an
explicit case. This one comprises all devices not being accounted
for by other cases, reduced by those not having wan at all.
The big number of entries for this node might be another indication
that many of them wouldn't actually be there if there hadn't been
default wan_mac setup.
In exchange, the current "do nothing" case can be removed, as it
will be the new default case.
The devices being put in the newly created explicit case were
determined as follows:
1. Create a list of all devices based on the DTS files.
2. Remove all devices already having an explicit entry setting
their address.
3. Remove all devices that only have lan set up in the first part
of 02_network:
mt7620:
- alfa-network,tube-e4g
- asus,rp-n53
- buffalo,wmr-300
- comfast,cf-wr800n
- edimax,ew-7476rpc
- edimax,ew-7478ac
- elecom,wrh-300cr
- hnet,c108
- kimax,u25awf-h1
- kimax,u35wf
- kingston,mlw221
- kingston,mlwg2
- microduino,microwrt
- netgear,ex2700
- netgear,ex3700
- netgear,wn3000rp-v3
- planex,cs-qr10
- planex,mzk-ex300np
- planex,mzk-ex750np
- ravpower,wd03
- sercomm,na930
- yukai,bocco
- zbtlink,zbt-cpe102
- zte,q7
mt7621:
- gnubee,gb-pc1
- gnubee,gb-pc2
- linksys,re6500
- mikrotik,rbm11g
- netgear,ex6150
- thunder,timecloud
- tplink,re350-v1
- tplink,re650-v1
mt76x8:
- alfa-network,awusfree1
- d-team,pbr-d1
- glinet,vixmini
- vocore,vocore2-lite
- tama,w06
- tplink,tl-mr3020-v3
- tplink,tl-wa801nd-v5
- tplink,tl-wr802n-v4
- tplink,tl-wr902ac-v3
- vocore,vocore2
- widora,neo-16m
- widora,neo-32m
rt288x:
- buffalo,wli-tx4-ag300n
- dlink,dap-1522-a1
rt305x:
- allnet,all0256n-4m
- allnet,all0256n-8m
- allnet,all5002
- allnet,all5003
- alphanetworks,asl26555-16m
- alphanetworks,asl26555-8m
- asus,wl-330n
- aximcom,mr-102n
- dlink,dcs-930
- easyacc,wizard-8800
- hame,mpr-a2
- hootoo,ht-tm02
- huawei,d105
- intenso,memory2move
- planex,mzk-dp150n
- rt305x dlink,dcs-930l-b1
- sparklan,wcr-150gn
- tenda,3g150b
- tenda,3g300m
- tenda,w150m
- trendnet,tew-638apb-v2
- unbranded,a5-v11
- vocore,vocore-16m
- vocore,vocore-8m
- wansview,ncs601w
- zorlik,zl5900v2
rt3883:
- loewe,wmdr-143n
- omnima,hpm
4. Put the remaining devices in the new case.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Tue, 5 Nov 2019 18:23:33 +0000 (19:23 +0100)]
ath79: DTS file style update and harmonization
This applies several style adjustments that have been requested in
recent reviews to older DTS files. Despite making the code base more
consistent, this will also help to reduce review time when DTSes
are copy/pasted.
Applied changes:
- Rename gpio-keys/gpio-leds to keys/leds
- Remove node labels that are not used
- Use label property for partitions
- Prefix led node labels with "led_"
- Remove redundant includes
- Harmonize new lines after status property
- Several smaller style fixes
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Sungbo Eo [Wed, 2 Oct 2019 13:01:11 +0000 (22:01 +0900)]
ramips: improve netis WF-2881 support
This patch does the following:
1. remove u-boot-env partition
Stock bootloader saves env variables at 0x80000 in flash,
and there is nothing stored at 0x30000.
By merging the partition "u-boot-env" with "u-boot",
the partition table becomes the same as used in stock firmware:
00000000-
00080000: "Bootloader"
00080000-
00100000: "Config"
00100000-
00140000: "Factory"
00140000-
07f80000: "Kernel"
2. fix LAN/WAN MAC addresses and provide label MAC address
Ethernet MAC addresses are stored in factory partition at:
0xe000: LAN (label_mac)
0xe006: WAN (label_mac+1)
3. fix LAN port order
WF-2881 LAN ports are in reverse order of switch ports.
4. fix WiFi LEDs
mt76 led nodes are added to make WiFi LEDs work.
On top of this, mt76 node names are changed to more generic ones,
and compatible strings are also added.
5. fix pinmux groups
uart3 and uart2 pins are used as button and led, but jtag pins are not.
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Adrian Schmutzler [Tue, 5 Nov 2019 12:05:29 +0000 (13:05 +0100)]
gitignore: ignore patches in OpenWrt root directory
This will have GIT ignore patches in root directory, as created
when using "git format-patch".
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Fredrik Olofsson [Mon, 14 Oct 2019 07:01:57 +0000 (09:01 +0200)]
tools/automake: Revert "Do not use $(V) - force AM_V=1"
This reverts commit
43365ca66253 ("Do not use $(V) - force AM_V=1") as
it breaks verbose output in automake packages, deviating from the
upstream and expected behaviour.
As you can see, neither make command outputs the expected verbose
compile command lines:
```
$ make package/mtd-utils/{clean,compile} V=sc
...
CCLD lsmtd
CC nand-utils/nanddump.o
CCLD nanddump
...
```
```
$ make -C build_dir/target*/mtd-utils-2.1.1 clean
...
$ make -C build_dir/target*/mtd-utils-2.1.1 V=1
...
CC lib/libmtd.o
CC lib/libfec.o
CC lib/common.o
CC lib/libcrc32.o
```
The original reason for this commit was some packages failing to build
if V is set to something other than 0 or 1. See the discussion in PR
https://github.com/openwrt/openwrt/pull/2481 for how to fix this in the
package Makefile.
Ref: PR#2481
Acked-by: Mirko Vogt <mirko-openwrt@nanl.de>
Signed-off-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com>
[commit title/description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Tue, 5 Nov 2019 20:51:23 +0000 (21:51 +0100)]
Revert "ipq806x: fix EA8500 switch control"
There is a problem with the EA8500, the switch will not work after soft
reboot, the only way to get it working again is to power cycle it
manually.
There are probably several issues in the play, it's quite hard to fix it
without having access to the actual device, so I don't see any other
option now, then revert the offending commit.
Ref: PR#2047
Fixes: FS#2168 ("Switch no longer work after restart on Linksys EA8500")
Reported-by: Adam <424778940z@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>