Commit Graph

42978 Commits (31075313bf69fff3803b7c1da1e0ed7e5773d999)
 

Author SHA1 Message Date
INAGAKI Hiroshi d745eac636 ath79: add hwver parameter to buffalo-tag
In order to be able to set the value of "hardware version" other than
"3", I added the "hwver" parameter.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Robert Marko adbd9d1f1f ath79: Add support for TP-Link TL-WR842N-v2
This PR adds support for TP-Link TL-WR842N-v2 router which is supported by ar71xx to ath79.

This is a low cost model with following specs:

CPU: Atheros AR9341 SoC
RAM: 32 MB DDR1
Flash: 8 MB NOR SPI
Switch: Internal AR9341 5 port 10/100 Mbit
Ports:  5x 10/100 Mbit(1x WAN, 4x LAN)
USB: 1x USB2.0
WLAN: 2.4 GHZ AR9341

Installation:

Simply flash the factory image through stock firmware WEB UI.

Signed-off-by: Robert Marko <robimarko@gmail.com>
6 years ago
Sven Eckelmann ebd57de1f9 ipq40xx: Create /var/lock directory in platform_do_upgrade_*
The sysupgrade_pre_upgrade hook was removed with 5e1b4c57de ("base-files:
drop fwtool_pre_upgrade") while there were still scripts using it:

* target/linux/ar71xx/base-files/lib/upgrade/allnet.sh
* target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
* target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh

Not running the hooks can either prevent a successful upgrade or brick the
device because the fw_setenv program cannot be started correctly.

Instead of adding this hook again, the directory /var/lock for fw_setenv
can also just be created directly before fw_setenv is called.

Fixes: 5e1b4c57de ("base-files: drop fwtool_pre_upgrade")
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years ago
Sven Eckelmann c383e0c979 ar71xx: Create /var/lock directory in platform_do_upgrade_*
The sysupgrade_pre_upgrade hook was removed with 5e1b4c57de ("base-files:
drop fwtool_pre_upgrade") while there were still scripts using it:

* target/linux/ar71xx/base-files/lib/upgrade/allnet.sh
* target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
* target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh

Not running the hooks can either prevent a successful upgrade or brick the
device because the fw_setenv program cannot be started correctly.

Instead of adding this hook again, the directory /var/lock for fw_setenv
can also just be created directly before fw_setenv is called.

Fixes: 5e1b4c57de ("base-files: drop fwtool_pre_upgrade")
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years ago
Sven Eckelmann 11d51276b1 ar71xx: Use sysupgrade's RAMFS_COPY_* for fw_(set|print)env
The install_bin from /lib/upgrade/common.sh is no longer creating the
symlinks when a secondary parameter is added. But the fw_setenv program was
always copied this way to the ramdisk for the upgrade.

Instead, this should be done using RAMFS_COPY_* like on all other
platforms.

Fixes: 438dcbfe74 ("base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN")
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years ago
Mathias Kresin b09992a7d9 ath79: fix build warning
The image build code for the Ubiquiti Nanostation AC series adds the
factory image as to be build image. The same is already done by an
included recipe which results into an expanded IMAGE variable of:

  IMAGES = sysupgrade.bin factory.bin factory.bin

The build system doesn't like these duplicates and issues the following
warning:

  Makefile:82: warning: overriding recipe for target...

Get remove the duplicate factory image to get rid of the warning.

Fixes: 5736af8024 ("ath79: Add support for Ubiquiti NanoStation AC loco")
       fa3c2676ab ("ath79: Add support for Ubiquiti Nanostation AC")

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Hans Dedecker af78e90d4c odhcpd: update to latest git HEAD (FS#1853)
57f639e (HEAD -> master, origin/master, origin/HEAD) odhcpd: make DHCPv6/RA/NDP support optional
402c274 dhcpv6: check return code of dhcpv6_ia_init()
ee7472a router: don't leak RA message in relay mode (FS#1853)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Felix Fietkau 518fb345e1 iw: strip a few more non-essential features from iw-tiny
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 7999282f7f iw: fix filtering linked object files for iw-tiny
It was broken by the recent commit that added iw-full

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Mathias Kresin b07b3ddaad ramips: don't hijack the status led
Don't hijack the status led to indicate the wireless state. If we don't
have a dedicated wireless led, it's as simply as the wireless status
can't be indicated.

Such a led misuse should be set by the user and not shipped by default.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin c074239c79 ramips: move status led unset to devicetree
Release the led used for boot status indication via devicetree instead
of setting a default off trigger in userspace.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 8f4dfadd5a ramips: add support for indicating the boot state using multiple leds
Use diag.sh version used for other targets supporting different leds
for the different boot states.

The existing led sequences should be the same as before.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 772b27c207 ramips: set F5D8235 v1 usb led trigger via devicetree
Assign the usbdev trigger via devicetree and drop the userspace
handling of the usb leds.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 04eab0a1c9 ramips: set rt2880 pci controller of_node
Set the PCI controller of_node such that PCI devices can be
instantiated via device tree.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin a58535771f ramips: set usb led trigger via devicetree
Assign the usbdev trigger via devicetree for all subtargets and drop
the userspace handling of the usb leds.

With the change all usb ports are triggering the usb led instead of
only usb 1.1 XOR usb 2.0 XOR usb 3.0 as it was before.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Tobias Schramm fa3c2676ab ath79: Add support for Ubiquiti Nanostation AC
5 GHz AC wireless outdoor PoE CPE with internal 2.4 GHz management radio

CPU:    Atheros AR9342 SoC
RAM:    64 MB DDR2
Flash:  16 MB NOR SPI
Switch: QCA8334
Ports:  2 GbE ports (1x PoE in, 1x PoE passthrough)
WLAN:   5 GHz QCA899X (PCI) and 2.4 GHZ AR9342

Successor to the old NanoStation M5 with AC wireless.

The integrated QCA899X is a Ubiquiti branded part with modified vendor and
product id (0777:11ac9).

Serial

Serial settings: 115200, 8N1

* = plated through hole
0 = nylon screw

      [Top of device]
+--------------------------+
|    [label]               |
|  0                       |
|                    0     |
|         [ubnt]           |
|         [logo]  3V3  *   |
|                  TX  *   |
|                  RX  *   |
|                 GND  *   |
|                          |
|                      *   |
|                      *   |
|                      *   |
|                      *   |
|    0                     |
|                 0        |
|                          |
|                          |

Installation

1. Connect to serial header on device
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
6 years ago
Tobias Schramm 5736af8024 ath79: Add support for Ubiquiti NanoStation AC loco
Atheros AR9342, 16 MB flash, 64 MB RAM

Successor to the old NanoStation M5 loco with AC wireless.

Includes a mac80211 patch for ath10k_pci because Ubiquiti uses a Ubiquiti
branded and customized QCA988X with vendor id 0777 and device id 11ac for
AC wireless.

Installation

1. Connect to serial header on device (8N1 115200)
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
6 years ago
Tobias Schramm bc5761f90b ath79: Add generic device tree for Ubiquiti WA boards
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
6 years ago
Tobias Schramm 8f697e406a mkfwimage: Add image type definition for WA images
This patch adds a new type of ubiquiti image, the WA image. First seen
on the NanoStation AC loco the generic name implies that we will see
this type of image on more ubiquiti devices thus it makes sense to
implement it in mkfwimage.

The main difference is that WA images are signed. The "END" header has
been replaced by a "ENDS" header followed by a 2048 bit RSA signature.
This signature is not being generated by mkfwimage and filled with 0x00.

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
6 years ago
INAGAKI Hiroshi 4b9882eb92 ath79: fix MAC address for Buffalo BHR-4GRV
I added mtd-mac-address for WZR-HP-G450H and BHR-4GRV in
1df1ea4d7e, but that address in ART is
incorrect for BHR-4GRV.

WZR-HP-G450H has wlan eeprom and MAC address in ART, but BHR-4GRV
has only MAC address in ART.

- WZR-HP-G450H
  - eeprom: 0x1000
  - MAC:    0x1002

- BHR-4GRV
  - MAC:    0x0

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Hauke Mehrtens 90bb790fbf intel-microcode: update to version 20180807a
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Thomas Nixon 6b729e1563 uboot-lantiq: fix compile with modern host dtc
In dtc version 1.4.6 the macro names in header include guards changed,
but the build relies on them matching in order to replace selected
headers. This is a horrible hack to work around this.

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
6 years ago
Ansuel Smith 43e71e0416 uboot-envtools: adds r7800 uboot env support
This fix and adds support for r7800 uboot env

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
6 years ago
Rene Kjellerup 53be2d2a4e bcm53xx: added basic dts for linksys ea6500v2
only thing not working is the b43 5GHz wifi band as upstream
kernel
doesn't supporthe 0x4360 chip so far

Signed-off-by: Rene Kjellerup <rk.katana.steel@gmail.com>
6 years ago
Daniel Engberg 6e6e7adc8c mac80211: Use @KERNEL alias instead of hardlink
Use @KERNEL alias provided by toolchain instead of relying on a specific site.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years ago
Daniel Engberg fface27db8 binutils: Use 2.31.1 by default
Set binutils 2.31.1 as default

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years ago
Daniel Engberg 754a08e8d9 toolchain/binutils: Fix u-boot on some armhf platforms
Backport commit 3d9c8f6b3f033a6092425b7344647fb51dbed5c6
Without this binutils doesn't properly link u-boot

Source:
https://sourceware.org/bugzilla/show_bug.cgi?id=23571

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years ago
Daniel Engberg f6159c1e37 tools/cmake: Update to 3.12.3
Update CMake to 3.12.3

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years ago
Daniel Engberg 9efd0cb403 tools/bison: Update to 3.1
Update bison to 3.1

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years ago
Daniel Engberg 969d052e96 toolchain/fortify-headers: Update to 1.0
Update fortify-headers to 1.0

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years ago
Daniel Engberg 6bdc6cdd04 tools/libressl: Update to 2.8.1
Update libressl to 2.8.1

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years ago
Daniel Engberg 7808ba86ea tools/mtools: Update to 4.0.19
Update mtools to 4.0.19

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years ago
Hans Dedecker f771a1b962 ubus: update to latest git HEAD
221ce7e ubusd_acl: event send access list support
da503db ubusd_acl: event listen access list support
c035bab ubusd_acl: rework wildcard support
73bd847 ubusd_event: move strmatch_len to ubus_common.h
0327a91 ubus/lua: add support for BLOBMSG_TYPE_DOUBLE

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Jason A. Donenfeld b665856450 wireguard: bump to 0.0.20181006
* Account for big-endian 2^26 conversion in Poly1305.
  * Account for big-endian NEON in Curve25519.
  * Fix macros in big-endian AArch64 code so that this will actually run there
    at all.
  * Prefer if (IS_ENABLED(...)) over ifdef mazes when possible.
  * Call simd_relax() within any preempt-disabling glue code every once in a
    while so as not to increase latency if folks pass in super long buffers.
  * Prefer compiler-defined architecture macros in assembly code, which puts us
    in closer alignment with upstream CRYPTOGAMS code, and is cleaner.
  * Non-static symbols are prefixed with wg_ to avoid polluting the global
    namespace.
  * Return a bool from simd_relax() indicating whether or not we were
    rescheduled.
  * Reflect the proper simd conditions on arm.
  * Do not reorder lines in Kbuild files for the simd asm-generic addition,
    since we don't want to cause merge conflicts.
  * WARN() if the selftests fail in Zinc, since if this is an initcall, it won't
    block module loading, so we want to be loud.
  * Document some interdependencies beside include statements.
  * Add missing static statement to fpu init functions.
  * Use union in chacha to access state words as a flat matrix, instead of
    casting a struct to a u8 and hoping all goes well. Then, by passing around
    that array as a struct for as long as possible, we can update counter[0]
    instead of state[12] in the generic blocks, which makes it clearer what's
    happening.
  * Remove __aligned(32) for chacha20_ctx since we no longer use vmovdqa on x86,
    and the other implementations do not require that kind of alignment either.
  * Submit patch to ARM tree for adjusting RiscPC's cflags to be -march=armv3 so
    that we can build code that uses umull.
  * Allow CONFIG_ARM[64] to imply [!]CONFIG_64BIT, and use zinc arch config
    variables consistently throughout.
  * Document rationale for the 2^26->2^64/32 conversion in code comments.
  * Convert all of remaining BUG_ON to WARN_ON.
  * Replace `bxeq lr` with `reteq lr` in ARM assembler to be compatible with old
    ISAs via the macro in <asm/assembler.h>.
  * Do not allow WireGuard to be a built-in if IPv6 is a module.
  * Writeback the base register and reorder multiplications in the NEON x25519
    implementation.
  * Try all combinations of different implementations in selftests, so that
    potential bugs are more immediately unearthed.
  * Self tests and SIMD glue code work with #include, which lets the compiler
    optimize these. Previously these files were .h, because they were included,
    but a simple grep of the kernel tree shows 259 other files that carry out
    this same pattern. Only they prefer to instead name the files with a .c
    instead of a .h, so we now follow the convention.
  * Support many more platforms in QEMU, especially big endian ones.
  * Kernels < 3.17 don't have read_cpuid_part, so fix building there.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years ago
Felix Fietkau ffe824e912 mt76: fix dependencies
- make kmod-mt76-core hidden
- select kmod-mt76-core and kmod-usb-core from mt76-usb

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau d51cbefe86 mt76: update to the latest version
053de5c mt76x0: pci: add mt76x0e_cleanup routine
c6b1926 mt76x2: move mt76x2 source files to mt76x2 folder
6afb1b8 mt76: fix header guard macro define names
05c7f24 mt76: fix frag length allocation for usb
6856ef6 mt76: usb: fix hw initialization sequence
3d43146 mt76x0: usb: stop cal/mac workqueues at hw stop
bef08cc mt76: move mt76x02_tx_get_max_txpwr_adj in mt76x02_util.c
cd42111 mt76: add get_tx_txpwr_adj function pointer to mt76_driver_ops
c49a3ae mt76: move mt76x02_mac_write_txwi in mt76x02-lib module
4bae980 mt76: usb: use mt76x02u_tx_prepare_skb to fill txwi
e0847b4 mt76x0: init: remove unnecessary configurations
e802b5c mt76: move mt76x02_phy_get_min_avg_rssi in mt76x02_phy.c
2742847 mt76: move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid in mt76x02_util.h
c26f9fd mt76x0: mac: use sta ewma estimation for rssi tracking
330fbe3 mt76x0: remove unused variable in mt76x0_dev
a56efc5 mt76x0: remove hw_atomic_mutex mutex in mt76x0_dev
abd1daa mt76x2: move mt76x2_dev in mt76x02_util.h
d5d1e59 mt76x0: merge mt76x0_dev in mt76x02_dev
e236ba5 mt76: move mt76x02_mac_process_rx in mt76x02-lib module
724d547 mt76: unify rxwi parsing between mt76x2 and mt76x0 drivers
ec3d829 mt76: move mt76x02_tx in mt76x02-lib module
159f767 mt76: move txrx shared routines in mt76x02_txrx.c
9c874cd mt76: rename mt76x02_util.h in mt76x02.h
fd9174f mt76x2: remove leftover function declatarions
608708a mt76: move tpc routines in mt76x02-lib module
45b8f5e mt76: move mt76x02_tx_prepare_skb in mt76x02_txrx.c
9a39521 mt76: usb: move mt76x02u_tx_complete_skb in mt76x02_usb_core.c
3770c54 mt76: move mt76x02_mac_poll_tx_status in mt76x02-lib moudle
9730290 mt76: move mt76x02_tx_complete in mt76x02-lib module
99e0486 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mmio.c
3d2cfe3 mt76: move tx_tasklet management in mt76x02-lib moudle
e61671e mt76: move irq handler in mt76x02-lib moudle
d533f13 mt76x0: pci: report firmware version using ethtool

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 8c647e873f iw: add iw-full package without size reduction hacks
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 502bcd93fe mac80211: move marvell packaging code to marvell.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 2804a7f13e mac80211: move intel packaging code to intel.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 1f14ac9a0c mac80211: move realtek packaging code to realtek.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 7f984dab1c mac80211: move broadcom packaging code to broadcom.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau bde8ddf1ad mac80211: move atheros/qca packaging code to ath.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau ece90fc9df mac80211: move rt2x00 packaging code to ralink.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau fe6606c7ba mac80211: remove duplicated lines for building packages, use PKG_DRIVERS instead
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau b7855230a3 build: insert blank line after KernelPackage template to allow chaining calls to it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Alexander Couzens 6ef1c978ba package/lldp: don't link against libbsd on !USE_GLIBC builds
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years ago
Koen Vandeputte 3b53d6fdbc ar71xx: fix pci irq init on kernel 4.14
The IRQ init structs are marked as __initconst which
means this memory can be free after init.

On this platform, the PCI IRQ init happens very late _after_ the
kernel already freed the memory allocated for these structs.

During IRQ allocation, the allocation function is passed
with invalid data at this point leading to following error:

[    0.000000] SoC: Qualcomm Atheros QCA9533 ver 2 rev 0
[    2.382828] Freeing unused kernel memory: 264K
[   34.414816] pci 0000:00:00.0: no irq found for pin 1

and

[    0.000000] SoC: Qualcomm Atheros QCA956X ver 1 rev 0
[    2.125401] Freeing unused kernel memory: 284K
[    9.526479] pci 0000:00:00.0: no irq found for pin 1

After this patch:

[   14.960814] pci 0000:00:00.0: using irq 40 for pin 1

Commit 318e19ba67 ("ar71xx: add v4.14 support") fixed this for the
default targets already present in the source by default but forgot
to remove the __initconst attribute for targets QCA953x and QCA956x
which are only added later through platform patches.

Fixes: 318e19ba67 ("ar71xx: add v4.14 support")

Reported-by: Sven Schönhoff <sven.schoenhoff@gmail.com>
Reported-by: Dirk Brenken <dev@brenken.org>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Dirk Brenken <dev@brenken.org>
6 years ago
Koen Vandeputte a2adeffffc kernel: bump 4.14 to 4.14.74
Refreshed all patches.

Fixes CVE:

- CVE-2018-7755

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 0bcff6b0db kernel: bump 4.9 to 4.9.131
Refreshed all patches.

Fixes CVE:

- CVE-2018-10880
- CVE-2018-7755

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Syrone Wong 68f109609b ipset: update to 6.38
dropped already upstream patch

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
6 years ago