Commit Graph

360 Commits (b123ffdf6ebaa3108524bb50d306d6ae73ff7405)

Author SHA1 Message Date
Pawel Dembicki 1461eabda3 Revert "kirkwood: disable image for Linksys EA3500 (Audi)"
This reverts commit d9ff499671.

At this moment kernel can be fitted in EA3500 image.

Tested by onefreeman (OpenWrt forum user)
Tested-by: Jacks <jack338c@gmail.com> (Github user @jack338c)
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Pawel Dembicki 28f4ae2e4b kirkwood: refresh kernel config
It was made by running "make kernel_oldconfig".

Suggested-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Pawel Dembicki 987292b20a kirkwood: move ext4 support to modules
Ext4 support is built in kirkwood kernel.

This patch moves ext4 support to modules and enables it for devices
with SATA interface.

Reviewed-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[rebase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Pawel Dembicki e53ec043ba kirkwood: move usb support to modules
USB support built in kernel isn't required for booting.
This patch move USB support to modules.

CONFIG_USB_STORAGE is removed because it can be found in kmod-usb-storage
and all usb support for this targed is moved to kmods.

Tested-by: Cezary Jackiewicz <cezary@eko.one.pl> [nsa310]
Tested-by: Alberto Bursi <bobafetthotmail@gmail.com> [nsa325, ea4500]
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[keep CONFIG_SCSI]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Pawel Dembicki c5356d10c0 kirkwood: move mmc/sd features to modules
All devices are using nand images. Built-in MMC/SD modules are not needed
anymore.

Run tested: pogo v4

Reviewed-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Pawel Dembicki 73c3ba23a4 kirkwood: move sata features to modules
All devices are using nand images. Built-in SATA modules are not needed
anymore.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[only move CONFIG_SATA_MV]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Pawel Dembicki <paweldembicki@gmail.com> [pogo v4]
4 years ago
Pawel Dembicki bbe7124945 kirkwood: move led triggers to dts
This patch moves led trigger settings from 01_leds file to dts.

Now "linux,default-trigger" property is used.

Tested-by: Alberto Bursi <bobafetthotmail@gmail.com> [nsa310,nsa325]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Adrian Schmutzler 64ebf74c05 treewide: drop DEVICE_TYPE when used as device variable
DEVICE_TYPE is a target/subtarget variable, and it does not have
any effect when set in a device definition. It can only be set
in a target's or subtarget's Makefile.

Consequently, having it set anyway is misleading, so this drops
all cases.

This effectively reverts the following commits:
7a1497fd60 ("apm821xx: MBL: set DEVICE_TYPE to NAS")
5b4765c93a ("gemini: Classify Raidsonic NAS IB-4220-B as a NAS")
cdc6de460b ("gemini: D-Link DNS-313 is a NAS")

For the following commit, the variable was set when adding device
support:
27b2f0fc0f ("kirkwood: add support for Iomega Storcenter ix2-200")

Cc: Christian Lamparter <chunkeey@gmail.com>
Cc: Sungbo Eo <mans0n@gorani.run>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler d9ff499671 kirkwood: disable image for Linksys EA3500 (Audi)
Due to the switch to DSA, the kernel image has become too big (2641k) for the
kernel partition (2624k) on this device:

  WARNING: Image file [...]/linux-kirkwood/linksys_audi-uImage is too big

Disable the device until this is fixed, so buildbots can continue their work.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 8b373892d3 kirkwood: remove support for kernel 4.19
kirkwood has moved to DSA on 5.4, which will make kernel 4.14 and 4.19
support broken on the affected devices.
Support on kernel 5.4 seems to have been running fine for almost 2 months
on multiple devices, while support for 4.19 has never left testing state.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Adrian Schmutzler 0af2c44604 kirkwood: remove support for kernel 4.14
kirkwood has moved to DSA on 5.4, which will make kernel 4.14 and 4.19
support broken on the affected devices.
Support on kernel 5.4 seems to have been running fine for almost 2 months
on multiple devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Pawel Dembicki 4fd7e539e4 kirkwood: switch from swconfig to dsa
This patch removes support for swconfig and switches to dsa driver.

swconfig and switch drivers are removed. DSA driver is enabled and
configuration is adjusted.

In kirkwood only two devices have switches: Linksys EA3500 and EA4500.

WAN MAC configuration in 02_network is required because otherwise WAN
would have the same MAC address as lan interfaces. In swconfig solution
the WAN address was assigned in u-Boot to eth1. Now, as eth1 is disabled
and wan is part of the switch, we have to set it manually.

Compile tested: EA3500, EA4500
Run tested: EA4500

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[minor commit title/message adjustments, remove swconfig package
for devices]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Alberto Bursi 43105f24eb kirkwood: fix DTS partitions for Pogoplug E02
The Pogoplug E02 was not using the correct partitions
in device tree, but used the ones from upstream and
thus could not boot OpenWrt images.

In contrast, uboot-kirkwood is using the correct
partitions since d3fc4fbd74 ("uboot-kirkwood: re-add
Pogoplug E02 support").

This patch corrects the partitions in DTS for kernels
4.14, 4.19 and 5.4.

Fixes: 2b0fa00da8 ("kirkwood: add Pogoplug E02 Kernel support")

Signed-off-by: Alberto Bursi <bobafetthotmail@gmail.com>
Reviewed-by: Pawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
[commit title/message facelift, refresh 4.14 patch]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 3f14f034fb treewide: omit IMAGE_SIZE argument from check-size
Now that check-size uses IMAGE_SIZE by default, we can skip the argument from
image recipes to reduce redundancy.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Tomasz Maciej Nowak ddc0e87fae kernel: move TEO governor to generic config
This new symbol popped up in few places. Disable it in generic config.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[fixed merge conflict in generic/config-5.4]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Sungbo Eo 4159054fbb kernel: make kmod-hwmon-core selected by dependent modules
Currently kmod-hwmon-* will not get into images unless kmod-hwmon-core is added
to DEVICE_PACKAGES as well. By changing the dependencies from "depends on" to
"select", we do not have the issue anymore.

Furthermore, we can remove most occurrences of the package from DEVICE_PACKAGES
and similar variables, as it is now pulled by dependent modules such as:
- kmod-hwmon-gpiofan
- kmod-hwmon-lm63
- kmod-hwmon-lm75
- kmod-hwmon-lm85
- kmod-hwmon-lm90

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx, adjust line wrapping]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Yousong Zhou 1d03283eb2 kernel: 5.4: remove some dup config options already set in generic
This furthers 860652f4b9 ("kernel: 5.4: move some kconfig options to
generic")

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years ago
Pawel Dembicki 8438ad26d9 kirkwood: switch kernel version to 5.4
5.4 support is ready and tested.

Compile tested: all target devices
Run tested: pogoplug v4, nsa310b and two unofficial supported devices

Tested-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Alberto Bursi <alberto.bursi@outlook.it> [pogoplug v4 and nsa310b]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[fixed the switch, removed maintainer variable]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Pawel Dembicki 61b4018763 kirkwood: fix switch dts node in EA4500 and EA3500
Changes made in switch nodes in d42c9ce commit causes problem with
correct mvsw61xx detection. This commit undo that changes.

mvsw61xx is platform driver, so it need to be in main root of dts.

Fixes: d42c9ce326 ("kirkwood: add kernel 4.19 support")

Tested-by: Marcin Fedan <mfedan@gmail.com> [EA4500]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Pawel Dembicki 45e47a9cd7 kirkwood: initial refresh of 5.4 patches
Refreshed all patches.
Changed:
105-ea4500.patch-> Upstream DSA driver was updated. Patch was fixed
202-linksys-find-active-root.patch -> Upstream driver was moved. Patch
was fixed

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Pawel Dembicki 43a1767afb kirkwood: initial refresh 5.4 config
Refreshed kernel config with updated NAND config.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Pawel Dembicki 7a3a99c8a6 kirkwood: copy files and config from 4.19 to 5.4
This commit is simple copy config, files and patches from 4.19 to 5.4
kernel. No changes was done.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Adrian Schmutzler 845093e8a0 kirkwood: apply minor DTS style improvements
This applies some minor DTS style improvements to the files kept
in OpenWrt at the moment:

- harmonize/improve LED/pinmux node names
- harmonize empty lines between nodes
- change "ok" to "okay"
- some other minor formatting adjustments

Since changes are only cosmetical, they are only applied to the
"newer" DTS files for kernel 4.19.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 16965a0f3f kirkwood: convert DTS patches into plain DTS files
Move DTS files newly created by patch files to files directory. This will make
these files much more maintainable.

Patching the kernel Makefile is unnecessary, as the DTS files specified in
DEVICE_DTS will be compiled by OpenWrt buildroot anyway.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Koen Vandeputte 7ae2523323 kernel: bump 4.19 to 4.19.106
Refreshed all patches.

Remove upstreamed:
- 950-0786-leds-pca963x-Fix-open-drain-initialization.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Sungbo Eo fc65fae304 kirkwood: remove kmod-i2c-mv64xxx from DEVICE_PACKAGES
Commit 9a1f441ac8 ("kirkwood: enable SoC drivers in the kernel config")
enabled I2C_MV64XXX in the kernel config, and the subsequent commit 0d5ba94088
("orion: enable SoC drivers in the kernel config") removed kmod-i2c-mv64xxx
package entirely. As the feature is now kernel built-in and the package does not
exist anymore, we can safely remove kmod-i2c-mv64xxx from DEVICE_PACKAGES.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 7e9c7e7b2d kirkwood: tidy up hwmon_fancontrol
Add indent and sort board_name alphabetically.

Sourcing /lib/functions.sh is already handled by /etc/rc.common. Drop the line.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 1013b140a6 kirkwood: add kmod-hwmon-core to DEVICE_PACKAGES
kmod-hwmon-lm* will not get into images unless kmod-hwmon-core is added to
DEVICE_PACKAGES as well.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[only address kmod-hwmon-core in this commit]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 4528128b05 kirkwood: tidy up image Makefile
- use k in SIZE variables
- break long lines

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo c24e01fccc kirkwood: fix device node name of Iomega ix2-200
The current device node name of ix2-200 is "iom_ix2_200", which results
in a SUPPORTED_DEVICES string "iom,ix2,200" that does not match the
compatible in DTS and the board name used in board.d.

Fix this by replacing the second underscore with a dash, following
vendor_model scheme.

Fixes: 27b2f0fc0f ("kirkwood: add support for Iomega Storcenter ix2-200")

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[commit title/message rephrase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler aa9c2149a7 kirkwood: do not expose status LED to user config by default
So far, the state of status LEDs is set up in 01_leds for many devices
in kirkwood target. As those LEDs are also controlled by diag.sh,
exposing them to the user via uci config by default seems not helpful
and might even have confusing results for the user.

Thus, remove the ucidef_set_led_default setup for power/status LED, but
do not touch the rest where user control is actually a feature.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 6bbca3a09a kirkwood: set default state for status LEDs in device tree
This adds the default-state = "on"; statement for the power or
primary status LED in DTS on kirkwood. This will ensure that this
LED will be lit up very early in the boot process (i.e. before
diag.sh is executed) and thus will provide an additional hint to the
user when problems arise during early boot process.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler b6db230183 kirkwood: add diag LEDs for ZyXEL NSA325
This device has had no diag LEDs set up so far, so let's just
add them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Pawel Dembicki ae67f5ffae kirkwood: 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.

Generic diag.sh allow to use different LEDs to indicate different states.
Non-red status LEDs for indicating boot and a running system.
Where possible, the red or orange LEDs are used to indicate failsafe
mode and a running upgrade.

Compile-tested: all target devices.
Run-tested: CheckPoint L-50

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[remove unrelated cosmetic changes, rename some labels, add pogo_e02]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 6fe31abc5a kirkwood: exploit BOARD_NAME to set DEVICE_DTS and SUPPORTED_DEVICES
Due to the history of the target, all devices added before a certain
point have the same device string in BOARD_NAME, DEVICE_DTS and added
to SUPPORTED_DEVICES.

Thus, we can set this one automatically for all devices where
BOARD_NAME is specified, removing the explicit DEVICE_DTS and
SUPPORTED_DEVICES addition there.

For new devices, nothing has changed, and just DEVICE_DTS has to
be set manually.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Stephan Knauss fbf297be38 kirkwood: fix HDD LED labels for Zyxel NSA325 in 01_leds
Change the LED labels for hdd1/hdd2 in 01_leds to match their
counterpart in DTS.

Signed-off-by: Stephan Knauss <openwrt@stephans-server.de>
[improve commit title and message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Daniel Golle 411e824ec3 kirkwood: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Eubert Bao e11fc8439c kirkwood: Fix FS#505 - Can't install LEDE on Linksys EA3500
The default sizes render Device/linksys_audi mage un-flashable.
Restore the pagesize, subpagesize, and blocksize for linksys_audi
from https://github.com/openwrt/archive.

Signed-off-by: Eubert Bao <bunnier@gmail.com>
5 years ago
Chuanhong Guo 92e60260d5 treewide: sync bootcount scripts across targets
This commit made the following changes to sync all bootcount scripts:

1. use boot() instead of start()
    This script only needs to be executed once when boot is complete.
    use boot() to make this explicit.

2. drop sourcing of /lib/functions.sh
    This is aready done in /etc/rc.common.

3. ramips: replace board name checking with a case

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Rafał Miłecki 8b4bc7abe0 treewide: sysupgrade: don't use $ARGV in platform_do_upgrade()
stage2 passes image path to platform_do_upgrade() as an argument so it
can be simply accessed using $1

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Moritz Warning 5850487473 kirkwood: split up DEVICE_TITLE
DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years ago
Petr Štetiar 0e1d07af1d kirkwood: image: fix unwanted 2nd inclusion of kernel
In commit d2e18dae28 ("kirkwood: cleanup image build code") the image
build code was refactored, setting KERNEL_IN_UBI=0 which doesn't work as
the KERNEL_IN_UBI needs to be unset in order to make it working as
intended, which leads to factory images with two kernels in them:

 binwalk --keep-going openwrt-kirkwood-cisco_on100-squashfs-factory.bin
 MD5 Checksum:  c33e3d1eb0cb632bf0a4dc287592eb70
 DECIMAL   	HEX       	DESCRIPTION
 -------------------------------------------------------------------------------
 0         	0x0       	uImage header [...] "ARM OpenWrt Linux-4.14.123"
 5769216   	0x580800  	uImage header [...] "ARM OpenWrt Linux-4.14.123"

Cc: Mathias Kresin <dev@kresin.me>
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2285
Fixes: d2e18dae28 ("kirkwood: cleanup image build code")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Jeff Kletsky b3770eaca3 mtd: base-files: Unify dual-firmware devices (Linksys)
Consistently handle boot-count reset and upgrade across
ipq40xx, ipq806x, kirkwood, mvebu

Dual-firmware devices often utilize a specific MTD partition
to record the number of times the boot loader has initiated boot.

Most of these devices are NAND, typically with a 2k erase size.
When this code was ported to the ipq40xx platform, the device in hand
used NOR for this partition, with a 16-byte "record" size. As the
implementation of `mtd resetbc` is by-platform, the hard-coded nature
of this change prevented proper operation of a NAND-based device.

* Unified the "NOR" variant with the rest of the Linksys variants

* Added logging to indicate success and failure

* Provided a meaningful return value for scripting

* "Protected" the use of `mtd resetbc` in start-up scripts so that
   failure does not end the boot sequence

* Moved Linksys-specific actions into common `/etc/init.d/bootcount`

For upgrade, these devices need to determine which partition to flash,
as well as set certain U-Boot envirnment variables to change the next
boot to the newly flashed version.

* Moved upgrade-related environment changes out of bootcount

* Combined multiple flashes of environment into single one

* Current-partition detection now handles absence of `boot_part`

Runtime-tested: Linksys EA8300

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[checkpatch.pl fixes, traded split strings for 80+ chars per line]
5 years ago
Alberto Bursi 4de0a61a62 kirkwood: enable sata port multiplier
Marvell sata controllers in all kirkwood SoCs support
sata port multipliers, just like mvebu.
Enable this feature in the default kernel config
so it is available in normal builds.
tested and working on nsa310b

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
5 years ago
Felix Fietkau 85017c40f4 build: add a config option for enabling a testing version of the target kernel
If the target supports a newer kernel version that is not used by default
yet, it can be enabled with this option

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Koen Vandeputte af6c86dbe5 kernel: bump 4.14 to 4.14.108
Refreshed all patches.

Altered patches:
- 950-0033-i2c-bcm2835-Add-debug-support.patch

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

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

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Paul Wassi d42c9ce326 kirkwood: add kernel 4.19 support
Add patches for 4.19
Drop patch 200-disable-tso, as the packet corruption was fixed in
kernel commit 3b89624ab54b9dc2d92fc08ce2670e5f19ad8ec8

Restructure the DTS for Marvell switch in 104-ea3500 and 105-ea4500
to fix DTC warning.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
5 years ago
Mathias Kresin 80c61c161a treewide: use wpad-basic for not small flash targets
Add out of the box support for 802.11r and 802.11w to all targets not
suffering from small flash.

Signed-off-by: Mathias Kresin <dev@kresin.me>

Mathias did all the heavy lifting on this, but I'm the one who should
get shouted at for committing.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
Felix Fietkau f445953d9f kirkwood: remove linux 4.9 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago