Commit Graph

20274 Commits (be2b61e4f1ec1e351733bebb7105629599034639)

Author SHA1 Message Date
David Bauer 01dcd574a2 ramips: add support for Archer C50 v4
This adds support for the TP-Link Archer C50 v4.
It uses the same hardware as the v3 variant, sharing the same FCC-ID.

CPU:   MediaTek MT7628 (580MHz)
RAM:   64M DDR2
FLASH: 8M SPI
WiFi:  2.4GHz 2x2 MT7628 b/g/n integrated
WiFI:  5GHz 2x2 MT7612 a/n/ac
ETH:   1x WAN 4x LAN
LED:   Power, WiFi2, WiFi5, LAN, WAN, WPS
BTN:   WPS/WiFi, RESET
UART:  Near ETH ports, 115200 8n1, TP-Link pinout

Create Factory image
--------------------
As all installation methods require a U-Boot to be integrated into the
Image (and we do not ship one with the image) we are not able to create
an image in the OpenWRT build-process.

Download a TP-Link image from their Wesite and a OpenWRT sysupgrade
image for the device and build yourself a factory image like following:

TP-Link image:             tpl.bin
OpenWRT sysupgrade image:  owrt.bin

 > dd if=tpl.bin of=boot.bin bs=131584 count=1
 > cat owrt.bin >> boot.bin

Installing via Web-UI
---------------------
Upload the boot.bin via TP-Links firmware upgrade tool in the
web-interface.

Installing via Recovery
-----------------------
Activate Web-Recovery by beginning the upgrade Process with a
Firmware-Image from TP-Link. After starting the Firmware Upgrade,
wait ~3 seconds (When update status is switching to 0%), then
disconnect the power supply from the device. Upgrade flag (which
activates Web-Recovery) is written before the OS-image is touched and
removed after write is succesfull, so this procedure should be safe.

Plug the power back in. It will come up in Recovery-Mode on 192.168.0.1.
When active, all LEDs but the WPS LED are off.
Remeber to assign yourself a static IP-address as DHCP is not active in
this mode.

The boot.bin can now be uploaded and flashed using the web-recovery.

Installing via TFTP
-------------------
Prepare an image like following (Filenames from factory image steps
apply here)

 > dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1
 > dd if=tpl.bin of=tmp.bin bs=131584 count=1
 > dd if=tmp.bin of=boot.bin bs=512 skip=1
 > cat boot.bin >> tp_recovery.bin
 > cat owrt.bin >> tp_recovery.bin

Place tp_recovery.bin in root directory of TFTP server and listen on
192.168.0.66/24.

Connect router LAN ports with your computer and power up the router
while pressing the reset button. The router will download the image via
tftp and after ~1 Minute reboot into OpenWRT.

U-Boot CLI
----------
U-Boot CLI can be activated by holding down '4' on bootup.

Dual U-Boot
-----------
This is the first TP-Link MediaTek device to feature a split-uboot
design. The first (factory-uboot) provides recovery via TFTP and HTTP,
jumping straight into the second (firmware-uboot) if no recovery needs
to be performed. The firmware-uboot unpacks and executed the kernel.

Web-Recovery
------------
TP-Link integrated a new Web-Recovery like the one on the Archer C7v4 /
TL-WR1043v5. Stock-firmware sets a flag in the "romfile" partition
before beginning to write and removes it afterwards. If the router boots
with this flag set, bootloader will automatically start Web-recovery and
listens on 192.168.0.1. This way, the vendor-firmware or an OpenWRT
factory image can be written.

By doing the same while performing sysupgrade, we can take advantage of
the Web-recovery in OpenWRT.

It is important to note that Web-Recovery is only based on this flag. It
can't detect e.g. a crashing kernel or other means. Once activated it
won't boot the OS before a recovery action (either via TFTP or HTTP) is
performed. This recovery-mode is indicated by an illuminated WPS-LED on
boot.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Christian Lamparter 53cc74bfa7 gemini: dlink-dir-685: fix rt2800-pci package name
The package is now called kmod-rt2800-pci.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Oever González a873b29284 ipq40xx: add support for Linksys EA6350v3
Specifications:
SOC: Qualcomm IPQ4018
RAM: 256 MiB Samsung K4B2G1646F-BYK0
FLASH1: MX25L1605D 2 MB
FLASH2: Winbond W25N01GV 128Mb
ETH: Qualcomm QCA8075
WLAN0: Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN1: Qualcomm Atheros QCA4018 5GHz 802.11n/ac W2 2x2
INPUT: WPS, Reset
LED: Status - Green
SERIAL: Header at J19, Beneath DC Power Jack
        1-VCC ; 2-TX ; 3-RX; 4-GND;
        Serial 115200-8-N-1.

Tested and working:
- USB (requires extra packages)
- LAN Ethernet (Correct MAC-address)
- WAN Ethernet (Correct MAC-address)
- 2.4 GHz WiFi (Correct MAC-address)
- 5 GHz WiFi (Correct MAC-address)
- Factory installation from Web UI
- OpenWRT sysupgrade
- LED
- Reset Button

Need Testing:
- WPS button

