Commit Graph

18480 Commits (c61a2395140d92cdd37d3d6ee43a765427e8e318)

Author SHA1 Message Date
Roman Yeryomin 97a836318f ipq806x: ipq4019: dts: move ap-dk01 networking entries to dtsi
That is mdio/ethernet and wifi are present on all ap-dk01 boards.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
Roman Yeryomin 45b1042a0a ipq806x: ipq4019: dts: remove counter entry from ap-dk01 boards
There is no code implementing "qcom,qca-gcnt", so no point in keeping it.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
Roman Yeryomin 91f0345801 ipq806x: ipq4019: dts: move ap-dk01 tcsr nodes to dtsi
tcsr configuration is the same for all ap-dk01 boards

Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
Roman Yeryomin ba9aa76a3a ipq806x: ipq4019: dts: remove crypto nodes from board dts
crypto and cryptobam are already present in dtsi used by these boards:
- fritz4040
- nbg6617
- rt-ac58u

Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
Roman Yeryomin 1abc788924 ipq806x: ipq4019: dts: move xo and timer nodes to SoC dtsi
xo and timer are common thing and it makes more sense to keep them in SoC dtsi

Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
Roman Yeryomin ab3ab6241f ipq806x: ipq4019: dts: fix pinctrl node name
Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
Alexander Couzens 2e1f73a79f
mt7620: image.mk: make elecom-header reproducible
elecom-header adds a timestamp dependency. Replace
the timestamps with SOURCE_DATE_EPOCH [0] variable.

[0] https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Felix Fietkau 1c68fd6d75 ar71xx: fix section mismatch in TP-Link Archer C7 v4 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau e0d58157d8 ar71xx: fix flash fast read on devices using multiple flash chips
Add a callback to allow the SPI driver to indicate which devices fast
flash read works on.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Florian Beier c4c72a9a42 ar71xx: fix LED config for DIR-869 A1
This fixes the LED configuration for the D-Link DIR-869 A1. In order to
support the device I probed around using an initramfs image for the
UniFi AC. Pulling GPIO 15 to low enabled the LEDs while high disabled them.
GPIO 16 set to low meant that the color was white while pulling it to high
made the color change to orange. The past code was written based upon these
findings.
However, running a flashed image I now discovered that GPIO 15 controls the
orange LEDs while GPIO 16 controls the white ones and that both are active
when low. This means that the GPIOs were inverted and one active_low was set
wrong which this patch fixes.

Behavior of the LED front after this patch is applied:

cat /sys/devices/platform/leds-gpio/leds/d-link:white:status/brightness
0   -> white LEDs are OFF
255 -> white LEDs are ON

cat /sys/devices/platform/leds-gpio/leds/d-link🍊status/brightness
0   -> orange LEDs are OFF
255 -> orange LEDs are ON

If the brightness of both is set to 255 the LED front will be white.
If the brightness of both is set to 0 the LED front will be off.

Signed-off-by: Florian Beier <beier.florian@gmail.com>
7 years ago
Mathias Kresin f9311e4070 ar71xx: wzr-hp-ag300h: drop unused wmac led_pin settings
The GPIOs are used for defined LEDs and therefore are ignored/unset in
the ath9k driver since 192f0a3db8. The wireless led led trigger is
added in userspace since e20965811d, which makes the
ap9x_pci_setup_wmac_led_pin() superfluous.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Thibaut VARENE dfa2930988 ar71xx: mach-rbspi: fix 74x164 support
The platform data was missing the num_registers element which is now
mandatory in linux 4.9

Without this patch, the gpio probing would fail with:
gpio gpiochip1: (74x164): tried to insert a GPIO chip with zero lines

Fixes: #1106

Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Stefan Lippers-Hollmann 189433e543 ipq806x: nbg6817: sync MAC addresses to the upstream values
The ZyXEL NBG6817 calculates all MAC addresses based on the ethaddr
value stored in the U-Boot environment (0:APPSBLENV). No MAC addresses
are stored in the ART partition and the generated MAC addresses for the
wlan interfaces alternate randomly between 12:34:56:78:90:12 and
00:03:7f:12:34:56.

