Commit graph

16050 commits

Author SHA1 Message Date
Rafał Miłecki
eaf0d22421 bcm53xx: calculate Seama MD5 using content of kernel partition
We don't want checksum to cover any part of UBI as even its part with
SquashFS may be changed due to e.g. flash wearing.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-04 12:32:12 +02:00
Rafał Miłecki
3c014dc306 Revert "bcm53xx: use uncompressed zImages"
This reverts commit b3be33f135.

CFE is known to fail in some non-standard cases, e.g. when using kernel
or format different that what was tested by Broadcom. This kernel change
triggered some problem with booting OpenWrt kernel stored in Seama.

As long as Seama checksum was covering enough data, it was working fine.
We need to change it however, because calculating MD5 over part of UBI
containing SquashFS is unsafe. UBI may move PEBs depending on flash
wearing level which would break CFE booting the image.

For some reason this kernel change was breaking CFE. Calculating MD5
over 0x47ffc0 B data or less (there is 0x40 B long header) was stopping
booting process at:
Starting program at 0x00008000

As our kernel is usually 0x3fffc0 B it was affected by this problem.

Reverting this change fixes sysupgrade (which already uses kernel size
for MD5 calculation) and will allow us to adjust "fixseama" command call
on the first boot.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-04 12:32:12 +02:00
Felix Fietkau
39a229ed4b ipq806x: enable ath10k firmware for 988x, 99x0 and 9984 by default
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-04 11:41:32 +02:00
John Crispin
d09f0045ea ramips: fix up switch settings for Sitecom WL-351 v1 002
Pinmux for rgmii needs to be set to rgmii, not gpio.
Hide the ESW switch on boot (using new rgmii esw devicetree attribute).
Also add a Sitecom-specific profile, since the image needs to include
the rtl8366 kernel driver.

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
2016-07-03 08:00:26 +02:00
Felix Fietkau
e892472b1e x86: enable kmod-igb on 64-bit by default
It is used on APU2 devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-03 19:43:18 +02:00
Felix Fietkau
d5ee23ee27 x86: stop relying on hexdump for image build signature
Use perl to generate random number instead.
See https://github.com/freifunk-gluon/gluon/issues/811

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-03 18:39:11 +02:00
Felix Fietkau
de165b66be imx6: fix redundant PROFILES overrides in image makefile
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-02 19:34:19 +02:00
Felix Fietkau
7e7a31e682 imx6: fix build breakage introduced in 9e41c3f54e
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-02 19:34:19 +02:00
Felix Fietkau
61d82e7b02 imx6: fix image makefile indentation for Device/ sections
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-02 19:34:19 +02:00
Hauke Mehrtens
1d15a96b29 kernel: fix build of kmod-udptunnel4 and kmod-udptunnel6
The kernel config option CONFIG_NET_UDP_TUNNEL is not visible and can
not directly be activated. When kmod-udptunnel4 or kmod-udptunnel6 are
build these packages could be empty when no other kernel module selects
CONFIG_NET_UDP_TUNNEL.

Reported-by: Baptiste Jonglez <baptiste@bitsofnetworks.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-07-02 18:35:58 +02:00
Sergey Sergeev
c312cef223 ar71xx: spi-rb4xx fix.
In new kernels we should use clk_prepare_enable instead of clk_enable
since clk_enable does not make proper initialization that leads
to rise WARN_ON messages and not working spi bus on the device.

Signed-off-by: Sergey Sergeev <adron@yapic.net>
2016-07-02 10:16:17 +02:00
Felix Fietkau
f9e7ffe73b ar71xx: prevent spurious ethernet resets from dma hang check false positives
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-02 10:30:58 +02:00
daniel
f576ff05a1 kernel: Fix ipv6 mc snooping if bridge has no ipv6 address
This patch is a backport for current LEDE 4.4 Kernels.
It is already upstream, for linux-next and stable.
The initial commit message is below:

The bridge is falsly dropping ipv6 mulitcast packets if there is:
 1. No ipv6 address assigned on the brigde.
 2. No external mld querier present.
 3. The internal querier enabled.

When the bridge fails to build mld queries, because it has no
ipv6 address, it slilently returns, but keeps the local querier enabled.
This specific case causes confusing packet loss.

Ipv6 multicast snooping can only work if:
 a) An external querier is present
 OR
 b) The bridge has an ipv6 address an is capable of sending own queries

Otherwise it has to forward/flood the ipv6 multicast traffic,
because snooping cannot work.