Install via Web UI:
- Attach to a LAN port on the router.
- Connect to the Linksys Smart WiFi Page (default 192.168.1.1) and login
- Select the connectivity tab on the left
- In the manual update box on the right
- Select browse, and browse to
  openwrt-ipq40xx-linksys_ea6350v3-squashfs-factory.bin
- Click update.
- Read and accept the warning
- The router LED will start blinking. When the router LED goes solid, you
  can now navigate to 192.168.1.1 to your new OpenWrt installation.

Sysupgrade:
- Flash the sysupgrade image as usual. Please: try to do a reset everytime
  you can (doing it with LuCI is easy and can be done in the same step).

Recovery (Automatic):
- If the device fails to boot after install or upgrade, whilst the unit is
  turned on:
1 - Wait 15 seconds
2 - Switch Off and Wait 10 seconds
3 - Switch on
4 - Repeat steps 1 to 3, 3 times then go to 5.
5 - U-boot will have now erased the failed update and switched back to the
    last working firmware - you should be able to access your router on
    LAN.

Recovery (Manual):
- The steps for manual recovery are the same as the generic u-boot tftp
  client method.

Back To Stock:
- Use the generic recovery using the tftp client method to flash the
  "civic.img". Also you can strip-and-pad the original image and use
  the generic "mtd" method by flashing over the "kernel" partition.
* Just be careful to flash in the partition that the device is currently
  booted.

Signed-off-by: Ryan Pannell <ryan@osukl.com>
Signed-off-by: Oever González <notengobattery@gmail.com>
[minor edits, removed second compatible of nand, added dtb entry to 4.19]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Petr Štetiar 89afabf9f8 ath79: dts: Unify naming of gpio-led nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[split up, removed entries where it could clash due to ath9k-leds]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Petr Štetiar a012b3dfa8 ath79: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Deng Qingfang c2bcdabf2a ramips: fix support for MX25L25635F flash
Patch picked from commit 82618062cf

