David Bauer [Mon, 27 Jul 2020 21:13:02 +0000 (23:13 +0200)]
rockchip: distribute net interrupts
This adds a hotplug script for distributing interrupts of eth0 and eth1
across different cores. Otherwise the forwarding performance between
eth0 and eth1 is severely affected.
The existing SMP distribution mechanic in OpenWrt can't be used here, as
the actual device IRQ has to be moved to dedicated cores. In case of
eth1, this is in fact the USB3 controller.
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Mon, 27 Jul 2020 19:34:24 +0000 (21:34 +0200)]
arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
where tx checksumming does not work with packets larger than 1498.
The default Programmable Buffer Length for TX in these GMAC's is
not suitable for MTUs higher than 1498. The workaround is to disable
TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
impacts as it disables hardware checksumming.
This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
the most popular MTU value of 1500.
For reference, see https://lkml.org/lkml/2019/4/1/1382.
Signed-off-by: Carlos de Paula <me@carlosedp.com>
Link: https://lore.kernel.org/r/20200218221040.10955-1-me@carlosedp.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Sun, 26 Jul 2020 17:12:03 +0000 (19:12 +0200)]
rockchip: enable LAN LED configuration
This enables the LEDs on the LAN interfaces.
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Thu, 16 Jul 2020 08:08:57 +0000 (10:08 +0200)]
rockchip: add NanoPi R2S support
Hardware
--------
RockChip RK3328 ARM64 (4 cores)
1GB DDR4 RAM
2x 1000 Base-T
3 LEDs (LAN / WAN / SYS)
1 Button (Reset)
Micro-SD slot
USB 2.0 Port
Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card using
dd.
MAC-address
-----------
The vendor code supports reading a MAC address from an EEPROM connected
via i2c0 of the SoC. The EEPROM (address 0x51) should contain the MAC
address in binary at offset 0xfa. However, my two units didn't come with
such an EEPROM soldered on. The EEPROM should be placed between the SoC
and the GPIO pins on the board. (U10)
Generating rendom MAC addresses works around this issue. Otherwise, all
boards running the same image have identical MAC addresses.
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Sat, 11 Jul 2020 12:02:23 +0000 (14:02 +0200)]
rockchip: allow for multiple boot-scripts
Add support for select a bootscript depending on the device built. This
is necessary, as the FriendlyARM NanoPi R2S needs a different bootcmd in
order to produce output on the debug UART.
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Sat, 11 Jul 2020 11:48:40 +0000 (13:48 +0200)]
base-files: add function for generating random MAC
This adds a function for generating a valid random MAC address (unset MC
bit / set locally administered bit).
It is necessary for devices which do not have a MAC address programmed
by the manufacturer.
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Fri, 10 Jul 2020 15:38:36 +0000 (17:38 +0200)]
uboot-rockchip: add NanoPi R2S support
Add support for the FriendlyARM NanoPi R2S.
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Fri, 10 Jul 2020 13:14:15 +0000 (15:14 +0200)]
uboot-rockchip: update to v2020.07
Update the U-Boot to version v2020.07. Also replace the Makefile rewrite
with a proper patch, explaining why this hack is needed.
Run-tested: FriendlyARM NanoPi R2S
Signed-off-by: David Bauer <mail@david-bauer.net>
Lucian Cristian [Sun, 28 Jun 2020 18:40:06 +0000 (21:40 +0300)]
atf-rockchip: update to 2.3
also install the firmware for all the supported boards
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
[fix ATF blob path in uboot-rockchip]
Signed-off-by: David Bauer <mail@david-bauer.net>
Adrian Schmutzler [Mon, 13 Apr 2020 10:33:52 +0000 (12:33 +0200)]
arc770: update kernel version to 5.4
Update config with make kernel_oldconfig and copy/refresh patch.
Add CONFIG_WATCHDOG_CORE=y to fix the following error as done for
several targets already:
Package kmod-hwmon-sch5627 is missing dependencies for the following
libraries:
watchdog.ko
Directly switch to kernel 5.4.
This patch is compile-tested only. However, the target is essentially
pure upstream with a single patch, and it has been reported that
kernel 5.4 has been run on this target successfully already.
Note that in my local tests building with all packages/kmods failed
since openvswitch selects libunwind, which doesn't build for arc with
the following error:
checking if we should build libunwind-ptrace... yes
checking if we should build libunwind-setjmp... yes
checking for build architecture... x86_64
checking for host architecture... arc
checking for target architecture... arc
checking for target operating system... linux-gnu
checking for ELF helper width... configure: error: Unknown ELF target: arc
make[3]: *** [Makefile:65: /data/openwrt/build_dir/target-arc_arc700_uClibc/
libunwind-1.3.1/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1
Deselecting all kmod-openvswitch* packages will have the build run through.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sat, 25 Jul 2020 18:29:14 +0000 (20:29 +0200)]
lantiq: fix cosmetic issues with partition offsets and sizes
This fixes a few cosmetic issues with partition offset and size
that are inconsistent probably due to copy/pasting.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Josh Bendavid [Tue, 14 Jul 2020 15:39:21 +0000 (17:39 +0200)]
ramips: add support for D-Link DIR-1960 A1
This patch adds support for D-Link DIR-1960 A1. Given the similarity with
the DIR-1760/2660 A1, this patch also introduces a common DTSI which can
be shared with these devices, with support to be added in future commits.
Specifications:
* Board: AP-MTKH7-0002
* SoC: MediaTek MT7621AT
* RAM: 256 MB (DDR3)
* Flash: 128 MB (NAND)
* WiFi: MediaTek MT7615N (x2)
* Switch: 1 WAN, 4 LAN (Gigabit)
* Ports: 1 USB 3.0
* Buttons: Reset, WPS
* LEDs: Power (white/orange), Internet (white/orange), WiFi 2.4G (white),
WiFi 5G (white), USB 3.0 (white)
Notes:
* WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips
Installation:
* D-Link Recovery GUI: power down the router, press and hold the reset
button, then re-plug it. Keep the reset button pressed until the power
LED starts flashing orange, manually assign a static IP address under
the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1
* Some modern browsers may have problems flashing via the Recovery GUI,
if that occurs consider uploading the firmware through cURL:
curl -v -i -F "firmware=@file.bin" 192.168.0.1
MAC addresses:
lan factory 0xe000 *:EB (label)
wan factory 0xe006 *:EE
2.4 factory 0xe000 +1 *:EC
5.0 factory 0xe000 +2 *:ED
Seems like vendor didn't replace the dummy entrys in the calibration data.
Signed-off-by: Josh Bendavid <joshbendavid@gmail.com>
[fix whitespace issues, create patch to merge DIR-1960 first, move
special WiFi MAC settings to DTS, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sat, 18 Jul 2020 12:59:48 +0000 (14:59 +0200)]
imx6: use device-tree compatible for board name
In imx6, we currently use the model from DTS to derive a board name
manually in /lib/imx6.sh.
However, if we have individual DTS files anyway, we can exploit
generic 02_sysinfo and use the compatible as board name directly.
While at it, remove the wildcards from /lib/upgrade/platform.sh as
these might make code shorter, but are quite unpleasant when grepping
for a specific device.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Mon, 20 Jul 2020 13:34:04 +0000 (15:34 +0200)]
layerscape: harmonize device strings
OpenWrt lately has harmonized device (definition) names to the
pattern vendor_model to improve overall consistency, also with
other values like the DTS compatible.
This patch applies that scheme to the layerscape target.
Since this (intentionally) creates a bigger overlap between DTS names,
compatible, and device definition name, it also moves DEVICE_DTS and
SUPPORTED_DEVICES definitions to the Device/Default blocks.
Apart from that, it also modifies several packages to use consistent
naming in order to keep the $(1) file references working.
While at it, remove one layer of complexity for the setup in
tfa-layerscape package.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Mon, 27 Jul 2020 09:05:25 +0000 (11:05 +0200)]
mvebu: only disable WRT1900AC v1 and WRT32X for buildbots
Use "DEFAULT := n" to only disable devices for buildbots, but
keep them available for manual build.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Jo-Philipp Wich [Sun, 26 Jul 2020 16:51:56 +0000 (18:51 +0200)]
mvebu: disable WRT1900AC v1 and WRT32X images for now
The kernel appears to have grown too large, breaking the build for the
entire target.
Disable the affected images for now until the situation is dealt with.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Yousong Zhou [Sat, 25 Jul 2020 03:08:29 +0000 (11:08 +0800)]
firewall: bump to version 2020-07-05
Changes since last source version
e9b90df zones: apply tcp mss clamping also on ingress path
050816a redirects: fix segmentation fault
f62a52b treewide: replace unsafe string functions
23cc543 improve reload logic
9d7f49d redurects: add support to define multiple zones for dnat reflection rules
f87d0b0 firewall3: defaults: fix uci flow_offloading option
fe9602c rules: fix typo
7cc2a84 defaults: robustify flow table detection.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
David Woodhouse [Tue, 21 Jul 2020 18:19:40 +0000 (19:19 +0100)]
mediatek: mt7623: add full system image for UniElec U7623
This adds a full eMMC image including U-Boot, which means that the
kernel can inherit the true RAM size detected by the preloader.
As implemented in previous commits, sysupgrade to this image from
the legacy layout (and via that, from the vendor-installed image)
is supported.
Rename the legacy image for the 512MiB board, for clarity.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Tue, 21 Jul 2020 18:14:18 +0000 (19:14 +0100)]
mediatek: mt7623: rename gen_banana_pi_img.sh → gen_mtk_mmc_img.sh
As I buy more hardware and continue to work on consolidation, This will
apply to a lot of MediaTek platforms; rename it accordingly.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Tue, 21 Jul 2020 18:07:47 +0000 (19:07 +0100)]
mediatek: mt7623: make gen_banana_pi_img.sh more generic
This actually covers fairly much all the MediaTek platforms; they
only have different images because they don't include the preloader
and U-Boot, and rely on preinstalled stuff from the vendor.
So this script can slowly take over the world as we complete the
support for various other platforms, starting with UniElec U7623…
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Tue, 21 Jul 2020 16:43:12 +0000 (17:43 +0100)]
mediatek: mt7623: add scatter file for unbricking with SP Flash Tool
Many MediaTek SoCs can be unbricked by using the SP Flash Tool from
http://spflashtool.com/ along with a "scatter list" file, which is
just a text file listing which image gets loaded where.
We use a trivial partition layout for the tool, with the whole eMMC
image as a single "partition", which means users just need to unzip
the sysupgrade image. Doing the real partition layout would be overly
complex and would require the individual partitions to be shipped
as artifacts — or users to extract them out of the sysupgrade image
just for the tool to put them adjacent to each other on the eMMC
anyway.
The tool does require a copy of the preloader in order to operate,
even when it isn't flashing the preloader to the eMMC boot region.
So drop that into the bin directory as an artifact too.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Chuanhong Guo [Sun, 26 Jul 2020 08:57:05 +0000 (16:57 +0800)]
mediatek: mt7623: build lzma fit for bpi-r2
bpi-r2 images are shipped with mainline u-boot which can extract lzma
with no problem.
remove custom kernel recipe to build lzma fit image instead of
uncompressed fit with zboot.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
David Woodhouse [Mon, 20 Jul 2020 20:10:04 +0000 (21:10 +0100)]
mediatek: mt7623: prepare for full sysupgrade support on UniElec U7623
An upcoming commit will add a full system image for U7623 which will
contain the MBR partition table and U-Boot too.
That contrasts with the current image which only owns the eMMC from
sector 0xa00 onwards, and must start with a legacy uImage.
Prepare for sysupgrade to the new images, and cope with the fact that
the recovery partition will be /dev/mmcblk0p2 instead of /dev/mmcblk0p1
after the upgrade.
This commit could potentially be backported to 19.07 to allow for direct
sysupgrade to the new image layout.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Mon, 20 Jul 2020 15:25:49 +0000 (16:25 +0100)]
mediatek: mt7623: increase flexibility of finding recovery partition
I'm about to change the layout of the images for UniElec U7623 so make it
find the recovery partition based on which the root partition is too.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Mon, 13 Jul 2020 09:37:28 +0000 (10:37 +0100)]
mediatek: add U-Boot build for UniElec U7623
Patches submitted upstream at
https://patchwork.ozlabs.org/project/uboot/list/?series=189178
Tested on Banana Pi R2 and U7623-06.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Thu, 23 Jul 2020 18:35:36 +0000 (19:35 +0100)]
mediatek: mt7623: fix Ethernet setup for TRGMII mode
This fixes the TX performance issues seen on MT7623 boards.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Sun, 12 Jul 2020 23:49:22 +0000 (00:49 +0100)]
mediatek: fix Ethernet support on UniElec U7623
The definition of the switch in the device-tree was not correct. Make it
look more like the Banana Pi R2, which works.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Tue, 21 Jul 2020 08:53:32 +0000 (09:53 +0100)]
mediatek: mt7623: fix sysupgrade from vendor OpenWrt on UniElec U7623
This board ships with an ancient 14.07-based OpenWrt using block2mtd, and
the MBR partition table contains nonsense.
It is possible to sysupgrade to an upstream OpenWrt image, but the
legacy layout of the OpenWrt images start at 0xA00 in the eMMC, with
a raw uImage. The legacy OpenWrt image doesn't "own" the beginning
of the device, including the MBR and U-Boot.
This means that when a user upgrades to upstream OpenWrt, it doesn't
boot because it can't find the right partitions. So hard-code them on
the kernel's command line using CONFIG_CMDLINE_PARTITION (for block).
Additionally, the vendor firmware doesn't cope with images larger than
about 36MiB, because it only overwrites the contents of its "firmware"
MTD partition. The current layout of the legacy image wastes a lot of
space, allowing over 32MiB for the kernel and another 10MiB for the FAT
recovery file system which is only created as 3MiB. So pull those in
to allow 4¾ MiB for the kernel, 3MiB for recovery, and then we have over
20MiB for the root file system.
This doesn't affect the new images which ship with a full eMMC image
including a different MBR layout and a partition for U-Boot, because
our modern U-Boot can actually pass the command line to the kernel, and
the built-in one doesn't get used anyway.
Tested by upgrading from vendor OpenWrt to the current legacy image,
from legacy to itself, to the previous legacy layout, and then to
finally the full-system image.
This commit probably wants backporting to 19.07, which also doesn't
install over the vendor OpenWrt and doesn't even have a full-system
installation option.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Mon, 20 Jul 2020 20:00:29 +0000 (21:00 +0100)]
mediatek: mt7623: add explicit console= to U7623 kernel
The bootloader for legacy builds can't set it, so we end up unable to
log in on the serial port.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Leon M. George [Fri, 26 Jul 2019 18:34:01 +0000 (20:34 +0200)]
ath79: add support for Compex WPJ563
Specifications:
SoC: QCA9563
DRAM: 128MB DDR2
Flash: 16MB SPI-NOR
2 Gigabit ethernet ports
3×3 2.4GHz on-board radio
miniPCIe slot that supports 5GHz radio
PoE 24V passive or 36V-56V passive with optional IEEE 802.3af/at
USB 3.0 header
Installation:
To install, either start tftp in bin/targets/ath79/generic/ and use
the u-boot prompt over UART:
tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj563-squashfs-sysupgrade.bin
erase 0x9f680000 +1
erase 0x9f030000 +$filesize
cp.b $fileaddr 0x9f030000 $filesize
boot
The cpximg file can be used with sysupgrade in the stock firmware (add
SSH key in luci for root access) or with the built-in cpximg loader.
The cpximg loader can be started either by holding the reset button
during power up or by entering the u-boot prompt and entering 'cpximg'.
Once it's running, a TFTP-server under 192.168.1.1 will accept the image
appropriate for the board revision that is etched on the board.
For example, if the board is labelled '7A02':
tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj563-squashfs-cpximg-7a02.bin
MAC addresses:
<&uboot 0x2e010> *:71 (label)
<&uboot 0x2e018> *:72
<&uboot 0x2e020> *:73
<&uboot 0x2e028> *:74
Only the first two are used (for ethernet), the WiFi modules have
separate (valid) addresses. The latter two addresses are not used.
Signed-off-by: Leon M. George <leon@georgemail.eu>
Aleksander Jan Bajkowski [Sat, 27 Jun 2020 11:41:54 +0000 (13:41 +0200)]
lantiq: xrx200: disable unused switch and phy
xrx200 has a 6 port built-in switch with 2 integrated PHY. None of the
xrx200 router uses external switch. Most boards use integrated or Lantiq
(Intel) PEF7071 PHY. Only some FritzBox routers use AT803X PHY and
VGV7510KW22 use ICPLUS PHY. Other unused PHY drivers may be removed.
This patch enables these symbols only on xway and xway_legacy subtargets:
- CONFIG_PSB6970_PHY (Driver for PHY in PSB6970 - 7 port FE Switch)
- CONFIG_RTL8366RB_PHY (Driver for PHY in RTL8366 - 6 port GE Switch)
- CONFIG_RTL8366_SMI (Driver for RTL8366 - 6 port GE Switch)
Reduces image size by 7.3kB.
Continuation of
58a6f06978f8 (PR: #2983)
Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
[fix sorting in config files, small fix in commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Tue, 21 Jul 2020 15:28:54 +0000 (17:28 +0200)]
mediatek: remove condition in Device/Default
The current condition with part of the variables set dependent on
the subtarget in Device/Default isn't really nice to read and also
defeats the purpose of having a default node.
This removes the special settings for mt7623 and moves them to the
individual devices, which is not much of a problem as there are
actually just two of them and they partly use different settings
anyway.
While at it, slightly adjust the order of variables and wrap some
long lines.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
David Bauer [Sat, 25 Jul 2020 09:26:11 +0000 (11:26 +0200)]
mac80211: util: don't warn on missing sband iftype data
The kernel currently floods the ringbuffer with warnings when adding a
mesh interface for a device not support HE 6GHz modes.
Return without warning in this case, as mesh_add_he_6ghz_cap_ie calls
ieee80211_ie_build_he_6ghz_cap regardless of the supported interface
modes.
Signed-off-by: David Bauer <mail@david-bauer.net>
Bjoern Dobe [Fri, 24 Jul 2020 06:48:39 +0000 (08:48 +0200)]
ath79: mikrotik: use base mac on lan for RBwAPG-5HacT2HnD
The Mikrotik RBwAPG-5HacT2HnD has only a single ethernet interface
(lan), and the vendor uses the base (label) MAC address for it.
Signed-off-by: Bjoern Dobe <bjoern@dobecom.de>
[commit title/message improvement]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Sungbo Eo [Thu, 2 Jul 2020 13:33:18 +0000 (22:33 +0900)]
treewide: rename POWER_ON_STRIP register
AR8327 datasheet[1] calls the register at address 0x0010
"Power-on Strapping Register". As it has nothing to do with "strip",
let's rename it to "POWER_ON_STRAP" to make it easier to grasp.
[1] https://lafibre.info/images/doc/201106_spec_AR8327.pdf
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
John Thomson [Sat, 13 Jun 2020 11:25:12 +0000 (21:25 +1000)]
ramips: remove non-existant poe_passthrough for RouterBOARD 750Gr3
This 750gr3 GPIO17 switch was added based on vendor source,
but only the 760iGS (which shares the rbsysfs board identifier)
device has the physical wiring. The 750Gr3 actually does not
support PoE out.
Apart from that, note that the gpio base (480) would have required
this GPIO to be referenced as 497 if it was kept.
Fixes: 6ba58b7b020c ("ramips: cleanup the RB750Gr3 support")
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
[commit title/message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Davide Fioravanti [Thu, 16 Jul 2020 21:29:27 +0000 (23:29 +0200)]
ramips: add support for Winstars WS-WN583A6
The Winstars WS-WN583A6 is a wireless repeater with 2 gigabit ethernet
ports. Even if mine is branded as "Gemeita AC2100", the sticker on the
back says WS-WN583A6. So I will refer to it as Winstars WS-WN583A6.
Probably the real product name is the Wavlink WL-WN583A6 because of
the many references to Wavlink in the OEM firmware and bootlog.
Hardware
--------
SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads)
RAM: 128MB
FLASH: 8MB NOR (GigaDevice GD25Q64B)
ETH: 2x 10/100/1000 Mbps Ethernet (MT7530)
WIFI:
- 2.4GHz: 1x MT7603E (2x2:2)
- 5GHz: 1x MT7615E (4x4:4)
- 6 internal antennas
BTN:
- 1x Reset button
- 1x WPS button
- 1x ON/OFF switch (working but unmodifiable)
- 1x Auto/Schedule switch (working but unmodifiable. Read Note #3)
LEDS:
- 1x White led
- 1x Red led
- 1x Amber led
- 1x Blue led
- 2x Blue leds (lan and wan port status: working but unmodifiable)
UART:
- 57600-8-N-1
Everything works correctly.
Currently there is no firmware update available. Because of this, in
order to restore the OEM firmware, you must firstly dump the OEM
firmware from your router before you flash the OpenWrt image.
Backup the OEM Firmware
-----------------------
The following steps are to be intended for users having little to none
experience in linux. Obviously there are many ways to backup the OEM
firmware, but probably this is the easiest way for this router.
Procedure tested on M83A6.V5030.191210 firmware version.
1) Go to http://192.168.10.1/webcmd.shtml
2) Type the following line in the "Command" input box:
mkdir /etc_ro/lighttpd/www/dev; for i in /dev/mtd*ro; do dd if=${i} of=/etc_ro/lighttpd/www${i}; done
3) Click "Apply"
4) After few seconds, in the textarea should appear this output:
16384+0 records in
16384+0 records out
8388608 bytes (8.0MB) copied, 4.038820 seconds, 2.0MB/s
384+0 records in
384+0 records out
196608 bytes (192.0KB) copied, 0.095180 seconds, 2.0MB/s
128+0 records in
128+0 records out
65536 bytes (64.0KB) copied, 0.032020 seconds, 2.0MB/s
128+0 records in
128+0 records out
65536 bytes (64.0KB) copied, 0.031760 seconds, 2.0MB/s
15744+0 records in
15744+0 records out
8060928 bytes (7.7MB) copied, 3.885280 seconds, 2.0MB/s
dd: can't open '/dev/mtd5ro': No such device
dd: can't open '/dev/mtd6ro': No such device
dd: can't open '/dev/mtd7ro': No such device
Excluding the "X.XXXXXX seconds" part, you should get the same
exact output. If your output doesn't match mine, stop reading
and ask for help in the forum.
5) Open the following links to download the partitions of the OEM FW:
http://192.168.10.1/dev/mtd0ro
http://192.168.10.1/dev/mtd1ro
http://192.168.10.1/dev/mtd2ro
http://192.168.10.1/dev/mtd3ro
http://192.168.10.1/dev/mtd4ro
If one (or more) of these files weight 0 byte, stop reading and ask
for help in the forum.
6) Store these downloaded files in a safe place.
7) Reboot your router to remove any temporary file from your router.
Installation
------------
Flash the initramfs image in the OEM firmware interface.
When openwrt boots, flash the sysupgrade image otherwise you won't be
able to keep configuration between reboots.
Restore OEM Firmware
--------------------
Flash the "mtd4ro" file you previously backed-up directly from LUCI.
Warning: Remember to not keep settings!
Warning2: Remember to force the flash.
Notes
-----
1) The "System Command" page allows to run every command as root.
For example you can use "dd" and "nc" to backup the OEM firmware.
PC (SERVER):
nc -l 5555 > ./mtdXro
ROUTER (CLIENT):
dd if=/dev/mtdXro | nc PC_IP_ADDRESS 5555
2) The OEM web interface accepts only images containing the string
"WN583A6" in the filename.
Currently the OEM interface accepts only the initramfs image
probably because it checks if the ih_size in the image header is
equal to the whole image size (instead of the kernel size)
Read more here:
https://forum.openwrt.org/t/support-for-strong-1200/22768/19
3) The white led (namely "Smart Night Light") can be controller by the
user only if the side switch is set to "Schedule" otherwise it will
be activated by the light condition (there is a photodiode on the
top side of the router)
4) Router mac addresses:
LAN XX:XX:XX:XX:XX:8F
WAN XX:XX:XX:XX:XX:90
WIFI 2G XX:XX:XX:XX:XX:91
WIFI 5G XX:XX:XX:XX:XX:92
LABEL XX:XX:XX:XX:XX:91
Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
[remove chosen node, fix whitespace]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sat, 18 Jul 2020 12:22:54 +0000 (14:22 +0200)]
oxnas: use vendor_model scheme for ox810se
Most newer targets have been converted to consistently use
vendor_model scheme for device definitions/image names, ox820 is
using it as well, so let's just convert ox810se for consistency.
While at it, use generic setup for DEVICE_DTS and add SUPPORTED_DEVICES.
The latter have been introduced for ox820 already in
cf7896117b3e ("oxnas: enable image metadata by setting SUPPORTED_DEVICES")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Daniel Golle [Sat, 25 Jul 2020 15:54:40 +0000 (16:54 +0100)]
procd: jail: fix build on glibc and uclibc
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle [Sat, 25 Jul 2020 15:07:59 +0000 (16:07 +0100)]
procd: update to git HEAD
48777de rcS: cast format string to int64_t
a4df90f jail: fix wrong format for 32-bit
c482c5d jail: add support for referencing existing namespaces
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Kevin Darbyshire-Bryant [Sat, 4 Jul 2020 16:18:10 +0000 (17:18 +0100)]
cake-oot: update to latest HEAD
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Hauke Mehrtens [Fri, 17 Jul 2020 21:27:41 +0000 (23:27 +0200)]
build: Remove dependency of user space stack cookies from kernel
Currently the user space stack cookies work well also when the kernel
stack cookies are not activated. This is handled completely in user
space and does not need kernel support.
This dependency was probably needed some years ago when the libc did not
support stack cookies.
Reviewed-by: Ian Cooper <iancooper@hotmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Fri, 17 Jul 2020 20:53:11 +0000 (22:53 +0200)]
toolchain: binutils: Use version 2.34 by default
Switch to binutils version 2.34 for all CPUs by default. The ARC CPUs
do not need any special binutils version any more.
This increases the image size by 0.2% on MIPS (lantiq)
Tested on lantiq, ipq40xx
Acked-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Fri, 17 Jul 2020 20:48:15 +0000 (22:48 +0200)]
lantiq: Fix warning in SPI driver
This fixes a warning in the SPI driver at bootup. This warning is seen
in kernel 5.4 on lantiq deives.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sat, 20 Jun 2020 21:11:17 +0000 (23:11 +0200)]
mac80211: Update to version 5.8-rc2-1
The following patches:
* 972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
* 973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch
are replaced by this commit in the upstream kernel:
*
3db24065c2c8 ("ath10k: enable VHT160 and VHT80+80 modes")
The following patches were applied upstream:
* 001-rt2800-enable-MFP-support-unconditionally.patch
* 090-wireless-Use-linux-stddef.h-instead-of-stddef.h.patch
The rtw88 driver is now split into multiple kernel modules, just put it
all into one OpenWrt kernel package.
rtl8812au-ct was patched to compile against the mac80211 from kernel
5.8, but not runtime tested.
Add a patch which fixes ath10k on IPQ40XX, this patch was send upstream
and fixes a crash when loading ath10k on this SoC.
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq40xx/ map-ac2200]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sun, 28 Jun 2020 12:57:06 +0000 (14:57 +0200)]
mac80211: Update to version 5.7.5-1
The b43 and b43legacy driver now support DRIVER_11W_SUPPORT.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Ted Hess [Thu, 23 Jul 2020 18:07:16 +0000 (14:07 -0400)]
tools/mkimage: create .itb file with read-access for group,other not just owner.
This patch will fix the source of 403 errors on these files
from downloads.openwrt.org.
Signed-off-by: Ted Hess <thess@kitschensync.net>
Rosen Penev [Thu, 23 Jul 2020 00:55:07 +0000 (17:55 -0700)]
uboot-mediatek: remove swig requirement
Ever since this package was introduced, the SDK for mt7629 failed to
build as it started failing on this package.
Fixed by porting Hauke's similar patch for uboot-sunxi to uboot-mediatek.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Michal Hrusecky [Mon, 20 Jul 2020 13:23:07 +0000 (15:23 +0200)]
openvpn: Allow override of interface name
If using a configuration file for OpenVPN, allow overriding name of the
interface. The reason is that then people could use configuration file
provided by VPN provider directly and override the name of the interface
to include it in correct firewall zone without need to alter the
configuration file.
Signed-off-by: Michal Hrusecky <michal@hrusecky.net>
(cherry picked from commit
c93667358515ec078ef4ac96393623ac084e5c9e)
Michal Hrusecky [Thu, 23 Jul 2020 10:10:45 +0000 (12:10 +0200)]
openpvn: Split out config parsing code for reuse
Split out code that parses openvpn configuration file into separate file
that can be later included in various scripts and reused.
Signed-off-by: Michal Hrusecky <michal@hrusecky.net>
(cherry picked from commit
86d8467c8ab792c79809a08c223dd9d40da6da2e)
Phi Nguyen [Thu, 23 Jul 2020 03:03:52 +0000 (11:03 +0800)]
ipq40xx: support reset button for WPJ419
Compex WPJ419 has a reset button on a GPIO pin.
Signed-off-by: Phi Nguyen <phind.uet@gmail.com>
Paul Spooren [Wed, 22 Jul 2020 23:49:37 +0000 (13:49 -1000)]
tools/flock: add PKG_{VERSION,RELEASE}
The stored source code of flock contains the version string of version
2.18, reflect that in the Makefile.
Motivation is the tracking of changes in the buildsystem, which requires
versioning of packages.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Paul Spooren [Wed, 22 Jul 2020 23:46:21 +0000 (13:46 -1000)]
tools/sstrip: add PKG_{VERSION,RELEASE}
Comparing the in tree stored source file of sstrip suggests it's version
2.0[0], reflect that in the Makefile.
Motivation is the tracking of changes in the buildsystem, which requires
versioning of packages.
[0]: https://github.com/BR903/ELFkickers/commit/
df4426a0f0ada861064d75c08cbebaac7c16b3ae#diff-
d3ba694d91432a068d5d3b36abf8cd0f
Signed-off-by: Paul Spooren <mail@aparcar.org>
Paul Spooren [Wed, 22 Jul 2020 23:10:06 +0000 (13:10 -1000)]
tools/firmware-utils: add PKG_RELEASE
There is no versioning information in the firmware-utils code nor the
Makefile. Consider it as first release by adding PKG_RELEASE.
Motivation is the tracking of changes in the buildsystem, which requires
versioning of packages.
Also update copyright.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Paul Spooren [Wed, 22 Jul 2020 23:08:27 +0000 (13:08 -1000)]
tools/patch-image: add PKG_RELEASE
There is no versioning information in the patch-image code nor the
Makefile. Consider it as first release by adding PKG_RELEASE.
Motivation is the tracking of changes in the buildsystem, which requires
versioning of packages.
Also update copyright.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Adrian Schmutzler [Wed, 22 Jul 2020 23:04:35 +0000 (01:04 +0200)]
tools: drop PKG_VERSION for purely local packages
This applies to tools directory what has been done for package/ in
commit
9c170cb92f4f ("package: drop PKG_VERSION for purely local
packages"):
In the package guidelines, PKG_VERSION is supposed to be used as
"The upstream version number that we're downloading", while
PKG_RELEASE is referred to as "The version of this package Makefile".
Thus, the variables in a strict interpretation provide a clear
distinction between "their" (upstream) version in PKG_VERSION and
"our" (local OpenWrt trunk) version in PKG_RELEASE.
For local (OpenWrt-only) packages, this implies that those will only
need PKG_RELEASE defined, while PKG_VERSION does not apply following
a strict interpretation. While the majority of "our" packages actually
follow that scheme, there are also some that mix both variables or
have one of them defined but keep them at "1".
This is misleading and confusing, which can be observed by the fact
that there typically either one of the variables is never bumped or
the choice of the variable to increase depends on the person doing the
change.
Consequently, this patch aims at clarifying the situation by
consistently using only PKG_RELEASE for "our" packages. For tools/,
only three packages were affected. This fixes two of them, and
leaves the remaining wrt350nv2-builder untouched, as the code there
seems to have some versioning of its own that is treated as upstream
version in PKG_VERSION.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Wed, 22 Jul 2020 16:49:09 +0000 (18:49 +0200)]
Revert "ramips: fix flash layout for TP-Link TL-WR841N v14"
This reverts commit
1623defbdbb852a4018329d07673b4b8f66225a8.
As already stated in the reverted patch, the OEM firmware will
properly recreate the config partition if it is overwritten by
OpenWrt.
The main reason for adding the partition was the image size
restriction imposed by the 0x3d0000 limitation of the TFTP
flashing process. Addressing this by shrinking the firmware
partition is not a good solution to that problem, though:
1. For a working image, the size of the content has to be smaller
than the available space, so empty erase blocks will remain.
2. Conceptually, the restriction is on the image, so it makes sense
to implement it in the same way, and not via the partitioning.
Users could e.g. do initial flash with TFTP restriction with
an older image, and then sysupgrade into a newer one, so TFTP
restriction does not apply.
3. The (content) size of the recovery image is enforced to 0x3d0000
by the tplink-v2-image command in combination with
TPLINK_FLASHLAYOUT (flash layout in mktplinkfw2.c) anyway.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Wed, 22 Jul 2020 16:24:01 +0000 (18:24 +0200)]
arc770: use generic 02_sysinfo
Currently arc770 sets a board name from compatible for no apparent
reason. Just use the compatible directly instead.
This theoretically removes a board name "generic" when no compatible
was present, however, there is no case where this "generic" board
name was actually used.
This also fixes an issue where snps,axs101 would not have been
properly detected anyway, as its case was not set up syntactically
correct.
Fixes: 576621f1e353 ("linux: add support of Synopsys ARC770-based boards")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sat, 18 Jul 2020 14:02:06 +0000 (16:02 +0200)]
archs38: use generic 02_sysinfo
Currently archs38 sets a board name from compatible for no apparent
reason. Just use the compatible directly instead.
This theoretically removes a board name "generic" when no compatible
was present, however, there is no case where this "generic" board
name was actually used.
This also fixes an issue where snps,axs103 would not have been
properly detected anyway, as its case was not set up syntactically
correct.
Fixes: 73015c4cb378 ("linux: add support of Synopsys ARCHS38-based boards")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
David Bauer [Tue, 21 Jul 2020 18:40:39 +0000 (20:40 +0200)]
ramips: switch MT7620 subtarget to 5.4
MT7620 seems to work fine with kernel 5.4. Set the default kernel
version to 5.4 to bring this to a broader audience.
Tested on Archer C2 v1 / Archer C20i
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Tue, 21 Jul 2020 18:11:28 +0000 (20:11 +0200)]
ramips: increase SPI frequency for MT7620 Archer
Increase the SPI frequency for the MT7620 based TP-Link Archer
series to 30MHz.
TP-Link uses different SPI flash chips for the same board
revision, so be conservative to not break boards with a
different chip. 30MHz should be well supported by all chips.
Tested on Archer C2 v1 (GD25Q64B) and Archer C20i (W25Q64FV).
Archer C20i (before)
====================
root@OpenWrt:~# time dd if=/dev/mtd1 of=/tmp/test.bin bs=64k
122+0 records in
122+0 records out
real 0m 15.30s
user 0m 0.00s
sys 0m 15.29s
Archer C20i (after)
===================
root@OpenWrt:~# time dd if=/dev/mtd1 of=/tmp/test.bin bs=64k
122+0 records in
122+0 records out
real 0m 5.99s
user 0m 0.00s
sys 0m 5.98s
Signed-off-by: David Bauer <mail@david-bauer.net>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
David Bauer [Tue, 21 Jul 2020 22:00:36 +0000 (00:00 +0200)]
ath79: re-enable image generation for GL-AR750S
The bootloader only writes the first 2MB of the image to the NOR flash
when installing the NAND factory image. The bootloader is capable of
booting larger kernels as it boots from the memory mapped SPI flash.
Disable the NAND factory image. The NAND can be bootstrapped by writing
the NAND initramfs image using the NOR upgrade method in the bootloader
web-recovery and sysupgrading from there. The NOR variant is not
affected.
Also refactor the partition definitions in the DTS to make them less
annoying to read.
Signed-off-by: David Bauer <mail@david-bauer.net>
Kevin Darbyshire-Bryant [Wed, 22 Jul 2020 14:56:08 +0000 (15:56 +0100)]
kmod-sched-cake-oot: fix PKG_MIRROR_HASH
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Kevin Darbyshire-Bryant [Mon, 20 Jul 2020 11:16:19 +0000 (12:16 +0100)]
umdns: fix compiling using gcc 10
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Hans Dedecker [Tue, 21 Jul 2020 20:41:04 +0000 (22:41 +0200)]
glibc: fix memcpy and memmove for negative length [BZ #25620]
6f3459f985 Add NEWS entry for CVE-2020-6096 (bug 25620)
64246fccaf arm: CVE-2020-6096: Fix multiarch memcpy for negative length [BZ #25620]
9bbd2b6172 arm: CVE-2020-6096: fix memcpy and memmove for negative length [BZ #25620]
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Adrian Schmutzler [Wed, 8 Jul 2020 18:48:57 +0000 (20:48 +0200)]
ath79: correctly define WiFi switch for TL-WR841ND v8
The TL-WR841ND v8 feature a WiFi switch instead of a button.
This adds the corresponding input-type to prevent booting into
failsafe regularly.
This has been defined correctly in ar71xx, but was overlooked
when migrating to ath79. In contrast, the TL-WR842ND v2, which
has the key set up as switch in ar71xx, actually has a button.
The TL-MR3420 v2 has a button as well and is set up correctly
for both targets. (Information based on TP-Link user guide)
Note:
While looking into this, I found that support PR for TL-MR3420 v2
switched reset button to ACTIVE_HIGH. However, the other two
device still use ACTIVE_LOW. This seems strange, but I cannot
verify it lacking the affected devices.
Fixes: FS#2733
Fixes: 9601d94138de ("add support for TP-Link TL-WR841N/ND v8")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Wed, 8 Jul 2020 11:36:54 +0000 (13:36 +0200)]
ramips: improve LED support for D-Link DIR-615 D series
This patch adds a trigger for the WAN LED and enhances support for
the WiFi LED by enabling activity indication.
This is based on bug report feedback (see reference below).
While at it, update the LED node names in DTS file.
Fixes: FS#732
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sat, 18 Jul 2020 12:14:01 +0000 (14:14 +0200)]
omap: derive DEVICE_DTS from device name
In most cases the DEVICE_DTS name can be derived easily from the
node name, so let's do this to enforce harmonized names where
possible.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sat, 18 Jul 2020 11:14:28 +0000 (13:14 +0200)]
apm821xx: derive DEVICE_DTS from device name
The DEVICE_DTS variable always matches the device definition name,
just with "_" replaced by "-". Thus, create a DEVICE_DTS definition
in Device/Default and drop all the individual statements.
If necessary in the future, local DEVICE_DTS will still overwrite
that default.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Wed, 8 Jul 2020 12:54:11 +0000 (14:54 +0200)]
bcm47xx: fix switch setup for Linksys WRT610N v2
WRT610N V2 is not detected by the initial network configuration script.
The switch remains unconfigured and wlan/lan vlans are not created.
This adds the correct setup for the device.
Fixes: FS#1869
Suggested-by: Alessandro Radicati
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Mon, 20 Jul 2020 13:34:18 +0000 (15:34 +0200)]
layerscape: fix indent
Fix indent to be consistent with the rest of the file.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Nelson Cai [Mon, 20 Jul 2020 05:02:27 +0000 (13:02 +0800)]
ramips: fix network setup for Ubiquiti ER-X/ER-X-SFP
The function name ucidef_set_interface_lan_wan does not exist,
use the proper name by adding an "s" and thereby fix network
setup on these devices.
Fixes: 22468cc40c8b (ramips: erx and erx-sfp: fix missing WAN interface)
Signed-off-by: Nelson Cai <niphor@gmail.com>
[commit message/title facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
David Bauer [Mon, 20 Jul 2020 13:08:19 +0000 (15:08 +0200)]
hostapd: enter DFS state if no available channel is found
Previously hostapd would not stop transmitting when a DFS event was
detected and no available channel to switch to was available.
Disable and re-enable the interface to enter DFS state. This way, TX
does not happen until the kernel notifies hostapd about the NOP
expiring.
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Mon, 20 Jul 2020 13:07:47 +0000 (15:07 +0200)]
mac80211: create channel list for fixed channel operation
Currently a device which has a DFS channel selected using the UCI
channel setting might switch to a non-DFS channel in case no chanlist is
provided (UCI setting "channels") when the radio detects a DFS event.
Automatically add a chanlist consisting of the configured channel when
the device does not operate in auto-channel mode and no chanlist set to
circumvent this issue.
Signed-off-by: David Bauer <mail@david-bauer.net>
Johannes Kimmel [Mon, 20 Jul 2020 06:05:10 +0000 (08:05 +0200)]
vxlan: add capability for multiple fdb entries
Similar to wireguard, vxlan can configure multiple peers or add specific
entries to the fdb for a single mac address.
While you can still use peeraddr/peer6addr option within the proto
vxlan/vxlan6 section to not break existing configurations, this patch
allows to add multiple sections that conigure fdb entries via the bridge
command. As such, the bridge command is now a dependency of the vxlan
package. (To be honest without the bridge command available, vxlan isn't
very much fun to use or debug at all)
Field names are taken direclty from the bridge command.
Example with all supported parameters, since this hasn't been documented so
far:
config interface 'vx0'
option proto 'vxlan6' # use vxlan over ipv6
# main options
option ip6addr '2001:db8::1' # listen address
option tunlink 'wan6' # optional if listen address given
option peer6addr '2001:db8::2' # now optional
option port '8472' # this is the standard port under linux
option vid '42' # VXLAN Network Identifier to use
option mtu '1430' # vxlan6 has 70 bytes overhead
# extra options
option rxcsum '0' # allow receiving packets without checksum
option txcsum '0' # send packets without checksum
option ttl '16' # specifies the TTL value for outgoing packets
option tos '0' # specifies the TOS value for outgoing packets
option macaddr '11:22:33:44:55:66' # optional, manually specify mac
# default is a random address
Single peer with head-end replication. Corresponds to the following call
to bridge:
$ bridge fdb append 00:00:00:00:00:00 dev vx0 dst 2001:db8::3
config vxlan_peer
option vxlan 'vx0'
option dst '2001:db8::3' # always required
For multiple peers, this section can be repeated for each dst address.
It's possible to specify a multicast address as destination. Useful when
multicast routing is available or within one lan segment:
config vxlan_peer
option vxlan 'vx0'
option dst 'ff02::1337' # multicast group to join.
# all bum traffic will be send there
option via 'eth1' # for multicast, an outgoing interface needs
# to be specified
All available peer options for completeness:
config vxlan_peer
option vxlan 'vx0' # the interface to configure
option lladdr 'aa:bb:cc:dd:ee:ff' # specific mac,
option dst '2001:db8::4' # connected to this peer
option via 'eth0.1' # use this interface only
option port '4789' # use different port for this peer
option vni '23' # override vni for this peer
option src_vni '123' # see man 3 bridge
Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Johannes Kimmel [Mon, 20 Jul 2020 06:05:09 +0000 (08:05 +0200)]
vxlan: remove mandatory peeraddr
vxlan can be configured without a peer address. This is used to prepare
an interface and add peers later.
Fixes: FS#2743
Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Acked-by: Matthias Schiffer <mschiffer@universe-factory.net>
Adrian Schmutzler [Wed, 8 Jul 2020 09:08:17 +0000 (11:08 +0200)]
tplink-safeloader: expand support list for TP-Link CPE210 v3
This adds new strings to the support list for the TP-Link CPE210 v3
that are supposed to work with the existing setup.
Without it, the factory image won't be accepted by the vendor UI on
these newer revisions.
Tested on a CPE210 v3.20 (EU).
Ref: https://forum.openwrt.org/t/build-for-cpe210-v3-20/68000
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Kevin Darbyshire-Bryant [Mon, 29 Jun 2020 15:26:42 +0000 (16:26 +0100)]
dnsmasq: bump to 2.82
This fixes a nasty problem introduced in 2.81 which causes random
crashes on systems where there's significant DNS activity over TCP. It
also fixes DNSSEC validation problems with zero-TTL DNSKEY and DS
records.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Daniel Golle [Mon, 20 Jul 2020 03:36:58 +0000 (04:36 +0100)]
procd: bump to git HEAD once again
Further complete OCI container support in ujail:
f5f305e jail: move /tmp/resolv.conf.d to /dev/resolv.conf.d
6f078ae jail: add support for defining devices
686cf7a jail: actually apply filesystem-specific mount options
f91009a jail: refactor default mounts into new structure
66ae2d9 jail: re-implement /proc/sys/net read-write in netns hack
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Dustin Gathmann [Sun, 19 Jul 2020 22:07:44 +0000 (00:07 +0200)]
lantiq/xrx200: make WLAN button responsive on Fritzbox 7360 & 7362
Pressing the 'WLAN' button should enable/disable wireless activity.
Currently, the button is mapped to the KEY_WLAN, which will not
have this effect.
This patch changes the mapping of the WLAN button, so a button
press will emit an action for the 'rfkill' key instead of 'wlan'.
Apparently, this is what stock OpenWRT expects.
This fix is analogous to the preceding patch for Fritzbox 3370.
Signed-off-by: Dustin Gathmann <dzsoftware@posteo.org>
Dustin Gathmann [Wed, 20 May 2020 23:22:53 +0000 (01:22 +0200)]
lantiq/xrx200: fix WLAN button actions for Fritzbox 3370
The WLAN button actions are reversed, i.e. pressing the button emits a
'released' action, and vice versa.
This can easily be checked by adding
logger -t button_action "$BUTTON $ACTION"
as the second line of /etc/rc.button/rfkill, and using logread to read
the events (assuming the preceding patch has been applied).
Defining the GPIO as ACTIVE_LOW corrects this behavior.
Signed-off-by: Dustin Gathmann <dzsoftware@posteo.org>
Dustin Gathmann [Wed, 20 May 2020 22:13:43 +0000 (00:13 +0200)]
lantiq/xrx200: make WLAN button responsive on Fritzbox 3370
Pressing the 'WLAN' button should enable/disable wireless activity.
However, on the Fritzbox 3370 this doesn't have an effect.
This patch changes the mapping of the physical WLAN button, so a button
press will emit an action for the 'rfkill' key instead of 'wlan'.
Apparently, this is what stock OpenWRT expects, and also what is
implemented for most other devices.
Signed-off-by: Dustin Gathmann <dzsoftware@posteo.org>
Daniel Golle [Sun, 19 Jul 2020 18:34:46 +0000 (19:34 +0100)]
procd: update to git HEAD
9eddf0f jail: fix hooks
1b1286b jail: parse and apply OCI sysctl values
c049047 jail: implement OCI user additionalGIDs
0e1920c jail: read and apply umask from OCI if defined
1c46cc3 jail: parse and apply POSIX rlimits
76adac5 jail: /proc/$pid/oom_score_adj to OCI defined oomScoreAdj
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Alexander Müller [Fri, 17 Jul 2020 16:46:19 +0000 (18:46 +0200)]
ramips: fix flash layout for TP-Link TL-WR841N v14
The config partition was missing from the flash layout of the device.
Although the stock firmware resets a corrupted config partition to the
default values, the TFTP flash with an image bigger than 0x3d0000 will
truncate the image as the bootloader only copies 0x3d0000 bytes to flash
during TFTP flashing.
Fixed by adding the config partition and shrinking the firmware
partition.
Fixes: 3fd97c522bb7 ("ramips: add support for TP-Link TL-WR841n v14")
Signed-off-by: Alexander Müller <donothingloop@gmail.com>
Adrian Schmutzler [Fri, 17 Jul 2020 09:23:16 +0000 (11:23 +0200)]
ramips: remove incorrect mtd-eeprom for TP-Link TL-WR841N v14
The factory partition on this device is only 64k in size, so having
mediatek,mtd-eeprom = <&factory 0x10000> would place the EEPROM data
after the end of the flash. As can be verified against the TP-Link
GPL sources, which contain the EEPROM data as binary blob, the actual
address for the EEPROM data is 0x0.
Since 0x0 is default for MT7628, the incorrect line is just removed.
This error is the reason for the abysmal Wifi performance that people
are complaining about for the WR841Nv14.
Fixes: 3fd97c522bb7 ("ramips: add support for TP-Link TL-WR841n v14")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
David Bauer [Sat, 18 Jul 2020 20:12:19 +0000 (22:12 +0200)]
ramips: don't create switch config for VIXMINI
Don't create UCI switch config for the GL.iNet microuter-N300 and
VIXMINI. These devices only have a single LAN port.
Creating the switch config makes usage of VLANs more complicated,
as they would have to be configured on the MAC as well as the "switch".
Signed-off-by: David Bauer <mail@david-bauer.net>
Daniel Golle [Fri, 17 Jul 2020 10:59:16 +0000 (11:59 +0100)]
procd: bump to git HEAD
8d5208f jail: fix false return in case of nofail mount
b41f76b procd: fix compile if procd-ujail is not selected
86a5105 jail: fs: fix build on uClibc-ng
bfce7d1 jail: fix some more mount options
268126a jail: add support for maskedPaths and readonlyPaths
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Adrian Schmutzler [Fri, 17 Jul 2020 10:09:57 +0000 (12:09 +0200)]
lantiq: move 01_led_migration script to subtargets
Split the /etc/uci-defaults/01_led_migration scripts into subtargets
as already done for most of the other base-files.
While this introduces a minor amount of code duplication, it still
is considered an improvement, as device-specific settings are kept
together in the subtargets' base-files and the script at hand can be
removed entirely for two of the subtargets not needing it.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Martin Schiller [Fri, 17 Jul 2020 03:58:19 +0000 (05:58 +0200)]
ltq-*dsl-app: dsl_control: remove unneeded check for lantiq_dsl.sh
This file is always present because it is part of the ltq-dsl-base
package on which these packages depend.
This check would not have been necessary in the past, because the script
was part of the TARGET_LANTIQ on which these packages also depend.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Martin Schiller [Wed, 21 Aug 2019 07:06:54 +0000 (09:06 +0200)]
lantiq: move dsl related base-files into own package
It does not make sense to install this components on lantiq systems
where the dsl subsystem is not needed/used.
This also makes it possible to use the files also on other targets.
(hopefully ipq401x / FritzBox 7530 in the near future)
Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
Adrian Schmutzler [Tue, 14 Jul 2020 10:01:51 +0000 (12:01 +0200)]
ramips: move redundant console setup to mt7621 SoC DTSI
For mt7621, console is set up via DTS bootargs individually in
device DTS/DTSI files. However, 44 of 74 statements use the
following setting:
chosen {
bootargs = "console=ttyS0,57600";
};
Therefore, don't repeat ourselves and move that definition to the SoC
DTSI file to serve as a default value.
This patch is cosmetic.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
John Audia [Thu, 16 Jul 2020 11:03:17 +0000 (07:03 -0400)]
kernel: bump 5.4 to 5.4.52
update_kernel.sh refreshed all patches, no human interaction was needed
Build system: x86_64
Run-tested: Netgear R7800 (ipq806x)
Signed-off-by: John Audia <graysky@archlinux.us>
Salvatore Mesoraca [Wed, 17 Jun 2020 13:07:58 +0000 (14:07 +0100)]
ramips: add arl_table support for MT7530
Use switch.h API to expose MT7530's ARL table to
user space.
Signed-off-by: Salvatore Mesoraca <salvatore@samknows.com>
Rosen Penev [Tue, 14 Jul 2020 05:12:52 +0000 (22:12 -0700)]
lzo: fix pkgconfig paths
The last commit to this package that added the pkgconfig file did not
fix the paths to point to the prefix.
This allows packages to find lzo properly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Alberto Bursi [Sun, 12 Jul 2020 13:35:54 +0000 (15:35 +0200)]
mvebu: add Kobol Helios 4 device
The Helios 4 is a NAS from Kobol
that is powered by an Armada 38x
MicroSOM from Solidrun, similarly
to Clearfog.
This device has:
-Armada 38x CPU
(dual core ARMv7 1.6 Ghz)
-2 GB of ECC RAM
-Gigabit ethernet (Marvell)
-2x USB 3.0 ports
-4x Sata 3.0 ports
-i2c header (J9 |>GND|SDA|SCL|VCC)
-2x 3-pin fan headers with PWM
-micro-usb port is a TTL/UART to
USB converter connected to TTL
-MicroSD card slot
-System, 4xSata and 1xUSB LEDs
NOT WORKING: fan control
Fan Control requires a kernel patch
that is available in the Armbian
project (the "default firmware"
of this device) and named
mvebu-gpio-remove-hardcoded
-timer-assignment
This patch isn't acceptable
by OpenWrt, it should be upstreamed.
I also have that patch in my own
local OpenWrt builds,
in case you want a more
clean and less confusing patch
for upstreaming.
To install, write the disk image
on a micro SD card with dd or
win32 disk imager, insert the
card in the slot.
Check that the dip switch battery
for boot selection is as follows
Switch 1 and 2 down/off, switches
3, 4, 5 up/on.
Signed-off-by: Alberto Bursi <bobafetthotmail@gmail.com>
Alberto Bursi [Wed, 3 Jun 2020 06:19:51 +0000 (08:19 +0200)]
uboot-mvebu: add uboot for helios 4
add u-boot for Helios 4 NAS
Signed-off-by: Alberto Bursi <bobafetthotmail@gmail.com>
Hans Dedecker [Thu, 16 Jul 2020 20:14:30 +0000 (22:14 +0200)]
nat46: update to latest git HEAD
ac712ad nat46-netdev: Add support for removing a rule
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Mateus B. Cassiano [Wed, 15 Jul 2020 21:45:39 +0000 (17:45 -0400)]
ramips: add support for D-Link DIR-867/DIR-882 A1
This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given
the similarity of these devices, this patch also introduces a common DTS
shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1.
Specifications:
* Board: AP-MTKH7-0002
* SoC: MediaTek MT7621AT
* RAM: 128 MB (DDR3)
* Flash: 16 MB (SPI NOR)
* WiFi: MediaTek MT7615N (x2)
* Switch: 1 WAN, 4 LAN (Gigabit)
* Ports: 1 USB 2.0, 1 USB 3.0
* Buttons: Reset, WiFi Toggle, WPS
* LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green),
WiFi 5G (green), USB 2.0 (green), USB 3.0 (green)
Notes:
* WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips
* DIR-867 wireless chips are limited to 3x3 streams at hardware level
* USB ports and related LEDs available only on DIR-882
Serial port:
* Parameters: 57600, 8N1
* Location: J1 header (close to the Reset, WiFi and WPS buttons)
* Pinout: 1 - VCC
2 - RXD
3 - TXD
4 - GND
Installation:
* D-Link Recovery GUI: power down the router, press and hold the reset
button, then re-plug it. Keep the reset button pressed until the power
LED starts flashing orange, manually assign a static IP address under
the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1
* Some modern browsers may have problems flashing via the Recovery GUI,
if that occurs consider uploading the firmware through cURL:
curl -v -i -F "firmware=@file.bin" 192.168.0.1
Signed-off-by: Mateus B. Cassiano <mbc07@live.com>
[move DEVICE_VARIANT to individual definitions]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Santiago Rodriguez-Papa [Thu, 16 Jul 2020 00:24:43 +0000 (20:24 -0400)]
ramips: add support for Linksys EA7300 v1
Specifications:
* SoC: MediaTek MT7621A (880 MHz 2c/4t)
* RAM: Nanya NT5CC128M16IP-DIT (256M DDR3-1600)
* Flash: Macronix MX30LF1G18AC-TI (128M NAND)
* Eth: MediaTek MT7621A (10/100/1000 Mbps x5)
* Radio: MT7615N (2.4 GHz & 5 GHz)
4 antennae: 1 internal and 3 non-deatachable
* USB: 3.0 (x1)
* LEDs:
White (x1 logo)
Green (x6 eth + wps)
Orange (x5, hardware-bound)
* Buttons:
Reset (x1)
WPS (x1)
Everything works! Been running it for a couple weeks now and haven't had
any problems. Please let me know if you run into any.
Installation:
Flash factory image through GUI.
This might fail due to the A/B nature of this device. When flashing, OEM
firmware writes over the non-booted partition. If booted from 'A',
flashing over 'B' won't work. To get around this, you should flash the
OEM image over itself. This will then boot the router from 'B' and
allow you to flash OpenWRT without problems.
Reverting to factory firmware:
Hard-reset the router three times to force it to boot from 'B.' This is
where the stock firmware resides. To remove any traces of OpenWRT from
your router simply flash the OEM image at this point.
Signed-off-by: Santiago Rodriguez-Papa <contact@rodsan.dev>
[use v1 only, minor DTS adjustments, use LINKSYS_HWNAME and add it to
DEVICE_VARS, wrap DEVICE_PACKAGES, adjust commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Wed, 15 Jul 2020 18:08:22 +0000 (20:08 +0200)]
ramips: provide common definition for ELECOM WRC GS devices
Add a common definition for ELECOM WRC "GS" devices to mt7621.mk
to not repeat the same assignments five times.
To keep the naming consistent, slightly rename the DTSI and the
factory image recipe as well.
Note that elecom_wrc-1167ghbk2-s uses a slightly different build
recipe for the factory image, so we keep it separate.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com> [WRC-1750GSV]