Commit Graph

18729 Commits (ddd7cdc54bc5663eb5e12dbda85a744c85c5ea97)

Author SHA1 Message Date
Chuanhong Guo a657978fe7 ramips: fix lenovo newifi-y1 switch and LED config
There are 3 ethernet ports on Y1. LAN1 on port1, LAN2 on port0 and WAN on
port4.

Use a standalone switch configuration to match this and use the switch
trigger so that LAN LED could indicate the connetction status for both
lan ports correctly.

This patch also drop the internet led configuration, because there is a
WAN led for port4 and eth0.2 isn't always used as WAN.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
7 years ago
Mathias Kresin 6912e55e71 ramips: add missing soc compatibles to dts
Add SoC compatibles where missing.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 3326e36fa7 ramips: firewrt: indicate boot status via LED
Add the Firefly FireWRT gree power LED to diag.sh to indicate the boot
status via the power LED.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Gabor Juhos 82cc439976 ar71xx: remove obsolete '< KERNEL_VERSION(4, 4, 0)' check
Because the oldest supported kernel version on the ar71xx target is 4.4,
the condition that the kernel version is smaller than 4.4.0 is always
false. Remove the obsolete check from mach-rb4xx.c to clean up the code
a bit.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos 8f44c8086b ar71xx: remove obsolete '< KERNEL_VERSION(4, 2, 0)' check
Because the oldest supported kernel version on the ar71xx target is 4.4,
the condition that the kernel version is smaller than 4.2.0 is always
false. Remove the obsolete check from ag71xx_main.c to clean up the code
a bit.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos 7a4930b27c ar71xx: remove obsolete '< KERNEL_VERSION(3, 15, 0)' checks
Because the oldest supported kernel version on the ar71xx target is 4.4,
the condition that the kernel version is smaller than 3.15.0 is always
false. Remove the obsolete checks from the target specific source files
to clean up the code a bit.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
John Crispin aa100b66f2 armvirt: bump to v4.14
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 7172ec1e8f malta: bump tp v4.14
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 4ee195bcfa malta: fix image prefix names
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Gabor Juhos 99be4170cb ar71xx/mikrotik: disable TP-Link TL-WR810N v2 board support
It does not belongs to the MikroTik boards.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos 7f7eb18455 ar71xx/mikrotik: disable unused MTD partitioning and split drivers
Reduces the compressed kernel size by ~2.5KB.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos 660ee2d0f0 ar71xx/mikrotik: disable unused ethernet switch and phy drivers
Disable the drivers for the following ethernet switches:
  Realtek RTL8306
  Realtek RTL8366/8367
  Marvell 88E6060 (DSA)
  Marvell 88E6063 (DSA)

Also disable the phy driver for Marvell PHYs.

None of the supported RouterBOARDs are using any device
which needs these drivers.

Disable the DSA framework too, because it is not required
by the remaining switch drivers.

This reduces the compressed kernel size by ~20KB.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos b386b5727b ar71xx: fix Kconfig dependency of the 88E6063 switch DSA driver
The Marvell 88E6063 ethernet switch driver depends on the DSA
framework. Add a 'depends on NET_DSA' statement to its Kconfig
entry to state that explicitly.