This enables 4B opcodes for MX25L25635F, to fix the reboot crash
issue (FS#1120) At least 3 devices are using this flash
- GeHua GHL-R-001
- Youku YK1
- Newifi D1

Now the MX25L25635F can be correctly detected without breaking MX25L25635E
[ 3.034324] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[ 3.045962] m25p80 spi0.0: mx25l25635f (32768 Kbytes)
[ 3.056098] 4 fixed-partitions partitions found on MTD device spi0.0
[ 3.068748] Creating 4 MTD partitions on "spi0.0":

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [added deprecation notice]
5 years ago
David Bauer b368373fab mpc85xx: add support for OCEDO Panda
CPU:   FSL P1020 (2x 800MHz E500 PPC)
RAM:   1GB DDR3
FLASH: 256MiB NAND
WiFi:  2x Atheros AR9382 2x2:2 abgn
ETH:   2x BCM54616S - 1x BCM53128 8-port switch
LED:   5x LEDs (Power, WiFi1, WiFi2, N/D, SYS)
BTN:   1x RESET

Installation
------------

1. Download initrams kernel image, dtb binary and sysupgrade image.

2. Place initramfs kernel into tftp root directory. Rename to
"panda-uimage-factory".

3. Place dtb binary into tftp root directory. Rename to "panda.fdt".

4. Start tftp server on 192.168.100.8/24.

5. Power up the device with the reset button pressed. It will download
the initrams and dtb via tftp and boot into OpenWRT in RAM.

6. SSH into the device and remove the factory partitions.

 > ubirmvol /dev/ubi0 --name=kernel1
 > ubirmvol /dev/ubi0 --name=rootfs1
 > ubirmvol /dev/ubi0 --name=devicetree1

You will have around 60 MiB of free space with that.

You can also delete "kernel2", "devicetree2", "rootfs2" and "storage"
respectively in case you do not want to go back to the vendor firmware.

7. Modify the U-Boot bootcmd to allow for booting OpenWRT

 > fw_setenv bootcmd_owrt "ubi part ubi && ubi read 0x1000000 kernel
   && bootm 0x1000000"

 > fw_setenv bootargs_owrt "setenv bootargs console=ttyS0,115200
   ubi.mtd=3,2048"

 > fw_setenv bootcmd "run bootargs_owrt; run bootcmd_owrt"

8. Transfer the sysupgrade image via scp into the /tmp directory.

9. Upgrade the device

 > sysupgrade -n /tmp/<imagename>

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
David Bauer 90bfbed7c2 mpc85xx: use generic diag.sh
This commit removes the target-specific diag.sh script. This way, the
generic one is used for the target, which uses DT-aliases to specify the
LEDs used.

This way, we are also able to use different LEDs to indicate different
states. We use green status LEDs for indicating boot and a running
system. Where possible, the red status LED is used to indicate failsafe
mode and a running upgrade.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Christian Lamparter b2e1333de3 ipq40xx: 4.19: fix pcie wifi unit-address of the MR33 and A62
The unit address should be wifi@1,0 since the device is located
at 0000:01:00.0.

Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Mathias Kresin 1f0e08cf95 gemini: add EOD marker to rootfs images
With 6409b159e8 ("gemini: switch to 4.14") the EOF marker were dropped
from the rootfs images. Without the marker the rootfs_data partition
can't be created and it isn't possible to permanently store any
configuration changes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 82c7699dd8 gemini: fix ITian Square One SQ201 package selection
All kernel modules are prefixed with kmod-. Add the prefix to include
the desired packages.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin a565659c29 gemini: replace date placeholder
Replace the data placerholder in ImageInfo-itian_sq201 in a reproducible
way.

The code for the replace was accidentality dropped in 5bac623895
("gemini: unify and fix ib-nas4220b and sq201 image creation")

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 67d39c03ec gemini: drop Teltonika RUT1xx artifacts
Support for the Teltonika RUT1xx was added with the switch to kernel
4.4. Hidding such changes in a kernel switch commit is the wrong way and
the support for the Teltonika RUT1xx is pretty much incomplete.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 2a8fe45df5 gemini: add wiligear image build code
They were dropped with 6409b159e8 ("gemini: switch to 4.14") without
any explaination.

The image generation is disabled for now as it would break the build for
the target. The mkfwimage2 call need to be adjusted to reflect the real
size of kernel and rootfs. Nevertheless, add the required code to give
interested parties a chance to fix the remaining issues.

The dts would need to use the ecoscentric,redboot-fis-partitions
partition parser to get the correct partition offsets and size. It's
expected that the OEM firmware adjusts the on flash partition table with
the values defined in the image header.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 7055cb0acc gemini: fix alphabetical order
Reorder the image recipes to keep the alphabetical order.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 0013c94025 gemini: use dts compatible based image filenames
Use an output image filename based on the compatible string from the dts
files. This way it is way easier to get for which board an image is
intended.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin b9c6862d9d gemini: drop unnecessary image build default variables
They are either not required, set to an earlier set default value or
defined due to target features.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 7f17f3b418 gemini: drop unnecessary images
The root filesystem is already part of the factory image and most likely
not required at all.

The same applies to the kernel images.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin b010519f1e gemini: all images are factory images
There is no support for sysupgrade in gemini, hence all images are only
suitable for an installation via bootloader or oem firmware.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 10dab9b098 gemini: follow common pattern for temp dir naming
For temporary directories <imagename>.tmp is a common pattern in image
build code across the tree. Use it for the nas4220b/sq201 recipe as
well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 98c2261ac2 gemini: use existing build code where possible
Use the existing image build recipes in favour of introducing deplicate
shell code.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 1e606edce6 gemini: make all tar files more reproducible
Force a fixed sorting and use the parameters to create reproducible
archives for all tar invocations.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 6491643df4 gemini: build images in temporary directories
Create files in temporary directories within the build directory
instead manipulating files in the (final) output directory.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 0ffa6bae0a gemini: don't hardcode image filenames
Use the existing image build code mechanisms to specify the image output
filename.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin ec0d58ede4 gemini: fix parallel build
Due to the missing PROFILES all images are build, regardless of the
selected (or currently processed in case of a multi profile build).

Because of the race condition builds with eight parallel jobs fail,
which can be seen on the build bots as well.

Add the PROFILES variable for now, till the root cause is identified.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Tomasz Maciej Nowak 650df59e8a mvebu: remove default profile
When using Image Builder and building image for Cortex A53 or
A72 subtargets, it'll fail with following message:

Collected errors:
 * opkg_install_cmd: Cannot install package mwlwifi-firmware-88w8864.
 * opkg_install_cmd: Cannot install package mwlwifi-firmware-88w8964.
make[2]: *** [Makefile:153: package_install] Error 255
make[1]: *** [Makefile:114: _call_image] Error 2

This is beacuse both packages are available only for Cortex A9 subtarget
and are included in PACKAGES array in default profile. Instead patching
this, let's remove profiles completely, since all necessary packages are
specified in DEVICE_PACKAGES array for each device.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
David Bauer 25eb02ae8e ipq40xx: remove misplaced MR33 UCI definition
This removes the misplaced UCI-network configuration for the MR33. The
LAN port is set in 01_leds while it is already correctly defined in
02_network.

This was most likely an oversight as no network configuration belongs
into 01_leds.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Robert Resch 53c25fa2c4 lantiq: Add support for 2nd USB port on Fritz!Box 7320 and 7330
Enable support for 2nd USB port, which is available on Fritz!Box 7320
and 7330. It was run-tested on 7320 and 7330 as well.

Signed-off-by: Robert Resch <openwrt@webnmail.de>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
David Bauer d4ba7bab25 lantiq: make AVM FRITZ!Box naming consistent
This commit changes the model string and device title of all AVM boards
to fit the naming of the manufacturer.

Drop all provider-specific titles as they are re-used for every device
generation by 1&1. The original AVM model name is printed on the bottom
of every devices.

Exception applies for boards which are only supported by a specific
sub-revision.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
David Bauer 915fbd4e31 ramips: adjust Netgear R6120 model name
Adjust the model string and device title to match other Netgear routers
in the ramips target.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Jeff Kletsky ee3120a9db ath79: fix GL.iNet AR300M family GPIOs/LEDs
Change the "status" LED to proper GPIO 12 and "red" naming.

Remove GPIO 2 from definition as a USB LED.

GPIO 2 is used to control power to the USB socket, not an LED.
As such, PWM on the line or typical LED triggers are inappropriate.

Users who wish to control the USB power for custom applications
can manipulate the GPIO through code, or for example, export it
through /sys/class/gpio/export.

Runtime-tested:  GL.iNet AR300M-Lite

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years ago
Jo-Philipp Wich f01044e85c kernel: fix sdhci-msm build error
A missing upstream stable backport leads to the following build error:

     CC      drivers/mmc/host/sdhci-msm.o
    drivers/mmc/host/sdhci-msm.c:1158:3: error: 'const struct sdhci_ops' has no member named 'write_w'
      .write_w = sdhci_msm_write_w,
       ^~~~~~~
    drivers/mmc/host/sdhci-msm.c:1158:13: warning: excess elements in struct initializer
      .write_w = sdhci_msm_write_w,
                 ^~~~~~~~~~~~~~~~~
    drivers/mmc/host/sdhci-msm.c:1158:13: note: (near initialization for 'sdhci_msm_ops')
    scripts/Makefile.build:326: recipe for target 'drivers/mmc/host/sdhci-msm.o' failed

Solve the issue by backporting commit
99d570da30 ("mmc: Kconfig: Enable CONFIG_MMC_SDHCI_IO_ACCESSORS")
from linux-stable.

Ref: 528508ae8b (commitcomment-32049231)
Fixes: 528508ae8b ("kernel: bump 4.14 to 4.14.95")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Christian Lamparter 5bac623895 gemini: unify and fix ib-nas4220b and sq201 image creation
Both Build/sq201-images and Build/nas4220b-images scripts
are very similar. This patch unifies both methods at the
cost of renaming the produced sysupgrade file names, but
with the benifit of creating better reproducible files.

The patch also fixes a race in parallel builds in which case
the ImageInfo of one device could end up in both sysupgrade
files.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Christian Lamparter de07a0a29a gemini: lazy set IMAGE_NAME
Currently, IMAGE_NAME is expanded at declaration time
and this causes strange filename in the builder's logs:

|cp: cannot stat '[...]/openwrt-gemini-dlink-dns-313-.': No such file or directory
|cp: cannot stat '[...]/openwrt-gemini-nas4220b-.': No such file or directory
|[...]

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Petr Štetiar 71cf3eab25 layerscape: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar 9292822023 oxnas: dts: Unify naming of gpio-led nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar 4a954e8620 oxnas: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Christian Lamparter b5f6ede3c4 kernel: 4.19: use upstream usbport led trigger fix
This patch replaces the current hack with a better
version of the RFC patch has been accepted upstream.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Petr Štetiar 6928d06a7e ipq806x: dts: Unify naming of gpio-led nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar 93c30bef7c ipq806x: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar 540a7d1ecc ipq40xx: dts: Unify naming of gpio-led nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar 98c6c8cdfe ipq40xx: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Christian Lamparter f932137385 apm821xx: dts overhaul
- remove stray #address-cells / #size-cells

 - fix partition unit-addresses in wd-mybooklive.dts

 - remove index from MBL's gpio node name

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Petr Štetiar cbb44f6ed7 apm821xx: dts: Unify naming of gpio-led nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar a692eecda1 apm821xx: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar 87dcf24548 at91: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Christian Lamparter 1aa00f9d13 brcm2708: boot-part feature integration
This patch adds the boot-part feature which enables the brcm2708
target move from the custom boot partition size config option to
the generic CONFIG_TARGET_KERNEL_PARTSIZE.

Note:
For people using custom images: Just like with
CONFIG_TARGET_ROOTFS_PARTSIZE changing the value
can cause sysupgrade to repartition the device!
Make sure to have a backup in this case.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Koen Vandeputte 528508ae8b kernel: bump 4.14 to 4.14.95
Refreshed all patches.

Removed superseded patches:
- 0400-Revert-MIPS-smp-mt-Use-CPU-interrupt-controller-IPI-.patch

Compile-tested on: ar71xx, cns3xxx, imx6, lantiq (xrx200, AVM 3370), x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6, lantiq (xrx200, AVM 3370)

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Mathias Kresin <dev@kresin.me>
Tested-by: Robert Resch <openwrt@webnmail.de>
5 years ago
HsiuWen Yen fe7d965ea9 ramips: fix two-way hash and auto ageout on MT7621
Current code directly writes the FOE entry to hash_val+1 position
when hash collision occurs. However, it is found that this behavior
will cause the cache and the hardware FOE table to be inconsistent.

For example, there are three flows, and their hashed values are all
equal to 100. The first flow is written to the position of 100. The
second flow is written to the position of 100+1. Then, the logic of
the current code will also write the third flow to 100+1.

At this time, the cache has flow 1 and 2; and the hardware FOE table
has flow 1 and 3, where these two parts store different contents.
So it is necessary to check whether the hash_val+1 is also occupied
before writing. If hash_val+1 is also occupied, we won’t bind th
third flow to the FOE table.

Addition to that, we also cancel the processing of foe_entry removal
because the hardware has auto age-out ability. The hardware will
periodically iterate through the FOE table to find out the time-out
entry and set it as INVALID.

Signed-off-by: HsiuWen Yen <y.hsiuwen@gmail.com>
5 years ago
Sebastian Kemper 69dfdda157 ath79: fix port order for dir 825-c1 and 835-a1
LAN ports 1 and 4 and 2 and 3 are interchanged. Fix this in 02_network
so the ports show up in the correct order in luci.

The correct ucidef_add_switch line is already present. This commit moves
the blocks around to keep alphabetical order.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
5 years ago
Milan Krstic 39ede7bc67 ar71xx: ag71xx: preserve port mirror flags during swconfig apply
The swconfig load operation always triggers 'apply' function which in
this driver currently clears port mirroring flags effectively undoing
port mirroring configuration.

This fix preserves port mirroring flags during apply.

Signed-off-by: Milan Krstic <milan.krstic@gmail.com>
5 years ago
Milan Krstic 76a629ee35 ath79: ag71xx: preserve port mirror flags during swconfig apply
The swconfig load operation always triggers 'apply' function which in
this driver currently clears port mirroring flags effectively undoing
port mirroring configuration.

Signed-off-by: Milan Krstic <milan.krstic@gmail.com>
5 years ago
Hao Dong 62dadcb86c bcm53xx: add support for Phicomm K3
Hardware specifications:

- CPU: Broadcom BCM4709C0 @1.4GHz (Dual-Core ARM)
- RAM: 512 MB (DDR3)
- Flash: 128 MB (NAND)
- LAN ports: 3, LAN speed: 10/100/1000
- WAN ports: 1, WAN speed: 10/100/1000
- 2.4G: BCM4366 4x4 MIMO 1000Mbps -- Skyworks SE2623L 2.4GHz Power Amplifier (x4)
- 5G: BCM4366 4x4 MIMO 2167Mbps -- RFMD RFPA5542 5GHz Power Amplifier Module (x4)
- USB: 1x USB 3.0 port
- 1x LED, 1x reset button, 1x power switch
- 1x system status touch screen

Flash:

- Enter CFE
- Upload the trx file
- Reboot

Signed-off-by: Hao Dong <halbertdong@gmail.com>
5 years ago
Kevin Darbyshire-Bryant 1fdb4a7907 kernel: N_BADCLASS: fix macro to actually work - class e support
Backport upstream patch:

Commit 65cab850f0ee ("net: Allow class-e address assignment via ifconfig
ioctl") modified the IN_BADCLASS macro a bit, but unfortunatly one too
many '(' characters were added to the line, making any code that used
it, not build properly.

Also, the macro now compares an unsigned with a signed value, which
isn't ok, so fix that up by making both types match properly.

Reported-by: Christopher Ferris <cferris@google.com>
Fixes: 65cab850f0ee ("net: Allow class-e address assignment via ifconfig ioctl")
Cc: Dave Taht <dave.taht@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years ago
Mathias Kresin f5e61350e7 ramips: fix firmware splitter for edimax based boards
Use the correct splitter for board with the edimax header.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 116d0f276d kernel: add DT binding support to the Edimax uImage parser
It allows specifying those parsers directly in the DT.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Stijn Tintel 59e62809e6 kernel: remove upstreamed patch from 4.19
This patch applies cleanly, so it doesn't cause errors while rebasing
patches. It results in redifinition of inode_still_linked, causing build
to fail when ubifs is enabled. Drop the patch.

Fixes: a37098a2d0 ("kernel: bump 4.19 to 4.19.16")
Reported-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Stijn Tintel f4ebd1ead0 kernel: drop old symbol from 4.19
CONFIG_LIRC_STAGING was removed in kernel 4.16.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Stijn Tintel a37098a2d0 kernel: bump 4.19 to 4.19.16
Refresh patches.
Remove upstreamed patches:
- backport/096-mips-math-emu-Write-protect-delay-slot-emulation-pages.patch
- backport/096-v4.20-netfilter-ipv6-Preserve-link-scope-traffic-original-.patch
- backport/424-v4.20-net-dsa-fix-88e6060-roaming.patch
- hack/100-mtd-rawnand-qcom-fix-memory-corruption-that-causes-p.patch
- pending/510-f2fs-fix-sanity_check_raw_super-on-big-endian-machines.patch
Update patch that no longer applies:
- backport/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch

Compile-tested: mesongx
Runtime-tested: mesongx

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Koen Vandeputte 63a2ed3ba5 kernel: bump 4.9 to 4.9.150
Refreshed all patches.

Remove upstreamed:
- 096-mips-math-emu-Write-protect-delay-slot-emulation-pages.patch

Altered patches:
- 024-7-net-reorganize-struct-sock-for-better-data-locality.patch

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 5be22ef2fa kernel: bump 3.18 to 3.18.132
Refreshed all patches.

Compile-tested: adm5120
Runtime-tested: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Mathias Kresin 26a016731d firmware-utils: mksercommfw: overhaul image creation
Move the zip compression into a build recipe. Pad the image using the
existing build recipes as well to remove duplicate functionality

Change the code to append header and footer in two steps. Allow to use a
fixed filename as the netgear update image does.

Use a fixed timestamp within the zip archive to make the images
reproducible.

Due to the changes we are now compatible to the gnu89 c standard used by
default on the buildbots and we don't need to force a more recent
standard anymore.

Beside all changes, the footer still looks wrong in compare to the
netgear update image.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Stijn Tintel 8c6f00ef4f kernel: bump 4.14 to 4.14.93
Refresh patches.
Remove upstreamed patches:
- backport/096-mips-math-emu-Write-protect-delay-slot-emulation-pages.patch
- pending/510-f2fs-fix-sanity_check_raw_super-on-big-endian-machines.patch
- brcm2708/950-0415-qmi_wwan-apply-SET_DTR-quirk-to-the-SIMCOM-shared-de.patch

Compile-tested: ar71xx, ath79, brcm2708/bcm27{08,10}, octeon, x86/64
Runtime-tested: ar71xx, ath79, brcm2708/bcm27{08,10}, octeon, x86/64

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Hauke Mehrtens 900c6b1a42 sunxi: Add support for kernel 4.19
This adds supprot for kernel 4.19 to the sunxi target. The patches and
the configuration were copied from the kernel 4.14 patches folder and
adapted for kernel 4.19.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 2eeb5d6aac sunxi: Refresh kernel 4.14 configuration
Refresh the sunxi kernel configuration without doing any intentional
changes.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 0057beab1b sunxi: Use kernel specific sub target configuration
To make it easier to support multiple kernel versions in parallel also
copy the sub target specific kernel configurations into kernel specific
files.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 48f81ee1d0 sunxi: Remove unneeded patches
In the device tree file the higher offsets of the reset controller are
not used, so this patch supporting higher bits is not needed.
The sunxi architecture switched to the simple reset controller with
kernel 4.19 and then this patch does not apply any more.
The sunxi target in OpenWrt is very close to mainline, so if the device
tree files from the mainline Linux kernel need this the mainline kernel
will get support for this.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens cfc9bde379 kernel/modules: Add missing config option
This configuration option was added in kernel 4.15 and is missing in the
kernel 4.19 configuration.

Fixes: ed2839ac41 ("kernel/modules: add kmod-pmbus-zl6100 module")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 403d36ef3d malta: Add support for kernel 4.19
This adds a kernel configuration file for kernel 4.19 on malta.
CONFIG_POWER_RESET_PIIX4_POWEROFF and CONFIG_POWER_RESET_SYSCON were
activated because malta now uses this driver for reboot.

CONFIG_BLK_DEV_SR was also added because it was also added to the kernel
default configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 4ab689c137 malta: Refresh kernel 4.14 configuration
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens c54e4747be kernel: MIPS: Add CPU option reporting to /proc/cpuinfo
Many MIPS CPUs have optional CPU features which are not activates for
all CPU cores. Print the CPU options which are implemented in the core
in /proc/cpuinfo. This makes it possible to see what features are
supported and which are not supported. This should cover all standard
MIPS extensions, before it only printed information about the main MIPS
ASEs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens c7102a7699 kernel/modules: Fix build of kmod-pmbus
This fixes two build problems introduced with the recently added new
kernel module package.

Fixes: ed2839ac41 ("kernel/modules: add kmod-pmbus-zl6100 module")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Chuanhong Guo bd03255ec4 generic: ar8216: ar8327: kill warnings
This fixed warnings caused by returning value in a void function

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
David Bauer 97e4311fca mpc85xx: add support for Sophos RED 15w Rev.1
Hardware
========
CPU:  Freescale P1010 PowerPC
RAM:  128M DDR3
NAND: 128MiB
ETH:  RTL8211F SGMII PHY
      RTL8367B 5-port RGMII switch
      (not connected to SoC - unmanaged)
WiFi: SparkLan WPEA-121N
       - Atheros AR9382 2T2R abgn
USB:  1x USB 2.0
LED:  System, Router, Internet, Tunnel controllable
      LAN1-4, WAN, Power non-controllable
BTN:  None

Installation
============
1. Power on the device while attached to the Console port.

2. Halt the U-Boot by pressing Enter when prompted.

3. Set the correct bootcmd for booting OpenWRT:
 > setenv bootargs_owrt "setenv bootargs console=ttyS0,115200"
 > setenv bootcmd "run bootargs_owrt;
   nand read 0x1000000 0x300000 0x800000;
   bootm 0x1000000;"
 > saveenv

5. Rename OpenWRT initramfs image to 'kernel.bin' and place it in a
   TFTP server root-directory served on 192.168.1.2/24. Connect your
   computer to one of the LAN-ports.

4. Boot OpenWRT initramfs image with
 > run bootargs_owrt; tftpboot 0x1000000 192.168.1.2:kernel.bin;
   bootm 0x1000000;

6. (Optional)
   Make a Backup of 'sophos-os1', 'sophos-os2' and 'sophos-data' in case
   you ever want to go back to the vendor firmware.

7. Create Ubi Volume on mtd4 by executing
 > ubiformat /dev/mtd4 -y

8. Transfer OpenWRT sysupgrade image to the device via SCP and install it
   with
 > sysupgrade -n <openwrt-image-file>

Back to Stock
=============
If you want to go back to the stock firmware, here is the bootcmd of the
vendor firmware:
 > setenv bootargs console=ttyS0,115200 root=/dev/mtdblock5;
   nand read 0xc00000 0x00300000  0x100000;
   nand read 0x1000000 0x00400000 0x00800000;
   bootm 0x1000000 - 0xc00000

Set it via 'setenv' from the U-Boot shell and don't forget to save it
using 'saveenv'!

After this, boot the OpenWRT initramfs image just like you would for
installation. Write back the three vendor partitions using mtd. Reboot
the device afterwards.

Signed-off-by: David Bauer <mail@david-bauer.net>
[refresh and reorder patches]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Christian Lamparter 85be0f4c21 apm821xx: 4.14: sync config
This patch syncs the 4.14 kernel config to the
current generic configuration.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Pawel Dembicki 46d4c09bb6 mpc85xx: disable initramfs image in TL-WDR4900
Initramfs image isn't required for this device and regular
initramfs generation isn't work properly. It create not working
binaries.

This patch disable initramfs image for TL-WDR4900.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
5 years ago
Pawel Dembicki 5de6aed42c mpc85xx: add support for Freescale (NXP) P2020RDB
This commit add initial support for Freescale (NXP) P2020RDB

Hardware:
SoC: P2020 2x1GHz
DRAM: 512-1GB DDR3
2 + 4 GBE (2 separate ports and four in VSC7385)
Flash: 16MB NOR, 32MB NAND, 16MB SPI-NOR
PCIE x1 and mPCIE x1
SD Reader

Interfaces:
GBE RJ45 x6
USB2.0 x1
UART x2
I2C x2
JTAG x1
SD x1
PCIE x2 (PCIE and mPCIE)

Flash instructions:
Place sysupgrade image to 0x80000 address in NOR.
Eg. (no brakelines in setenv command):

setenv 'firmware_flash tftpboot $loadaddr $firmwarefile;
 protect off $norfdtaddr +$filesize; erase $norfdtaddr +$filesize;
 cp.b $loadaddr $norfdtaddr $filesize; protect on $norfdtaddr +$filesize;
 cmp.b $loadaddr $norfdtaddr $filesize'
setenv firmwarefile firmware.bin
run firmware_flash

Boot (no brakeline in setenv command):
setenv bootcmd 'setenv bootargs root=/dev/mtdblock3 rw console=$consoledev,
$baudrate rootfstype=squashfs $othbootargs;
bootm $norfdtaddr'
saveenv
boot

Known issues:
-Switch is unmanaged (VSC 7385 is connected via eLBC, driver uses SPI)
-No SD reader support

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [refreshed patches]
5 years ago
Pawel Dembicki ed2839ac41 kernel/modules: add kmod-pmbus-zl6100 module
This patch adds the kmod packaging for the Intersil / Zilker Labs
ZL6100 and compatible digital DC-DC controllers as well as the
core kernel module for the Power Management Bus.

Add:
kmod-pmbus-core
kmod-pmbus-zl6100

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
5 years ago
Hauke Mehrtens 75fdf3ba01 x86: Add support for kernel 4.19
This adds initial support for kernel 4.19 to the x86 target.
The patches and the kernel configurations were copied from kernel 4.14
and then refreshed.

The legacy and the genode target will not support PAE any more because
they use a CPU type which does not support PAE, the generic sub target
still supports PAE.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens f6e0ecdceb x86: Refresh kernel 4.14 configuration
This refreshes the kernel configuration for kernel 4.14.
First this was run for the legacy target:
	make kernel_oldconfig
Then for all targets including the legacy target this was run:
	make kernel_oldconfig CONFIG_TARGET=subtarget
The option CONFIG_104_QUAD_8 was added to the generic configuration
because it would have been automatically removed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 0ea7160abe x86: Use kernel specific subtarget configurations
This makes it possible to use different sub target configurations for
kernel 4.19 for example.
To support kernel 4.9 and kernel 4.14 with the same configuration file
already needed some extra work this will not be needed for kernel 4.19
any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hans Dedecker 4bd9d331e5 octeon: fix typo in platform.sh
Fix upgrade typo

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Rafał Miłecki 45ce9897c0 kernel: add bcma fix for subdevices DMA parameters
This fixes bgmac DMA allocations with kernel 4.19.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki 34696ce25e kernel: backport bcma patches that improve printing functions
Updated printing functions use dev_* helpers to provide more meaningful
messages.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki 7175b1356e brcm47xx: backport MIPS fix adding struct device for the SoC
It's needed to:
1) Fix GPIOLIB_IRQCHIP as in 4.19 there is no bcma revert anymore
2) Fix /sys/devices/
3) Fix dma_zalloc_coherent() regression

