Commit graph

18554 commits

Author SHA1 Message Date
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>
2017-12-17 12:50:22 +01:00
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>
2017-12-16 23:33:56 +01:00
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>
2017-12-16 23:33:56 +01:00
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>
2017-12-16 23:33:56 +01:00
Mathias Kresin
ed72540c10 lantiq: add missing model names
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-12-16 23:33:56 +01:00
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>
2017-12-16 23:33:56 +01:00
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>
2017-12-16 23:33:56 +01:00
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>
2017-12-16 23:33:56 +01:00
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>
2017-12-16 23:33:56 +01:00
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>
2017-12-16 22:16:07 +01:00
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>
2017-12-16 22:13:04 +01:00
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>
2017-12-16 22:11:19 +01:00
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>
2017-12-16 22:11:05 +01:00
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>
2017-12-16 22:10:48 +01:00
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>
2017-12-16 14:41:37 +01:00
Philip Prindeville
9868eba5a0 x86: refresh settings for 4.9.59
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-12-16 14:41:37 +01:00
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>
2017-12-16 12:57:06 +01:00
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>
2017-12-16 12:57:05 +01:00
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>
2017-12-16 12:57:05 +01:00
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>
2017-12-16 12:57:05 +01:00
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>
2017-12-16 12:57:05 +01:00
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>
2017-12-16 12:57:05 +01:00
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>
2017-12-16 00:02:14 +01:00
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>
2017-12-16 00:00:25 +01:00
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>
2017-12-15 23:57:41 +01:00
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>
2017-12-15 23:57:09 +01:00
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>
2017-12-15 23:50:21 +01:00
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>
2017-12-14 11:00:11 +01:00
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>
2017-12-14 09:29:31 +01:00
Henryk Heisig
85c1644a86 ar71xx: generate BR region-code factory image for TP-Link TL-WR940N
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2017-12-14 09:29:30 +01:00
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>
2017-12-14 09:29:30 +01:00
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>
2017-12-14 09:29:30 +01:00
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>
2017-12-14 09:29:30 +01:00
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>
2017-12-14 09:29:30 +01:00
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>
2017-12-14 09:29:30 +01:00
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>
2017-12-13 16:40:47 +01:00
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>
2017-12-13 11:34:51 +01:00
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>
2017-12-12 18:47:26 +01:00
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>
2017-12-12 17:05:25 +08:00
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>
2017-12-11 12:44:50 +01:00
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>
2017-12-11 12:44:41 +01:00
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>
2017-12-11 12:43:29 +01:00
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>
2017-12-11 10:31:00 +01:00
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>
2017-12-08 22:34:31 +01:00
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>
2017-12-08 20:57:12 +01:00
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>
2017-12-08 19:55:17 +01:00
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>
2017-12-08 19:54:37 +01:00
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>
2017-12-08 19:54:34 +01:00
Zoltan HERPAI
d2c06eb075 merge: etc: update remaining files
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2017-12-08 19:41:18 +01:00
Zoltan HERPAI
1f8585cf99 merge: ssid: update default ssid
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2017-12-08 19:41:18 +01:00