Fixes the following Kconfig warning:

  warning: (NET_DSA_MV88E6060 && NET_DSA_MV88E6063) selects NET_DSA_TAG_TRAILER which has unmet direct dependencies (NET && NET_DSA)

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos 09bb7105c2 ar71xx: sort kernel configurations
The symbols in some kernel configurations of the target are in
wrong order. Sort them with kconfig.pl.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Stijn Tintel 56767dfa42 octeon: add support for kernel 4.14
Tested on EdgeRouter Lite.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Gabor Juhos 4045f15a21 ar71xx: fix compiler warnings in mdio-bitbang.c for 4.4
Building Linux 4.4 for ar71xx throws the following warnings in
drivers/net/phy/mdio-bitbang.c:

    CC      drivers/net/phy/mdio-bitbang.o
  In file included from include/linux/irqflags.h:14:0,
                   from drivers/net/phy/mdio-bitbang.c:20:
  drivers/net/phy/mdio-bitbang.c: In function 'mdiobb_read':
  include/linux/typecheck.h:11:18: warning: comparison of distinct pointer types lacks a cast
    (void)(&__dummy == &__dummy2); \
                    ^
  include/linux/irqflags.h:63:3: note: in expansion of macro 'typecheck'
     typecheck(unsigned long, flags); \
     ^
  include/linux/irqflags.h:124:3: note: in expansion of macro 'raw_local_irq_save'
     raw_local_irq_save(flags);   \
     ^
  drivers/net/phy/mdio-bitbang.c:162:2: note: in expansion of macro 'local_irq_save'
    local_irq_save(flags);
    ^
  include/linux/typecheck.h:11:18: warning: comparison of distinct pointer types lacks a cast
    (void)(&__dummy == &__dummy2); \
                    ^
  include/linux/irqflags.h:68:3: note: in expansion of macro 'typecheck'
     typecheck(unsigned long, flags); \
     ^
  include/linux/irqflags.h:126:39: note: in expansion of macro 'raw_local_irq_restore'
   #define local_irq_restore(flags) do { raw_local_irq_restore(flags); } while (0)
                                         ^
  drivers/net/phy/mdio-bitbang.c:175:2: note: in expansion of macro 'local_irq_restore'
    local_irq_restore(flags);
    ^
  drivers/net/phy/mdio-bitbang.c:159:11: warning: unused variable 'i' [-Wunused-variable]
    int ret, i;
             ^
  In file included from include/linux/irqflags.h:14:0,
                   from drivers/net/phy/mdio-bitbang.c:20:
  drivers/net/phy/mdio-bitbang.c: In function 'mdiobb_write':
  include/linux/typecheck.h:11:18: warning: comparison of distinct pointer types lacks a cast
    (void)(&__dummy == &__dummy2); \
                    ^
  include/linux/irqflags.h:63:3: note: in expansion of macro 'typecheck'
     typecheck(unsigned long, flags); \
     ^
  include/linux/irqflags.h:124:3: note: in expansion of macro 'raw_local_irq_save'
     raw_local_irq_save(flags);   \
     ^
  drivers/net/phy/mdio-bitbang.c:185:2: note: in expansion of macro 'local_irq_save'
    local_irq_save(flags);
    ^
  include/linux/typecheck.h:11:18: warning: comparison of distinct pointer types lacks a cast
    (void)(&__dummy == &__dummy2); \
                    ^
  include/linux/irqflags.h:68:3: note: in expansion of macro 'typecheck'
     typecheck(unsigned long, flags); \
     ^
  include/linux/irqflags.h:126:39: note: in expansion of macro 'raw_local_irq_restore'
   #define local_irq_restore(flags) do { raw_local_irq_restore(flags); } while (0)
                                         ^
  drivers/net/phy/mdio-bitbang.c:200:2: note: in expansion of macro 'local_irq_restore'
    local_irq_restore(flags);
    ^

These are caused by the 900-mdio_bitbang_ignore_ta_value and
901-phy-mdio-bitbang-prevent-rescheduling-during-command patches.

The first patch removes some code but it does not remove the variable
which is used by the removed code only.

The second patch adds local_irq_{save,restore} calls. The type of the
argument of these calls must be 'unsigned long', but the patch defines
the variable as 'long'.

Fix both patches to silence the warnings.

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Mathias Kresin d726187367 lantiq: fix wbmr-hp-g300h image metadata
The Annex A and Annex B version are using the same (old) userspace
boardname. Update the SUPPORTED_DEVICES to allow an update from lede-17.01.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Jo-Philipp Wich f839ad685b sdk: switch base feed url to git.openwrt.org
As LEDE is rebranding to OpenWrt now, adjust the base feed Git reference
accordingly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Philip Prindeville d280c03a1d x86: preinit: use board_name on Sm Super Servers
Supermicro puts "Super Server" into their product_name DMI value
for a whole slew of products, making this value about as useful
as not having been filled in at all.  Instead, fall back on the
board_name instead.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
7 years ago
Philip Prindeville 445f980a38 x86: preinit: make name rewrite into reusable function
There might be other places (such as vendor-supplied preinit scripts)
where we wish to take a DMI name and clean it up in a consistent way,
so make the sed command into a function.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
7 years ago
Stijn Tintel c5ca1c9ab6 kernel: bump 4.14 to 4.14.11
Rename unwinder config symbols to match upstream changes.
Refresh patches.
Update patch that no longer applies: 202-reduce_module_size.patch

Also enable CONFIG_PAGE_TABLE_ISOLATION. This feature was backported
from 4.15 to the 4.14 stable series. It is enabled by default, so enable
it in OpenWrt as well.