It still needs a bcma change that will follow later.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki 94561333cd brcm47xx: backport a final/accepted Netgear WNDR3400v3 patch
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Koen Vandeputte 630d8b87a5 cns3xxx: use actual size reads for PCIe
upstream commit 802b7c06adc7 ("ARM: cns3xxx: Convert PCI to use generic config accessors")
reimplemented cns3xxx_pci_read_config() using pci_generic_config_read32(),
which preserved the property of only doing 32-bit reads.

It also replaced cns3xxx_pci_write_config() with pci_generic_config_write(),
so it changed writes from always being 32 bits to being the actual size,
which works just fine.

Due to:
- The documentation does not mention that only 32 bit access is allowed.
- Writes are already executed using the actual size
- Extensive testing shows that 8b, 16b and 32b reads work as intended

It makes perfectly sense to also swap 32 bit reading in favor of actual size.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte f56a4e809b kernel: bump 4.14 to 4.14.91
Refreshed all patches.

Removed upstreamed:
- 500-ubifs-Handle-re-linking-of-inodes-correctly-while-re.patch

Compile-tested on: ar71xx, cns3xxx, imx6
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 30d518bf16 kernel: bump 4.9 to 4.9.148
Refreshed all patches.

Altered patches:
- 902-debloat_proc.patch