This patch fixes the issue by adding a flag to the bridge struct that
indicates that there is currently no ipv6 address assinged to the bridge
and returns a false state for the local querier in
__br_multicast_querier_exists().

Special thanks to Linus Lüssing.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2016-06-30 22:48:39 +02:00
Yousong Zhou
559a7d1177 ar71xx: seama: fix making factory images
rootfs part needs to be aligned to erase block size which is passed as
the 6th argument to Image/Build/Seama  and is now 65536 since commit
commit 5119ee9 "ar71xx: fix bogus hardcoded kernel image size for Seama
images (fixes #20585)", but $(($(6) - 64)) still assumes that the
argument is a limit on kernel partition size, i.e. 1310720, so the
generated factory image is wrong in that the kernel will fail to find
the rootfs (FlySpray link at [1])

This patch will workaround it with the following steps

1. Calculate the required space for seama header and META data in step 5
2. Pre-padding 64 bytes to lzma-compressed loader
3. Generate correctly padded image-$(2).tmp
4. Strip out the padding
5. Seal it with seama utility

While at it convert seama to new build method

[1] FS#35 - mynet-n750 factory images don't find root partition,
    https://bugs.lede-project.org/index.php?do=details&task_id=35

Reported-by: Steven Haigh <netwiz@crc.id.au>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2016-06-30 22:48:39 +02:00
Yousong Zhou
ea284d704b ar71xx: image: unify indentation with 2 whitespaces
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2016-06-30 22:48:39 +02:00
Yousong Zhou
e3cf2cc1c6 ar71xx: image: remove duplicate IMAGES definition
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2016-06-30 22:48:39 +02:00
Yousong Zhou
11cbe29833 ar71xx: hiwifi-hc6361: move packages selection to generic.mk
Remove kmod-crypto-deflate and kmod-ledtrig-gpio as the device works the
same by default without them

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2016-06-30 22:48:39 +02:00
John Crispin
2dc9beddc0 ramips: disable the WP pin on the SDK mmc driver
Signed-off-by: John Crispin <john@phrozen.org>
2016-06-30 22:48:39 +02:00
John Crispin
81add8f753 ramips: fix pinmux typo
Reported-by: Joy Kicer <joykicer@gmail.com>
Signed-off-by: John Crispin <john@phrozen.org>
2016-06-30 22:48:39 +02:00
Daniel Dickinson
e408abd7fb kernel: Add option to make using filesystem ACL support the default
This adds a configuration options that allows to make filesystem ACL support
the default in the kernel, except for old nfs.

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
2016-06-30 22:48:39 +02:00
Matthias Schiffer
0a0caa2656
ramips: set correct LAN/WAN MAC addresses on DIR-860L B1
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
2016-06-30 17:12:38 +02:00
Matthias Schiffer
103ed00cfb
ramips: add button support and make LEDs known to userspace for DIR-860L B1
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
2016-06-30 17:12:38 +02:00
Matthias Schiffer
fa9811814a
ramips: fix fixseama call on first boot
Commit "kernel: mtdsplit: calculate kernel partition precisely for Seama"
changed the kernel partition to only contain the kernel itself and not
the Seama header. Adjust the fixseama call to match what is used on
brcm53xx.

This fixes failing to boot a second time after flashing the factory image
on the affected devices.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
2016-06-30 17:12:38 +02:00
Jo-Philipp Wich
6ee66ae075 ar71xx: further legacy image build fixes
- Add missing macro to trigger the generation of 64k padded squashfs images
- Revert Zcomax image generation to use the prepared 64k squashfs image

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-06-27 15:15:49 +02:00
Felix Fietkau
2270fc5947 Revert "lantiq: enable SMP for XRX200"
This reverts commit cc3bfdb62f.

Apparently the ethernet driver is not SMP safe, as reported in
https://bugs.lede-project.org/index.php?do=details&task_id=27

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-27 13:06:56 +02:00
Felix Fietkau
be08fdd007 ar71xx: disable pdata->use_flow_control for QCA9558
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-27 12:12:40 +02:00
Felix Fietkau
75b2105cd3 ar71xx: rename ethernet pdata->builtin_switch to use_flow_control
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-27 12:12:40 +02:00
Jo-Philipp Wich
8d1218ca73 ar71xx: merge profiles into image building code
- Remove old style device profiles and convert them to device definitions
  within the image building code

- Fix the legacy build macros for the changed eval depth in the legacy
  image build wrapper

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-06-27 11:10:15 +02:00
Hauke Mehrtens
dc140e00a9 kernel: fix missing break in ubi auto-mounting patch
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
2016-06-27 08:10:36 +02:00
Hauke Mehrtens
459a8afff1 kernel: remove igb: Fix Null-pointer dereference patch
This patch is already included in the Linux mainline kernel since
v3.15, remove it from LEDE, see the lines directly before this patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-06-26 18:47:29 +02:00
Hauke Mehrtens
bf32177a1d kernel: remove full cache flush in fuse_copy_do() for MIPS
This patch was introduced in commit r16412 for the brcm47xx target only
and then moved to generic in commit r32395. It was initially added
because of ticket #5186 and should fix some problems with fuse file
systems and MIPS caches. The commit comment in r32395 says that this a
generic problem in MIPS CPUs, but does not name any specifics about
that. There was a fix added to kernel 2.6.21 in commit commit
7575a49f20 "[MIPS] Implement flush_anon_page()." that should fix this
problem, but that was already available before both commits were done
to OpenWrt.

I just tested fuse with ntfs.3g without this patch on a BCM4704
(BMIPS3300 V0.6) SoC and haven't seen any problems. Someone reported
that removing this patch improves some fuse operations by 5 times on
some modern MIPS cores.
My test was only a simple "dd if=/dev/zero of=/mnt/zero bs=5000" to an
USB stick.

This patch removes the patch to OpenWrt, because I assume that it is
not needed any more and Felix, the orginal author, also thinks so.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-06-26 18:22:23 +02:00
Hauke Mehrtens
2abb02419d kernel: remove one of two patches deactivating broken vdso support on mips
The patch target/linux/generic/patches-4.4/206-mips-disable-vdso.patch
should be sufficient.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-06-26 18:22:23 +02:00
Hauke Mehrtens
84d489f64f kernel: update to version 4.4.14
Changelog: https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.14

Some manual changes to target/linux/generic/patches-4.4/610-
netfilter_match_bypass_default_checks.patch were needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-06-26 18:20:37 +02:00
Felix Fietkau
3bf3512673 Revert "ar71xx: prevent spurious ethernet resets from dma hang check false positives"
This reverts commit 3d58d7f053.
2016-06-26 16:53:11 +02:00
Felix Fietkau
3d58d7f053 ar71xx: prevent spurious ethernet resets from dma hang check false positives
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-26 11:21:17 +02:00
Felix Fietkau
26b8db2537 ar71xx: enable flow control for ethernet MACs with built-in switch
Should fix LAN speed issues on some devices. This is an updated version
of the previously reverted commit with the same name.
It improves the check for MACs connected to a built-in switch

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-26 11:21:17 +02:00
John Crispin
3874773503 Revert "ar71xx: fix legacy image building"
This reverts commit 59e98b27c9.

and

Revert "ar71xx: merge profiles into image building code"

This reverts commit 636089ead6.

these are still causing issues

Signed-off-by: John Crispin <john@phrozen.org>
2016-06-23 19:33:31 +02:00
Jo-Philipp Wich
59e98b27c9 ar71xx: fix legacy image building
After the conversion from legacy device profiles to the newer profile
information embedded in the image building code, the legacy recipes got
triggered twice with different eval depths, leading to shell syntax errors
when processing certain images.

The double processing was caused by the remaining Image/Build macro in
legacy.mk which serves as main entry point for the new style image build code
in conjunction with the newly introduced LegacyDevice/* macros which caused
the legacy image build fallback code to kick in.

In order to fix the issue, rework all legacy macros to work under the legacy
image build wrapper and remove the Image/Build macro of legacy.mk to prevent
legacy profiles getting executed in the context of the new build code.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-06-24 13:43:40 +02:00
John Crispin
636089ead6 ar71xx: merge profiles into image building code
Signed-off-by: John Crispin <john@phrozen.org>
2016-06-22 19:32:06 +02:00
Roger Pueyo Centelles
5fba0f0c0c ramips: add suport for ZBT APE522II
The ZBT APE522II is a dual-radio outdoor CPE based on the MT7620a SoC. It has
64 MB RAM, 8 MB flash, 2 Fast Ethernet ports via internal switch (one with
802.3af 48V PoE support), a 802.11b/g/n SoC 2.4 GHz radio and an 802.11a/n/ac
MT7612E-based 5 GHz radio.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2016-06-22 19:32:06 +02:00
Adrian Panella
184087f4f1 ipq806x: enable ieee80211 phy hotplug and patch macaddress
Calibration data for QCA99x0 in this device has bogus macaddress.
The data cannot be modified directly, as it breaks checksum control.
Instead change the macaddress from phy add hotplug event.

Signed-off-by: Adrian Panella <ianchi74@outlook.com>
2016-06-22 19:32:06 +02:00
Hauke Mehrtens
f97ad870e1 squashfs4: use upstream xz compression header format
In the upstream kernel and the upstream squashfs4 tools the xz
compression header looks the following:
struct disk_comp_opts {
        __le32 dictionary_size;
        __le32 flags;
};

We added some other members and also moved some existing members. Place
the members which are already in upstream header at the same position
as in that kernel and add our own at the end. The kernel should not
have a problem when there are some additional members and just ignore
them.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-06-22 19:32:06 +02:00
Mathias Kresin
f080cfab72 lantiq: fix network in failsafe
So far the network in failsafe is setup only for one board. Use the
eth0 interface as lan interface for all boards for now.

If a board has its lan interface(s) on another eth, a special
handling based on the board name can be added.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-06-22 19:32:06 +02:00
Alexey Brodkin
acd41539d6 linux: arc: disable kernel unwinding to fix modules loading
With update of binutils for ARC (this is now based on upstream 2.26)
we noticed issues with loadable kernel modules.

Something like that was happening:
--------------------->8-------------------
mbcache: unknown relocation: 49
insmod: can't insert './mbcache.ko': invalid module format
--------------------->8-------------------

More details could be found in that discussion in binutils mailing list:
http://thread.gmane.org/gmane.comp.gnu.binutils/74662

As of now the simplest work-around is to disable in-kernel unwinder
for now. That will at least allow us to use modules again.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: John Crispin <john@phrozen.org>
2016-06-22 19:32:06 +02:00
Sven Eckelmann
776613eeba ipq806x: Fix typo in Qualcomm device names
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2016-06-22 19:32:06 +02:00
Oswald Buddenhagen
9759fde40a lantiq: add support for ARV7506PW11 (Alice/O2 IAD 4421)
Ethernet, ADSL2+ and LEDs are fully functional.

Supporting the two TAE ports and SIP gateway was not attempted.

The WiFi is unreliable, due to experimental support for rt35xx family
devices by the rt2800pci driver.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
[rebase to LEDE HEAD]
[switch to normal image instead of brnboot image]
[remove not required pinmux child nodes keys, leds, ebu, exin, pci_in and pci_out]
[remove switch_rst pinmux child node (no support for hw reset in driver/setting a default GPIO value in DT]
[enable usage of the wireless LED]
[fixup mac address configuration]
Sgned-off-by: Mathias Kresin <dev@kresin.me>
2016-06-22 19:32:06 +02:00
Yousong Zhou
b67066b8fa ar71xx: hiwifi-hc6361: lift size limit on kernel and rootfs parts
The patch has been run-tested and the relevant dmsg logs are as the
following

    [    0.762447] Creating 5 MTD partitions on "spi0.0":
    [    0.767217] 0x000000000000-0x000000010000 : "u-boot"
    [    0.775139] 0x000000010000-0x000000020000 : "bdinfo"
    [    0.781014] 0x000000020000-0x000000fe0000 : "firmware"
    [    0.810558] 2 uimage-fw partitions found on MTD device firmware
    [    0.815043] 0x000000020000-0x000000170000 : "kernel"
    [    0.821925] 0x000000170000-0x000000fe0000 : "rootfs"
    [    0.827587] mtd: device 4 (rootfs) set to be root filesystem
    [    0.831937] 1 squashfs-split partitions found on MTD device rootfs
    [    0.837983] 0x0000005c0000-0x000000fe0000 : "rootfs_data"
    [    0.845621] 0x000000fe0000-0x000000ff0000 : "backup"
    [    0.851445] 0x000000ff0000-0x000001000000 : "art"

While at it, convert to new build method

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2016-06-22 19:32:06 +02:00
Ben Whitten
b7baaaf782 kernel: Move append-dtb to common image-commands
This build step is used by various targets, move it to a common section.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
2016-06-22 19:32:06 +02:00
Daniel Gimpelevich
34fdfbf328 lantiq: Slow down SPI flash on the DGN3500
The bootloader uses 30 MHz as the SPI frequency for flash on the Germany and
North America models, and 50 MHz for it on the worldwide model, but the Lantiq
SPI driver in OpenWrt and LEDE may access the flash differently such that
writes are capped at 20 MHz, leading to read errors reported on the worldwide
model at 30 MHz.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Acked-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2016-06-22 19:32:06 +02:00
John Crispin
f054e82bdc lantiq: remove gr7000 support
this seems to have never worked as the wrong SoC is selected

Signed-off-by: John Crispin <john@phrozen.org>
2016-06-22 19:32:06 +02:00