Commit Graph

18729 Commits (ddd7cdc54bc5663eb5e12dbda85a744c85c5ea97)

Author SHA1 Message Date
Mathias Kresin 8ca650b8ce ramips: move common tplink image build code into own recipe
Move common tplink image build code into own recipe. Include the common
parts instead of including a full build recipe and overwriting former set
varaibles.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Tomasz Maciej Nowak cb2c0649ee kernel: move console loglevel to generic
Move CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 to generic, to make it consistent
across all targets.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
7 years ago
Stijn Tintel efa22b1116 kernel: add missing config symbols for 4.14
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Roger Pueyo Centelles 82626cc145 ar71xx: add support for MikroTik RouterBOARD 921GS-5HPacD r2 (mANTBox 15s)
This patch adds support for the MikroTik RouterBOARD 921GS-5HPacD r2
(mANTBox 15s), an outdoor sector antenna with a built-in 802.11ac
wireless router. Additionally, it adds a new profile for devices with
>= 128 MB NAND flash and 802.11ac to the ar71xx/mikrotik subtarget.

See https://mikrotik.com/product/RB921GS-5HPacD-15S for more info.

Specifications:
 - SoC: Qualcomm Atheros QCA9558 (720 MHz)
 - RAM: 128 MB
 - Storage: 128 MB NAND
 - Wireless: external QCA9822 802.11a/ac 2x2:2
 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE in
 - SFP: 1x host

Working:
 - Board/system detection
 - NAND storage detection
 - Wireless
 - Ethernet
 - 1x user LED
 - Reset button
 - Sysupgrade

Untested:
 - SFP cage (probably not working)

Installation:
 - Boot initramfs image via TFTP and then flash sysupgrade image

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
7 years ago
Roger Pueyo Centelles 9604f7d337 ar71xx: fix spelling in mach-rb922.c
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
7 years ago
Roger Pueyo Centelles 8927446dae ar71xx: fix rb922gs_nand_scan_fixup()
Apply code from commits 9e1bc27e6d
(ar71xx: Fix UBIFS work on Mikrotik RB95x devices) and
665bb27499 (ar71xx: fix invalid pointer
dereference in rb95x_nand_scan_fixup()) to RB92x devices too.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
7 years ago
Christian Lamparter e90dc8d272 apm821xx: convert to device-tree board detection
This patch converts all apm821xx devices to the device-tree
board-detection method. All instances of the legacy
boardnames (mbl,mr24,...) are converted to "vendor,device"
identifier.

The custom board-detection code in apm821xx.sh is removed as
it no longer serves any purpose.

Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter 213ba77359 apm821xx: enable metadata for packaging
This patch enables metadata-supported image verification
for all apm821xx supported devices. Since this method comes
with a built-in image verification tool (fwtool), the previous
image checks can be removed.

Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter e6604fab51 apm821xx: align device names with vendor_device format
Currently, the device name handle does not include the
manufacturer. This can make it hard do differentiate
between products from different vendors that have the
same product name. As the handle is used to derive
the image name.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter 1adeecf0d3 apm821xx: dts: rename devices dts files to include the manufacturer
This patch rename all the DT source files in order to
match upstream's "manufacturer-device.dts" format.

Please note that the DEVICE_DTB isn't changed. This is
because the u-boot of the MyBook Live defines the
fdt_file variable to be "apollo3g/apollo3g.dtb".

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter 70301af915 apm821xx: add product names to the dt compatible for Meraki
Meraki choose to use their product's codename as the main
compatible string. Mathias Kresin commented that this is
a poor choice as this will confuse the users and devs once
the device-tree compatible is used for board-detection and
possible the image name.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter 64b36fee8e apm821xx: dts: append SoC compatible to DTS
This patch appends the "apm,bluestone" or "amcc,apollo3g"
machine compatible string to the current device tree source.

Please note that unlike other archs the PPC DT code does
not regard the machine's compatible string as a priority
list. This is explained in the kernel's usage-model.txt as follows:
"PowerPC uses a slightly different scheme where it calls the .probe()
hook from each machine_desc, and the first one returning TRUE is used.
However, this approach does not take into account the priority of the
compatible list, and probably should be avoided for new architecture
support."

For this reason, the "apm,bluestone" compatible string can't be
added to the WNDR4700. As otherwise the target specific pci
fix-up code will get ignored and this causes the ath9k WIFI
to not get initialized.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter e4a50d115f apm821xx: replace DEVICE_{PROFILE|NAME} with BOARD_NAME
This patch sets the BOARD_NAME variable on each affected
apm821xx device. The existing DEVICE_PROFILE and
DEVICE_NAME assignments are deprecated as they no longer
serve any purpose.

The BOARD_NAME variable is used by the sysupgrade-tar
method to specifiy a directory overwrite for the
sysupgrade-$dir directory in the generated tar file.
Keeping the original boardname in this context will be
necessary for targets that utilize the sysupgrade-tar
method. Otherwise, sysupgrade on an previous installation
will not recognize the newly generated images.

This step is necessary since an upcoming patch realigns
the existing shortname for a device with a proper
"manufacturer_device" identifier.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter f895f1e51a apm821xx: replace whitespace with tabs
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter 7c2106696d apm821xx: explicitly build the rootfs.img.gz target
The commit 87b668765e
("image: when using the new image build code, gzip ext4 images by default")

forced that all targets that select the ext4 as the root filesystem
to always compress the generated rootfs. This is fine, but this method
doesn't not allow to append the metadata on a per-target base.

Therefore this patch changes the rootfs image production rule to generate
the gzip step manually. This way the metadata can be appended at a later
date.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Mathias Kresin 198da20401 ramips: fix devicetree compat strings
"PandoraBox" is not the name of the manufacturer, it's a firmware made by
the manufacturer actually. Their official English name is "D-Team".

PBR-M1 is the only one they use "PandoraBox" as a brand name. Their other
products are using "Newifi" as their trademark (including Y1 and Y1S which
used to be OEM products for Lenovo).

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Jackson Ming Hu c0e131b436 ramips: add support for newifi d2
Previously Newifi D2 could only use PandoraBox M1's firmware.
It works fine, but LED GPIO is different.
As a result, a separated DTS file for this device should be implemented.

Hardware spec:

* CPU: MTK MT7621A
* RAM: 512MB
* ROM: 32MB SPI Flash
* WiFi: MTK MT7603+MT7612
* Button: 2 buttons (reset, wps)
* LED: 3 single-color LEDs (USB, WiFi 2.4GHz, WiFi 5GHz) &
       2 dual-color LEDs (Power, Internet)
* Ethernet: 5 ports, 4 LAN + 1 WAN

Installation method:

Same as Newifi D1, users may need to request unlock code from the device
manufacturer. Otherwise, a SPI flash programmer may be necessary to get
the firmware flashed. After the device is unlocked, press and hold reset
button before power cable plugs in. Then go to http://192.168.1.1 to
upload and flash the firmware package.

Signed-off-by: Jackson Ming Hu <huming2207@gmail.com>
7 years ago
Andrew Crawley fe6f298b07 ramips: add support for Vonets VAR11N-300
The VAR11N-300 is a tiny wireless-N device with a hardwired Ethernet
cable, one extra Ethernet port, and an internal antenna, based on the
MediaTek MT7620n chipset.

Specs:
- MT7620n WiSoC @ 600MHz
- 32 MB SDRAM
- 4 MB SPI flash
- 2T2R 2.4GHz WiFi-N
- 1 attached 10/100 Ethernet cable (LAN)
- 1 10/100 Ethernet port (WAN)
- 1 attached USB / barrel 5vdc power cable
- 5 LEDs (see notes below)
- 1 reset button
- 1 UART (3 pads on board)

Installation:

The stock firmware does not support uploading new firmware directly,
only checking the manufacturer's site for updates.  This process may be
possible to spoof, but the update check uses some kind of homebrew
encryption that I didn't investigate.  Instead, you can install via a
backdoor:

1. Set up a TFTP server to serve the firmware binary
(lede-ramips-mt7620-var11n-300-squashfs-sysupgrade.bin)
2. Factory reset the device by holding the reset button for a few
seconds.
3. Open the web interface (default IP: 192.168.253.254)
4. Log in with the "super admin" credentials: username `vonets`,
password `vonets26642519`.
5. On the "Operative Status" page, click the text "System Uptime", then
quickly click the uptime value.
6. If successful, an alert dialog will appear reading "Ated start", and
the device will now accept telnet connections.  If the alert does not
appear, repeat step 5 until it works (the timing is a bit tricky).
7. Telnet to the device using credentials "admin / admin"
8. Retrieve the firmware binary from the tftp server: `tftp -l lede.bin
-r lede-ramips-mt7620-var11n-300-squashfs-sysupgrade.bin -g
<tftp-server-ip>`
9. Write the firmware to flash: `mtd_write write lede.bin /dev/mtd4`
10. Reboot

Tested:
- LAN / WAN ethernet
- WiFi
- LAN / WAN / status LED GPIOs (see notes below)
- Reset button
- Sysupgrade

Notes:

LEDs:

The board has 5 LEDs - two green LEDs for LAN / WAN activity, one blue
LED for WiFi, and a pair of "status" LEDs connected to the same GPIO
(the blue LED lights when the GPIO is low, and the green when it's
high).  I was unable to determine how to operate the WiFi LED, as it
does not appear to be controlled by a GPIO directly.

Recovery:

The default U-boot installation will only boot from flash due to a
missing environment block.  I generated a valid 4KB env block using
U-boot's `fw_setenv` tool and wrote it to flash at 0x30000 using an
external programmer.  After this, it was possible to enter the U-boot
commandline interface and download a new image via TFTP (`tftpboot
81b00000 <image-filename>`), but while I could boot this image
sucessfully (`bootm`), writing it to flash (`cp.linux`) just corrupted
the flash chip.  The sysupgrade file can be written to flash at 0x50000
using an external programmer.

Signed-off-by: Andrew Crawley <acrawley@gmail.com>
7 years ago
Mathias Kresin ad002c397a ramips: add helper variable for boardname
Add a helper variable which contains the boardname separated from the
vendor name. It allows to switch to a device tree compatible string
based boardname, by keeping the $board:colour:function syntax in
scripts handling/adding config for LEDs.

Boards not using the device tree compatible string as based boardname
are unaffected by the change, since none of them uses a comma in the
boardname.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 6545c71d2c ramips: sync image filename with boardname
Use <manufacturer>_<modelname> as image name for board using the
devicetree compat string as boardname.

Replace the underline of the device define, to keep the SUPPORTED_DEVICES
in sync with a devicetree compat string based boardname.

Override the default SUPPORTED_DEVICES for board which are having an
userspace boardname with an underline.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 7d3ec5f833 ramips: fallback to generic board detect
Fallback to the generic board detection if no case for the current
board exists.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 224d4a96dd ramips: drop LinkIt Smart 7688 Duo userspace support
The  LinkIt Smart 7688/LinkIt Smart 7688 Duo are identical beside the
extra ATmega32U4 - accessible via UART - on the the Duo.

Since all relevant hardware is identical, drop the Duo special handling
in userspace.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Hauke Mehrtens f704b643b9 kernel: Update kernel 4.9 to 4.9.70
Runtime tested on lantiq.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Mathias Kresin 95fe3c51e5 ramips: fix polarity in gpio-export node
If we need to set the initial output value to GPIOF_OUT_INIT_HIGH (1) to
enable something, the pin is ACTIVE_HIGH. The same applies to
GPIOF_OUT_INIT_LOW (0) and ACTIVE_LOW.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Marty E. Plummer 7c03f97e84 ar71xx: fix lan ports on ens202ext
In the stock firmware both eth0 and eth1 are set to br-lan,
add this behavior to our images.

Fixes: FS#1084

Signed-off-by: Marty E. Plummer <hanetzer@protonmail.com>
7 years ago
Jonas Gorski 60a39e8f5a brcm63xx: fix Sercomm AD1018 status led
The status led part was missed when changing the board name to *-nor.

Fixes: e12c72bb52 ("brcm63xx: Add Sercomm AD1018 support")
Reported-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Mathias Kresin 4a4d957d1a lantiq: sync image filename with boardname
Use <manufacturer>_<modelname> as image name.

Use the BOARD_NAME variable to ensure that the former used boardname is
still used as the subdirectory name for the sysupgrade-tar image, to
not break sysupgrade from earlier versions.

While at it, normalise the image filenames by using only lower case
characters and bin as file extension for sysupgrade images.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 58c6ad53a8 lantiq: drop unused variable from image build code
Remove the DEVICE_PROFILE variable. The variable isn't
used at all.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 7f68bd8119 lantiq: use the generic board detect
Drop the target specific detection function in favour of the generic
one provided by base-files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin ed72540c10 lantiq: add missing model names
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 26dc65b126 lantiq: remove the former board name from device tree model
Remove the former used board name from the device model property and
use the model name as it is.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 63d7f7fc92 lantiq: use the compatible string as board name
Use the first compatible string as board name in userspace. Add the new
board name as well as the former used board name to the image metadata
to keep compatibilty with already deployed installations.

Don't add the former used boardname for boards which exists only in
master or evaluation boards.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin aba421432f lantiq: drop SoC name from eval boards compatible string
Keep it in the same format as used for the other eval boards.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 7bab49fd7a lantiq: add compatible strings to dts files
The compatible string is mandetory for devicetree source file.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Hauke Mehrtens 481e1f23f5 x86: Add support for kernel 4.14
This adds basic support for kernel 4.14, this was tested in qemu only.
The subtarget configuration was refresh with kernel 4.14 and the
options needed to make it compile on kernel 4.9 were added manually.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 199273324e kernel: add kmod-crypto-ecdh
In kernel 4.14 kmod-bluetooth depends on kmod-crypto-ecdh, add
kmod-crypto-ecdh to LEDE.
Both packages also depend on the kmod-crypto-kpp package. To build this
we have to fix the dependency of CRYPTO_ECDH which has a typo.
This patch is already accepted upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens b3f95490b9 kernel: generic: Add kernel 4.14 support
This adds initial support for kernel 4.14 based on the patches for
kernel 4.9.

In the configuration I deactivated some of the new possible security
features like:
CONFIG_REFCOUNT_FULL
CONFIG_SLAB_FREELIST_HARDENED
CONFIG_SOFTLOCKUP_DETECTOR
CONFIG_WARN_ALL_UNSEEDED_RANDOM

And these overlay FS options are also deactivated:
CONFIG_OVERLAY_FS_INDEX
CONFIG_OVERLAY_FS_REDIRECT_DIR

I activated this:
CONFIG_FORTIFY_SOURCE
CONFIG_POSIX_TIMERS
CONFIG_SLAB_MERGE_DEFAULT
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED

I am not sure if I did the porting correct for the following patches:
target/linux/generic/backport-4.14/020-backport_netfilter_rtcache.patch
target/linux/generic/hack-4.14/220-gc_sections.patch
target/linux/generic/hack-4.14/321-powerpc_crtsavres_prereq.patch
target/linux/generic/pending-4.14/305-mips_module_reloc.patch
target/linux/generic/pending-4.14/611-netfilter_match_bypass_default_table.patch
target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens a362df6f25 x86: refresh configuration
Just refresh the kernel configuration, some options are removed because
they are now in the generic kernel configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 0402c48cba kernel: generic: add some more 4.9 configure options
These are taken from the x86 target and should make support kernel 4.9
and 4.14 in the x86 target easier.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Philip Prindeville f96085b35d x86: add on-chip thermal sensors and cpuid support
Cover temperature sensors for all mainstream 64-bit processors, including
AMD 10h and 15h families, Intel iCore, Xeon, Atom, and Via Nano.  Also
add CPUID support for user-space applications to detect CPU type.

Include the on-chip sensors for 64-bit CPU's in the generic profile
in case someone builds a 32-bit kernel to run on a Xeon SoC, etc.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
7 years ago
Philip Prindeville 9868eba5a0 x86: refresh settings for 4.9.59
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
7 years ago
Jonas Gorski 054c0d4e31 brcm63xx: backport mdio-bus reset gpio support
Backport the mdio-bus reset gpio support from 4.12 and use it instead
of toggling the reset ourself.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 49c3b1c455 brcm63xx: backport enet cleanup patches
Align with upstream version, mostly non-fixes and small clean ups.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski aba4e29ead brcm63xx: register serial through device tree
Register serial consoles through device tree instead of through board
data.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski a3384088a2 brcm63xx: add uart nodes
Now that we can register uarts through device-tree, add them to the dtsi
files.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 5c69047aaf brcm63xx: add clkdev lookup support
Add clockdev lookup support for easier providing of clocks for
devices.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas e12c72bb52 brcm63xx: Add Sercomm AD1018 support
Add support for the Sercomm AD1018 router

This a BCM6328 based board, 128 MB RAM, 128 MiB NAND flash,
with an onboard BCM43217 wifi, 4 ethernet ports and 1 USB
host port (not soldered). The board also has an FXS chip (Si32177)
connected via SPI (SS2#), without support in LEDE.

Since NAND flash chips aren't still supported in brcm63xx, the
support is for now added to work only with SPI flash chips. Therefore
hardware modding, soldering a new SPI flash chip, is required
to make the board work with LEDE (tested and working OK).
The flash at dts is intentionally left without partitioning to let
the user choose a NOR chip of any size (8, 16 or 32 MB).

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
[jonas.gorski: renamed ad1018 to ad1018-nor to signify the modification]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Sandeep Sheriker Mallikarjun 085967f774 at91: create sdcard image for sama5
create sdcard image using gen_at91_sdcard_img.sh for sama5 platform
and sdcard image partition layout is:
  P0: Boot (fat32) - contains(at91bootstrap,u-boot,zImage & dtb)
  p1: Rootfs (ext4)

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
7 years ago
Gabor Juhos 665bb27499 ar71xx: fix invalid pointer dereference in rb95x_nand_scan_fixup()
Since Linux 4.6, mtd->priv no longer points to the NAND specific
structure. Under 4.9 it contains NULL, thus using it to access
chip->options causes an invalid pointer dereference (FS#1200).

Update the code to use the mtd_to_nand() helper under 4.9 to obtain
the address of the chip specific data.

Fixes: 7bbf4117c6 ("ar71xx: Add kernel 4.9 support")
Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos 2ecc413107 ar71xx: fix invalid pointer dereference in c60_nand_scan_fixup()
Since Linux 4.6, mtd->priv no longer points to the NAND specific
structure. Under 4.9 it contains NULL, thus using it to access
the fields of the nand_chip structure causes an invalid pointer
dereference.

Update the code to use the mtd_to_nand() helper under 4.9 to obtain
the address of the chip specific data.

Compile tested only.

Fixes: 7bbf4117c6 ("ar71xx: Add kernel 4.9 support")
Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
Tested-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Gabor Juhos c13b4ef2c8 kernel: fix compiler warning in mtdsplit_minor.c under 4.4
When mtdsplit_minor.c is compiled under Linux 4.4, the compiler
drops the following warning:

    CC      drivers/mtd/mtdsplit/mtdsplit_minor.o
  drivers/mtd/mtdsplit/mtdsplit_minor.c:106:14: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
    .parse_fn = mtdsplit_parse_minor,
                ^
  drivers/mtd/mtdsplit/mtdsplit_minor.c:106:14: note: (near initialization for 'mtdsplit_minor_parser.parse_fn')

The second parameter of the parser function must not have a 'const'
qualifier in 4.4. The 001-mtdsplit_backport.patch removes the qualifier
from other partition parsers. Update it to handle mtdsplit_minor.c as
well.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
kyson Lok e776b6ed0b ar71xx: fix LED name typo for GL-AR300M
It shouldn't use double colon characters.

Signed-off-by: kyson Lok <kysonlok@gmail.com>
7 years ago
John Crispin 9f8d28285d Revert "ar71xx: TL-WR1043N v4/v5: add orange WAN LED support"
This reverts commit 256990cbc0.

this commit caused a compile error

"TL_WR1043_V5_GPIO_LED_WANORANGE" is undefined.

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Tim Thorpe 256990cbc0 ar71xx: TL-WR1043N v4/v5: add orange WAN LED support
Add missing definitions for the orange WAN LED on the TL-WR1043N(D) v4 and
v5. Minor format correction on a constant for consistency.

Signed-off-by: Tim Thorpe <tim@tfthorpe.net>
7 years ago
Henryk Heisig 85c1644a86 ar71xx: generate BR region-code factory image for TP-Link TL-WR940N
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years ago
João Chaínho 4d8a8c80d9 ar71xx: Fix switch port numbering on MIkrotik RB951Ui-2nD and RB493G
This patch fixes the switch port numbering on Mikrotik RB951Ui-2nD (hAP).
Also fixes the switch port numbering shown on LuCI for Mikrotik RB493G.

Signed-off-by: João Chaínho <joaochainho@gmail.com>
7 years ago
Christian Lamparter cb02a376b3 apm821xx: use x86's upgrade scripts for MyBook Live
Advantages:
 - preserves existing partition layout. On the hard-drive.
   Only the boot and rootfs partition will be overwritten.

Disadvantages:
 - The upgrade process takes much longer to run.
   from 2-3 seconds to 15-25 seconds.

Please note that sysupgrade will refuse to upgrade, if the existing
installation has an incompatible partition layout. Future changes
to the bootfs and/or rootfs partition size will likely cause breakage
to the sysupgrade procedure. In these cases, the ext4-rootfs.img.gz
has to be written manually onto the disk. Please don't forget to backup
your configuration in this cases.

Note2: This patch requires
"base-files: upgrade: make get_partitions() endian agnostic"

Note3: If your current installation does not host the two
changes, sysupgrading will wipe the existing partition
layout. Don't forget to backup your data!

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter 0cad9f09be apm821xx: MyBook Live convert to DT PHY
Changes MyBook Live to use DT PHY probing and the broadcom phy driver.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter 6ad56fb34c apm821xx: convert to dt based diag LED script
Please note that users with a Netgear WNDR4700
will need to update the device-tree partition
manually.

For instructions, please refere to commit 49856a4bb5
("apm821xx: make it possible to update the dtb partition on the WNDR4700")

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter da6fdce365 base-files: unify get_dt_led helper function
Lantiq and IPQ806X (which includes IPQ40XX) both define the
same custom function {ipq806x|lantiq}_get_dt_led.

This patch moves the function into the base-file package at
lib/functions/leds.sh to make it more accessible for other
targets as well.

Cc: Mathias Kresin <dev@kresin.me>
Cc: John Crispin <john@phrozen.org>
Cc: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Jonas Gorski a8d3d517d0 brcm63xx: fix an OOPS when accessing the basemode register on 6368
The bcm6368 pinctrl driver passed the wrong variable to
devm_regmap_field_alloc, causing it to blow up when later trying to
access the field.

Fixes #1211.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski eeeee885fb ar71xx: fix lzma-loader build with glibc
For an unknown reason gcc tries to link in crti.o when building with a
glibc toolchain (this does not happen with other targets). Prevent this
by telling gcc explicitly to not do that.

Fixes the following build error:

/home/jonas/git/lede/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/lib/gcc/mips-openwrt-linux-gnu/5.5.0/../../../../mips-openwrt-linux-gnu/lib/crti.o: In function `_init':
(.init+0x18): relocation truncated to fit: R_MIPS_GOT16 against `__gmon_start__'
/home/jonas/git/lede/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/lib/gcc/mips-openwrt-linux-gnu/5.5.0/../../../../mips-openwrt-linux-gnu/lib/crti.o: In function `_init':
(.init+0x28): relocation truncated to fit: R_MIPS_CALL16 against `__gmon_start__'
collect2: error: ld returned 1 exit status

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Luis Araneda 575178e462 treewide: add only one device when appending to TARGET_DEVICES
This will avoid some conflicts when doing a git rebase or merge,
specially when adding support to a new device.

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
[drop brcm47xx changes which rename the images]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Gabor Juhos e7b48fcfe1 ar71xx: fix board detection with newer RouterBOOT versions
Recent RouterBOOT version (at least version 3.41 on RB911G-5HPacD)
use "Board=" kernel parameter instead of "board=" to pass the board
name to the kernel. Due to this change the board detection code is
not working on the devices shipped with the new RouterBOOT version.
Because the kernel is unable to identify these boards they become
unusable despite that they are supported by the current code.

Update the prom_init code to convert the 'Board' kernel parameter to
'board'. After this change, the board detection works also with the
new RouterBOOT versions.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Moritz Warning b8220883fd brcm47xx: remove versions from linksys-e1000 target
The target name does not need to included a revision
if all revisions are supported.
This target supports all revisions (v1, v2, v2.1).

Signed-off-by: Moritz Warning <moritzwarning@web.de>
[Keep the version numbers in the device title, it doesn't harm]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Moritz Warning ac3d7d3569 brcm47xx: use proper region code in image name
Replace 'north-america' by 'na' and remove 'other-regions' in image
files for Netgear WGR614 v10.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
7 years ago
Mathias Kresin ab6620e817 lantiq: dgn3500 drop worldwide suffix
Remove the WW suffix, everything without a region suffix is world wide
anyway.

While at it, normalise the image filenames by using only lower case
characters.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 0c7ad4e5d3 lantiq: nand: drop ubifs images
Users are confused which image type they should use and there are more
drawbacks than adavantages in using a r/w ubifs rootfs in constrast to
a read-only squashfs rootfs like:

 - less available free flash space due to better compression of squashfs
   images
 - no support for factory reset due to r/w filesystem
 - possibility to break failsafe due to r/w filesystem

Therefore, drop support for r/w ubifs rootfs images.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Pavel Kubelun 69d22a6bf6 ramips: fix a typo in 02_network
The typo in network defaults script in ramips target that prevents
defaults to initialize.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years ago
Mathias Kresin 0b8a1e75df ar71xx: remove nand_board_name platform override
The boardname isn't used any longer to find the subdirectory in the
sysupgrade tar archive, which makes this override useless.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Felix Fietkau 668eb70157 kernel: MIPS compile out no-op DMA mapping ops where possible
Slightly improves networking throughput on some devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Rosen Penev 1c2fdfbaf2 ag71xx: Reduce NAPI weight to 32.
Qualcomm claims this reduces cache misses. Original commit message below:

From: Ben Menchaca <ben.menchaca@qca.qualcomm.com>
Date: Tue, 11 Jun 2013 12:18:46 -0500
Subject: [ag71xx] reduce NAPI weight

In an attempt to increase our cache warmth, we are decreasing NAPI.
This increases the warmth of the reused SKBs.

Signed-off-by: Ben Menchaca <ben.menchaca@qca.qualcomm.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Rosen Penev 524d103e7e Revert "ag71xx: Switch from driver to kernel macro for NAPI_WEIGHT."
The motivation for this was misguided. It turns out tuning the NAPI weight could be useful for testing purposes. Therefore reverting.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Zoltan HERPAI d2c06eb075 merge: etc: update remaining files
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
Zoltan HERPAI 1f8585cf99 merge: ssid: update default ssid
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
Zoltan HERPAI 7b5c989ab9 merge: targets: update image generation and targets
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
David Bauer 5a8e9846af
ar71xx: C58/C59 fix LAN1 working incorrectly
This commit fixes LAN Port 1 not transferring data in case no
other LAN Port has active link-state on TP-Link Archer C58/C59.

Signed-off-by: David Bauer <mail@david-bauer.net>
7 years ago
Stijn Tintel f997478655 kernel: bump 4.9 to 4.9.67
Refresh patches.
Remove upstreamed patches:
- generic/190-1-5-e1000e-Fix-error-path-in-link-detection.patch
- generic/190-3-5-e1000e-Fix-return-value-test.patch
- generic/190-4-5-e1000e-Separate-signaling-for-link-check-link-up.patch
- generic/190-5-5-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch
- ramips/0102-MIPS-ralink-Fix-MT7628-pinmux.patch
- ramips/0103-MIPS-ralink-Fix-typo-in-mt7628-pinmux-function
Update patches that no longer apply:
- layerscape/815-spi-support-layerscape.patch
- ramips/0099-pci-mt7620.patch

Compile-tested on ar71xx, brcm2708/bcm2708, octeon and x86/64.
Runtime-tested on ar71xx, brcm2708/bcm2708, octeon and x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Zoltan HERPAI 58e0673900 ramips: add support for Asus RT-N11P / RT-N12+ / RT-N12E b1
This is a variant of the MT7620N-based Asus routers.

Specifications:

- MT7620N (580 MHz)
- 32 MB RAM
- 8 MB Flash
- 5x 10/100Mbps Ethernet (built-in switch)
- 2.4 GHz WLAN
- 2x external, non-detachable antennas
- UART (J2) header on PCB (115200 8n1)

Flash instructions:

1. Configure PC with static IP 192.168.1.75/24
2. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds. All 4 LEDs will
   start to blink, which is when the router will accept firmware files via TFTP.
   No known limitations on firmware filenames, just send it with a TFTP client
   to 192.168.1.1.
3. Router will download file from server, write it to flash and reboot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
Rafał Miłecki deaf9597c6 sdk: restrict base feed repo to public git for CONFIG_BUILDBOT only
This allows people to build SDK from custom repository (git access using
ssh) and keep original URL in SDK's feeds.conf.default.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
INAGAKI Hiroshi 18cc8d520c ramips: add missing reset button for Nexx WT1520
This commit adds missing the GPIO key used as reset button.
Nexx WT1520 has a GPIO key for factory reset, but it's not defined in
WT1520.dtsi and cannot use it.

Drop the UART (full) from the device tree source file, it was never
used for this board. Adjust the kernel bootargs accordingly.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[add note about dropped UART (full) to the commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Rosen Penev 7a318bc1a1 kernel: Update kernel 4.4 to 4.4.100
Run-tested on ramips

Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Stijn Tintel 9fe59abef8 kernel: bump 4.9 to 4.9.65
Refresh patches.
Compile-tested: ar71xx, octeon, x86/64.
Runtime-tested: ar71xx, octeon, x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Hauke Mehrtens b5d52b2052 sunxi: remove support for kernel 4.4
Kernel 4.9 is working good on this target, remove support for kernel 4.4
now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens c048ca0ce0 sunxi: backport sunxi-mmc controller driver from 4.13
There are multiple problems on the A64 SoC with the older drivers which
are fixed in the upstream kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Lucian Cristian 9f13f98c8c kernel: Hyper-V PCI pass through
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
7 years ago
Lucian Cristian 551de61ddc kernel: add 32bit x86 HYPER-V support
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
[refresh config]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Koen Vandeputte 62ede4f783 kernel: bump 4.9 to 4.9.63
Refreshed all patches.

Removed upstreamed parts.

Compile-tested: cns3xxx, imx6, mvebu, layerscape
Run-tested: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years ago
Mathias Kresin aa82141d9b ramips: use pinmux nodes from dtsi
Use the pinmux nodes from the included dtsi file instead of adding
duplicate nodes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin b69ceb0c3d ramips: add missing pinmuxes to SoC dtsi
Add pinmuxes defined by some board which are including the dtsi files
to the dtsi files itself. Allows to reduce duplication.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin e142173e8d ramips: backport MT7628 pinmux fixes
According to the datasheet the REFCLK pin is shared with GPIO#37 and
the PERST pin is shared with GPIO#36.

While at it fix a typo inside the pinmux setup code. The function is called
refclk and not reclk.

Update device tree source files accordingly.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 2f9fe78e75 ramips: fix Planex CS-QR10 device packages
Add kmod-sound-core, it is a dependency of kmod-sound-mt7620 and will
not be autoselected.

Remove kmod-i2c-core, it will be autoselected by kmod-i2c-ralink.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin a783185e28 ramips: fix DCH-M225 support
Setting the pins of the UARTF group to GPIO+I2S at the time the I2C
driver loads is to late for the wps GPIO button.

The gpio-keys driver fails to load since the pin used by the wps button
is not yet set to GPIO. The wps button with the rfkill keycode is
essential for this wireless only board.

Add the missing sound and I2C kernel modules corresponding to the
device nodes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Ted Hess 358df5e4fc ixp4xx: Update to 4.9 kernel, refresh patches. Remove kmod-spi-gpio-old usage.
Signed-off-by: Ted Hess <thess@kitschensync.net>
7 years ago
Rafał Miłecki 370ce1fb48 bcm53xx: use otrx for creating TRX images
The advantage is that we don't have to specify max TRX size anymore and
otrx doesn't allocate a buffer of that size. It saves us allocating
32 MiB for every image we generate.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rosen Penev 146326c454 kernel: Enable fadvise on older kernels.
Backport of 56342ee2bc for older kernels.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Luis Araneda b31c1237c7 sunxi: add support for NanoPi M1 Plus board
Backported devicetree from Kernel 4.13 with some additions
to enable Ethernet and WiFi module

The following features are working:
- Ethernet
- WiFi
- eMMC and microSD slot
- USB ports

The following features are not working:
* Bluetooth

NanoPi M1 Plus key features
- SoC: Allwinner H3, Quad-core Cortex-A7@1.2GHz
- RAM: 1GB DDR3
- eMMC: 8GB
- microSD slot
- Ethernet 10/100/1000M
- Wifi: AP6212

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
7 years ago
Luis Araneda ef1483b8fe sunxi: base files: add AP6212 (brcm43430) NVRAM
Used by the NanoPi M1 Plus board

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
7 years ago
Roman Yeryomin 8bb33f3c98 ipq806x: ipq4019: enable usb phy
Run tested on ap-dk01.2-c1

Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
Antony Black d44a6307c9 brcm47xx: fix switch port mapping on D-Link DIR-330
D-Link DIR-330 is clone of ASUS WL500GP2, by default conf the WAN port is
eth1, it's not working cus eth1 not soldered and wan port function
performs 5th port of the switch.

Signed-off-by: Antony Black <gtrtfm@gmail.com>
7 years ago
Felix Fietkau 00a8f349f7 kernel: backport a patch that allows drivers to tweak the TSQ logic
Currently local TCP performance on wifi devices can be limited because
the TSQ (TCP Small Queues) code is tuned for wired ethernet latencies.

With this patch drivers can increase the amount of local buffering to
allow TCP to trigger larger aggregation sizes

This commit is modified from the upstream version to allow #ifdef based
backport feature detection

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9996480b0e ramips: add support for ZBT WE3526
This is a variant of the ZBT WG3526 with a few minor modifications.
The wifi chips are swapped, and there is no GPIO controllable status
LED. There is also no SATA port.

Specifications:

- MT7621AT (880 MHz)
- 512 MB RAM
- 16 MB Flash (SPI NOR)
- 5x 1Gbps Ethernet (built-in switch)
- MT7612E 802.11ac 5 GHz WLAN
- MT7603E 802.11n 2.4 GHz WLAN

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 3eb839b579 ramips: extract board name from device tree as a fallback
This makes it possible to avoid more duplication when adding support for
a new board

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Koen Vandeputte 0d5e024e09 cns3xxx: refresh kernel config
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years ago
Felix Fietkau 31691f9649 mvebu: backport a kernel irq fix for setting IRQ affinity
The IRQ controller can only set the affinity to a single CPU. Update the
mask in the controller data.

Suggested-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Paul Wassi e3c55dbe30 ar71xx: merge mach-files for TP-Link TL-WR802N v1 and v2
TP-Link TL-WR802N v1 and v2 are set up with almost same configuration in
the mach-files. Merge the mach-files of these devices.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years ago
Tim Thorpe 673793d753 ar71xx: add support for TP-Link TL-WR1043N v5
TP-Link TL-WR1043N v5 appears to be identical to the TL-WR1043ND v4,
except that the USB port has been removed and there is no longer a
removable antenna option.

The software is more in line with the Archer series in that it uses a
nested bootloader scheme.

Specifications:

 - QCA9563 at 775 MHz
 - 64 MB RAM
 - 16 MB flash
 - 3 (non-detachable) Antennas / 450 Mbit
 - 1x/4x WAN/LAN Gbps Ethernet (QCA8337)
 - reset and Wi-Fi buttons

Signed-off-by: Tim Thorpe <tim@tfthorpe.net>
Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
7 years ago
Paul Wassi e202a8b9f6 ar71xx: add support for TP-Link TL-WA901ND v5
The TL-WA901ND v5 has the same hardware as v4, although the PCB has
a different layout. Installation from factory is done via TFTP.
(rename -factory image to wa901ndv4_tp_recovery.bin for tftp)

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years ago
Robert Marko ac4a52b5c8 ar71xx: complete support for RB mAP 2nD
This patch adds support for the MikroTik RouterBOARD mAP 2nD
https://mikrotik.com/product/RBmAP2nD

Specifications:

- SoC: Qualcomm QCA9531 (650 MHz)
- RAM: 64 MB
- Storage: 16 MB NOR SPI flash
- Wireless: builtin QCA9531, 2x2:2
- Ethernet: 2x100M (802.3af/at POE in and passive POE out on ETH2)
- USB: microUSB type AB port

This patch adds missing code to fully support mAP. Machfile already
contained configuration for mAP 2nD, but device specific configuration
like LEDs etc., was missing.

Note: The POE LED works but doesn't turn on when POE passthrough is
enabled, despite being configured with GPIO trigger.

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 labeled 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
Paul Wassi d7adaceda3 ar71xx: fix network setup for UniFi
The Ubiquiti UniFi APs just have eth0. Until now, the setup script fell
through to the default case and configured the (not present) eth1 as
WAN with DHCP.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years ago
Robert Marko 3b15eb06c3 ar71xx: complete support for RB wAP 2nD
This patch adds support for the MikroTik RouterBOARD wAP
https://mikrotik.com/product/RBwAP2nD

Specifications:

- SoC: Qualcomm QCA9533 (650 MHz)
- RAM: 64 MB
- Storage: 16 MB NOR SPI flash
- Wireless: built-in QCA9533, 2x2:2
- Ethernet: 1x100M (802.3af/at POE in)

This patch adds missing code to fully support wAP. Machfile already
contained configuration for wAP 2nD but device specific configuration
like LEDs etc. was missing.

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 labeled 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
Paul Wassi b23b0fb28b ar71xx: add support for TP-Link TL-WR810N v2
TP-Link TL-WR810N v2 is a compact Wi-Fi router with two Ethernet ports.

Specification:

- QCA9533 (650 MHz)
- 32 MB RAM
- 8 MB Flash
- 300 Mbps Wi-Fi 2.4 GHz
- 2x 10/100 Mbps Ethernet (eth0, eth1)
- UART on testpads on PCB
- 1x LED (GPIO-controlled)
- 1x reset/WPS button
- 1x slide-switch with 2 GPIO inputs

Flash instructions:

- Flash as regular firmware update in Web UI
- Default: 192.168.0.254 / admin / admin
- Select *-factory.bin

When holding reset button during power-up, U-Boot requests a file
'wr810nv1_tp_recovery.bin' from TFTP server at 192.168.0.66

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years ago
Piotr Dymacz c83bdd094e ar71xx: add support for Wallys DR342
Wallys DR342 is a 5 GHz, 2T2R AP/CPE board based on Atheros AR9342.

Short specification:

- 560/450/225 MHz (CPU/DDR/AHB)
- 1x Gbps Ethernet (AR8035) with passive PoE support (24-56 V)
- 64 MB of RAM (DDR2)
- 16 MB of FLASH
- 2T2R 5 GHz with external FEM (SKY85728-11), up to 30 dBm
- 2x MMCX connectors
- miniPCIe connector with PCIe and USB 2.0 buses
- optional miniSIM slot
- 7x LED, 1x button
- UART, (E)JTAG and LED headers
- 1x DC jack for main power (12-56 V)

Flash instruction (do it under U-Boot, using UART):

1. tftp 0x82000000 lede-ar71xx-generic-dr342-squashfs-sysupgrade.bin
2. erase 0x9f050000 +$filesize
3. cp.b $fileaddr 0x9f050000 $filesize
4. setenv bootcmd "bootm 0x9f050000"
5. saveenv && reset

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz fa36bea470 ramips: add support for UniElec U7628-01
UniElec U7628-01 is a router platform board based on MediaTek MT7628AN.
The device has the following specifications:

- MT7628AN (580MHz)
- 64/128/256 MB of RAM (DDR2)
- 8/16 MB of flash (SPI NOR)
- 5x 10/100 Mbps Ethernet (MT7628 built-in switch)
- 1x 2T2R 2.4 GHz Wi-Fi (MT7628)
- 1x miniPCIe slot (with PCIe and USB 2.0 buses)
- 1x miniSIM slot
- 1x microSD slot
- 1x USB 2.0 port
- 7x single-color LEDs (GPIO-controlled)
- 1x bi-color LED (green GPIO-controlled, red -> LED_WLAN# in miniPCIe)
- 1x reset button
- 1x UART header (4-pins)
- 1x SDXC/GPIO header (10-pins, connected with microSD slot)
- 1x DC jack for main power (12 V)

The following has been tested and is working:

- Ethernet switch
- miniPCIe slot (tested with modem and Wi-Fi card)
- miniSIM slot
- sysupgrade
- reset button
- USB 2.0 port*

Due to a missing driver (MMC over GPIO) this is not supported:

- microSD card reader

* Warning:
USB buses in miniPCIe and regular A-type socket are connected together,
without any proper analog switch or USB HUB.

Installation:

This board might come with a different firmware versions (MediaTek SDK,
PandoraBox, Padavan, etc.). If your board comes with PandoraBox, you can
install LEDE using sysupgrade. Just SSH to the router and perform forced
sysupgrade (due to a board name mismatch). The default IP of this board
should be: 192.168.1.1 and username/password: root/admin. In case of a
different firmware, you can use web based recovery described below.

Use the following command to perform the sysupgrade (for the 128MB
RAM/16MB flash version):

sysupgrade -n -F lede-ramips-mt76x8-u7628-01-128M-16M-squashfs-sysupgrade.bin

Recovery:

This board contains a Chinese, closed-source bootloader called Breed
(Boot and Recovery Environment for Embedded Devices). Breed supports web
recovery and to enter it, you keep the reset button pressed for around
5 seconds during boot. Your machine will be assigned an IP through DHCP
and the router will use IP address 192.168.1.1. The recovery website is
in Chinese, but is easy to use. Click on the second item in the list to
access the recovery page, then the second item on the next page is where
you select the firmware. In order to start the recovery, you click the
button at the bottom.

SDXC/GPIO header (J3):

 1. SDXC_D3  / I2C_SCLK
 2. SDXC_D2  / I2C_SD
 3. SDXC_D1  / I2S_DI
 4. SDXC_D0  / I2S_WS
 5. SDXC_CMD / I2S_CLK
 6. SDXC_CLK / GPIO0
 7. SDXC_CD  / UART_RXD1
 8. UART_TXD1
 9. 3V3
10. GND

Other notes:

1. The board is available with different amounts of RAM and flash. We
have only added support for the 128/16 MB configuration, as that seems
to be the default. However, all the required infrastructure is in place
for making support for the other configurations easy.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
7 years ago
Piotr Dymacz 46ab81e405 ramips: add support for UniElec U7621-06
UniElec U7621-06 is a router platform board based on MediaTek MT7621AT.
The device has the following specifications:

- MT7621AT (880 MHz)
- 256/512 MB of RAM (DDR3)
- 8/16/32/64 MB of FLASH (SPI NOR)
- 5x 1 Gbps Ethernet (MT7621 built-in switch)
- 1x ASMedia ASM1061 (for mSATA and SATA)
- 2x miniPCIe slots (PCIe bus only)
- 1x mSATA slot (with USB 2.0 bus for modem)
- 1x SATA
- 1x miniSIM slot
- 1x microSD slot
- 1x USB 3.0
- 12x LEDs (3 GPIO-controlled)
- 1x reset button
- 1x UART header (4-pins)
- 1x GPIO header (30-pins)
- 1x FPC connector for LEDs (20-pin, 0.5 mm pitch)
- 1x DC jack for main power (12 V)

The following has been tested and is working:

- Ethernet switch
- miniPCIe slots (tested with Wi-Fi cards)
- mSATA slot (tested with modem and mSATA drive)
- miniSIM slot
- sysupgrade
- reset button
- microSD slot

Installation:

This board might come with a different firmware versions (MediaTek SDK,
PandoraBox, Padavan, etc.). If your board comes with PandoraBox, you can
install LEDE using sysupgrade. Just SSH to the router and perform forced
sysupgrade (due to a board name mismatch). The default IP of this board
should be: 192.168.1.1 and username/password: root/admin. In case of a
different firmware, you can use web based recovery described below.

Use the following command to perform the sysupgrade (for the 256MB
RAM/16MB flash version):

sysupgrade -n -F lede-ramips-mt7621-u7621-06-256M-16M-squashfs-sysupgrade.bin

Recovery:

This board contains a Chinese, closed-source bootloader called Breed
(Boot and Recovery Environment for Embedded Devices). Breed supports web
recovery and to enter it, you keep the reset button pressed for around
5 seconds during boot. Your machine will be assigned an IP through DHCP
and the router will use IP address 192.168.1.1. The recovery website is
in Chinese, but is easy to use. Click on the second item in the list to
access the recovery page, then the second item on the next page is where
you select the firmware. In order to start the recovery, you click the
button at the bottom.

LEDs list (top row, left to right):

- LED_WWAN# (connected with pin 42 in LTE/mSATA slot)
- Power (connected directly to 3V3)
- CTS2_N (GPIO10, configured as "status" LED)
- TXD2 (GPIO11, configured as "led4", without default trigger)
- RXD2 (GPIO12, configured as "led5", without default trigger)
- LED_WLAN# (connected with pin 44 in wifi0 slot)

LEDs list (bottom row, left to right):

- ESW_P0_LED_0
- ESW_P1_LED_0
- ESW_P2_LED_0
- ESW_P3_LED_0
- ESW_P4_LED_0
- LED_WLAN# (connected with pin 44 in wifi1 slot)

Other notes:

1. The board is available with different amounts of RAM and flash. We
have only added support for the 256/16 MB configuration, as that seems
to be the default. However, all the required infrastructure is in place
for making support for the other configurations easy.

2. The manufacturer offers five different wireless cards with MediaTek
chipsets, based on MT76x2, MT7603 and MT7615. Images of the board all
show that the miniPCIe slots are dedicated to specific Wi-Fi cards.
However, the slots are generic.

3. All boards we got access to had the same EEPROM content. The default
firmware reads the Ethernet MAC from offset 0xe000 in factory partition.
This offset only contains 0xffs, so a random MAC will be generated on
every boot of the router. There is a valid MAC stored at offset 0xe006
and this MAC is shown as the WAN MAC in the bootloader. However, it is
the same on all boards we have checked. Based on information provided
by the vendor, all boards sold in small quantities are considered more
as samples for development purposes.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
7 years ago
Piotr Dymacz 55c77b3d3c ar71xx: increase kernel partition size for TP-Link RE450 v1
This increases kernel partition size and fixes rootfs (file-system)
partition size on TP-Link RE450 v1. Also, while we are at it, switch
from statically defined kernel and rootfs partitions in kernel cmdline
to "tplink-fw" mtd splitter.

Fixes: FS#1072.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz a4bb13e720 ar71xx: fix typo in Kconfig.openwrt
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 2eeb8ac271 ar71xx: image: fix typo in tp-link.mk
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Henryk Heisig ca6002c0ef ar71xx: increase kernel partition size for some TP-Link boards
This patch increases kernel partition size and re-enables image
generation for below TP-Link boards:

- archer-c58-v1
- archer-c60-v1
- tl-wr902ac-v1
- tl-wr942n-v1

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
[commit message and title reworded]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Yangbo Lu 769e1bac7b layerscape: enable CONFIG_CRYPTO_ARC4 in kernel 4.9
This patch is to enable CONFIG_CRYPTO_ARC4 in kernel 4.9
which is a dependency for mac80211 package.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu ff56bb0dfb layerscape: fix pfe module autoload issue
There was a typo in module.mk for pfe module autoload.
This patch is to fix this and remove useless rc.local
which was for loading pfe module.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu d96d0eb28f layerscape: add a README for build and deployment
Added a README for layerscape targets build and deployment.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 2b1ec44dbd layerscape: add ls1012afrdm device support
The QorIQ FRDM-LS1012A Board is an ultra-low-cost
development platform for QorIQ LS1012A Series Network
Processors built on ARM Cortex-A53 processor.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 9e7b166704 layerscape: enlarge ext4 rootfs size to 30MB
This patch is to enlarge ext4 rootfs size to 30MB.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 5b8639f02e layerscape: add ppa firmware package
This patch is to add PPA (The Primary Protected Application)
package and also enable it for all layerscape devices.
LSDK github provides ppa source code git tree, but it
only could be compiled with 64-bit toolchain. For 32-bit
devices, there was no method to use it.
https://github.com/qoriq-open-source/ppa-generic

This patch is to directly use a private ppa binary tree for
both 32-bit and 64-bit devices.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 82fbca8aaa layerscape: support LSDK ppfe
This patch is to use ppfe git tree on LSDK github
instead of private git tree, and support the latest
ppfe on ls1012ardb.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 669c02d46d layerscape: fix ls1046ardb 32-bit call trace
Enabled CONFIG_ARCH_DMA_ADDR_T_64BIT in kernel to
resolve below call trace when ls1046ardb 32-bit
started up kernel.

[    0.142141] Bman ver:0a02,02,01
[    0.145326] ------------[ cut here ]------------
[    0.149969] WARNING: CPU: 0 PID: 1 at arch/arm/mm/ioremap.c:303 __arm_ioremap_pfn_caller+0x1ac/0x1d8
[    0.159152] Modules linked in:
[    0.162216] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.51-g9c76e024 #2
[    0.169036] Hardware name: Generic DT based system
[    0.173853] [<c02236a4>] (unwind_backtrace) from [<c021ed94>] (show_stack+0x10/0x14)
[    0.181638] [<c021ed94>] (show_stack) from [<c04d2d38>] (dump_stack+0x98/0xac)
[    0.188899] [<c04d2d38>] (dump_stack) from [<c0245bcc>] (__warn+0xe4/0x100)
[    0.195896] [<c0245bcc>] (__warn) from [<c0245c98>] (warn_slowpath_null+0x20/0x28)
[    0.203504] [<c0245c98>] (warn_slowpath_null) from [<c0229e24>] (__arm_ioremap_pfn_caller+0x1ac/0x1d8)
[    0.212861] [<c0229e24>] (__arm_ioremap_pfn_caller) from [<c0229f0c>] (ioremap_cache+0x20/0x28)
[    0.221608] [<c0229f0c>] (ioremap_cache) from [<c105e390>] (parse_mem_property.part.3+0x18/0x50)
[    0.230441] [<c105e390>] (parse_mem_property.part.3) from [<c105e6dc>] (qman_init_early+0x314/0x334)
[    0.239623] [<c105e6dc>] (qman_init_early) from [<c0201a24>] (do_one_initcall+0xb4/0x168)
[    0.247844] [<c0201a24>] (do_one_initcall) from [<c1000e84>] (kernel_init_freeable+0x1d8/0x280)
[    0.256590] [<c1000e84>] (kernel_init_freeable) from [<c0adbcfc>] (kernel_init+0x8/0x114)
[    0.264812] [<c0adbcfc>] (kernel_init) from [<c021bb28>] (ret_from_fork+0x14/0x2c)
[    0.272423] ---[ end trace 39aaeef329e2a0a2 ]---
[    0.277058] qman-fqd addr 0xfb000000 size 0x800000

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 110c9e9034 layerscape: update config-4.9
Some new options were introduced by kernel patches.
And some options should be removed/added.
The config-4.9 should be updated accordingly.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu ce6311d283 layerscape: update kernel patches
Updated kernel patches to align layerscape kernel
with latest LSDK linux (LSDK-17.09-update-103017-V4.9 tag).

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 47cff4cf5f layerscape: support all-in-one firmware for ls1088ardb/ls2088ardb
Suppport all-in-one firmware for ls1088ardb/ls2088ardb by
integrating u-boot/rcw/mc/dpl/restool.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu e47c93bb19 layerscape: remove default profile
Default profile had to enable many packages for all devices
support. This made these packages still enabled when built
for single device. This patch is to remove default profile.
For multiple devices build, it's proper to build with multiple
devices profile.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Yangbo Lu 4e209e07f7 layerscape: clean up kernel patches
A previous patch disaggregated kernel patch 601 intending to
reverse the ndo_get_stats64 change, but it also dropped
many other changes without a reason. This caused build issue
for layerscape. This patch is to fix that with below steps.
1. Reversed patch "1c4415a layerscape: reverse changes to ndo_get_stats64",
   but kept kernel patch 701 which was a proper fix.
2. Reversed the ndo_get_stats64 change in kernel patch 601.
3. Renamed patch 601 (net patch) to 202 (core-linux patch). Maybe it's
   more proper.

Fixes: 1c4415a679 ("layerscape: reverse changes to ndo_get_stats64")
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Tim Thorpe bddffc5e7b brcm47xx: fix switch port mapping on Asus RT-N16
On the Asus RT-N16, the ports are not mapped the in the same way as
the RT-N12.  It is, however, the same as the Linksys E3000v1.

Signed-off-by: Tim Thorpe <timfthorpe@gmail.com>
7 years ago
Felix Fietkau 645b163cfc ar71xx: fix regression in 74x164 initialization with 4.9
The memcpy of the init data relies on chip->registers to be initialized,
which only happens later in the code. Move this initialization further
down to make it work.
This was breaking PCIe/USB on some MikroTik RouterBoard devices.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Daniel Gimpelevich a6e9d146f2 lantiq: add missing macaddr retrieval for Netgear DGN3500
The MAC addresses were not being set for LAN and WAN. This will now use the
same MAC mechanism as the rest of the target.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
7 years ago
Robert Marko d0ef27594a ramips: add support for TP-Link TL-WR840N v5
TP-Link TL-WR840N v5 is simple N300 router with 5-port FE switch and
non-detachable antennas, based on MediaTek MT7628NN (aka MT7628N) WiSoC.

Specification:

- MT7628N/N (580 MHz)
- 64 MB of RAM (DDR2)
- 4 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- UART (J1) header on PCB (115200 8n1)
- 1x LED (GPIO-controlled), 1x button

* LED in TL-WR840N v5 is a dual-color, dual-leads type which isn't
  (fully) supported by gpio-leds driver. This type of LED requires both
  GPIOs state change at the same time to select color or turn it off.
  For now, we support/use only the green part of the LED.
  Orange LED is registered so you can later use it for your own purposes.

  Flash instruction:

  Unlike TL-WR840N v4 flashing through WEB UI works in v5.
  1. Download lede-ramips-mt76x8-tl-wr840n-v5-squashfs-sysupgrade.bin image.
  2. Go to 192.168.0.1
  3. Flash the sysupgrade image through Firmware upgrade section of WEB UI.
  4. Wait until green LED stops flashing and use the router.

Notes:
TFTP recovery is broken since TP-Link reused bootloader code for v4 and
that does not take into account only 4 MB of flash and bricks the device.
So do not use TFTP Recovery or you will have to rewrite SPI flash.
They fixed it in later GPL code,but it is unknown which version of
bootloader you have.

After manually compiling and flashing bootloader from GPL sources TFTP
recovery works properly.

Signed-off-by: Robert Marko <robimarko@gmail.com>
7 years ago
Thibaut VARÈNE 74f891752b generic: make mtdsplit-tplink.c honor rootfs offset
The splitter ignored the rootfs offset from the header, probably
because until c1e6e61 it was invalid.

This patch fixes the splitter to use the now correct header data.

Regarding target/linux/ar71xx/files/drivers/mtd/tplinkpart.c,
this particular splitter "falls back" to the correct rootfs offset
reading and as such it doesn't need to be updated, although it will
report a kernel partition length that can be larger than the actual
length as it assumes that partition fills the entire segment up to
the rootfs partition.

Tested-by: Mathias Kresin <dev@kresin.me>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Tested-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Tested-by: Henryk Heisig <hyniu@o2.pl>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
7 years ago
Zoltan HERPAI f9ecb0d562 sunxi: add Orange Pi 2 support
- H3 @ 1.3 GHz
- 1GiB DDR3
- 10/100Mbps Ethernet
- Realtek RTL8189ETV wifi
- 4 USB 2.0

Difference to the "Orange Pi Plus" is the lack of Gbit ethernet
and lack of onboard flash.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
Rosen Penev e555153807 ag71xx: Switch from driver to kernel macro for NAPI_WEIGHT.
NAPI_POLL_WEIGHT was introduced in the kernel for exactly this purpose 5 years ago.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Sergey Ryazanov 890e668273 ixp4xx: drop the jumbo frame support
Current jumbo frame support code allocates rxbuffers of the maximum size
supported by the hardware (~14KB). This happens at the device open time
even if the configured MTU is lower (e.g. if it configured to standard
1500 bytes). Such behavior effectivly prevents interface start on boards
with a low ammount of RAM (e.g. WRT300N v2), since the kernel simly can
not allocates of ~0.8MB (14KB x 64).

So remove jumbo frame support for now.

Reported-by: Nerijus Baliunas <nerijus@users.sourceforge.net>
Tested-by: Nerijus Baliunas <nerijus@users.sourceforge.net>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
7 years ago
Sergey Ryazanov 204f3f5987 ixp4xx: fix non-standard phy support
The patch, which adds multiphy support, adds new path for non-standard
PHYs (e.g. MV88E6060 switch IC) to avoid using kernel phy framework. All
work well except the link status traking (Duplex and Speed), which is
reseted as soon as PHY connection procedure is done. This leads to lost
of the link status of non-standard PHY, which is configured exactly in
the ixp4xx_phy_connect() function.

Move the generic reset of a link state to the ixp4xx_phy_connect()
function to the code path, which is intended for handling of a normal
PHY.

Reported-by: Nerijus Baliunas <nerijus@users.sourceforge.net>
Tested-by: Nerijus Baliunas <nerijus@users.sourceforge.net>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
7 years ago
Kayo Phoenix 6a3565985f sunxi: Added profile for HAOYU Electronics Marsboard A10
The MarsBoard was a short-lived credit-card sized, extendable board with an Allwinner A10 SoC.
http://linux-sunxi.org/MarsBoard_A10

Signed-off-by: Kayo Phoenix <kayo@illumium.org>
[Forward-ported to new target layout:]
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
Felix Fietkau c078386ae3 ar71xx: only use SPI NOR 4K sectors on smaller flash chips for mikrotik devices
On NOR based Mikrotik devices, 4K sectors significantly slow down
firmware flashing and jffs2 usage. On NAND based devices they may be
necessary to run rbcfg (the boot loader config is often on SPI NOR).

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau c08293893a kernel: add support for limiting 4K erase sector support based on flash chip size
Some targets need 4K sectors for small flash chips (e.g. some
routerboards, where the entire chip is just one "erase block"), whereas
on other devices 4K sectors lead to horrible flash erase/write
performance.

Set the default limit in the generic kernel configuration to 4 MiB to
ensure that all new platforms don't use 4K sectors for bigger flash
chips. On all existing targets use 16 MiB for now to avoid regressions.
They will be changed individually in follow-up commits.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Stefan Lippers-Hollmann 9a221c6d69 ip806x: nbg6817: sysupgrade support both targets for kernel/ rootfs partitions
With this commit and the previous "nbg6817: don't hardcode the rootfs location
by using append-rootblock instead" applied, it is possible to boot- and
sysupgrade from both dual-boot sets (the primary mmcblk0p4+mmcblk0p5 or the
alternative mmcblk0p7+mmcblk0p8). However the sysupgrade support does not
toggle between both dual-boot sets between firmware upgrades so far.

The partition map of the eMMC used in the nbg6817 is:

Found valid GPT with protective MBR; using GPT.
Disk /dev/mmcblk0: 7471104 sectors, 3.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): XXX
Partition table holds up to 12 entries
First usable sector is 34, last usable sector is 7471070
Partitions will be aligned on 2-sector boundaries
Total free space is 1 sectors (512 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34            8225   4.0 MiB     FFFF  rootfs_data
   2            8226           16417   4.0 MiB     FFFF  romd
   3           16418           18465   1024.0 KiB  FFFF  header
   4           18466           26657   4.0 MiB     FFFF  kernel
   5           26658          157729   64.0 MiB    FFFF  rootfs
   6          157730          159777   1024.0 KiB  FFFF  header_1
   7          159778          167969   4.0 MiB     FFFF  kernel_1
   8          167970          299041   64.0 MiB    FFFF  rootfs_1
   9          299042          823329   256.0 MiB   FFFF  bu1
  10          823330         7471069   3.2 GiB     FFFF  bu2

rootfs_data is the ext4 formatted overlay of the OEM firmware, LEDE
ignores it due to its (too) small size.

romd/ bu1 are initialized with zeroes (0x00) and unused.

bu2 is formatted with ext4 and used for streamboost and other optional
functionality by the OEM firmware, it is reformatted during factory
resets of the OEM firmware.

header/ header_1 contains version information for the corresponding
vendor firmwares installed to kernel/rootfs or kernel_1/ rootfs_1, the
format hasn't been completely reverse engineered so far and remains
left untouched by LEDE:

V1.00(ABCS.2)C0:
 00000000  00 00 a7 74 01 32 f0 00  56 31 2e 30 30 28 41 42  |...t.2..V1.00(AB|
 00000010  43 53 2e 32 29 43 30 00  ff ff ff ff ff ff ff ff  |CS.2)C0.........|
 00000020  ff ff ff ff ff ff ff ff  00 00 d5 dc 4e 42 47 36  |............NBG6|
 00000030  38 31 37 00 ff ff ff ff  ff ff ff ff ff ff ff ff  |817.............|
 00000040  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
 *
 00000060  ff ff ff ff ff ff ff ff  ff ff ff ff 00 00 22 a3  |..............".|
 00000070  00 1c 70 00 ff ff ff ff  ff ff ff ff ff ff ff ff  |..p.............|
 00000080  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
 *
 00000800  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
 00100000

V1.00(ABCS.5)C0:
 00000000  00 00 bf 94 01 46 d8 00  56 31 2e 30 30 28 41 42  |.....F..V1.00(AB|
 00000010  43 53 2e 35 29 43 30 00  ff ff ff ff ff ff ff ff  |CS.5)C0.........|
 00000020  ff ff ff ff ff ff ff ff  00 00 d6 5a 4e 42 47 36  |...........ZNBG6|
 00000030  38 31 37 00 ff ff ff ff  ff ff ff ff ff ff ff ff  |817.............|
 00000040  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
 *
 00000060  ff ff ff ff ff ff ff ff  ff ff ff ff 00 00 c0 2c  |...............,|
 00000070  00 1c 58 00 ff ff ff ff  ff ff ff ff ff ff ff ff  |..X.............|
 00000080  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
 *
 00010000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
 00100000

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
7 years ago
Stefan Lippers-Hollmann b583aaf5aa ip806x: nbg6817: don't hardcode the rootfs location by using append-rootblock instead
This changes the cmdline from:

Kernel command line: root=/dev/mmcblk0p5 rootfstype=squashfs,ext4 rootwait noinitrd
Bootloader command line (ignored): board=NBG6817 root=/dev/mmcblk0p5 rootwait zld_ver=2.04 console=ttyHSL1,115200n8 mtdparts=m25p80:0xC0000(SBL)ro,0x40000(TZ)ro,0x40000(RPM)ro,0x80000(u-boot)ro,0x10000(env)ro,0x10000(ART)ro,0x10000(dualflag),0x210000(reserved)

to

Kernel command line: rootfstype=squashfs,ext4 rootwait noinitrd root=/dev/mmcblk0p5
Bootloader command line (ignored): board=NBG6817 root=/dev/mmcblk0p5 rootwait zld_ver=2.04 console=ttyHSL1,115200n8 mtdparts=m25p80:0xC0000(SBL)ro,0x40000(TZ)ro,0x40000(RPM)ro,0x80000(u-boot)ro,0x10000(env)ro,0x10000(ART)ro,0x10000(dualflag),0x210000(reserved)

As a consequence booting from the alternative dual-boot partition set
(root=/dev/mmcblk0p8) becomes possible.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
7 years ago
Roman Yeryomin 156f2df879 ipq806x: ipq4019: add ap-dk01.1-c1 board support
AP-DK01.1-C1 is QCA dev board with:
- ipq4018 quad core ARM @716.8MHz, 2x2 dual (11n+11ac) radio
- 256MB RAM
- 32MB SPI flash
- QCA8075 multiport ethernet phy (WAN port, 4x LAN ports)

First installation via u-boot:
sf probe
sf erase 0x180000 0x1a00000
tftpboot 0x84000000 lede-ipq806x-AP-DK01.1-C1-squashfs-sysupgrade.bin
sf write 0x84000000 0x180000 $filesize

Further upgrades via sysupgrade.

Changes:
- add partitions
- set memory size to 256MB
- add reserved memory mapping
- add correct compatible string
- add image generation
- extract pre-cal data from ART partition

Compile and run tested.
Wirespeed NAT can be achieved with spreading rx interrupts over different
cores. Wifi speed is ~550Mbps @5GHz in open air.

Note:
AP-DK01.1-C1 is fully compatible with AP-DK01.2-C1, which has
ipq4028 instead of ipq4018 on board.

Changes since v2:
- based on dts(i) rework/cleanup submitted:
  http://lists.infradead.org/pipermail/lede-dev/2017-October/009596.html
- precise reserved memory mapping
- more precise description
- compatible string

Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
Roman Yeryomin a22e2bd37d ipq806x: ipq4019: dts: fix maximum cpu speed
Supported frequencies of all ipq40xx chips are 48, 200, 500 and 716.8 MHz.
Previous 666MHz setting was most likely related to instability of early
chips/boards made before mass production.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
Roman Yeryomin 21802ce3ab ipq806x: ipq4019: dts: remove spi chip node from ap-dk01 dtsi
All ap-dk01 boards have different spi chips, thus no point in keeping it in dtsi.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
7 years ago
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