Removed upstreamed:
- 424-v4.20-net-dsa-fix-88e6060-roaming.patch

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte a18f68ff30 kernel: bump 3.18 to 3.18.131
Refreshed all patches.

Altered patches:
- 902-debloat_proc.patch

Compile-tested on: adm5120
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
John Crispin 93c35bfa21 ramips: whitespace cleanup inside hnat driver
Signed-off-by: John Crispin <john@phrozen.org>
5 years ago
HsiuWen Yen 6b9bdbd493 ramips: add two-way hashing scheme for MT7621
Sometimes the tuples might be hashed to the same FOE entry.
When this hash collision problem occurs, some of the
connections will not be bound and consequently the CPU
idle rate cannot reach 100%. Therefore, two-way hashing
is adopted to alleviate this problem.

Signed-off-by: HsiuWen Yen <y.hsiuwen@gmail.com>
5 years ago
David Bauer 634c733065 ipq40xx: copy Fritz4040 UBoot to STAGING_DIR_IMAGE
Copy U-Boot to STAGING_DIR_IMAGE (and append it to the EVA-image from
there) to fix image generation using the image-builder.

Also remove the bootloader from DEVICE_PACKAGES and instead use the
BUILD_DEVICES directive from within the U-Boot makefile.

This fixes eva-image generation using the OpenWRT image-builder.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Christian Lamparter bbe7ad5a2f mpc85xx: 4.19: refresh kernel config
This patch syncs the 4.19 kernel config to the
current generic configuration.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Christian Lamparter 32420fc6b9 mpc85xx: 4.14: refresh kernel config
This patch syncs the 4.14 kernel config to the
current generic configuration.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Robert Marko bba1428274 ipq40xx: 4.14: Sync kernel config
This patch syncs the 4.14 kernel config to the
current generic configuration.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [reworded commit]
5 years ago
Robert Marko 0c1f1dab59 ipq40xx: 4.19: Sync kernel config
This patch syncs the 4.19 kernel config since the
KERNEL_STACKPROTECTOR and compiler options are
now part of the 4.19 generic config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [reworded commit]
5 years ago
Christian Lamparter 32e953b821 ipq40xx: fix 4.14 ImageBuilder build woes
Robert Marko reported an issue with the current imagebuilder images:
"Imagebuilder includes the new kmod-usb-dwc3-qcom USB driver
package by default even on 4.14. [...] the current state imagebuilder
can't build images under 4.14 at all as the kmod-usb-dwc3-qcom does
not exist in it so it throws and error and exits."

