Commit Graph

45719 Commits (56ab58fb6ce29329963619d5a4fffa9d5828176e)
 

Author SHA1 Message Date
leo chung 56ab58fb6c bzip2: add linker option LDFLAGS
if gcc not linker whith this LDFLAGS, "file libbz2.so.1.0.8" will
recognize as pie executable ELF file ( which should be shared object).

this because the file command version before 5.36 not recognize
correctly.

Signed-off-by: leo chung <gewalalb@gmail.com>
5 years ago
Mathew McBride 97bcbc690c kernel: add package for Epson RX-8025 and compatible I2C RTC
RX-8025 is an I2C RTC from Epson, some newer products such as the
RX-8035 are also compatible.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
5 years ago
Hauke Mehrtens e6cadb215c mac80211: Update to version 5.4-rc2
This updates mac80211 to backports based on kernel 5.4-rc2

ath10k-ct was updated to match the API changes and iw now uses the new
nl80211.h header file.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 67dc023f87 mac80211: Update to version 5.3.6
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Christian Lamparter 54d9ac8ba8 ipq806x: WPQ864: fix partition unit-address
This patch fixes what seems to be a simple copy & paste
error with the unit-address of the BOOTCONFIG partition.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Jo-Philipp Wich 9bb5dac593 build: fix seq host tool check
Problem found on alpine linux when trying to `./scripts/feeds update -a`,
which results in `Build dependency: Missing seq command`.

Ref: https://github.com/openwrt/openwrt/pull/1926
Suggested-by: imShara <shara@protonmail.com>
[reworded commit and turned faulty Sob into Suggested-by]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Florian Eckert c7c14aaad3 wwan: Double quote to prevent globbing and word splitting
Fix some shellcheck warnings.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
[bump PKG_RELEASE]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Florian Eckert a78a539afd wwan: add ec25 to database
Add ec25 to database.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
[bump PKG_RELEASE]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Florian Eckert 68b1b0bb39 wwan: add mc7304 to database
Add mc7304 to database.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
[bump PKG_RELEASE]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Florian Eckert c45c7606cc wwan: check new uci bus option on proto setup event
If system has more then one and different wwan interface (modem). Then the
wwan protohandler will always take the modem which is discovered first.
The protohandler will always setup the same interface. To fix this add a
new usb "bus" option which is associated with wwan device and so will set
the specified interface up. With this change more then one interface
could be mananged by the wwan protohandler.

If the "bus" option is not set in the uci network config then the protohandler
behaves as before the change. The protohanldler will take the first
interface which he founds.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 years ago
Alin Nastac ddf6ec29b4 procd: allow usage of * as procd_running() instance parameter
service_running() implementation in /etc/rc.common use it.
It is preferable to use wildcard than assuming the instance
name is the default one.

jsonfilter returns all matches when wildcards are used, hence
the -l 1 argument used to limit output to only one value.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
5 years ago
Lucian Cristian 91aabae895 util-linux: add more command
at least vtysh needs it for proper listing, busybox is not modular so add it here

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years ago
Sean Kenny 9105057cc0 6in4: add rfc1918 check function
This is a precursor to adding proper support for multiple
6in4 tunnels with the already programmed tunlink parameter.
This is an essential sanity check so as to not break existing
and working behind NAT setups.

Signed-off-by: Sean Kenny <skenny@wfap.ca>

6in4: add myip he.net api parameter logic

This is to add proper support for multiple 6in4 tunnels
with the already programmed tunlink parameter.
As it stands before this commit, if there is a multi wan setup that
consists of dynamic ips, there is no way to use the
dynamic update feature as the he.net api is implicitly using
the ip address of the caller. This will explicitly use the
ipaddr specified in the interface config OR the ip of the
tunlink interface specified in the dynamic update api call instead
ONLY if the final resolved ipaddr variable is not an rfc1918 address.

Signed-off-by: Sean Kenny <skenny@wfap.ca>
5 years ago
Alin Nastac d3b0459c93 lua: install luac symlink on host
Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
5 years ago
Christian Franke d544bc84a0 lantiq: Fix fw_cutter LzmaWrapper
The destination buffer size `d_len` is passed to `lzma_inflate` as a
pointer. Therefore, it needs to be dereferenced to compare its content.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
5 years ago
Bjørn Mork 07b5c59232 kernel: fix MBIM description
Signed-off-by: Bjørn Mork <bjorn@mork.no>
5 years ago
Jo-Philipp Wich 889b841048 fwtool: do not omit final 16 byte when image does not contain signature
The fwutil command will interpret the final 16 byte of a given firmware
image files as "struct fwimage_trailer".

