Commit Graph

36832 Commits

Author SHA1 Message Date
Jo-Philipp Wich
70b104f98c tools: mkimage: fix build with OpenSSL 1.1.x (FS#182)
The OpenSSL 1.1.x version series undergone some major API changes which made
the RSA structure opaque and deprecated a number of methods, so add some
conditional compat code to make the u-boot source build again.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-11-30 18:20:32 +01:00
Felix Fietkau
f2010b0929 rtc-rv5c386a: fix include path for bcm47xx_nvram.h
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-30 12:47:25 +01:00
Mathias Kresin
59261cbf38 docs: remove all refrences in Makefiles/scripts
The SDK Makefile still trys to copy the docs folder which was removed
with 882f4d2d63. This causes an SDK build
error.

All other removals are just cleanup.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-30 10:13:14 +01:00
Alberto Bursi
d52676d1ea base-files: add a wrapper for init scripts in profile
"service" is a simple wrapper that will allow to call init.d scripts

current method:     #  /etc/init.d/network reload
with the wrapper:   #  service network reload

If the wrapper is called without arguments or with a wrong init script name, it will print an error and list the content of /etc/init.d/ folder

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
2016-11-29 21:12:08 +01:00
Kevin Darbyshire-Bryant
102cb4742c kernel: bump to 4.4.35
Refresh patches on all 4.4 supported platforms.

077-0005-bgmac-stop-clearing-DMA-receive-control-register-rig.patch
removed as now upstream.

Compile & run tested: ar71xx - Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2016-11-29 21:12:08 +01:00
Alberto Bursi
882f4d2d63 docs: deleting docs because they are obsolete
the docs in /docs folder are pretty much obsolete and in a not very friendly format (latex, that requires to be
compiled), leaving them there only causes confusion.
LEDE documentation's place is the wiki, or the site.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
2016-11-29 21:12:08 +01:00
Mathias Kresin
c0e66478b5 lantiq: drop obsolete patch
ifxhcd never had roothub support but since kernel 3.x it was expected
that a roothub always exists.

The patched fixed a null pointer deref in the usb subsystem because of
the missing roothub.

Since ifxhcd is gone, this whole patch isn't required any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +01:00
Mathias Kresin
36148d923b uboot-lantiq: Add BT Home Hub 5A support
Based on the submission to the uboot-lantiq repo by Martin Blumenstingl.

Use the ddr_settings.h from the GPL tarball. The NAND boot optimized
one (with memory tuning enabled) doesn't work for the UART boot image.

Use the same mtd layout as the stock u-boot. Add add UBI support.

Use the leds to indicate boot status like it is done with the stock
u-boot. Switch on the red power led if kernel image can't be loaded.
Otherwise switch the green led on.

Make only the ramboot u-boot available. Only this image is required for
the first installation of LEDE.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +01:00
Mathias Kresin
0e34459e6b lantiq: use BT HomeHub 5 Type A OEM partition layout
This way the on nand bad block table is preserved and used. Add support
for nand OOB ECC checksums as well. It should fix all reported ubi
errors, which were all related to bad nand blocks and a purged on nand
bad block table.

The existing ubi partition will be reused, which eliminates the need
to touch the caldata during initial install. The BT u-boot has support
for loading a kernel from an ubi volume. It isn't necessary any longer
to replace the BT u-boot with a custom compiled one to use LEDE.

It is required to restore the BT Firmware and install LEDE from scratch
to switch to the new partition layout.

An image for restoring the BT firmware and installing LEDE is provided
at https://github.com/mkresin/lede/releases.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +01:00
Mathias Kresin
860210c373 lantiq: backport kernel patch to pass of node to nand_dt_init
Backport upstream commit a61ae81a1907af1987ad4c77300508327bc48b23.

The actually purpose of the patch was to do some cleanup. As a side
effect of this cleanup, the device node is now passed to nand_dt_init.

This allows to use the common nand device tree properties

 - nand-bus-width
 - nand-on-flash-bbt
 - nand-ecc-mode
 - nand-ecc-step-size
 - nand-ecc-strength

for the plat_nand driver.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +01:00
Mathias Kresin
62a347b1d9 lantiq: drop ath9k device tree binding & ath9k pci fixup
Due to the addition of the bindings to the ath9k driver, this code
isn't used any longer. The fixup is now done by the owloader.

Rename the ath_eep.c file to ath5k_eep.c to indicate that this files
includes ath5k related code only.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +01:00
Martin Blumenstingl
a20616863d lantiq: use ath9k device tree bindings binding/owl-loader
This moves the extraction of the eeprom/calibration data to a hotplug
firmware script. Additionally it modifies all .dts to configure ath9k
directly from within the .dts.

The owl-loader approach enables support on devices with exotic eeprom
data locations (such as unaligned positions on the flash or data
inside an UBI volume).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[add ath9k caldata mac address patcher]
[fixes DGN3500 wifi mac]
[fixes BTHOMEHUBV3A wifi mac]
[set invalid mac for BTHOMEHUB2B, FRITZ3370, FRITZ7320 & FRITZ7360SL to restore previous random mac behavior]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +01:00
Martin Blumenstingl
448b9b67e1 kernel: mac80211: disable ath9k bands via device tree
These properties allow overriding the settings from the EEPROM
which indicate whether a band is enabled or not.
Setting this property is only needed when the RF circuit does not
support the 2.4GHz or 5GHz band while it is enabled nevertheless in the
EEPROM.

These patches will be replaced with a future upstream version which
will introduces an ieee80211 device tree property to disable bands.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-11-29 21:40:16 +01:00
Martin Blumenstingl
3f889418a5 kernel: mac80211: add pending ath9k EEPROM swapping patches
There are two types of swapping the EEPROM data in the ath9k driver.
Before this series one type of swapping could not be used without the
other.

The first type of swapping looks at the "magic bytes" at the start of
the EEPROM data and performs swab16 on the EEPROM contents if needed.
The second type of swapping is EEPROM format specific and swaps
specific fields within the EEPROM itself (swab16, swab32 - depends on
the EEPROM format).

With this series the second part now looks at the EEPMISC register
inside the EEPROM, which uses a bit to indicate if the EEPROM data
is Big Endian (this is also done by the FreeBSD kernel).
This has a nice advantage: currently there are some out-of-tree hacks
(in OpenWrt and LEDE) where the EEPROM has a Big Endian header on a
Big Endian system (= no swab16 is performed) but the EEPROM itself
indicates that it's data is Little Endian. Until now the out-of-tree
code simply did a swab16 before passing the data to ath9k, so ath9k
first did the swab16 - this also enabled the format specific swapping.
These out-of-tree hacks are still working with the new logic, but it
is recommended to remove them. This implementation is based on a
discussion with Arnd Bergmann who raised concerns about the
robustness and portability of the swapping logic in the original OF
support patch review, see [0].

After a second round of patches (= v1 of this series) neither Arnd
Bergmann nor I were really happy with the complexity of the EEPROM
swapping logic. Based on a discussion (see [1] and [2]) we decided
that ath9k should use a defined format (specifying the endianness
of the data - I went with __le16 and __le32) when accessing the
EEPROM fields. A benefit of this is that we enable the EEPMISC based
swapping logic by default, just like the FreeBSD driver, see [3]. On
the devices which I have tested (see below) ath9k now works without
having to specify the "endian_check" field in ath9k_platform_data (or
a similar logic which could provide this via devicetree) as ath9k now
detects the endianness automatically. Only EEPROMs which are mangled
by some out-of-tree code still need the endian_check flag (or one can
simply remove that mangling from the out-of-tree code).

[0] http://www.spinics.net/lists/linux-wireless/msg152634.html
[1] https://marc.info/?l=linux-wireless&m=147250597503174&w=2
[2] https://marc.info/?l=linux-wireless&m=147254388611344&w=2
[3] 50719b56d9/sys/dev/ath/ath_hal/ah_eeprom_9287.c (L351)

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-11-29 21:40:16 +01:00
Martin Blumenstingl
1847248fc1 kernel: mac80211: backport ath9k device tree support patches
These patches add support for configuring ath9k based devices via
devicetree. This was tested on PCI(e) based devices. This should work
for AHB based devices as well (adding more AHB specific properties may
still be needed) as soon as the ath79 platform is ready to populate the
ath9k wmac via devicetree.
This patchset was accepted upstream, more information can be found on
the linux-wireless list:
https://www.spinics.net/lists/linux-wireless/msg155474.html

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-11-29 21:40:16 +01:00
Matthias Schiffer
a15ea362d7
ar71xx: fix syntax error in /lib/ar71xx.sh
Remove all comments in ubnt_xm_board_detect(), as it's not possible to add
comments to specific lines of the case construct anyways.

Fixes: 9a5801e7 "ar71xx: add model detection for UBNT Rocket Ti"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-11-29 19:53:47 +01:00
Matthias Schiffer
9a5801e7f6
ar71xx: add model detection for UBNT Rocket Ti
Based-on-patch-by: Neal Oakey <neal.oakey@bingo-ev.de>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-11-29 15:37:39 +01:00
Stijn Tintel
9f109876ea kernel: have kmod-ipsec depend on kmod-crypto-echainiv
The ESP algorithms in CBC mode require echainiv, so have kmod-ipsec
depend on kmod-crypto-echainiv.

See upstream commit 32b6170ca59ccf07d0e394561e54b2cd9726038c.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-11-29 12:19:22 +01:00
Felix Fietkau
a07c4977ac brcm47xx: fix initramfs image build error
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 10:20:27 +01:00
Felix Fietkau
f12f77b477 brcm47xx: merge cpu cache workaround patches into one, ensure they get compiled out on mips74k
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 10:20:27 +01:00
Felix Fietkau
1cd7ff3e96 ar71xx: remove squashfs-64k rootfs image from bin directory, the generic one is enough
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 10:20:27 +01:00
Felix Fietkau
eff858e8df ar71xx: remove split kernel/rootfs images where the sysupgrade image can be written to flash directly
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 10:20:27 +01:00
Felix Fietkau
cc550d0005 ar71xx: remove 2MB flash variant of WP543
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 09:55:05 +01:00
Felix Fietkau
12e2beaaed ar71xx: remove legacy devices that cannot be supported due to kernel partition size limits
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 09:51:57 +01:00
Felix Fietkau
35dda35114 ar71xx: remove legacy gzip images
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 09:44:39 +01:00
Felix Fietkau
88f6f0120d ar71xx: remove obsolete jffs2 image building code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 09:44:39 +01:00
Rafał Miłecki
e8fe83e1be iw: drop TX power patch that is part of upstream version now
Applying it again was resulting in duplicated TX info like:
Interface wlan0
        ifindex 6
        wdev 0x1
        addr 00:23:6a:a3:7d:00
        ssid LEDE2
        type AP
        wiphy 0
        channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
        txpower 31.00 dBm
        txpower 31.00 dBm

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-11-29 08:39:57 +01:00
Rafał Miłecki
480473337d kernel: use upstream accepted bcm47xxpart parsing fix
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-11-28 13:15:13 +01:00
Rafał Miłecki
32875a2d79 bcm53xx: use upstream accepted fix for ARM core aborts
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-11-28 13:14:14 +01:00
Rafał Miłecki
cb7ab730c7 firmware-utils: replace md5 code with Alexander Peslyak's implementation
Our current implementation is pretty old and uses some pre-standard/old
ANSI C style that triggers warnings like:
warning: call to function 'MD5_Init' without a real prototype [-Wunprototyped-calls]

This is caused by declarations specified in a following way:
src/md5.h:60:6: note: 'MD5_Init' was declared here
 void MD5_Init ();

Having these warnings makes it harded to notice real problems. We could
try hiding them but it makes more sense to just use a cleaner code.
Another tiny gain from this switch is slightly reduced binary size, on
x86_64 tplink-safeloader's size 48104 became 48003.

The new code is public domain, uses "heavily cut-down BSD license".

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-11-28 07:52:31 +01:00
Hauke Mehrtens
9371542783 lantiq: add Falcon support
This adds support for the Intel Falcon SoC for GPON.

Support for the Falcon SoC was removed in commit c821836395 svn rev:
40392 from OpenWrt, this commit adds it again.

This patch adds a new subtarget for the Falcon SoC, but it still misses
all the drivers needed to control the GPON part.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-11-27 17:40:20 +01:00
Mathias Kresin
5cdbc86329 lantiq: add swconfig to the default packages
The DEVICE_PACKAGES are not included in the initramfs image in case
TARGET_PER_DEVICE_ROOTFS is set. This might produces initramfs images
with a not working network configuration because of a missing swconfig.

Workaround the issues by adding the essential swconfig package to the
default packages selection and deselect swconfig for boards not having
swconfig included before via device packages.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:34:23 +01:00
Mathias Kresin
57d36e5bdd ltq-hcd: drop package
Since ffd7c15500 it isn't used anymore on
any supported target.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:34:23 +01:00
Mathias Kresin
d561b2f5ce gpio-button-hotplug: add more buttons
The keycodes are used by some boards.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:34:23 +01:00
Mathias Kresin
18c64f41c7 treewide: fix button keys codes used in dts
Use keycodes that matches the intended use case based on the label.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:34:23 +01:00
Mathias Kresin
4780e7e994 ramips: add size checks/append metadata where missing
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:34:23 +01:00
Mathias Kresin
6cc0ae27b9 ramips: fix Airlink AR670W factory image
Move the mkwrgimg build step to the makefile. It will be required by
other boards as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:34:23 +01:00
Mathias Kresin
7cc0d8b3bd mvebu: fix typo in image metadata support
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:34:22 +01:00
Mathias Kresin
3228c2a682 ipq806x: more dts cleanup
Remove the wifi5g LED from the the d7800, r7500 and r7800. Albeit this
GPIO is mentioned in the GPL tarball, it doesn't do anything. The
2.4/5 GHz LEDs are connected to the wifi chips and not be controlled
from the the userspace.

Use the LEDs names/colours as they are used in the board manuals. Merge
redundant LED configurations. Use the phy[0|1]tpt trigger for the
wireless LEDs. Remove the workarounds for the not controllable wireless
LEDs.

Fix spi compatible strings and remove superfluous spi-max-frequency
parameters.

If there are two power leds, use one for indicating normal operation and
one for failsafe/upgrade. Keep the on/off state of the main power led
during boot.

Use the usb pinmux settings from the nbg6817 gpl sources.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:33:54 +01:00
Henryk Heisig
e3caadc69d ipq806x: clean up dts files
Set the pinmux to the values found in the GPL tarballs of the boards.
Remove pinmux which are is not used (like nand pinmux for spi
flash boards).

This allows to use the wan orange led of the C2600 which had a wrong
pinmux before. Might fix buttons or leds of other boards as well.

Fix the LED color and the ledswitch key code of the C2600. Rename the
ledgnr to ledswitch.

Add support for indication the boot state using LEDs to the D7800,
NBG6817, R7500 and R7500v2.

Change GPIO active to readable values in D7800, EA8500, R7500,
R7500v2 and R7800.

Change gpioexport to gpio pinmux.

Add proper "drive strenght" to i2c4_pins and use it for RPM on
C2600, D7800, EA8500, R7500, R7500v2.

Remove pcie pinmux from D7800.

Move pinctrl to correct place in NBG6817 and R7800.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2016-11-27 15:24:59 +01:00
Florian Fainelli
97eff5cba5 firmware-utils: Fix build failure in mkmerakifw.c FS#298
Earlier compilers such as GCC 4 do not like anynomous unions, make it a named
union "u", and update the code where relevant.

Fixes FS#298
Fixes: a72e1692b8 ("firmware-utils: Add support for the Cisco Meraki MX60/MX60W")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2016-11-26 22:39:27 +01:00
Julian Kornberger
04a76da1ae ipset: Add InstallDev to provide libipset as library 2016-11-26 22:39:27 +01:00
Martin Blumenstingl
d76ee5bfac lantiq: specify the PCIe controller's interrupt, size and address cells
This allows adding devices to the PCIe controller in the .dts files.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-11-26 22:39:27 +01:00
Martin Blumenstingl
79741dc379 lantiq: Register the device tree node with the PCIe controller
This allows specifying PCI devices as children of the PCIe controller
node to pass configuration data to them.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-11-26 22:39:26 +01:00
Yong-hyu, Ban
c723646f22 ramips: Add missing chunked-io directive to W2914NSV2.dtsi
Fix bug that LEDE failed to boot with this message:

WARNING: CPU: 2 PID: 1 at drivers/spi/spi-mt7621.c:214
mt7621_spi_transfer_one_message+0x28c/0x620()

Signed-off-by: Yong-hyu, Ban <perillamint@gentoo.moe>
2016-11-26 22:39:21 +01:00
Andrew Yong
a7de18718d ramips: SamKnows SK-WB8 DTS cleanup
Use gpio.h definition of GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW. Remove unused backup partition to increase available JFFS space. As long as U-Boot env variable "bootcount" is < 3 (reset to 0 after boot by init script) SamKnow's U-Boot will not attempt to boot from the backup flash address (0xe30000).

Signed-off-by: Andrew Yong <me@ndoo.sg>
2016-11-26 22:35:52 +01:00
Avi H. D
bbdb20f649 kernel: fix typo in input-gpio-encoder package title
Line 115, 'rotary' was misspelled as 'rotay'

Signed off by: Avinash Duduskar <strykar@hotmail.com>
2016-11-26 22:00:30 +01:00
Hannu Nyman
2c05fd7ef4 tools/cmake: update to 3.7.0
Release notes at
https://cmake.org/cmake/help/v3.7/release/3.7.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-11-26 21:59:40 +01:00
Hannu Nyman
a22464b92f tools/quilt: update to 0.65
User-visible changes since 0.64 are as follows:

  - Translation fixes
  - Project settings have priority
  - Reject binary files in patches
  - Fix a race condition in diff_file
  - Performance: Optimizations to the setup command
  - Performance: Optimizations to the bash completion script
  - Test suite: Improve the edit test case
  - Test suite: Make the symlink test more robust
  - Test suite: Test backup failure
  - Test suite: Test the header command with hard links
  - diff: Report diff failures
  - edit: Fix a corner case bug
  - mail: Fix the help text
  - push: Fix the synopsis
  - refresh: Do not remove symlinks
  - refresh: Break links to read-only patch files
  - refresh: Always preserve modification time
  - setup: Report failed look-ups in inspect-wrapper
  - quilt.el: Fix quilt-editable when patches are stored in subdirs
  - bash_completion: Handle spaces in file names
  - bash_completion: Update the list of commands
  - bash_completion: Add new command options
  - bash_completion: Fix handling of mail, new, push options
  - guards: Simplify the help text
  - guards: Include the file name also in the "Not found" case
  - guards: Add support for an external filelist in --check mode
  - guards: Report which config file has problem in --check mode
  - guards: Documentation update
  - guards: Clarify a user message

Note to packagers: the Makefile was modified to take configure's
--sysconfdir into account as other projects do. As a result, setting
--prefix=/usr will no longer put the configuration files under /etc.
You now need to explicitly pass --sysconfdir=/etc. If you don't,
configuration files will go under /usr/etc, which is not what you want.
This is somewhat less intuitive, but also more consistent with what
other projects are doing.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-11-26 21:59:40 +01:00
Hannu Nyman
a6e790b202 tools/scons: update to 2.5.1
RELEASE 2.5.1 - Mon, 03 Nov 2016 13:37:42 -0400
    - Add scons-configure-cache.py to packaging. It was omitted
    - Use memoization to optimize PATH evaluation across
      all dependencies per node.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-11-26 21:59:40 +01:00