This patch reverts the Makefile to just kmod-usb-dwc3-of-simple and
once the switch to 4.19 is done. It also removes the
kmod-usb-phy-qcom-dwc3 as they only contain the usb-phy drivers for
the ipq806x generation.

Dynamic switching based on the KERNEL_PATCHVER is possible by using:
   $(if $(filter 4.14,$(KERNEL_PATCHVER)),kmod-usb-dwc3-of-simple,kmod-usb-dwc3-qcom)
though it

Fixes: 13321fa142 ("ipq40xx: Use kmod-usb-dwc3-qcom by default")
Fixes: 6e58fb2c33 ("ipq40xx: kmod-usb-dwc3-of-simple vs kmod-usb-dwc3-qcom")
Reported-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Christian Lamparter 3801f8a7f7 apm821xx: MBL: fix kernel/apollo3g.dtb artifact build
The name for the artifact should have been apollo3g.dtb
and not kernel.dtb.

Fixes: 908bdbfce9f9 ("apm821xx: utilize build ARTIFACTs")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Pawel Dembicki 36d45e4cdc mpc85xx: add kernel 4.19 support
Copied config from 4.14

Add patches for 4.19

Drop patch 103-powerpc-fix-build-cross32ar.patch,
because issue was fixed in upstream.

Compiled: generic p1020
Compiled and tested: (unofficial) P2020, TP-Link TL-WDR4900

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [reworded commit]
5 years ago