interface	  new/ OEM MAC	old MAC

wlan-2.4g (phy1): ethaddr	undefined
wlan-5g   (phy0): ethaddr + 1	undefined
lan             : ethaddr + 2	ethaddr
wan             : ethaddr + 3	ethaddr + 1

This patch defines stable MAC addresses for the wlan interfaces for
the first time instead of generating them at random. The previously
defined values for lan/ wan are changed to follow the settings of the
OEM firmware.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
7 years ago
Stefan Lippers-Hollmann 6e6d4f2e87 ipq806x: nbg6817: add kmod-fs-ext4 to device packages
The ZyXEL NBG6817 uses an eMMC flash for the rootfs, which is split
into the readonly squashfs and ext4 for the overlay. This adds the
required package to the device packages to allow mounting the overlay
by default.

/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/loop0 on /overlay type ext4 (rw,noatime,data=ordered)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
mountd(pid1040) on /tmp/run/blockd type autofs (rw,relatime,fd=7,pgrp=1,timeout=30,minproto=5,maxproto=5,indirect)

Before this commit, the ext4 based overlayfs could not be mounted,
which left only the tmpfs based/ volatile  emergency overlay in place.

Fixes: https://forum.lede-project.org/t/zyxel-nbg6817-flashing-from-oem/768

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
7 years ago
Felix Fietkau 22d982ea00 ramips: add support for switching between 3-byte and 4-byte addressing on w25q256 flash
On some devices the flash chip needs to be in 3-byte addressing mode during
reboot, otherwise the boot loader will fail to start.
This mode however does not allow regular reads/writes onto the upper 16M
half. W25Q256 has separate read commands for reading from >16M, however
it does not have any separate write commands.
This patch changes the code to leave the chip in 3-byte mode most of the
time and only switch during erase/write cycles that go to >16M
addresses.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Jonas Gorski cf9e0a59aa ar7: add kernel 4.9 support
Compile and run tested on WAG354Gv1.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 1d30869cd2 ar7: drop unused 4.1 support
Kernel 4.1 isn't support anymore anyway.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski be11b3b1c7 ar7: unbreak serial console
Serial output was broken since 3.16 for shared uarts between
kernel and login. Fix this by adding a fix sent upstream.

While at it, drop a useless patch that adds duplicate code.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 23145d4276 ar7: remove gpio character device
There are no obvious users, and any out of tree users should convert to
one of the generic APIs.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Mathew McBride 1c4415a679 layerscape: reverse changes to ndo_get_stats64
The NXP LSDK kernel backported changes for interface ndo_get_stats64
functions from mainline, this causes a compile error with
backports/mac80211, which expects the original 4.9 defintion.

As reversing the ndo_get_stats64 change signifcantly reduces the size of
patch 601, the patches that were aggregated into it have been
disaggregated.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
7 years ago
Mathew McBride 6a457749a4 layerscape: Remove netfilter and LZ4 config symbols
These conflict with the kmod packages (such as nf-netlink)

Signed-off-by: Mathew McBride <matt@traverse.com.au>
[Add same changes for arm8_32b subtarget and refresh config]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hans Dedecker 8b9cdebc9c arc770: mark as source-only
Mark target arc770 as source-only as it has package compile issues
(e.g. iproute2) due to the usage of uClibc.
As a prerequisite to be included in future releases the arc770 target
needs to switch either to glibc or musl.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Edmunt Pienkowsky 9786b53efb ramips: fix Youku-YK1 support
Remove the ephy-pins from the ethernet device tree node. The ephy-pins
are useed to controll the ePHY LEDs and this board doesn't have these.
Instead one of the ePHY pins is used in GPIO mode to control the WAN
LED.

Use the switch LED trigger to control the WAN LED. Move the power LED
handling to diag.sh to show the boot status via this LED.

Add the missing kernel packages for USB and microSD card reader to the
default package selection.

Fix the maximum image size value. The board has a 32MByte flash chip.

Fixes: FS#1055