In case these bytes do look like a valid trailer, we must ensure that we
print them out along with the remainder of the image to not accidentally
truncate non-trailer-images by 16 bytes when they're piped through fwtool,
e.g. as part of an image verification command sequence.

Some command sequences pipe images through fwtool in order to strip any
possible metadata, certificate or signature trailers and do not expect
bare images without any of that metadata to get truncated as other non-
fwtool specific metadata is expected at the end of the file, e.g. an
information block with an md5sum in case of the combined image format.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Paul Spooren 6caf437652 build: add buildinfo as single Makefile target
The prepare target was added some 11 years ago to build tools and
toolchain and was recently extended to  create buildinfo files for
reproducibility, meaning {feeds,version,config}.buildinfo.

As the buildbot workflow is more complex than the single prepare (kmod
feed insertion), prepare is only used to create those buildinfo files.
Running prepare however runs `target/compile` as well, taking time even
everything is already compiled.

Splitting this allows the buildbot to run only the `buildinfo` target
while others can still use the convenience feature `prepare`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 years ago
Kevin Darbyshire-Bryant 9d5e266cb1 wireguard: bump to latest snapshot 20191012
8eb8443 version: bump snapshot
be09cf5 wg-quick: android: use Binder for setting DNS on Android 10
4716f85 noise: recompare stamps after taking write lock
54db197 netlink: allow preventing creation of new peers when updating
f1b87d1 netns: add test for failing 5.3 FIB changes
a3539c4 qemu: bump default version

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years ago
Kevin Darbyshire-Bryant 14881b49d8 toolchain/kernel-headers: don't use TARGET_CFLAGS
Kernel utilities (e.g. scripts/kconfig/conf) are being built to run on
the host system at this stage, therefore it makes no sense to use the
target system CC flags.  Use HOSTCFLAGS instead

While we're here rename KMAKE macro to HOST_KMAKE to make it even more
obvious that we're building for host.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years ago
Jo-Philipp Wich bc61458b73 iwinfo: update to latest Git HEAD
07315b6 nl80211: handle hidden SSIDs in wpa_supplicant scan results
3ac846e lua: fix string description of mixed WPA3 modes

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Adrian Schmutzler d1072096f4 ramips: fix WiFi MAC addresses for D-Link DIR-810L
So far, WiFi MAC addresses for this device have been set up from
caldata. However, this returns values which do not look like MAC
addresses. They also do not match stock firmware:

wlan0 (5.0): 00:11:22:00:17:D0 from 0x8004
wlan1 (2.4): 00:11:22:00:17:CD from 0x4 (and 0x2e)

It looks like the only valid MAC address on this device is at 0x28.

So, this patch changes setup to calculate addresses based on the
value at 0x28:

lan: *:0A (flash, label)
wan: *:0B (flash + 1)
wifi2: *:0A (flash)
wifi5: *:0C (flash + 2)

Thanks to Roger Pueyo Centelles <roger.pueyo@guifi.net> for
investigating this on his devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Florian Eckert a5ec41b0e5 mac80211: add new acs_exclude_dfs option
The channel can be selected automatically at run time by setting
channel=acs_survey or channel=0, both of which will enable the ACS survey
based algorithm in hostapd. If the option acs_exclude_dfs is set in the
hostpad config DFS channels from ACS are excluded on channel selection.

This commit will add the possibilty to exclude the dfs channel on ACS
survey.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 years ago
Martin Schiller 71e04091a9 lantiq: fix dsl_control status handling.
Commit 7519a36774 ("base-files,procd: add generic service status")
introduced the generic 'status' command which broke the previous
dsl_control status output. To fix this, let's rename the "old" command
to "dslstat".

Fixes: 7519a36774 ("base-files,procd: add generic service status")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 years ago
Daniel Engberg f351beedfd libevent2: Update to 2.1.11
Update libevent to 2.1.11
Use CMake instead GNU Autotools
Backport following commits:
f05ba67193
..and partially
7201062f3e
to fix compilation

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
5 years ago
Dan Haab 63c43e5674 bcm53xx: sysupgrade: support Luxul NAND devices
This adds support for UBI-aware sysupgrade using Luxul formats.

Signed-off-by: Dan Haab <dan.haab@legrand.com>
5 years ago
Michael Heimpold e56e5a454e brcm47xx: fix switch port labels for Asus WL500GP V2
The switch port naming in LuCI does not fit the physical numbers
on the front of this device. Since this is confusing, fix it.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
5 years ago
Rosen Penev 4533ba6810 lua: fix linking under glibc
Compilation of liblua itself works, but when other packages link against
it, the linker starts throwing undefined references to a bunch of math
functions in libm.

First discovered in a failed attempt to transition a package to uClibc++.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[fix commit title capitalization]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Adrian Schmutzler 48b5d08a48 treewide: use a single ath10k MAC patching function with checksum
While all ath10k eeproms have a checksum field, so far two
functions for patching ath10k MAC address have been present (and
been used).

This merges code to provide a single function ath10k_patch_mac
in caldata.sh, having its name in accordance with ath9k functions.
By doing so, correct MAC patching for current and future ath10k
devices should be ensured.

This patch adds checksum adjustments for several targets on
ath79 and lantiq.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 332b1f46e9 ipq40xx: add label MAC address for FritzBox 4040
The CWMP-Account on the device's label contains the eth0 MAC
address.

This only changes 4.19 files as label-mac-device is introduced
after 19.07 branch, so there won't be a 4.14 release anymore.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
David Bauer 1a256470e7 ath79: correct ar71xx boardname for UniFi AC Lite
This corrects the additional boardname for the image metadata to the one
used in ar71xx. The previously present additional entry was never used
on a running system.

Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
David Bauer 07e555d873 mpc85xx: correct TP-LINK TL-WDR4900 MAC addresses
This commit fixes TP-Link TL-WDR4900 v1 MAC address assignment.
Previously, the MAC addrss was read for the ethernet from the "config"
partition. However, the content of this partition is dependent on the
firmware which was previously installed on the device.

Switch the MAC address source to the U-Boot partition, where the MAC
address is always present at a fixed partition. The partition was
previously already used for the WiFi MAC-addresses.

Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Andreas Ziegler 07c1ddf522 ath79: add support for UniFi AC-LR
The Unifi AC-LR has identical hardware to the Unifi AC-Lite.
The antenna setup is different according to the vendor,
which explains the thicker enclosure.

Therefore, it is helpful to know the exact device variant,
instead of having "Ubiquiti UniFi-AC-LITE/LR".

Signed-off-by: Andreas Ziegler <dev@andreas-ziegler.de>
[fix legacy name in commit message; add old boardname to
SUPPORTED_DEVICES]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Koen Vandeputte 089b4f16aa gdb: bump to 8.3.1
GDB 8.3.1 brings the following fixes and enhancements over GDB 8.3:

PR c++/20020 (GDB segfault on printing objects)
PR gdb/24454 (nat/x86-linux-dregs.c failed assertion)
PR breakpoints/24541 (Incorrect evaluation of systemtap probes due to register being signed and probe expression assuming unsigned)
PR symtab/24545 (Symbol loading performance regression with cc1)
PR gdb/24592 (amd64->i386 linux syscall restart problem)
PR gdb/25009 (terminate called after throwing an instance of 'srchilite::ParserException')
PR gdb/25010 (Calls to error () can cause SIGTTOU to send gdb to the background)
PR breakpoints/25011 (Breakpoints on file reloads broken for PIE binaries)

This corrective release also brings the following testsuite fixes and
enhancements:

PR testsuite/25005 (gdb-caching-proc.exp takes a lot of time on skip_opencl_tests)
PR testsuite/25016 (Test-case failures for -pie)

GDB 8.3 includes the following changes and enhancements:

* Support for new native configurations (also available as a target configuration):
     - RISC-V GNU/Linux (riscv*-*-linux*)
     - RISC-V FreeBSD (riscv*-*-freebsd*)

* Support for new target configurations:
     - CSKY ELF (csky*-*-elf)
     - CSKY GNU/Linux (csky*-*-linux)
     - NXP S12Z ELF (s12z-*-elf)
     - OpenRISC GNU/Linux (or1k*-*-linux*)

* Native Windows debugging is only supported on Windows XP or later.

* The Python API in GDB now requires Python 2.6 or later.

* GDB now supports terminal styling for the CLI and TUI.
  Source highlighting is also supported by building GDB with GNU
  Highlight.

* Experimental support for compilation and injection of C++ source
  code into the inferior (requires GCC 7.1 or higher, built with
  libcp1.so).

* GDB and GDBserver now support IPv6 connections.

* Target description support on RISC-V targets.

