Felix Fietkau [Tue, 26 Jan 2021 18:25:10 +0000 (19:25 +0100)]
mac80211: fix an uninitialized variable warning
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Tue, 26 Jan 2021 15:46:19 +0000 (16:46 +0100)]
mac80211: minstrel_ht: fix regression in the max_prob_rate fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Mon, 25 Jan 2021 17:22:30 +0000 (18:22 +0100)]
mac80211: remove accidentally duplicated line in minstrel_ht patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Birger Koblitz [Thu, 21 Jan 2021 14:18:24 +0000 (15:18 +0100)]
realtek: add debugfs support for mirroring
This adds debugfs support to monitor mirroring via debugfs
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 14:16:24 +0000 (15:16 +0100)]
realtek: add API for the hw tables of RTL83XX/93XX SoCs
Add a table API that has per accss register locking and uses
register description information to handle all table access
through a single set of api calls.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 14:14:56 +0000 (15:14 +0100)]
realtek: add switch driver support for the RTL93XX based switches
Adds support for the RTL9300 and RTL9310 series of switches
with 10GBit per port and up to 56 ports.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 14:12:36 +0000 (15:12 +0100)]
realtek: add internal and external SDS/PHYs of RTL9300 devices
This adds support for the internal SerDes of the RTL9300 SoC
and for the RTL8218D and RTL8226B phys found in combination
with this SoC in switches.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 14:09:47 +0000 (15:09 +0100)]
realtek: fix RTL8231 gpio expander usage with RTL839X SoC
This fixes the usage of the RTL8231 GPIO extender chip
when used with the RTL839X SoCs. Specifically,
the PHY addresses may be different from 0.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 13:35:26 +0000 (14:35 +0100)]
realtek: enable default rate limiting and qos settings
Enable default rate limiting and QoS support. Remove
previous storm control code.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 13:32:44 +0000 (14:32 +0100)]
realtek: correct l2 offloading tag handling
Makes sure the DSA trailer information on any L2 offloading done
by the switch is honoured by the bridge layer
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 13:29:52 +0000 (14:29 +0100)]
realtek: add QoS and rate control
This adds support for identifying QoS information in packets
and use this and rate control information to submit to multiple
egress queues. The ethernet driver is also made to support
2 egress and up to 32 egress queues.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 20:41:37 +0000 (21:41 +0100)]
realtek: add dtsi for RTL930X SoCs
Add a default dtsi to support RTL930X SoCs.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 20:38:27 +0000 (21:38 +0100)]
realtek: add support for the RTL9300 timer
this adds support for the SoC timer of the RTL9300 chips, it
provides 6 independent timer/counters, of which the first one
is used as a clocksource and the second one as event timer.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 13:11:35 +0000 (14:11 +0100)]
realtek: add support for the RTL8390 and RTL9300 SoC IRQs
This adds support for the RTL8390 and RTL9300 SoCs
it also cleans up unnecessary definitions in mach-rtl83xx.h
and moves definitions relevant for irq routing to irq.h
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Birger Koblitz [Thu, 21 Jan 2021 13:07:38 +0000 (14:07 +0100)]
realtek: add detection of RTL930X SoCs and RTL8313 SoC
This adds support to detect RTL930X based SoCs and the RTL9313 SoC.
Tested on Zyxel XGS1210-10 (RTL9302B SoC) and the
Zyxel XS1930-12 (RTL9313 SoC)
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
John Audia [Sat, 23 Jan 2021 16:09:03 +0000 (11:09 -0500)]
kernel: bump 5.4 to 5.4.92
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.
Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800
Compile-tested [*]: ath79/{tiny,generic}, ipq40xx, octeon,
ramips/mt7621, realtek, x86/64.
Run-tested [*]: ath79/generic, octeon, ramips/mt7621, realtek.
No dmesg regressions, everything functional
Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
Tony Ambardar [Tue, 15 Dec 2020 05:39:19 +0000 (21:39 -0800)]
bpftools: update to 5.10.10
Use the latest stable kernel since the previous 5.8.x series is EOL.
Also drop the following patches recently accepted upstream:
* 001-libbpf-ensure-no-local-symbols-counted-in-ABI-check.patch
* 002-libbpf-fix-build-failure-from-uninitialized-variable.patch
* 003-bpftool-allow-passing-BPFTOOL_VERSION-to-make.patch
* 004-v5.9-bpftool-use-only-ftw-for-file-tree-parsing.patch
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Tony Ambardar [Wed, 21 Oct 2020 16:13:45 +0000 (09:13 -0700)]
config: limit CONFIG_PERF_EVENTS to top-level generic configs
Remove redundant target-level settings.
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Tony Ambardar [Wed, 21 Oct 2020 16:24:33 +0000 (09:24 -0700)]
config: drop CONFIG_KPROBE_EVENT unused since kernel 4.9
The config setting was renamed to CONFIG_KPROBE_EVENTS.
Fixes: 97d3f800a8 ("config: kernel: Add KPROBE_EVENTS config option)
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Tony Ambardar [Mon, 27 Jul 2020 11:36:21 +0000 (04:36 -0700)]
malta: update target configs and fix build warnings
Comment out some conflicting target configs that are set from subtarget
configs, which sometimes lead to kernel compile warnings:
scripts/kconfig/conf --syncconfig Kconfig
net/sched/Kconfig:45: warning: menuconfig statement without prompt
.config:1038:warning: override: CPU_MIPS32_R2 changes choice state
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Felix Fietkau [Fri, 22 Jan 2021 23:17:31 +0000 (00:17 +0100)]
mac80211: add significant minstrel_ht performance improvements
Completely redesign the rate sampling approach
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Bjørn Mork [Sat, 23 Jan 2021 10:08:12 +0000 (11:08 +0100)]
realtek: build ZyXEL vendor firmware compatible initramfs
Append a device specific version trailer used by the stock
firmware upgrade application to validate firmwares.
The trailer contains a list of ZyXEL firmware version
numbers, which includes a four letter hardware identifier.
The stock web UI requires that the current hardware matches
one of the listed versions, and that the version number is
larger than a model specific minimum value. The minimum
version varies between V1.00 and V2.60 for the currently
known GS1900 models. The number is not used anywhere else
to our knowlege, and has no direct relation to the version
info in the u-image header. We can therefore use an
arbitrary value larger than V2.60.
The stock firmware upgrade application will only load and
flash the part of the file specified in the u-image header,
regardless of file size. It can therefore not be used to
flash images with an appended rootfs. There is therefore no
need to include the trailer in other images than the
initramfs. This prevents accidentally bricking by attempts
to flash other images from the stock web UI.
Stock images support all models in the series, listing
all of them in the version trailer. OpenWrt provide model
specific images. We therefore only list the single supported
hardware identifier for each image. This eliminates the risk
of flashing the wrong OpenWrt image from stock web UI.
OpenWrt can be installed from stock firmware in two steps:
1) flash OpenWrt initramfs image from stock web gui
2) boot OpenWrt and sysupgrade to a squasfs image
The OpenWrt squashfs image depends on a static partition
map in the DTS. It can only be installed to the "firmware"
partition. This partition is labeled "RUNTIME1" in u-boot
and in stock firmware, and is referred to as "image 0" in
the stock flash management tool. The OpenWrt initramfs
can be installed and run from either partitions. But if
you want to keep stock irmware in the spare system partition,
then you must make sure stock firmware is installed to the
"RUNTIME2" partition referred to as "image 1" in the stock
web UI. And the initial OpenWrt initramfs must be flashed
to "RUNTIME1"/"image 0".
The stock flash management application supports direct
selection of both which partition to flash and which
partition to boot next. This allows software controlled
"dual-boot" between OpenWrt and stock firmware, without
using console access to u-boot. u-boot use the "bootpartition"
variable stored in the second u-boot environment to select
which of the two system partitions to boot. This variable
is set by the stock flash management application, by direct
user input. It can also be set in OpenWrt using e.g
fw_setsys bootpartition 1
to select "RUNTIME2"/"image 1" as default, assuming a
stock firmware version is installed in that partition.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Sat, 23 Jan 2021 10:08:11 +0000 (11:08 +0100)]
realtek: use vendor-specific magic for ZyXEL
The stock firmware of the ZyXEL GS1900 series use a non-standard
u-image magic. This is not enforced by the stock u-boot, which is
why we could boot images with the default magic. The flash
management application of the stock firmware will however verify
the magic, and refuse any image with another value.
Convert to vendor-specific value to get flash management support
in stock firmware, including the ability to upgrade to OpenWrt
directly from stock web UI.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Kevin Darbyshire-Bryant [Sat, 23 Jan 2021 10:20:03 +0000 (10:20 +0000)]
dnsmasq: Update to 2.84test3
dnsmasq v2.83 has a bug in handling duplicate queries which means it may
try to reply using the incorrect network socket. This is especially
noticeable in dual stack environments where replies may be mis-directed to
IPv4 addresses on an IPv6 socket or IPv6 addresses on an IPv4 socket.
This results in system log spam such as:
dnsmasq[16020]: failed to send packet: Network unreachable
dnsmasq[16020]: failed to send packet: Address family not supported by protocol
dnsmasq v2.84test3 resolves these issues.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Adrian Schmutzler [Sat, 23 Jan 2021 21:09:27 +0000 (22:09 +0100)]
x86: fix upgrade by emptying SUPPORTED_DEVICES
x86 uses append-metadata, but only for signing and not for the
metadata itself.
Since recently SUPPORTED_DEVICES was assigned with a global value
and is not empty anymore, append-metadata will now actually put
metadata into x86 images. This breaks sysupgrade on x86.
To fix it for the moment, let's just empty SUPPORTED_DEVICES for
this target again.
In the long term, one should either not add metadata to the images
if it is not desired, and/or remove the unintended fwtool check.
Fixes: f52081bcf938 ("treewide: provide global default for SUPPORTED_DEVICES")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Sat, 23 Jan 2021 21:03:51 +0000 (22:03 +0100)]
bcm53xx: use default SUPPORTED_DEVICES for Meraki MR32
Since the new global SUPPORTED_DEVICES are now available in bcm53xx
as well, we do not need to specify an explicit value for the MR32
anymore.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Hans Dedecker [Sat, 23 Jan 2021 19:54:23 +0000 (20:54 +0100)]
glibc: update to latest 2.32 commit (BZ#2692 BZ#26988 BZ#26831 BZ#2706)
d3cb8f6222 aarch64: fix static PIE start code for BTI [BZ #27068]
082798622d __vfscanf_internal: fix aliasing violation (bug 26690)
33dc30bc83 aarch64: Use mmap to add PROT_BTI instead of mprotect [BZ #26831]
46e1e64fe3 elf: Pass the fd to note processing
b6eae83717 elf: Move note processing after l_phdr is updated
c6090dcebd aarch64: align address for BTI protection [BZ #26988]
610e2c5150 aarch64: Fix missing BTI protection from dependencies [BZ #26926]
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Michael Pratt [Sun, 10 Jan 2021 07:40:00 +0000 (02:40 -0500)]
ath79: add support for Senao Engenius EAP1200H
FCC ID: A8J-EAP1200H
Engenius EAP1200H is an indoor wireless access point with
1 Gb ethernet port, dual-band wireless,
internal antenna plates, and 802.3at PoE+
**Specification:**
- QCA9557 SOC
- QCA9882 WLAN PCI card, 5 GHz, 2x2, 26dBm
- AR8035-A PHY RGMII GbE with PoE+ IN
- 40 MHz clock
- 16 MB FLASH MX25L12845EMI-10G
- 2x 64 MB RAM NT5TU32M16FG
- UART at J10 populated
- 4 internal antenna plates (5 dbi, omni-directional)
- 5 LEDs, 1 button (power, eth0, 2G, 5G, WPS) (reset)
**MAC addresses:**
MAC addresses are labeled as ETH, 2.4G, and 5GHz
Only one Vendor MAC address in flash
eth0 ETH *:a2 art 0x0
phy1 2.4G *:a3 ---
phy0 5GHz *:a4 ---
**Serial Access:**
the RX line on the board for UART is shorted to ground by resistor R176
therefore it must be removed to use the console
but it is not necessary to remove to view boot log
optionally, R175 can be replaced with a solder bridge short
the resistors R175 and R176 are next to the UART RX pin at J10
**Installation:**
2 ways to flash factory.bin from OEM:
Method 1: Firmware upgrade page:
OEM webpage at 192.168.1.1
username and password "admin"
Navigate to "Firmware Upgrade" page from left pane
Click Browse and select the factory.bin image
Upload and verify checksum
Click Continue to confirm and wait 3 minutes
Method 2: Serial to load Failsafe webpage:
After connecting to serial console and rebooting...
Interrupt uboot with any key pressed rapidly
execute `run failsafe_boot` OR `bootm 0x9fd70000`
wait a minute
connect to ethernet and navigate to
"192.168.1.1/index.htm"
Select the factory.bin image and upload
wait about 3 minutes
**Return to OEM:**
If you have a serial cable, see Serial Failsafe instructions
otherwise, uboot-env can be used to make uboot load the failsafe image
*DISCLAIMER*
The Failsafe image is unique to Engenius boards.
If the failsafe image is missing or damaged this will brick the device
DO NOT downgrade to ar71xx this way, it can cause kernel loop or halt
ssh into openwrt and run
`fw_setenv rootfs_checksum 0`
reboot, wait 3 minutes
connect to ethernet and navigate to 192.168.1.1/index.htm
select OEM firmware image from Engenius and click upgrade
**TFTP recovery:**
Requires serial console, reset button does nothing
rename initramfs to 'vmlinux-art-ramdisk'
make available on TFTP server at 192.168.1.101
power board, interrupt boot
execute tftpboot and bootm 0x81000000
NOTE: TFTP is not reliable due to bugged bootloader
set MTU to 600 and try many times
**Format of OEM firmware image:**
The OEM software of EAP1200H is a heavily modified version
of Openwrt Kamikaze. One of the many modifications
is to the sysupgrade program. Image verification is performed
simply by the successful ungzip and untar of the supplied file
and name check and header verification of the resulting contents.
To form a factory.bin that is accepted by OEM Openwrt build,
the kernel and rootfs must have specific names...
openwrt-ar71xx-generic-eap1200h-uImage-lzma.bin
openwrt-ar71xx-generic-eap1200h-root.squashfs
and begin with the respective headers (uImage, squashfs).
Then the files must be tarballed and gzipped.
The resulting binary is actually a tar.gz file in disguise.
This can be verified by using binwalk on the OEM firmware images,
ungzipping then untaring.
Newer EnGenius software requires more checks but their script
includes a way to skip them, otherwise the tar must include
a text file with the version and md5sums in a deprecated format.
The OEM upgrade script is at /etc/fwupgrade.sh.
OKLI kernel loader is required because the OEM software
expects the kernel to be no greater than 1536k
and the factory.bin upgrade procedure would otherwise
overwrite part of the kernel when writing rootfs.
Note on PLL-data cells:
The default PLL register values will not work
because of the external AR8035 switch between
the SOC and the ethernet port.
For QCA955x series, the PLL registers for eth0 and eth1
can be see in the DTSI as 0x28 and 0x48 respectively.
Therefore the PLL registers can be read from uboot
for each link speed after attempting tftpboot
or another network action using that link speed
with `md 0x18050028 1` and `md 0x18050048 1`.
The clock delay required for RGMII can be applied
at the PHY side, using the at803x driver `phy-mode`.
Therefore the PLL registers for GMAC0
do not need the bits for delay on the MAC side.
This is possible due to fixes in at803x driver
since Linux 5.1 and 5.3
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Adrian Schmutzler [Tue, 19 Jan 2021 19:05:35 +0000 (20:05 +0100)]
treewide: provide global default for SUPPORTED_DEVICES
The majority of our targets provide a default value for the variable
SUPPORTED_DEVICES, which is used in images to check against the
compatible on a running device:
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
At the moment, this is implemented in the Device/Default block of
the individual targets or even subtargets. However, since we
standardized device names and compatible in the recent past, almost
all targets are following the same scheme now:
device/image name: vendor_model
compatible: vendor,model
The equal redundant definitions are a symptom of this process.
Consequently, this patch moves the definition to image.mk making it
a global default. For the few targets not using the scheme above,
SUPPORTED_DEVICES will be defined to a different value in
Device/Default anyway, overwriting the default. In other words:
This change is supposed to be cosmetic.
This can be used as a global measure to get the current compatible
with: $(firstword $(SUPPORTED_DEVICES))
(Though this is not precisely an achievement of this commit.)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Fri, 22 Jan 2021 09:48:51 +0000 (10:48 +0100)]
maccalc: remove package
This is a helpful utility, but it does not have any dependencies
in this repository. Move it to packages feed.
The package does not seem to have a maintainer.
Cc: Jo-Philipp Wich <jo@mein.io>
Cc: Nick Hainke <vincent@systemli.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Fri, 22 Jan 2021 09:46:10 +0000 (10:46 +0100)]
owipcalc: remove package
This is a helpful utility, but it does not have any dependencies
in this repository. Move it to packages feed.
Cc: Jo-Philipp Wich <jo@mein.io>
Cc: Nick Hainke <vincent@systemli.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Paul Spooren [Thu, 7 Jan 2021 08:56:54 +0000 (22:56 -1000)]
uboot-envtools: use $(AUTORELEASE) for PKG_RELEASE
Use `$(AUTORELEASE)` variable rather than setting a PKG_RELEASE
on every commit manually.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Paul Spooren [Sat, 2 Jan 2021 00:18:32 +0000 (14:18 -1000)]
base-files: use $(COMMITCOUNT) in PKG_RELEASE
The newly added `$(COMMITCOUNT)` varialbe allows automatic versioning
based on the number of Git commits of a package. Replace *tedious to
bump* and *merge conflict causing* `PKG_RELEASE` and replace it with
`$(COMMITCOUNT)`.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Paul Spooren [Sat, 2 Jan 2021 00:02:12 +0000 (14:02 -1000)]
rules: add AUTORELEASE and COMMITCOUNT variables
The lack of bumped PKG_RELEASE variables is a recurring theme on the
mailing list and in GitHub comments. This costs precious review time,
a rare good within the OpenWrt project.
Instead of relying on a manually set PKG_RELEASE this commit adds a
`commitcount` function that uses the number of Git commits to determine
the release. The function is called via the variables `$(AUTORELEASE)`
or `$(COMMITCOUNT)`. The `PKG_RELEASE` variable can be set to either of
the two.
- $(AUTORELEASE):
Release is automagically set to the number of commits since the last
commit containing either ": update to " or ": bump to ".
Example below:
$ git log packages/foobar/
foobar: fixup file location
foobar: disable docs
foobar: bump to 5.3.2
foobar: fixup copyright
Resulting package name: foobar_5.3.2-3_all.ipk, two package changes
since the last upstream version change, using a 1 based counter.
- $(COMMITCOUNT):
For non-traditional versioning (x.y.z), most prominent `base-files`,
this variable contains the total number of package commits.
The new functionality can also be used by other feeds like packages.git.
In case no build information is available, e.g. when using release
tarballs, the SOURCE_DATE_EPOCH is used to have a reproducible release
identifier.
Suggested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Florian Eckert [Fri, 22 Jan 2021 12:06:10 +0000 (13:06 +0100)]
iperf3: remove
This package is not needed in base. It will be imported in the packages
feed.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Florian Eckert [Fri, 22 Jan 2021 09:14:48 +0000 (10:14 +0100)]
iperf: remove
This package is not needed in base. It will be imported in the packages
feed.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Bjørn Mork [Wed, 20 Jan 2021 17:36:53 +0000 (18:36 +0100)]
kernel: mtdsplit_uimage: replace "edimax, uimage" parser
The "edimax,uimage"" parser can be replaced by the generic
parser using device specific openwrt,partition-magic and
openwrt,offset properties.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Wed, 20 Jan 2021 17:36:52 +0000 (18:36 +0100)]
kernel: mtdsplit_uimage: add "openwrt, offset" and "openwrt, partition-magic"
Some devices prepend a standard U-Boot Image with a vendor specific
header, having its own magic. Adding two new properties will support
validation of such images, including the additional magic.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Wed, 20 Jan 2021 17:36:51 +0000 (18:36 +0100)]
kernel: mtdsplit_uimage: replace "netgear, uimage" parser
The "netgear,uimage" parser can be replaced by the generic
parser using device specific openwrt,ih-magic and
openwrt,ih-type properties.
Device tree properties for the following devices have not
been set, as they have been dropped from OpenWrt with the
removal of the ar71xx target:
FW_MAGIC_WNR2000V1 0x32303031
FW_MAGIC_WNR2000V4 0x32303034
FW_MAGIC_WNR1000V2_VC 0x31303030
FW_MAGIC_WPN824N 0x31313030
Tested-by: Sander Vanheule <sander@svanheule.net> # WNDR3700v2
Tested-by: Stijn Segers <foss@volatilesystems.org> # WNDR3700v1
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Wed, 20 Jan 2021 17:36:50 +0000 (18:36 +0100)]
kernel: mtdsplit_uimage: add "openwrt, ih-type" device-tree property
Some devices use uimage headers with a non-default ih_type. Add
support for overriding this in device tree.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Wed, 20 Jan 2021 17:36:49 +0000 (18:36 +0100)]
kernel: mtdsplit_uimage: replace "allnet, uimage" parser
Convert users to the generic "openwrt,uimage" using device specific
"openwrt,ih-magic" properties, and remove "allnet,uimage".
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Wed, 20 Jan 2021 17:36:48 +0000 (18:36 +0100)]
kernel: mtdsplit_uimage: replace "openwrt, okli" parser
The only difference between the "openwrt,okli" and the generic
parser is the magic. Set this in device tree for all affected
devices and remove the "openwrt,okli" parser.
Tested-by: Michael Pratt <mcpratt@protonmail.com> # EAP300 v2, ENS202EXT and ENH202
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Wed, 20 Jan 2021 17:36:47 +0000 (18:36 +0100)]
kernel: mtdsplit_uimage: add "openwrt, ih-magic" device-tree property
Many devices use uimages with non-standard magic values. Let
device tree override the default magic.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Wed, 20 Jan 2021 17:36:46 +0000 (18:36 +0100)]
kernel: mtdsplit_uimage: replace "fonfxc" and "sge" parsers
Convert users of the "fonfxc" and "sge" parsers to the generic
"openwrt,uimage", using device specific "openwrt,padding" properties.
Tested-by: Stijn Segers <foss@volatilesystems.org> [DIR-878 A1]
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Wed, 20 Jan 2021 17:36:45 +0000 (18:36 +0100)]
kernel: mtdsplit_uimage: read extralen from device tree
An "openwrt,padding" property in device tree can replace two device
specific parsers.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Wed, 20 Jan 2021 17:36:44 +0000 (18:36 +0100)]
dt-bindings: mtd: partitions: add OpenWrt defined U-Boot Image
Add devicetree bindings for vendor specific variants of U-Boot
Images, as defined by OpenWrt.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Rafał Miłecki [Wed, 20 Jan 2021 15:49:26 +0000 (16:49 +0100)]
kernel: add parser finding rootfs after CFE bootfs
It's required for BCM4908. It cannot use "bcm-wfi-fw" parser because
that one requires *two* JFFS2 partitions which is untested / unsupported
on the BCM4908 architecture. With a single JFFS2 partition "bcm-wfi-fw"
parser will:
1. Fail to find "vmlinux.lz" as it doesn't follow "1-openwrt" file
2. Create partitions that don't precisely match bootfs layout
The new parser is described in details in the MTD_SPLIT_CFE_BOOTFS
symbol help message.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Thu, 21 Jan 2021 15:07:49 +0000 (16:07 +0100)]
bcm4908: build valid Asus GT-AC5300 firmware image
Insert Asus specific tail that is required for image identification.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Thu, 21 Jan 2021 12:04:45 +0000 (13:04 +0100)]
firmware-utils: bcm4908asus: tool inserting Asus tail into BCM4908 image
Asus looks for an extra data at the end of BCM4908 image, right before
the BCM4908 tail. It needs to be properly filled to make Asus accept
firmware image.
This tool constructs such a tail, writes it and updates CRC32 in BCM4908
tail accordingly.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Sieng Piaw Liew [Tue, 12 Jan 2021 02:35:55 +0000 (10:35 +0800)]
bcm63xx: sync ethernet driver with net-next
Sync ethernet driver code with upstream Linux kernel:
-Reduce xmit_more code changes.
-Combine rx cleanup code into a function.
-Convert to build_skb.
-Improve rx loop by optimizing loop tracking.
https://lore.kernel.org/netdev/
20210106144208.1935-1-liew.s.piaw@gmail.com/
Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[Amend commit description, move patches to the top since they are going to be
upstreamed]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Álvaro Fernández Rojas [Fri, 22 Jan 2021 10:10:12 +0000 (11:10 +0100)]
bcm63xx: nand: fix OOB R/W for non Hamming ECC
Hamming ECC devices do not cover OOB data, as opposed to BCH ECC devices.
Therefore, disabling ECC for all devices is preventing BCH devices from
correctly reading and writing the OOB data.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Adrian Schmutzler [Thu, 21 Jan 2021 21:56:43 +0000 (22:56 +0100)]
ramips: fix port labels for Xiaomi Mi Router 4
The OEM assignment of LAN ports is swapped.
Fixes: c2a7bb520a0f ("ramips: mt7621: add support for Xiaomi Mi Router 4")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Dmytro Oz [Mon, 14 Dec 2020 19:07:32 +0000 (21:07 +0200)]
ramips: mt7621: add support for Xiaomi Mi Router 4
Xiaomi Mi Router 4 is the same as Xiaomi Mi Router 3G, except for
the RAM (256Mib→128Mib), LEDs and gpio (MiNet button).
Specifications:
Power: 12 VDC, 1 A
Connector type: barrel
CPU1: MediaTek MT7621A (880 MHz, 4 cores)
FLA1: 128 MiB (ESMT F59L1G81MA)
RAM1: 128 MiB (ESMT M15T1G1664A)
WI1 chip1: MediaTek MT7603EN
WI1 802dot11 protocols: bgn
WI1 MIMO config: 2x2:2
WI1 antenna connector: U.FL
WI2 chip1: MediaTek MT7612EN
WI2 802dot11 protocols: an+ac
WI2 MIMO config: 2x2:2
WI2 antenna connector: U.FL
ETH chip1: MediaTek MT7621A
Switch: MediaTek MT7621A
UART Serial
[o] TX
[o] GND
[o] RX
[ ] VCC - Do not connect it
MAC addresses as verified by OEM firmware:
use address source
LAN *:c2 factory 0xe000 (label)
WAN *:c3 factory 0xe006
2g *:c4 factory 0x0000
5g *:c5 factory 0x8000
Flashing instructions:
1.Create a simple http server (nginx etc)
2.set uart enable
To enable writing to the console, you must reset to factory settings
Then you see uboot boot, press the keyboard 4 button (enter uboot command line)
If it is not successful, repeat the above operation of restoring the factory settings.
After entering the uboot command line, type:
setenv uart_en 1
saveenv
boot
3.use shell in uart
cd /tmp
wget http://"your_computer_ip:80"/openwrt-ramips-mt7621-xiaomi_mir4-squashfs-kernel1.bin
wget http://"your_computer_ip:80"/openwrt-ramips-mt7621-xiaomi_mir4-squashfs-rootfs0.bin
mtd write openwrt-ramips-mt7621-xiaomi_mir4-squashfs-kernel1.bin kernel1
mtd write openwrt-ramips-mt7621-xiaomi_mir4-squashfs-rootfs0.bin rootfs0
nvram set flag_try_sys1_failed=1
nvram commit
reboot
4.login to the router http://192.168.1.1/
Installation via Software exploit
Find the instructions in the https://github.com/acecilia/OpenWRTInvasion
Signed-off-by: Dmytro Oz <sequentiality@gmail.com>
[commit message facelift, rebase onto shared DTSI/common device
definition, bump uboot-envtools]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Tue, 19 Jan 2021 17:48:48 +0000 (18:48 +0100)]
ramips: mt7621: create DTSI for Xiaomi NAND devices
This creates a DTSI for Xiaomi devices with 128M NAND.
This allows to consolidate the partitions and a few other nodes for
AC2100 family and Mi Router 3G.
Note that the Mi Router 3 Pro has 256M NAND and differently sized
partitions.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Tue, 19 Jan 2021 17:34:21 +0000 (18:34 +0100)]
ramips: mt7621: reorganize shared device definitions for Xiaomi
This creates a shared device definition for Xiaomi devices with
NAND and "separate" images, i.e. kernel1.bin and rootfs0.bin.
This allows to consolidate similar/duplicate code for AC2100 family
and Mi Router 3G.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Robert Marko [Thu, 21 Jan 2021 12:08:57 +0000 (13:08 +0100)]
ipq40xx: fix boards being shown twice
Since generic images have been split to their own
Makefile boards are showing up twice in menuconfig
as $(eval $(call BuildImage)) was not dropped from
the new generic.mk.
Hence $(eval $(call BuildImage)) was being called
twice.
So, lets simply drop it from generic.mk.
Fixes: 378c7ff28210 ("ipq40xx: split generic images into own file")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Rafał Miłecki [Thu, 21 Jan 2021 12:26:17 +0000 (13:26 +0100)]
bcm4908: workaround NAND controller #WP issue
There seems to be a problem with setting #WP. On the other hand ignoring
the #WP seems to work. rootfs_data UBI volume seems to persist changes.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Thu, 21 Jan 2021 12:23:56 +0000 (13:23 +0100)]
bcm4908: append UBI with rootfs to device images
Also enable UBI kernel support.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Wed, 20 Jan 2021 08:21:21 +0000 (09:21 +0100)]
bcm4908: build flashable & bootable firmware images
BCM4908 bootloader requires firmware with JFFS2 image containing:
1. cferam.000
2. 94908.dtb
3. vmlinux.lz
4. device custom files
cferam.000 can be obtained from the bcm63xx-cfe repository.
device custom files are stored in images dir.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Thu, 21 Jan 2021 08:14:20 +0000 (09:14 +0100)]
bcm4908: set console in the CONFIG_CMDLINE
procd doesn't work with just serial specified in the DT (using chosen &
stdout-path). It requires tty device to be explicitly specified in the
cmdline.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Wed, 20 Jan 2021 20:23:49 +0000 (21:23 +0100)]
bcm4908: add DTS patches for USB PHY and partitions
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Wed, 20 Jan 2021 20:13:08 +0000 (21:13 +0100)]
bcm4908: use backported brcmstb soc stubs patch
Final version differs slightly - uses IS_ENABLED()
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Wed, 20 Jan 2021 19:20:24 +0000 (20:20 +0100)]
bcm4908: use backported switch & PMB DTS patches
Final versions differ slightly from what was used initially.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Wed, 20 Jan 2021 06:39:25 +0000 (07:39 +0100)]
bcm4908: add pending mtd patches for BCM4908 partitioning
BCM4908 can have multiple firmware partitions. MTD needs to detect which
one is currently used.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Tue, 19 Jan 2021 20:36:30 +0000 (21:36 +0100)]
kernel: backport mtd commit converting partitions doc syntax
1. It's useful for developing & validating DTS files inside OpenWrt
2. This will allow backporting later changes that depend on it
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
John Audia [Tue, 19 Jan 2021 21:13:26 +0000 (16:13 -0500)]
kernel: bump 5.4 to 5.4.91
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.
Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800
No dmesg regressions, everything functional
Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86/64]
Sven Eckelmann [Mon, 23 Nov 2020 12:41:34 +0000 (13:41 +0100)]
ath79: Add support for OpenMesh MR1750 v2
Device specifications:
======================
* Qualcomm/Atheros QCA9558 ver 1 rev 0
* 720/600/240 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
- 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 3T3R 2.4 GHz Wi-Fi (11n)
* 3T3R 5 GHz Wi-Fi (11ac)
* 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 1x ethernet
- AR8035 ethernet PHY (RGMII)
- 10/100/1000 Mbps Ethernet
- 802.3af POE
- used as LAN interface
* 12-24V 1A DC
* internal antennas
Flashing instructions:
======================
Various methods can be used to install the actual image on the flash.
Two easy ones are:
ap51-flash
----------
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.
initramfs from TFTP
-------------------
The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):
setenv serverip 192.168.1.21
setenv ipaddr 192.168.1.1
tftpboot
0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr
The actual sysupgrade image can then be transferred (on the LAN port) to the
device via
scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/
On the device, the sysupgrade must then be started using
sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[rebase, add LED migration]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Sven Eckelmann [Mon, 23 Nov 2020 12:41:34 +0000 (13:41 +0100)]
ath79: Add support for OpenMesh MR1750 v1
Device specifications:
======================
* Qualcomm/Atheros QCA9558 ver 1 rev 0
* 720/600/240 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
- 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 3T3R 2.4 GHz Wi-Fi (11n)
* 3T3R 5 GHz Wi-Fi (11ac)
* 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 1x ethernet
- AR8035 ethernet PHY (RGMII)
- 10/100/1000 Mbps Ethernet
- 802.3af POE
- used as LAN interface
* 12-24V 1A DC
* internal antennas
Flashing instructions:
======================
Various methods can be used to install the actual image on the flash.
Two easy ones are:
ap51-flash
----------
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.
initramfs from TFTP
-------------------
The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):
setenv serverip 192.168.1.21
setenv ipaddr 192.168.1.1
tftpboot
0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr
The actual sysupgrade image can then be transferred (on the LAN port) to the
device via
scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/
On the device, the sysupgrade must then be started using
sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[rebase, apply shared DTSI/device node, add LED migration]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Tue, 19 Jan 2021 13:53:36 +0000 (14:53 +0100)]
ath79: make OpenMesh MR900 DTSI more general
The OpenMesh MR900 and to-be-added MR1750 family are very similar.
Make the existing MR900 DTSI more general so it can be used for
the MR1750 devices as well.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adrian Schmutzler [Tue, 19 Jan 2021 13:28:05 +0000 (14:28 +0100)]
ath79: consolidate common definitions for OpenMesh devices
The shared image definitions for OpenMesh devices are currently
organized based on device families. This introduces some duplicate
code, as the image creation code is mostly the same for those.
This patch thus derives two basic shared definitions that work for
all devices and only requires a few variables to be moved back to
the device definitions.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Sven Eckelmann [Wed, 30 Dec 2020 20:56:55 +0000 (21:56 +0100)]
ath79: apply Engenius
ECB1750 style to OpenMesh MR900 RGMII cfg
The OpenMesh MR900 is a modified version of the Exx900/Exx1750 family.
These devices are shipped with an AR803x PHY and had various problems with
the delay configuration in ar71xx. These problems are now in the past [1]
and parts of the delay configuration should now be done in the PHY only.
Just switch to the configuration of the
ECB1750 to have an already well
tested configuration for ath79 with the newer kernel versions.
[1] https://github.com/openwrt/openwrt/pull/3505#issuecomment-
716050292
Reported-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Mon, 23 Nov 2020 12:41:34 +0000 (13:41 +0100)]
ath79: Add support for OpenMesh MR900 v2
Device specifications:
======================
* Qualcomm/Atheros QCA9558 ver 1 rev 0
* 720/600/240 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
- 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 3T3R 2.4 GHz Wi-Fi
* 3T3R 5 GHz Wi-Fi
* 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 1x ethernet
- AR8035 ethernet PHY (RGMII)
- 10/100/1000 Mbps Ethernet
- 802.3af POE
- used as LAN interface
* 12-24V 1A DC
* internal antennas
Flashing instructions:
======================
Various methods can be used to install the actual image on the flash.
Two easy ones are:
ap51-flash
----------
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.
initramfs from TFTP
-------------------
The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):
setenv serverip 192.168.1.21
setenv ipaddr 192.168.1.1
tftpboot
0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr
The actual sysupgrade image can then be transferred (on the LAN port) to the
device via
scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/
On the device, the sysupgrade must then be started using
sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[rebase, add LED migration]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Sven Eckelmann [Mon, 23 Nov 2020 12:41:34 +0000 (13:41 +0100)]
ath79: Add support for OpenMesh MR900 v1
Device specifications:
======================
* Qualcomm/Atheros QCA9558 ver 1 rev 0
* 720/600/240 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
- 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 3T3R 2.4 GHz Wi-Fi
* 3T3R 5 GHz Wi-Fi
* 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 1x ethernet
- AR8035 ethernet PHY (RGMII)
- 10/100/1000 Mbps Ethernet
- 802.3af POE
- used as LAN interface
* 12-24V 1A DC
* internal antennas
Flashing instructions:
======================
Various methods can be used to install the actual image on the flash.
Two easy ones are:
ap51-flash
----------
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.
initramfs from TFTP
-------------------
The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):
setenv serverip 192.168.1.21
setenv ipaddr 192.168.1.1
tftpboot
0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr
The actual sysupgrade image can then be transferred (on the LAN port) to the
device via
scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/
On the device, the sysupgrade must then be started using
sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[rebase, add LED migration]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Sven Eckelmann [Wed, 30 Dec 2020 20:56:55 +0000 (21:56 +0100)]
ath79: apply Engenius EAP600 style to OpenMesh MR600 RGMII cfg
The OpenMesh MR600 is a modified version of the EAP600 family. These
devices are shipped with an AR803x PHY and had various problems with the
delay configuration in ar71xx. These problems are now in the past [1] and
parts of the delay configuration should now be done in the PHY only.
Just switch to the configuration of the EAP600 to have an already well
tested configuration for ath79 with the newer kernel versions.
[1] https://github.com/openwrt/openwrt/pull/3505#issuecomment-
716050292
Reported-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Mon, 23 Nov 2020 12:41:34 +0000 (13:41 +0100)]
ath79: Add support for OpenMesh MR600 v2
Device specifications:
======================
* Qualcomm/Atheros AR9344 rev 2
* 560/450/225 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
- 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 2T2R 2.4 GHz Wi-Fi
* 2T2R 5 GHz Wi-Fi
* 8x GPIO-LEDs (6x wifi, 1x wps, 1x power)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 1x ethernet
- AR8035 ethernet PHY (RGMII)
- 10/100/1000 Mbps Ethernet
- 802.3af POE
- used as LAN interface
* 12-24V 1A DC
* internal antennas
Flashing instructions:
======================
Various methods can be used to install the actual image on the flash.
Two easy ones are:
ap51-flash
----------
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.
initramfs from TFTP
-------------------
The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):
setenv serverip 192.168.1.21
setenv ipaddr 192.168.1.1
tftpboot
0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr
The actual sysupgrade image can then be transferred (on the LAN port) to the
device via
scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/
On the device, the sysupgrade must then be started using
sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[rebase, add LED migration]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Sven Eckelmann [Mon, 23 Nov 2020 12:41:34 +0000 (13:41 +0100)]
ath79: Add support for OpenMesh MR600 v1
Device specifications:
======================
* Qualcomm/Atheros AR9344 rev 2
* 560/450/225 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
- 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 2T2R 2.4 GHz Wi-Fi
* 2T2R 5 GHz Wi-Fi
* 4x GPIO-LEDs (2x wifi, 1x wps, 1x power)
* 1x GPIO-button (reset)
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 1x ethernet
- AR8035 ethernet PHY (RGMII)
- 10/100/1000 Mbps Ethernet
- 802.3af POE
- used as LAN interface
* 12-24V 1A DC
* internal antennas
Flashing instructions:
======================
Various methods can be used to install the actual image on the flash.
Two easy ones are:
ap51-flash
----------
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.
initramfs from TFTP
-------------------
The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):
setenv serverip 192.168.1.21
setenv ipaddr 192.168.1.1
tftpboot
0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr
The actual sysupgrade image can then be transferred (on the LAN port) to the
device via
scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/
On the device, the sysupgrade must then be started using
sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[rebase, make WLAN LEDs consistent, add LED migration]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Nick Hainke [Sat, 16 Jan 2021 12:48:50 +0000 (13:48 +0100)]
owipcalc: remove clone in cidr_contains6
The "cidr_contains6" functions clones the given cidr. The contains4
does not clone the cidr. Both functions do not behave the same.
I see no reason to push the cidr. I think that we get only a negligible
performance gain, but it makes ipv4 and ipv6 equal again.
Signed-off-by: Nick Hainke <vincent@systemli.org>
John Audia [Sun, 17 Jan 2021 14:15:14 +0000 (09:15 -0500)]
kernel: bump 5.4 to 5.4.90
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.
Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800
No dmesg regressions, everything functional
Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86/64]
Hauke Mehrtens [Sun, 10 Jan 2021 23:33:07 +0000 (00:33 +0100)]
dnsmasq: Update to version 2.83
This fixes the following security problems in dnsmasq:
* CVE-2020-25681:
Dnsmasq versions before 2.83 is susceptible to a heap-based buffer
overflow in sort_rrset() when DNSSEC is used. This can allow a remote
attacker to write arbitrary data into target device's memory that can
lead to memory corruption and other unexpected behaviors on the target
device.
* CVE-2020-25682:
Dnsmasq versions before 2.83 is susceptible to buffer overflow in
extract_name() function due to missing length check, when DNSSEC is
enabled. This can allow a remote attacker to cause memory corruption
on the target device.
* CVE-2020-25683:
Dnsmasq version before 2.83 is susceptible to a heap-based buffer
overflow when DNSSEC is enabled. A remote attacker, who can create
valid DNS replies, could use this flaw to cause an overflow in a heap-
allocated memory. This flaw is caused by the lack of length checks in
rtc1035.c:extract_name(), which could be abused to make the code
execute memcpy() with a negative size in get_rdata() and cause a crash
in Dnsmasq, resulting in a Denial of Service.
* CVE-2020-25684:
A lack of proper address/port check implemented in Dnsmasq version <
2.83 reply_query function makes forging replies easier to an off-path
attacker.
* CVE-2020-25685:
A lack of query resource name (RRNAME) checks implemented in Dnsmasq's
versions before 2.83 reply_query function allows remote attackers to
spoof DNS traffic that can lead to DNS cache poisoning.
* CVE-2020-25686:
Multiple DNS query requests for the same resource name (RRNAME) by
Dnsmasq versions before 2.83 allows for remote attackers to spoof DNS
traffic, using a birthday attack (RFC 5452), that can lead to DNS
cache poisoning.
* CVE-2020-25687:
Dnsmasq versions before 2.83 is vulnerable to a heap-based buffer
overflow with large memcpy in sort_rrset() when DNSSEC is enabled. A
remote attacker, who can create valid DNS replies, could use this flaw
to cause an overflow in a heap-allocated memory. This flaw is caused
by the lack of length checks in rtc1035.c:extract_name(), which could
be abused to make the code execute memcpy() with a negative size in
sort_rrset() and cause a crash in dnsmasq, resulting in a Denial of
Service.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Mon, 18 Jan 2021 20:57:10 +0000 (21:57 +0100)]
uboot-at91: Add PKG_MIRROR_HASH to fix download
The referenced commit is gone, but we already have this file on our
mirror, use that one by providing the correct mirror hash.
I generated a tar.xz file with the given git commit hash using a random
fork on github and it generated the same tar.xz file as found on our
mirror so this looks correct.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Mon, 18 Jan 2021 20:57:05 +0000 (21:57 +0100)]
at91bootstrap: Add PKG_MIRROR_HASH to fix download
The referenced commit is gone, but we already have this file on our
mirror, use that one by providing the correct mirror hash.
I generated a tar.xz file with the given git commit hash using a random
fork on github and it generated the same tar.xz file as found on our
mirror so this looks correct.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Paul Spooren [Mon, 18 Jan 2021 19:07:22 +0000 (09:07 -1000)]
include: update logo with better kerning
Kerning seems to be very off-putting for some people so the logo
designer thankfully updated guidelines to something which is now
considered final.
Signed-off-by: Paul Spooren <mail@aparcar.org>
David Bauer [Sat, 16 Jan 2021 19:08:35 +0000 (20:08 +0100)]
ath79: rename UniFi AC kernel1 partition
These devices do not run Ubiquiti AirOS. Rename the partition to the
name used by other UniFi devices with vendor dualboot support.
Signed-off-by: David Bauer <mail@david-bauer.net>
David Bauer [Fri, 15 Jan 2021 01:15:12 +0000 (02:15 +0100)]
rockchip: use stable MAC-address for NanoPi R2S
The NanoPi R2S does not have a board specific MAC address written inside
e.g. an EEPROM, hence why it is randomly generated on first boot.
The issue with that however is the lack of a driver for the PRNG.
It often results to the same MAC address used on multiple boards by
default, as urngd is not active at this early stage resulting in low
available entropy.
There is however a semi-unique identifier available to us, which is the
CID of the used SD card. It is unique to each SD card, hence we can use
it to generate the MAC address used for LAN and WAN.
Signed-off-by: David Bauer <mail@david-bauer.net>
Rafał Miłecki [Fri, 15 Jan 2021 09:44:12 +0000 (10:44 +0100)]
bcm63xx-cfe: enable package for bcm4908
bcm4908 target needs to include cferam images in firmware files too
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Wed, 13 Jan 2021 13:14:11 +0000 (14:14 +0100)]
firmware-utils: bcm4908img: tool adding BCM4908 image tail
Flashing image with BCM4908 CFE bootloader requires specific firmware
format. It needs 20 extra bytes with magic numbers and CRC32 appended.
This tools allows appending such a tail to the specified image and also
verifying CRC32 of existing BCM4908 image.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rosen Penev [Mon, 4 Jan 2021 00:28:43 +0000 (16:28 -0800)]
mbedtls: update to 2.16.9
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Hans Dedecker [Wed, 13 Jan 2021 19:14:47 +0000 (20:14 +0100)]
netifd: fix IPv6 routing loop on point-to-point links
c00c833 interface-ip: add unreachable route if address is offlink
e71909c interface-ip: coding style fixes
Tested-by: Karl Vogel <karl.vogel@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Wed, 13 Jan 2021 19:06:23 +0000 (20:06 +0100)]
odhcp6c: fix routing loop on point-to-point links
53f07e9 ra: fix routing loop on point to point links
2b6959d ra: align ifindex resolving
Tested-by: Karl Vogel <karl.vogel@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Robert Marko [Fri, 30 Oct 2020 17:42:37 +0000 (18:42 +0100)]
ipq40xx: mikrotik: enable MikroTik platform driver
This enables the MikroTik platform driver, it enables us to parse
valuable info from hard_config including WLAN calibration data
extraction from sysfs.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Fri, 30 Oct 2020 17:40:27 +0000 (18:40 +0100)]
ipq40xx: mikrotik: enable MikroTik NOR parser
Needed for SPI-NOR based MikroTik IPQ40xx devices like hAP ac2.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Fri, 30 Oct 2020 17:39:04 +0000 (18:39 +0100)]
ipq40xx: mikrotik: enable CONFIG_MTD_ROUTERBOOT_PARTS
This enables the new MikroTik specific partition parser.
This avoids manually specifying the MikroTik specific partitions as they
can be detected by their magic values.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Thu, 12 Nov 2020 17:13:26 +0000 (18:13 +0100)]
ipq40xx: add MikroTik subtarget
MikroTik devices require the use of raw vmlinux out of the self
extracting compressed kernels.
They also require 4K sectors, kernel2minor, partition parser as well as
RouterBoard platform drivers.
So in order to not add unnecessary code to the generic sub target lets
introduce a MikroTik sub target.
Signed-off-by: Robert Marko <robimarko@gmail.com>
John Thomson [Fri, 23 Oct 2020 09:49:26 +0000 (19:49 +1000)]
ipq40xx: kernel compressed boot: reset watchdog countdown
If the watchdog is enabled, set the timeout to 30 seconds before
decompress is started.
Mikrotik ipq40xx devices running with RouterBoot have the SoC watchdog
enabled and running with a timeout that does not allow time for the
kernel to decompress and manage the watchdog.
On ipq40xx RouterBoot TFTP boot the watchdog countdown is reset before:
Jumping to kernel
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Robert Marko [Fri, 30 Oct 2020 12:58:29 +0000 (13:58 +0100)]
ipq40xx: arm: compressed: add appended DTB section
This adds a appended_dtb section to the ARM decompressor
linker script.
This allows using the existing ARM zImage appended DTB support for
appending a DTB to the raw ELF kernel.
Its size is set to 1MB max to match the zImage appended DTB size limit.
To use it to pass the DTB to the kernel, objcopy is used:
objcopy --set-section-flags=.appended_dtb=alloc,contents \
--update-section=.appended_dtb=<target>.dtb vmlinux
This is based off the following patch:
https://github.com/openwrt/openwrt/commit/
c063e27e02a9dcac0e7f5877fb154e58fa3e1a69
Signed-off-by: Robert Marko <robimarko@gmail.com>
Rosen Penev [Mon, 4 Jan 2021 00:27:10 +0000 (16:27 -0800)]
libusb: make InstallDev explicit
Helps to see what actually gets installed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Rosen Penev [Mon, 4 Jan 2021 00:27:09 +0000 (16:27 -0800)]
libusb: cleanup PKG_ variables
Reordered for consistency between packages.
Fixed license information.
Change PKG_BUILD_PARALLEL to 1. This is no longer a problem.1
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Rosen Penev [Mon, 4 Jan 2021 00:27:08 +0000 (16:27 -0800)]
libusb: update to 1.0.24
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Alexander Couzens [Sun, 17 Jan 2021 05:54:04 +0000 (06:54 +0100)]
ipq40xx: split generic images into own file
In preparation of the new mikrotik subtarget split the generic images
into generic.mk
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Hans Dedecker [Fri, 15 Jan 2021 19:45:38 +0000 (20:45 +0100)]
glibc: update to latest 2.32 commit (BZ #20019, BZ #27177, BZ #27130)
4c619b3eed x86: Check IFUNC definition in unrelocated executable [BZ #20019]
87450ecf8a x86: Set header.feature_1 in TCB for always-on CET [BZ #27177]
2b4f67c2b3 Update for [BZ #27130] fix
1a24bbd43e x86-64: Avoid rep movsb with short distance [BZ #27130]
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>