Signed-off-by: Edmunt Pienkowsky <roed@onet.eu>
[make the commit message more verbose, remove GPIO pinmux for pins not
used as GPIOs]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Rosen Penev 56342ee2bc kernel: enable CONFIG_ADVISE_SYSCALLS
Without this, posix_[fm]advise does not work. This causes issues with
btrfs-progs, which uses fadvise to drop caches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Henryk Heisig e917e51bf9 ar71xx: fix board.bin used by QCA9886 in Archer C58/C59/C60
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years ago
Henryk Heisig 34958c8269 ar71xx: Archer C58/C59/C60 fix qca9886 wireless interface
This commit fix 5GHz wireless interface used in Archer C58/C59/C60v1
and set correctly MAC address on this interface.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years ago
Jonas Gorski 6f528dfbd9 treewide: do not use IMG_PREFIX in Image/Prepare
IMG_PREFIX can be modified in ImageBuilder by passing EXTRA_IMAGE_NAME
on command line, but Image/Prepare is not run in ImageBuilder. This
causes missing files when IMG_PREFIX is used for target file names in
Image/Prepare, then as source file names in Image/BuildKernel or
Image/Build.

Fix this by using a fixed output file name in Image/Prepare, and copy to
the expected file name in Image/BuildKernel instead, which is run by
ImageBuilder.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Kevin Darbyshire-Bryant bca01fddb3 ramips: remove erroneous "wdt rst" DTS entries
Remove reference to pinmux group "wdt rst" on EW1200, ZBT-WG2626 and
ZBT-WG3526 devices. "wdt rst" is a pinmux function and not a pinmux
group.

Fixes the following error message during boot:

  rt2880-pinmux pinctrl: invalid group "wdt rst" for function "gpio"

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
7 years ago
Tolga Cakir f4d4a3c0ef ipq806x: fix Zyxel NBG6817 WiFi button
Zyxel NBG6817 features a WiFi button, which becomes functional by setting
correct GPIO. It is a switch-type button, so it emits KEY_RFKILL on each ON
and OFF state. This is achieved by setting input-type to EV_SW.