* Various enhancements to several commands:
     - "frame", "select-frame" and "info frame" commands
     - "info functions", "info types", "info variables"
     - "info thread"
     - "info proc"
     - System call alias catchpoint support on FreeBSD
     - "target remote" support for Unix Domain sockets.

* Support for displaying all files opened by a process

* DWARF index cache: GDB can now automatically save indices of DWARF
  symbols on disk to speed up further loading of the same binaries.

* Various GDB/MI enhancements.

* GDBserver on PowerPC GNU/Linux now supports access to the PPR,
  DSCR, TAR, EBB/PMU, and HTM registers.

* Ada task switching support when debugging programs built with
  the Ravenscar profile added to aarch64-elf.

* GDB in batch mode now exits with status 1 if the last executed
  command failed.

* Support for building GDB with GCC's Undefined Behavior Sanitizer.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 68c50e1ca2 toolchain/gdb: bump to 8.3.1
GDB 8.3.1 brings the following fixes and enhancements over GDB 8.3:

PR c++/20020 (GDB segfault on printing objects)
PR gdb/24454 (nat/x86-linux-dregs.c failed assertion)
PR breakpoints/24541 (Incorrect evaluation of systemtap probes due to register being signed and probe expression assuming unsigned)
PR symtab/24545 (Symbol loading performance regression with cc1)
PR gdb/24592 (amd64->i386 linux syscall restart problem)
PR gdb/25009 (terminate called after throwing an instance of 'srchilite::ParserException')
PR gdb/25010 (Calls to error () can cause SIGTTOU to send gdb to the background)
PR breakpoints/25011 (Breakpoints on file reloads broken for PIE binaries)

This corrective release also brings the following testsuite fixes and
enhancements:

PR testsuite/25005 (gdb-caching-proc.exp takes a lot of time on skip_opencl_tests)
PR testsuite/25016 (Test-case failures for -pie)

GDB 8.3 includes the following changes and enhancements:

* Support for new native configurations (also available as a target configuration):
     - RISC-V GNU/Linux (riscv*-*-linux*)
     - RISC-V FreeBSD (riscv*-*-freebsd*)

* Support for new target configurations:
     - CSKY ELF (csky*-*-elf)
     - CSKY GNU/Linux (csky*-*-linux)
     - NXP S12Z ELF (s12z-*-elf)
     - OpenRISC GNU/Linux (or1k*-*-linux*)

* Native Windows debugging is only supported on Windows XP or later.

* The Python API in GDB now requires Python 2.6 or later.

* GDB now supports terminal styling for the CLI and TUI.
  Source highlighting is also supported by building GDB with GNU
  Highlight.

* Experimental support for compilation and injection of C++ source
  code into the inferior (requires GCC 7.1 or higher, built with
  libcp1.so).

* GDB and GDBserver now support IPv6 connections.

* Target description support on RISC-V targets.

* Various enhancements to several commands:
     - "frame", "select-frame" and "info frame" commands
     - "info functions", "info types", "info variables"
     - "info thread"
     - "info proc"
     - System call alias catchpoint support on FreeBSD
     - "target remote" support for Unix Domain sockets.

* Support for displaying all files opened by a process

* DWARF index cache: GDB can now automatically save indices of DWARF
  symbols on disk to speed up further loading of the same binaries.

* Various GDB/MI enhancements.

* GDBserver on PowerPC GNU/Linux now supports access to the PPR,
  DSCR, TAR, EBB/PMU, and HTM registers.

* Ada task switching support when debugging programs built with
  the Ravenscar profile added to aarch64-elf.

* GDB in batch mode now exits with status 1 if the last executed
  command failed.

* Support for building GDB with GCC's Undefined Behavior Sanitizer.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte e5445333f6 kernel: bump 4.19 to 4.19.79
Refreshed all patches.

Remove upstreamed (superseded):
- 950-0726-can-mcp251x-Allow-more-time-after-a-reset.patch

Compile-tested on: brcm2708, cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 1cfe412dd2 kernel: bump 4.14 to 4.14.149
Refreshed all patches.

Altered patches:
- 820-sec-support-layerscape.patch

Compile-tested on: cns3xxx, layerscape
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 4d5b62263c toolchain/musl: bump to version 1.1.24
1.1.24 release notes

new features:
- GLOB_TILDE extension to glob
- non-stub catgets localization API, using netbsd binary catalog format
- posix_spawn file actions for [f]chdir (extension, pending future standard)
- secure_getenv function (extension)
- copy_file_range syscall wrapper (Linux extension)
- header-level support for new linux features in 5.2

performance:
- new fast path for lrint (generic C version) on 32-bit archs

major internal changes:
- functions involving time are overhauled to be time64-ready in 32-bit archs
- x32 uses the new time64 code paths to replace nasty hacks in syscall glue

compatibility & conformance:
- support for powerpc[64] unaligned relocation types
- powerpc[64] and sh sys/user.h no longer clash with kernel asm/ptrace.h
- select no longer modifies timeout on failure (or at all)
- mips64 stat results are no longer limited to 32-bit time range
- optreset (BSD extension) now has a public declaration
- support for clang inconsistencies in wchar_t type vs some 32-bit archs
- mips r6 syscall asm no longer has invalid lo/hi register clobbers
- vestigial asm declarations of __tls_get_new are removed (broke some tooling)
- riscv64 mcontext_t mismatch glibc's member naming is corrected

bugs fixed:
- glob failed to match broken symlinks consistently
- invalid use of interposed calloc to allocate initial TLS
- various dlsym symbol resolution logic errors
- semctl with SEM_STAT_ANY didn't work
- pthread_create with explicit scheduling was subject to priority inversion
- pthread_create failure path had data race for thread count
- timer_create with SIGEV_THREAD notification had data race getting timer id
- wide printf family failed to support l modifier for float formats

arch-specific bugs fixed:
- x87 floating point stack imbalance in math asm (i386-only CVE-2019-14697)
- x32 clock_adjtime, getrusage, wait3, wait4 produced junk (struct mismatches)
- lseek broken on x32 and mipsn32 with large file offsets
- riscv64 atomics weren't compiler barriers
- riscv64 atomics had broken asm constraints (missing earlyclobber flag)
- arm clone() was broken when compiled as thumb if start function returned
- mipsr6 setjmp/longjmp did not preserve fpu register state correctly

Refreshed all patches.
Removed upstreamed.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Jo-Philipp Wich 57b834281b iwinfo: update to latest Git HEAD
a29b7d4 nl80211: align path to phy mapping logic with mac80211.sh

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Hans Dedecker 34c4741da0 odhcpd: update to latest git HEAD
9a4531a ndp: fix endian issue

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Adrian Schmutzler 2c60de0e3f treewide: move MAC address patch functions to common library
This unifies MAC address patch functions and moves them to a
common script. While those were implemented differently for
different targets, they all seem to do the same. The number of
different variants is significantly reduced by this patch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 5b6a809092 treewide: move calibration data extraction function to library
This moves the almost identical calibration data extraction
functions present multiple times in several targets to a single
library file /lib/functions/caldata.sh.

Functions are renamed with more generic names to merge different
variants that only differ in their names.

Most of the targets used find_mtd_chardev, while some used
find_mtd_part inside the extraction code. To merge them, the more
abundant version with find_mtd_chardev is used in the common code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[rebase on latest master; add mpc85xx]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Adrian Schmutzler c1388a2deb base-files: move xor() from caldata extraction to functions.sh
The xor() function is defined in each of the caldata extraction
scripts for several targets. Move it to functions.sh to reduce
duplicate code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Roger Pueyo Centelles bba6646b5c ath79: add support for COMFAST CF-E313AC
This patch adds support for the COMFAST CF-E313AC, an  outdoor wireless
CPE with two Ethernet ports and a 802.11ac radio.

Specifications:

 - QCA9531 SoC
 - 650/400/216 MHz (CPU/DDR/AHB)
 - 1x 10/100 Mbps WAN Ethernet, 48V PoE-in
 - 1x 10/100 Mbps LAN Ethernet, pass-through 48V PoE-out
 - 1x manual pass-through PoE switch
 - 64 MB RAM (DDR2)
 - 16 MB FLASH
 - QCA9886 2T2R 5 GHz 802.11ac, 23 dBm
 - 12 dBi built-in antenna
 - POWER/LAN/WAN/WLAN green LEDs
 - 4x RSSI LEDs (2x red, 2x green)
 - UART (115200 8N1)

Flashing instructions:

 The original firmware is based on OpenWrt so a sysupgrade image can be
 installed via the stock web GUI. Settings from the original firmware
 will be saved and restored on the new one, so a factory reset will be
 needed. To do so, once the new firmware is flashed, enter into failsafe
 mode by pressing the reset button several times during the boot
 process, while the WAN LED flashes, until it starts flashing faster.
 Once in failsafe mode, perform a factory reset as usual.

 Alternatively, the U-boot bootloader contains a recovery HTTP server
 to upload the  firmware. Push the reset button while powering the
 device on and keep it pressed for >10 seconds. The device's LEDs will
 blink several times and the recovery page will be at
 http://192.168.1.1; use it to upload the sysupgrade image.