Compile-tested on x86/64.
Runtime-tested on x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Stijn Tintel 8b35da1552 kernel: move CONFIG_KASAN to generic config
While bumping 4.14, the kernel build failed due to missing CONFIG_KASAN
symbol. Move it to generic config instead of defining it for all arm64
and x86/64 targets.

It was only added in 4.0, so not needed in config-3.18.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Hauke Mehrtens 597de6904c layerscape: activate fpu feature
The CPU sub type was set to a CPU version with FPU, but the FPU feature
was not activated before, so a soft float toolchain was created.
Activate also the FPU feature to create the correct toolchain.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 01cc6bd495 at91: sama5: activate fpu
This activates neon and VFPv4 support for this target. The CPU support
these feature so also use them.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Kevin Darbyshire-Bryant 4b275baf91 kernel: bump 4.9 to 4.9.73
Refresh patches.

Runtime tested: ar71xx - Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
7 years ago
Rafał Miłecki 3267ce750e bcm53xx: use iflag=skip_bytes for dd command during sysupgrade
Since BusyBox 1.25.0 dd command supports iflag=skip_bytes which allows
skipping requested amount of bytes without reducing blocksize. Thanks to
this we can leave default blocksize and let dd work more efficiently.

On Netgear R6250 "dd skip=58 iflag=skip_bytes" can be 5 times faster
than "dd bs=58 skip=1" when extracting TRX out of CHK.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 612a93564c brcm47xx: image: build firmware for Asus WL-500g Deluxe
It's a device based on BCM5365P (0x5365 package 0x00). This SoC has
USB 1.1 controller but device has two USB 2.0 parts. They are handled by
PCI-based controllers: 1106:3038 UHCI and 1106:3104 EHCI.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki fea884ff51 bcm53xx: add early support for kernel 4.14
Don't switch to it by default yet as it requires more testing.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Mathias Kresin 4dd51788dd ramips: fix Omega2 compatible string
Change the compatibel from Omega to Omega2 and add the compatible string
where missing.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 76d735d189 ramips: fix widora neo diag led
The diag LED is named widora🍊wifi and can't be derived from the
boardname.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Thomas Nixon 9fc9fbeb97 lantiq: fix dts compatible string
This was broken in 7bab49fd ("lantiq: add compatible strings to dts
files"), causing for the dm200 garbled serial output during boot, and
likely other issues.

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
[fix the compat string of the P2601HNFX as well]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Rafał Miłecki 6e922a0756 bcm53xx: make USB packages compatible with kernels 4.13+
In kernels 4.13+ modules are located in an extra "broadcom" subdir.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 9c312ef628 bcm53xx: add upstream patch fixing SPI controller driver
That patch fixes handling SPI messages with two writing transfers. It's
important when using e.g. by m25p80 driver which uses one transfer for
opcode and another one for data.

Thanks to that fix we can now drop m25p80 workaround patch. It means one
less hack and also a better flash writing performance as there is no
more data buf copying.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Vittorio Gambaletta d40a358136
ag71xx: Fix rx ring buffer stall on small packets flood on qca956x and qca953x.
Backported from Code Aurora QSDK

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
7 years ago
Philip Prindeville 2e23733838 x86: add NVMe support for motherboards w/ M.2 slot
A lot of 1U x86_64 servers have NVMe support, which is lower-power
and higher speed than SSD or CFast drives, etc.  The drivers
required to make this work are trivial.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
7 years ago
Kevin Darbyshire-Bryant e547f1692a kernel: bump 4.4 to 4.4.108
Refresh patches.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
7 years ago
Kevin Darbyshire-Bryant 7b6e01d389 kernel: bump 4.9 to 4.9.72
Refresh patches.

Runtime tested: ar71xx - Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
7 years ago
Jonas Gorski 1064e76e4e linux: unbreak host tools build for 4.14
Remove a stray -Wp left in host_c_flags causing build failures for newer
4.14 versions.

Reported-by: Michael Marley <michael@michaelmarley.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Christian Lamparter 246916ddf4 brcm2708: use x86's upgrade scripts for all rpi targets
Advantages:
 - preserves existing partition layout on the sd-card.
   Only the boot and rootfs partition will be overwritten.

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-sdcard.img.gz
will have to be written to the sdcard manually.
Please don't forget to backup your configuration in this case.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter 6f04128892 brcm2708: convert to dt-based board-detection
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: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter 778543dab4 brcm2708: add compatible strings
This patch adds the compatible string for the various RPIs from
4.14 upstream.

Note: The 4.14 upstream does not include the compute modules.
If the CM* would just house the SoC, it could in theory use the
"raw" chip compatible string. However, these CM boards also come
with RAM and eMMC. So they have to have a proper comaptible.

For now, "raspberrypi,compute-module-{1|3}" will be good enough.

Note2: The original CM was renamed to CM1 when CM3 was released.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Christian Lamparter e79b096ee1 brcm2708: convert to metadata
This patch converts all the raspberrypi images to utilize
the common metadata-based image verification.

Note: the CM1 and CM3 currently use the same "rpi-cm"
boardname.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Gabor Juhos 6456999731 ar71xx: spi-rb4xx: balance clk_prepare_enable() call
Commit c312cef223 ("ar71xx: spi-rb4xx fix.") replaced the clk_enable() call
with clk_prepare_enable() to meet the common clock framework requirements.
However it did not change the clk_disable() call in the error patch which
thus leads to imbalance.

Fix the code by using the correct counterpart of clk_prepare_enable() in both
places.

Fixes: c312cef223 ("ar71xx: spi-rb4xx fix.")
Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos df68e63a4f kernel/4.14: add missing newline character to UBI messages
A few UBI messages lacks the trailing newline character which
leads to ugly lines in the bootlog like this:

  [    6.649159] UBI error: no valid UBI magic found inside mtd6[    6.667751] Freeing unused kernel memory: 2196K

Add a newline character to the end of the messages to fix it.
After the fix the line from above looks better in the log:

  [    6.609182] UBI error: no valid UBI magic found inside mtd6
  [    6.627599] Freeing unused kernel memory: 2132K

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos 975e9cd866 kernel/4.9: add missing newline character to UBI messages
A few UBI messages lacks the trailing newline character which
leads to ugly lines in the bootlog like this:

  [    6.649159] UBI error: no valid UBI magic found inside mtd6[    6.667751] Freeing unused kernel memory: 2196K

Add a newline character to the end of the messages to fix it.
After the fix the line from above looks better in the log:

  [    6.609182] UBI error: no valid UBI magic found inside mtd6
  [    6.627599] Freeing unused kernel memory: 2132K

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Gabor Juhos bb51193acd kernel/4.4: add missing newline character to UBI messages
A few UBI messages lacks the trailing newline character which
leads to ugly lines in the bootlog like this:

  [    6.649159] UBI error: no valid UBI magic found inside mtd6[    6.667751] Freeing unused kernel memory: 2196K

Add a newline character to the end of the messages to fix it.
After the fix the line from above looks better in the log:

  [    6.609182] UBI error: no valid UBI magic found inside mtd6
  [    6.627599] Freeing unused kernel memory: 2132K

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
7 years ago
Kevin Darbyshire-Bryant b0d99b77e5 kernel: bump 4.4 to 4.4.107
Refresh patches.

Update patch that no longer applied:
oxnas/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tested-by: Rosen Penev <rosenp@gmail.com>
7 years ago
Martin Schiller 94952636e7 lantiq: remove DSL_ChipSetHWVersion from status information
The value DSL_ChipSetHWVersion is fetched from the dsl frontend
via the dsl_control service, but not really provided by the dsl
frontend firmware and for now always "UNKNOWN".

The lantiq support told us that this information wouldn't be
provided in the foreseeable future, so let's remove this
useless "UNKNOWN" information.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
7 years ago
Mathias Kresin c7776d4c55 ramips: fix Linkit smart 7688 support
Use a more appropriate compatible string. Fix the wireless led GPIO and
add the default wireless trigger. Use the wireless LED for boot state
indication as well.

Remove the GPIO pinmux for pins not exposed on the board.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Henryk Heisig 39e9bfb181 ramips: add support for TP-Link TL-MR3420 v5
TP-Link TL-MR3420 v5 are simple N300 router with
5-port FE switch and non-detachable antennas.
Its very similar to TP-Link TL-WR841N V13.

Specification:

- MT7628N/N (580 MHz)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- USB 2.0 Port
- UART (J1) header on PCB (115200 8n1)
- 8x LED, 2x button, power input switch

Flash instruction:

The only way to flash LEDE image in mr3420v5 is to use
tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.0.225/24 and tftp server.
2. Rename "lede-ramips-mt7628-tplink_tl-mr3420-v5-squashfs-tftp-recovery.bin"
   to "tp_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years ago
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