Commit Graph

369 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Adrian Schmutzler 86c89bf5e8 kirkwood: fix sysupgrade experience for early DSA-adopters
Conceptually, the compat-version during sysupgrade is meant to
describe the config. Therefore, if somebody starts with a device on
19.07 and swconfig, and that person does a forceful upgrade into a
DSA-based firmware without wiping his/her config, then the local
compat-version should stay at 1.0 according to the config present
(and not get updated).

However, this poses a problem for those people that early-adopted
DSA in master, as they already have adjusted their config for DSA,
but it still is "1.0" as far as sysupgrade is concerned. This can
be healed by a simple

   uci set system.@system[0].compat_version="1.1"
   uci commit system

But this needs to be applied _after_ the upgrade (as the "old" fwtool
on the old installation does not know about compat_version) and it
requires access via SSH (i.e. no pure GUI solution is available for
this group of people, apart from wiping their config _again_ for
no technical reason). Despite, the situation will not become
obvious to those just upgrading via GUI, they will just have the
experience of a "broken upgrade".

This is a conflict which cannot be resolved by achieving both goals,
we have to decide to either keep the strict concept or improve the
situation for early adopters.

In this patch, we address the issue by providing a uci-defaults
script that will raise the compat_version for _all_ people upgrading
into a 1.1 image, no matter whether they have reset config or not.
The idea is to implement this as a _temporary_ solution, so early
adopters can upgrade into the new mechanism without issues, and
after a few weeks/months we could remove the uci-defaults script
again.

If we e.g. remove the script just before 20.xx.0-rc1, early adopters
should have moved on by then, and existing stable users would still
get the intended experience.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Felix Fietkau b0f7ea2853 kernel: unify CONFIG_GPIO_SYSFS in kernel configs
Enable it for all platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years ago
Adrian Schmutzler 18b7d87a8f kirkwood: get rid of BOARD_NAME and tidy up DEVICE_DTS
Since most of the DTS file names follow a common scheme now, let's
update the automatically generated DEVICE_DTS value and get rid
of some DEVICE_DTS and all BOARD_NAME entries for individual devices.

This should specifically make the job easier for developers adding
new devices, as they are not tempted to copy over BOARD_NAME anymore.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 65305cb448 kirkwood: use real model names for Linksys devices
This replaces the internal device names "Audi" and "Viper" with the
real model names, which a user would look for. This makes the
Linksys devices on this target consistent with the names recently
changed for mvebu based on the same idea.

As a consequence, the "viper" device definition is split into two
separate definitions with the correct names for both real models.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 090779b24e kirkwood: implement compatibility version for DSA migration
This implements the newly introduced compat-version to prevent
upgrade between swconfig and DSA for kirkwood.

Just define a compat version with minor increment and an appropriate
message for both image (in Makefile) and device (in base-files).

Since we never removed SUPPORTED_DEVICES for this target, we don't
have to add it back either.

Attention:

All users that already updated to the DSA versions in master will
receive the same incompatibility warning since their devices are still
"1.0" as far as fwtool can tell.
Those, and only those, can bypass the upgrade check by using force (-F)
without having to reset config again. In addition, the new version
string needs to be put into uci config manually, so the new fwtool
knows that it actually deals with a "1.1":

   uci set "system.@system[-1].compat_version=1.1"
   uci commit system

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
John Audia b6443367d8 kernel: bump 5.4 to 5.4.52
update_kernel.sh refreshed all patches, no human interaction was needed

Build system: x86_64
Run-tested: Netgear R7800 (ipq806x)

Signed-off-by: John Audia <graysky@archlinux.us>
4 years ago
Pawel Dembicki 67ce9aedd6 kirkwood: add support for Check Point L-50
This patch adds support for the Check Point L-50 from 600/1100 series
routers.

Specification:
-CPU: Marvell Kirkwood 88F6281 1200MHz
-RAM: 512MB
-Flash: NAND 512MB
-WiFi: mPCIe card based on Atheros AR9287 b/g/n
-WAN: 1 Gigabit Port (Marvell 88E1116R PHY)
-LAN: 9 Gigabit Ports (2x Marvell 88E6171(5+4))
-USB: 2x USB2.0
-Express card slot
-SD card slot
-Serial console: RJ-45 115200 8n1
-Unsupported DSL

Known issues:
-DSL not supported
-Expresscard not tested

Installation:

Step one -> backup:
make backup u-boot and env for revert stock posibility
make backup dsl_mac_addr, dmz_mac_addr, eth1addr, ethaddr and all lanX_mac_addr

Step two -> Use kwboot tool to upload openwrt u-boot to RAM:

run kwboot: "kwboot -B 115200 /dev/ttyUSB0 -b u-boot.kwb -p -t"
end start u-boot

Step three -> Restore macs (e.g. below):
setenv eth1addr 00:1C:XX:XX:XX:6C
setenv ethaddr 00:1C:XX:XX:XX:6B
setenv lan1_mac_addr 00:1C:XX:XX:XX:6C
setenv lan2_mac_addr 00:1C:XX:XX:XX:6D
setenv lan3_mac_addr 00:1C:XX:XX:XX:6E
setenv lan4_mac_addr 00:1C:XX:XX:XX:6F
setenv lan5_mac_addr 00:1C:XX:XX:XX:70
setenv lan6_mac_addr 00:1C:XX:XX:XX:71
setenv lan7_mac_addr 00:1C:XX:XX:XX:72
setenv lan8_mac_addr 00:1C:XX:XX:XX:73
setenv dmz_mac_addr 00:1C:XX:XX:XX:74
setenv dsl_mac_addr 00:1C:XX:XX:XX:75

Step four -> flash u-boot:
mw 0x0800000 0xffff 0x100000
nand erase 0x0 100000
tftp 0x0800000 openwrt-kirkwood-l50-u-boot.kwb
nand write 0x0800000 0x0 0x100000
saveenv

Step five -> run initramfs image:

tftpboot 0x02000000 openwrt.bin; bootm 0x02000000;

Step six -> install sysupgrade OpenWrt image:

copy to /tmp/ sysupgrade image
run sysupgrade

Back to stock:
Restore original u-boot end env.
Install factory image via stock u-boot.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Pawel Dembicki d2c3131b3f kirkwood: add support for Zyxel NSA310S
Zyxel NSA310S is a NAS based on Marvell kirkwood SoC.

Specification:
 - Processor Marvell 88F6702 1 GHz
 - 256MB RAM
 - 128MB NAND
 - 1x GBE LAN port (PHY: Marvell 88E1318)
 - 2x USB 2.0
 - 1x SATA
 - 3x button
 - 7x leds
 - serial on J1 connector (115200 8N1) (GND-NOPIN-RX-TX-VCC)

Known issues:
 - no kernel module for RTC. [*]
 - buzzer (connected to MPP43) need to be drived by 1kHz signal
 - no kernel module for internal MCU connected via I2C[**]

[*]
Karoly Pocsi made simple, unofficial driver for HT1382.
It can be found here:
https://www.madadmin.com/zyxel-nsa320s-es-debian-linux-4-resz/

[**]
Karoly Pocsi found how CPU talk with MCU:
It is possible to query the MCU-controlled fan speed and temperature:
i2cget -y 0x0 0x0a 0x07
i2cget -y 0x0 0x0a 0x08
The first value (0x07) is the temperature in ° C, the second (0x08) is
the time in milliseconds to complete one fan revolution (rpm = 60,000 / value).
Info translated from:
https://www.madadmin.com/zyxel-nsa320s-es-debian-linux-4-resz/

Installation:

TFTP:
1. Run serial console and go to u-boot.
2. Copy u-boot via tftp and write to NAND:
	=> mw 0x0800000 0xffff 0x100000
	=> nand erase 0x0 100000
	=> setenv ipaddr 192.168.1.2
	=> setenv serverip 192.168.1.4
	=> tftp 0x0800000 nsa310s-u-boot.kwb
	=> nand write 0x0800000 0x0 0x100000
	=> reset
3. Run new u-Boot, repair bootcmd and restore MAC address from sticker
	=> setenv ethaddr AA:BB:CC:DD:EE:FF
	=> saveenv
4. Copy and run initramfs image
	=> setenv ipaddr 192.168.1.2
	=> setenv serverip 192.168.1.4
	=> tftpboot zyxel_nsa310s-initramfs-uImage
	=> bootm 0x800000
5. Download sysupgrade image and perform sysupgrade

USB:

1. Prepare usb fat32 drive with u-boot.kwb and initramfs image.
   Stick it to USB 2.0 port.
2. Run serial console and go to u-boot.
3. Copy u-boot from usb and write to NAND:
	=> mw 0x0800000 0xffff 0x100000
	=> nand erase 0x0 100000
	=> usb start
	=> fatload usb 0 0x0800000 u-boot.kwb
	=> nand write 0x0800000 0x0 0x100000
	=> reset
4. Run new u-Boot, repair bootcmd and restore MAC address from sticker
	=> setenv ethaddr AA:BB:CC:DD:EE:FF
	=> saveenv
5. Copy and run initramfs image:
	=> usb start
	=> fatload usb 0 0x0800000 initramfs-uImage
	=> bootm 0x800000
6. Download sysupgrade image and perform sysupgrade.

Based on work ThBexx <thomas.beckler@hotmail.com>
DTS based on dropped support in 0ebdf0c.

Tested-by: Lech Perczak <lech.perczak@gmail.com>
Reviewed-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[NSA310s -> NSA310S in DEVICE_MODEL]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Sungbo Eo 91472dc2ce kirkwood: support for button in Pogoplug V4
Pogoplug V4 has a reset button on a GPIO pin.
To use it, kmod-gpio-button-hotplug package needs to be installed.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
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>
4 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