Note:

 Four MAC addresses are stored in the "art" partition (read-only):
  - 0x0000: 40:A5:EF:AA:AA:A0
  - 0x0006: 40:A5:EF:AA:AA:A2
  - 0x1002: 40:A5:EF:AA:AA:A1
  - 0x5006: 40:A5:EF:AA.AA:A3 (inside the 5 GHz calibration data)

 The stock firmware assigns MAC addresses to physical and virtual
 interfaces in a very particular way:
  - eth0 corresponds to the physical Ethernet port labeled as WAN
  - eth1 corresponds to the physical Ethernet port labeled as LAN

  - eth0 belongs to the bridge interface br-wan
  - eth1 belongs to the bridge interface br-lan

  - eth0 is assigned the MAC from 0x0 (*:A0)
  - eth1 is assigned the MAC from 0x1002 (*:A1)

  - br-wan is forced to use the MAC from 0x1002 (*:A1)
  - br-lan is forced to use the MAC from 0x0 (*:A0)

  - radio0 uses the calibration data from 0x5000 (which contains
    a valid MAC address, *:A3). However, it is overwritten by the
    one at 0x6 (*:A2)

 This commit preserves the LAN/WAN roles of the physical Ethernet
 ports (as labeled on the router) and the MAC addresses they expose
 by default (i.e., *:A0 on LAN, *:A1 on WAN), but swaps the position
 of the eth0/eth1 compared to the stock firmware:
  - eth0 corresponds to the physical Ethernet port labeled as LAN
  - eth1 corresponds to the physical Ethernet port labeled as WAN

  - eth0 belongs to the bridge interface br-lan
  - eth1 is the interface at @wan

  - eth0 is assigned the MAC from 0x0 (*:A0)
  - eth1 is assigned the MAC from 0x1002 (*:A1)

  - br-lan inherits the MAC from eth0 (*:A0)
  - @wan inherits the MAC from eth1 (*:A1)

  - radio0's MAC is overwritten to the one at 0x6

This way, eth0/eth1's positions differ from the stock firmware, but
the weird MAC ressignations in br-lan/br-wan are avoided while the
external behaviour of the router is maintained. Additionally, WAN
port is connected to the PHY gmac, allowing to monitor the link
status (e.g., to restart DHCP negotiation when plugging a cable).

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
5 years ago
Roger Pueyo Centelles ac36cca012 ramips: mt7621: Alternative name KE 2P for Phicomm K2P
The Phicomm KE 2P is identical to the already supported Phicomm K2P,
renamed for the European market. Use the ALT0 buildroot tags to show
both devices.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
5 years ago
Stijn Tintel 4b9a07336a kernel: add kmod-iio-bme680
This driver supports the Bosch Sensortec BME680 gas, humidity, pressure
and temperature sensor.

Tested I2C and SPI modes on a Raspberry Pi Zero W.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Ali MJ Al-Nasrawy 10f5eb0398 trelay: log "started" and "stopped"
It is informative especially when using multiple device pairs.

Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
5 years ago
Ali MJ Al-Nasrawy c2635b871d trelay: fix deadlock on remove
Upon writing to "remove" file, debugfs_remove_recursive() blocks while
holding rtnl_lock. This is because debugfs' file_ops callbacks are
executed in debugfs_use_file_*() context which prevents file removal.

Fix this by only flagging the device for removal and then do the cleanup
in file_ops.release callback which is executed out of that context.

Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
5 years ago
Ali MJ Al-Nasrawy 77cfc0739d trelay: handle netdevice events correctly
Since v3.11, netdevice notification data are of type
"struct netdev_notifier_info". Handle it as such!

This should fix a critical bug in which devices are unable get released
because trelay does not release resources in response to UNREGISTER
event spamming the log with something like:

unregister_netdevice: waiting for eth0.1 to become free. Usage count = 1

Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
5 years ago
Ruixi Zhou b30e481b6c kernel: NFSD: add dependency kmod-crypto-arc4 for kmod-fs-nfs-common-rpcsec
crypto-arc4 move into a module with commit c3a78955f3,
fs-nfs-common-rpcsec compile error without arc4 support.

Ref: https://github.com/openwrt/packages/issues/9912

Fixes: c3a78955f3 ("kernel: move crypto-arc4 into a module")
Signed-off-by: Ruixi Zhou <zhouruixi@gmail.com>
5 years ago