Signed-off-by: Tolga Cakir <tolga@cevel.net>
7 years ago
Paul Wassi 080061c1ba ar71xx: fix LED names for GL-AR150
Add the respective colour to the LED's names for the GL-AR150 to be conform
to the kernel. Also add netdev triggers for the LAN and WAN LED.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years ago
Paul Wassi 9f7b897939 ar71xx: base-files: alphabetical reordering
Re-order the cases of base-files/* alphabetically.
Also merge some cases in diag.sh

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years ago
Mathias Kresin 605ce5f6cd mpc85xx: use image metadata
Append and enforce image metadata. Remove the device specific image
checks, they are replaced by image metadata.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin dcbbac55ed mpc85xx: use the generic board detect
Use the values populated by the generic board detect function. The
first compatible from the device tree source file will be the board
name in userspace. The model property from the device tree source file
will be the model name.

Change the board name where used in the userspace and drop the target
specific board detect, to use the generic one.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin f0e1f69f39 mpc85xx: fix TL-WDR4900 v1 compatible string
Use the vendor as it is listed in vendor.txt. Use a standard lower case
compatible string.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Chris Blake 93bfac468e mpc85xx: update HiveAP-330 dts
initramfs is not the proper name for this, as it stores a boot ramdisk
and not a filesystem. Update the name to reflect it's usage correctly.

If CMDLINE_OVERRIDE is enabled, the chosen bootargs aren't used at all.
Drop them from the device tree source file to not cause confusion.

Remove the noinitrd bootarg. Due to the empty ramdisk this parameter
isn't required any longer:

  [    0.000000] Initrd not found or empty - disabling initrd

Use the LEDE mtd-mac-address* device tree properties to set the interfaces
MAC-Addresses.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 79992d197f mpc85xx: cleanup kernel config
Move the kernel config changes added with the HiveAP 330 to the
subtarget the board belongs to instead of changing the target kernel
config.

While at it, move the TL_WDR4900_V1 config symbol to the containing
subtarget and disable boards we don't support.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Chris Blake ec269290db mpc85xx: use new build code style
The following moves the mpc85xx target (generic & P1020) to the new
build code style.

Compile & Flash tested on an Aerohive HiveAP-330.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin dcf62cb24e ramips: don't enable usb for the WT3020-4M
That device does not have a USB port. It as the same board as the
WT3020-8M, but without soldered USB port port. Also the case lacks the
opening for the port.

Reported-by: Alberto Bursi <alberto.bursi@outlook.it>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Alberto Bursi 1f7f24bfb9 ramips: fix default usb support for nexx wt3020-8M
the nexx wt3020-8M has a usb 2.0 port,
add usb 2.0 support packages to its default package list.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
7 years ago
Mathias Kresin b02b7004f8 lantiq: xway: rename nas0/ptm0 to dsl0
This change makes it possible to configure the wan/dsl ppp interface
settings independantly from the used TC-Layer (ATM/PTM).

By using dsl0 as interface name as for the xrx200 we can get rid of a
few conditionals which were introduced because of the different default
TC-Layer in xway and xrx200.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 664369f6b2 lantiq: match default adsl annex and firmware
Set a default Annex matching the the annex of the selected adsl
firmware.

Set Annex B for xrx200 board which are known to have an ADSL hybrid for
Annex B.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 9dd2d99525 lantiq: add missing default lan interface
With removing the boards from the the default case to fix the xDSL WAN
MAC-Address, the setting for the default LAN interface wasn't added.

Fixes: 92a12c434c ("lantiq: fix avm fritz box mac addresses")

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Florian Fainelli 5df1f4113b bcm53xx: Fix Generic profile description
Fix the sentence describing the bcm53xx generic profile.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Florian Fainelli 9a6e2d7d09 orion: Switch to 4.9 kernel
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Florian Fainelli 124cf53c87 orion: Add support for 4.9 kernel
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Florian Fainelli bb71847da5 uml: Switch to 4.9 kernel
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Florian Fainelli fd75e4d264 uml: Add 4.9 kernel patches
102-pseudo-random-mac.patch required an update to the new style asynchronous
crypto

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Hans Dedecker 5e425ad424 pending-4.9: 610-netfilter_match_bypass_default_check: fix 32bit compat layer
Patch 610-netfilter_match_bypass_default_check added an extra flag IPT_F_NO_DEF_MATCH
which is copied to user space in function copy_entries_to_user. The 32bit compat
layer function was missing the same logic to copy the flag IPT_F_NO_DEF_MATCH to
user space for a 64bit kernel and 32 bit user space.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Thierry Dutre <thierry.dutre@dtsystems.be>
7 years ago
Hans Dedecker 856c53f175 pending-4.4: 610-netfilter_match_bypass_default_check: fix 32bit compat layer
Patch 610-netfilter_match_bypass_default_check added an extra flag IPT_F_NO_DEF_MATCH
which is copied to user space in function copy_entries_to_user. The 32bit compat
layer function was missing the same logic to copy the flag IPT_F_NO_DEF_MATCH to
user space for a 64bit kernel and 32 bit user space.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Thierry Dutre <thierry.dutre@dtsystems.be>
7 years ago
Hans Dedecker 02ccffff3e pending-3.18: 610-netfilter_match_bypass_default_check: fix 32bit compat layer
Patch 610-netfilter_match_bypass_default_check added an extra flag IPT_F_NO_DEF_MATCH
which is copied to user space in function copy_entries_to_user. The 32bit compat
layer function was missing the same logic to copy the flag IPT_F_NO_DEF_MATCH to
user space for a 64bit kernel and 32 bit user space.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Thierry Dutre <thierry.dutre@dtsystems.be>
7 years ago
Felix Fietkau b7ea14150f ar71xx: re-enable 4k sectors for the mikrotik subtargets
On RB91x (and possibly others), there is a small SPI flash to store boot
loader and configuration. It needs 4K sectors to be able to write the
configuration using rbcfg

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 7c09fa4a74 ar71xx: fix mikrotik routerboard nand driver issues with linux 4.9
The mtd device is now embedded inside the nand chip data structure

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 65da6f9ca1 ar71xx: fix secondary gpio controller base values
In 4.9, gpio count is rounded up to 32 due to the use of bgpio in the
ath79 gpio controller driver.
Fix base values in mach files to account for that

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Julien Dusser 8d9ff6b6f7 ar71xx: lzma loader use LTO
Change the Makefile to use LTO for better code optimisations. Gains are
very low, only 270 bytes saved, but it's only Makefile changes.

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
7 years ago
Julien Dusser 8c5702f2a0 ar71xx: fix lzma loader performance issues
Some bootloaders set a cache cohenrency to a very slow mode. Use code from
Linux kernel to set it to "Cacheable, noncoherent, write-back, write
allocate".

Perfomance impact is significant on TP-Link EAP245 board, kernel
decompression time fall from 33 seconds to less than 1.

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
7 years ago
Florian Larysch 7ea6261b43 config: set ARCH if powerpc64 is selected in the configuration
Signed-off-by: Florian Larysch <fl@n621.de>
7 years ago
Florian Fainelli 7f0a32e21c bcm53xx: Fix SmartRG SR400AC initramfs image
The SmartRG SR400AC CFE does not accept a TRX image, just a normal
binary image.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Stijn Tintel 834810617e kernel: bump 4.9 to 4.9.58
Refresh patches.
Compile-tested: ar71xx, octeon, x86/64.
Runtime-tested: octeon, x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Stijn Tintel a48e5bea12 brcm2708: restore /boot/config.txt before reboot
The Raspberry Pi bootloader reads configuration values from config.txt
in the boot partition. This file allows to specify the amount of memory
to assign to the GPU, the license keys for hardware MPEG-2 and VC-1
decoding, Device Tree parameters and overlays, and lots of other things.

Since sysupgrade only restores the configuration after booting the newly
flashed image, these values will not be active, even if sysupgrade would
save /boot/config.txt. To solve this, add the file to the files to be
backed up, and restore it in platform_copy_config, before reboot.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Hauke Mehrtens f7a6fd3153 ar71xx: deactivate some boards with too small kernel partitions
This affects the following boards:
 * dr344
 * archer-c58-v1
 * archer-c60-v1
 * tl-wr902ac-v1
 * tl-wr942n-v1
 * ubnt-uap-pro
 * ubnt-unifi-outdoor-plus

The build fails for any of these boards because the resulting kernel
image will not fit into the kernel partition.

When CONFIG_KERNEL_KALLSYMS  is not set it could be that the kernel will
fit onto the board again, this is the case for release images.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens c84b7eaedd ar71xx: use kernel 4.9 by default
Kernel 4.9 support was added about 2 weeks ago and we haven't seen any
major regression so far. This patch was not ported to kernel 4.9, this
needs some additional work:
821-serial-core-add-support-for-boot-console-with-arbitr.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 8464d2f64a at91: remove unused at91part driver
There is no patch in the kernel 4.4 and 4.9 patches which adds this
driver to the build system.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 95627665cb at91: update to kernel 4.9
This brings the at91 target to kernel 4.9.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Ben Whitten <ben.whitten@gmail.com>
7 years ago
Hauke Mehrtens f73ed33be1 kernel: add config option
When the kmod-at91-adc package is activated for the at91 target the new
option CONFIG_AT91_SAMA5D2_ADC is selectable and not handled. Add this
option to the kernel 4.9 configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Felix Fietkau 9887afb1af ar71xx: add support for TP-LINK Archer C7 v4
TP-Link Archer C7 v4 is a dual-band AC1750 router, based on Qualcomm/Atheros
QCA9561+QCA9888.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 3T3R 5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 7x LED, 2x button
- UART header on PCB

Flash instruction:
1. Upload lede-ar71xx-generic-archer-c7-v4-squashfs-factory.bin via Web interface

Flash instruction using TFTP recovery:
1. Set PC to fixed ip address 192.168.0.66
2. Download lede-ar71xx-generic-archer-c7-v4-squashfs-factory.bin
and rename it to ArcherC7v4_tp_recovery.bin
3. Start a tftp server with the file tp_recovery.bin in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

Flash instruction under U-Boot, using UART:

1. tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin
2. erase 0x9f040000 +$filesize
3. cp.b $fileaddr 0x9f040000 $filesize
4. reset

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 2c9aff289e ar71xx: add support for Nokia WI2A-AC200i
Specifications:
 - SoC: Qualcomm QCA9558 (720 MHz)
 - RAM: 256MB
 - Storage: 1MB NOR, 128 MB NAND flash
 - Ethernet: 1x1000M

Installation:
 1. Connect to serial console on the board
 2. Boot initramfs image over u-boot
 3. Copy image to the device and run sysupgrade

Installation without serial console is not supported at this time

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Hauke Mehrtens 2af10c30fe brcm47xx: use kernel 4.9 by default
Kernel 4.9 is now working on the brcm47xx boards, we just recently fixed
the problem that some boards did not boot at all, by changing the memory
regions used to relocate the kernel to in the loader.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Felix Fietkau 7c42f15c24 kernel: fix ftrace support on 4.9
When porting the kernel patches from 4.4 to 4.9, they were missing a
small chunk that ensures that ftrace sections are kept in the vmlinux
image, even when linked with --gc-sections

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Mathias Kresin 36d2884d55 lantiq: ARV752DPW22: fix wireless mac address
The ARV752DPW22 has the same generic mac address in the EEPROM as it
was already noticed for other lantiq boards using a ralink wireless.

Use the base mac address from the boardconfig partition as it is done
by the stock firmware.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin a02a866519 lantiq: ARV752DPW22: set correct wireless led trigger
The ARV752DPW22 has a ralink based wireless and can not use the ath9k
only phy0tpt trigger.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Hauke Mehrtens 48dcd2657f omap: clean up configuration
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Hauke Mehrtens 44b9175d7c omap: Add support for kernel 4.9
This adds support for kernel 4.9 and replaces the kernel 4.4 support.

These are lynxis test results:
panda-board a3 - works, but no network, but master/4.4 doesn't have network either.
panda-board-a4 - u-boot SPL refuse to boot.
beaglebone-black - works
beagle-board - usb attached network doesn't come up and I doesn't have a serial around.
beagle-board-xm - ToDo: image code is missing.

Kernel 4.4 does not look better, so we merge this anyway.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Kevin Darbyshire-Bryant 886d66abcd kernel: bump 4.9 to 4.9.57
Refresh patches.
Compile-tested for ar71xx - Archer C7 v2
Runtime-tested on  ar71xx - Archer C7 v2

Fixes the following CVEs:

- CVE-2017-7518
- CVE-2017-0786
- CVE-2017-1000255
- CVE-2017-12188
- CVE-2017-15265

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
7 years ago
Felix Fietkau 3db529d5cc Revert "ar71xx: Add GRO support to ag71xx"
This reverts commit 13e5e47369.
This commit causes a severe regression in LAN->WAN routing performance
for several devices. This appears to be caused by the extra requirement
to validate the SKB checksum early in the rx path, which the ethernet
hardware does not do

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Hauke Mehrtens 61048c9011 at91: fix legacy build
The build system took the DTB_SIZE definition from Default and not from
production-dtb under some conditions. Move the size definitions to
Default now as it is only used in production-dtb anyway.

Thanks Mathias Kresin for helping me with this.

Fixes: c2f052acae ("at91: convert boards to generic build target")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Felix Fietkau fe3c3aed44 ramips: fix typo in MT7621 NAND driver
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Hauke Mehrtens 0d5c1d7f23 malta: activate some more standard kernel features
These options where deactivated in the malta kernel, take the default
options form the generic kernel configuration now to better match the
other targets.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 19f0c7d11c malta: upgrade to kernel 4.9
This brings the MIPS malta target to kernel 4.9.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 8fa9b2ce89 malta: add 64 bit qemu commands to README
This shows how to boot up the 64 bit images.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Martin Schiller 2dc9c8206b lantiq: xrx200: rename nas0/ptm0 to dsl0
This change makes it possible to configure the wan/dsl ppp interface
settings independantly from the used TC-Layer (ATM/PTM).

Now you can move a device from an ADSL/ATM port to an VDSL/PTM port
without any configuration changes for example.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[use the dsl0 interface name for the default netdev trigger in 01_led,
add ip dependency]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Ryan Mounce 1cd3e9c07c mvebu: clean up ClearFog Base package selection
It is unclear why so many packages are selected for ClearFog Base compared
to its big brother, and there is no reason to not append metadata for Base.

Tidy this up as the only hardware difference between Base/Pro is the
presence of a switch and a different board name / device tree.

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
7 years ago
Ryan Mounce 99cf825b06 mvebu: Fix ClearFog sysupgrade board definitions
Remove redundancy for platform_do_upgrade_clearfog
Fix platform_copy_config_clearfog to reflect -base/-pro split

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
7 years ago
Ryan Mounce 233633873b mvebu: Sort 02_network alphabetically
Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
7 years ago
Ben Whitten f81b353c9f at91: add support for the WB50N module from Laird
This module from Laird includes the following:
  - CPU Atmel SoC SAMA5D31
  - Wifi QCA6004
  - Bluetooth CSR8811
  - RAM 64MB LPDDR
  - FLASH 128MB

The flash is a dual image layout, kernel a/b, rootfs a/b, and a user
partition.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
7 years ago
Ben Whitten 86d037e4a2 at91: add support for the WB45N module from Laird
This module from Laird includes the following:
  - CPU Atmel SoC ARM926EJS
  - Wifi AR6003
  - Bluetooth CSR8510
  - RAM 64MB LPDDR
  - FLASH 128MB

The flash is a dual image layout, kernel a/b, rootfs a/b, and a user
partition.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
7 years ago
Ben Whitten a7c8112a0f at91: separate MKUBIFS opts to defaults in the sub target
Instead of applying global defaults based on selected board, transition
to using a per board setting for UBIFS and UBINIZE.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
7 years ago
Ben Whitten 3b6f9978d3 at91: refresh kernel config, enable UBI block and DMA
The platform generates squashfs images in a UBI block but misses the
kernel module to be able to mount the block.
DMA is also enabled to allow systems which include them in the DTS to
use it.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
7 years ago
Lucian Cristian b4fefe7b6e sunxi: backport support for Allwinner Security System PRNG
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
7 years ago
Robert Marko 443abb8ccd ar71xx: add support for Mikrotik RB750P-PBr2
Specifications:
- SoC: Qualcomm QCA9531 (650MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Ethernet: 5x100M (1 PoE in, 4 PoE out)
- Outdoor use ready

This ethernet router is based on the same platform as the hEX PoE lite.

Installation

1. login to the Mikrotik WebUI to backup your licence keys
2. setup a DHCP/BOOTP Server with:
     * DHCP-Option 66 (TFTP server name) pointing to a local TFTP
       Server within the same subnet of the DHCP range
     * DHCP-Option 67 (Bootfile-Name) matching the initramfs filename
       of the to be booted image
3. connect the port labled internet to your local network
4. keep the reset button pushed down and power on the board

The board should load and start the initramfs image from the TFTP
Server. Login as root/without password to the started LEDE via ssh
listing on IPv4 address 192.168.1.1. Use sysupgrade to install LEDE.

Revert to RouterOS

Use the "rbcfg" package on in LEDE:
  * rbcfg set boot_protocol bootp
  * rbcfg set boot_device ethnand
  * rbcfg apply

Open Netinstall and reboot routerboard. Now netinstall sees routerboard
and you can install RouterOS. If NetInstall gets stuck on Sending offer
just wait for it to timeout and then close and open Netinstall again.

Click on install again.

In order for RouterOS to function properly, you need to restore license
for the device. You can do that by including license in NetInstall

Signed-off-by: Robert Marko <robimarko@gmail.com>
7 years ago
Daniel Kucera 6f008af3f0 ramips: add support for Kimax U25AWF-H1
Kimax U-25AWF-H1 is is a 2,5" HDD Enclosure with Wi-Fi/Eth conection
and battery, based on MediaTek MT7620A.

Patch rewritten from: https://forum.openwrt.org/viewtopic.php?pid=305643

Specification:

- MT7620A CPU
- 64 MB of RAM
- 16 MB of FLASH
- 802.11bgn WiFi
- 1x 10/100 Mbps Ethernet
- USB 2.0 Host
- UART for serial console

Flash instruction:
1. Download lede-ramips-mt7620-u25awf-h1-squashfs-sysupgrade.bin
2. Open webinterface a upgrade
3. After boot connect via ethernet to ip 192.168.1.1

Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
[fix reset button gpio, don't add a lan/wan vlan config for single
port board, add -H1 suffix do make sure that this revision of the
board is supported/tested]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Chris Blake f2b7d9dc1c mpc85xx: Add Aerohive HiveAP-330 Access Point
The following adds the Aerohive HiveAP-330 Access Point to LEDE under
the mpc85xx/p1020 subtarget.

Hardware:
- SoC: Freescale P1020NSE2DFB
- NAND: Intel JS28F512M29EWH 64MB
- Memory: 2x ProMOS V59C1G01168QBJ3 128MB (Total of 256MB)
- 2.4GHz WiFi: Atheros AR9390-AL1A
- 5.0GHz WiFi: Atheros AR9390-AL1A
- Eth1: Atheros AR8035-A PoE
- Eth2: Atheros AR8035-A
- TPM: Atmel AT97SC3204
- LED Driver: TI LP5521

Flashing:
1. Hook into UART (9600 baud) and enter U-Boot. You may need to enter a
password of administrator or AhNf?d@ta06 if prompted.
2. Once in U-Boot, tftp boot the initramfs image:
    dhcp;
    tftpboot 0x1000000 192.168.1.101:lede-
mpc85xx-p1020-hiveap-330-initramfs.zImage;
    tftpboot 0x6000000 192.168.1.101:lede-mpc85xx-p1020-hiveap-330.fdt;
    bootm 0x1000000 - 0x6000000;
3. Once booted, scp over the sysupgrade file and sysupgrade the device
to flash LEDE to the NAND.
    sysupgrade /tmp/lede-mpc85xx-p1020-hiveap-330-sysupgrade.img

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
Chris Blake 8cd6686ef8 mpc85xx: Add cmdline override patch
This patch adds a new kernel option called CONFIG_CMDLINE_OVERRIDE. This
setting is for devices with locked down u-boot environments, where users
are unable to change the default bootargs. When set, the fdt driver will
propagate the cmdline for the kernel from chosen/bootargs-override
instead of chosen/bootargs as long as it exists within the DTB.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
Chris Blake a92f73e922 mpc85xx: Enable initramfs for p1020 subtarget
The following patch enables building of initramfs images by default for
the P1020 subtarget in mpc85xx.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
Sandeep Sheriker Mallikarjun 1b368f1641 at91: Add ext4 filesystem
Add ext4 filesystem for creating sdcard image with ext4 rootfs and
removing ext2 as it superset of ext4.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
7 years ago
Sandeep Sheriker Mallikarjun 43a0b72c3c at91: Enable SDHCI for sama5 in default config
Enabled SDHCI for sama5 in kernel default config and this is needed
to mount sdcard rootfs partition during boot.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
7 years ago
Hauke Mehrtens c4f720b19a at91: refresh kernel configuration
This was done by running "make kernel_oldconfig" and
"make kernel_oldconfig CONFIG_TARGET=subtarget"

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Rafał Miłecki 2cd32a3304 kernel: add fix for bgmac with B50212E B1 PHY
This PHY requires some extra programming to work reliably with all
devices. Backport upstream fix for it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Yangbo Lu 67c0c5978d layerscape: only support 64-bit for ls1088ardb/ls2088ardb
This is no requirement and plan to support 32-bit for ls1088ardb
and ls2088ardb. Current 32-bit firmware for them couldn't work,
so only keep 64-bit support for these two boards in menuconfig.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 4f3ddcb0e9 layerscape: fix compile issue for usb ehci-fsl driver
When build firmware for layerscape target with CONFIG_ALL_NONSHARED=y,
there would be a compile issue of usb ehci-fsl driver. Actually this
driver was for PPC platforms initially and was not ready for non-PPC
now, but a kernel kconfig patch removed PPC dependency for it. So that
kernel patch should be reverted.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Hauke Mehrtens 27f23bac8f ar71xx: fix section mismatches
Fix some section mismatches found with kernel 4.9.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago