Commit Graph

31 Commits (65305cb44869774a7db10c517b871dce5ab46ccb)

Author SHA1 Message Date
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
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
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
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
尤晓杰 a7e62b4be1 kirkwood: fix sysupgrade
The platform_check_image() stub need to return 0 for success, otherwise
the sysupgrade will fail with:

  Image check 'platform_check_image' failed.

Fixes: aa6f5f1787 ("kirkwood: use image metadata")
Signed-off-by: 尤晓杰 <yxj790222@163.com>
[reworded commit message}
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin c9e2c35f46 kirkwood: use the generic board detect
Drop the target specific detection function in favour of the generic
one provided by base-files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin aa6f5f1787 kirkwood: use image metadata
Append and enforce image metadata. Remove the device specific image
checks, they are replaced by image metadata.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 18ea058258 kirkwood: fix compatible string in ib62x0 dts
There is no point in being that specifc in a generic dts covering a range
of boards. Keep only the the generic compat string to use it for a
devicetree based boardname.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 0ebdf0c1d3 kirkwood: drop support for orphaned boards
No image build code for the Guruplug, Sheevaplug and NSA310S exists. Drop
support for the boards for now.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin e0b9ec8e96 treewide: drop target board_name functions
They are not used any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin f12a32630f treewide: use the generic board_name function
Use the generic function instead ot the target specific ones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 78cf5eed6e treewide: do board detection during preinit
Do the board detection during preinit to unify it across all targets.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Matthias Schiffer 438dcbfe74
base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN
Depending on busybox applet selection, paths of basic utiilties may differ,
and may not work as symlinks to busybox. Simply using whatever binary is
found in PATH and detecting symlinks automatically is more robust and
easier to maintain.

The list of binaries is also slightly cleaned up and duplicates are
removed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer f464da623d
kirkwood: upgrade: fix RAMFS_COPY_*
RAMFS_COPY_* are moved to platform.sh toplevel. The nand_do_upgrade call is
moved to platform_do_upgrade.

Fixes: 30f61a34b4 "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Paul Wassi 9808b9ae02 kirkwood: switch to kernel 4.9
Add patches-4.9, some of them (heavily) rewritten:
  - ea4500 is upstream available, keep only LEDE changes in dts
  - ea3500 is changed to match the structure of the upstream ea4500 dts
  - nsa310s rewritten to include the common dtsi
  - nsa325 is dropped, since already upstream

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
[refresh kernel config, add on100, use the switchdev based mv88e6171
driver for the linksys boards, keep lede specific rootfs/kernel
partition names for linksys boards, reorder patches]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Makoto Takeuchi ca27b3d370 kirkwood: add support for Cisco ON100
The Cisco ON100 device is a Kirkwood based router:

    SoC: Marvell 88F6282 1600Mhz
    SDRAM memory: 512MB DDR3 1333Mhz
    Gigabit ethernet: 2x Marvell 88E1310 (over RGMII)
    Flash memory: 512MB
    2 bi-colour status LEDs (green/red)
    1 Reset button
    1 USB 2.0 port (on back)
    1 SDIO slot (on back)

This commit adds a target profile of "Cisco Systems ON100" under the target
system "Marvell Kirkwood".

Flashing can be performed over tftp, once "dhcp" has been issued:
 tftpboot ${loadaddr} lede-kirkwood-on100-squashfs-factory.bin
 nand erase 0x0c0000 ${filesize}
 nand write ${loadaddr} 0x0c0000 ${filesize}

Once flashed, set environment variables to boot:
 setenv bootcmd nand read \${loadaddr} 0x0c0000 0x540000\; setenv bootargs
  \; bootm
 saveenv

Signed-off-by: Makoto Takeuchi <mak0@lxsys.co.uk>
7 years ago
Alberto Bursi 4383c13aee kirkwood: add ZyXEL NSA325 device
This patch add ZyXEL NSA325 2-Bay Media Server

The ZyXEL NSA325 device is a Kirkwood based NAS:

- SoC: Marvell 88F6702 1600Mhz
- SDRAM memory: 512MB DDR2 400Mhz
- Gigabit ethernet: Marvell Alaska
- Flash memory: 128MB
- 1 Power button
- 1 Power LED (blue)
- 5 Status LED (green/red)
- 1 Copy/Sync button
- 1 Reset button
- 2 SATA II ports (internal)
- 2 USB 2.0 ports (back)
- 1 USB 3.0 port (front)
- Fan (fixed speed)
- hardware watchdog in a mcu

Basically a bigger, more powerful version of NSA310,
installation is the same as they share the same flash layout.

A notable difference is that there is a hardware watchdog
in a mcu on the board, which is disabled by default in the LEDE u-boot.
The watchdog is also disabled with a GPIO activation through
raw register change when kwbooting or it would reset the board before
the new uboot was transferred.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [remove dead code]
7 years ago
Alberto Bursi 94676dd99d kirkwood: add ZyXEL NSA310b
The ZyXEL NSA310 device is a Kirkwood based NAS:

- SoC: Marvell 88F6702 1200Mhz
- SDRAM memory: 256MB DDR2 400Mhz
- Gigabit ethernet: Realtek (over pcie)
- Flash memory: 128MB
- 1 Power button
- 1 Power LED (blue)
- 5 Status LED (green/red)
- 1 Copy/Sync button
- 1 Reset button
- 2 SATA II port (1 internal and 1 external)
- 2 USB 2.0 ports (1 front and 1 back)
- Smart fan

The stock u-boot cannot read ubi so it should be replaced with the
LEDE/OpenWRT's u-boot or with a u-boot from here
https://github.com/mibodhi/u-boot-kirkwood

This device's boot ROM supports "kwboot" tool
(in mainline u-boot, built automatically if CONFIG_KIRKWOOD is declared)
that sends an uboot image to the board over serial connection, it is very easy to unbrick.

The stock bootloader can use usb and read from FAT filesystems,
so the installation process is simple, place the uboot file on a USB flashdrive
formatted as FAT (here it is "openwrt-kirkwood-nsa310.bin", then connect TTL
to the board and write the following commands in the bootloader console:

usb reset
fatload usb 0 0x1000000 openwrt-kirkwood-nsa310.bin
nand write 0x1000000 0x00000 0x100000
reset

Now you are rebooting in the new u-boot, write this in its console to install the firmware:

usb reset
fatload usb 0 0x2000000 lede-kirkwood-nsa310b-squashfs-factory.bin
nand erase.part ubi
nand write 0x2000000 ubi 0x600000

If your firmware file is bigger than 6 MiBs you should write its size in hex
instead of 0x600000 above, or remove that number entirely (it will take a while in this case).

If you are using another uboot that can read ubi, set mtdparts like this

mtdparts=mtdparts=orion_nand:0x00c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)

And set your bootcmd to be like this

bootcmd=run setenv bootargs; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000

Then you can install the firmware as described above.

After you installed (or configured) the u-boot for booting the firmware,
write the device's mac address in the ethaddr u-boot env.
The MAC address is usually on a sticker under the device (one of the two codes is the serial),
it should begin with "107BEF" as it is assigned to ZyXEL.

write in the u-boot console (use your MAC address instead of the example)

setenv ethaddr 10:7B:EF:00:00:00
saveenv

to save the mac address in the u-boot.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
7 years ago
Felix Fietkau 83d59453c0 kirkwood: fix sysupgrade for non-dockstar NAND devices
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Luka Perkov afa1c47e71 kirkwood/dockstar: use ubi(kernel, squashfs, ubifs) images
The new image requires `bootz` because of devicetree appending.
To flash a new image boot initramfs:

  tftpboot 0x800000 openwrt-kirkwood-dockstar-initramfs-kernel.bin
  bootz 0x800000

  # detach if already attached
  ubidetach -p /dev/$(grep ubi /proc/mtd|awk -F: '{print $1}')
  # scp openwrt-kirkwood-dockstar-squashfs-factory.bin /tmp
  ubiformat -f /tmp/openwrt-kirkwood-dockstar-squashfs-factory.bin
  # attach is important to resize rootfs_data otherwise it wont boot
  ubiattach -p /dev/$(grep ubi /proc/mtd|awk -F: '{print $1}')

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 49010
8 years ago
Luka Perkov b0e7ca4f8f kirkwood: support sysupgrade on Linksys EA[34]500
This automatically writes to the alternate firmware partition
(on Linksys's dual firmware layout) using code borrowed from
the WRT1900AC port.

Signed-off-by: Claudio Leite <leitec@staticky.com>

SVN-Revision: 47434
9 years ago
Luka Perkov ad8f6370de kirkwood: consistently use engineering board names
Signed-off-by: Claudio Leite <leitec@staticky.com>

SVN-Revision: 47430
9 years ago
Luka Perkov 6a18146206 kirkwood: add initial support for NSA310s
Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 47330
9 years ago
Luka Perkov 7437be53ba kirkwood: add support for the Seagate GoflexHome
Add Support for the Seagate GoflexHome <http://wiki.openwrt.org/toh/seagate/goflexhome>

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>

SVN-Revision: 45647
9 years ago
Luka Perkov 5cce8f9a0f kirkwood: Seagate GoFlex Net
Add GoFlex Net "Board Name" , set and cleanup network default and LEDs.
Remove kmod-rtc-marvell from default packages, as the GoFlex net does not have a RTC.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>

SVN-Revision: 44422
9 years ago
Luka Perkov 39743e45f8 kikwood: populate kirkwood.sh with new boards
- SheevaPlug
- SheevaPlug with eSATA
- GuruplugServerPlus

Signed-off-by: Gerald Kerma <dreagle@doukki.net>

SVN-Revision: 43751
10 years ago
Luka Perkov 4f1a9470f0 kirkwood: add support for Linksys EA3500
http://wiki.openwrt.org/toh/linksys/ea3500

Signed-off-by: Dan Walters <dan@walters.io>

SVN-Revision: 43230
10 years ago
Luka Perkov a54f4320f9 kirkwood: move kirkwood.sh to /lib/ for consistency
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41338
10 years ago
Luka Perkov e6aea925d3 kirkwood: base-files: add script to detect board name and populate /tmp/sysinfo
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41335
10 years ago
Luka Perkov 73246d2f64 kirkwood: upgrade to 3.10.15
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 38402
11 years ago
Gabor Juhos ba3ad24514 kirkwood: use uci-defaults to configure different boards
Signed-off-by: Luka Perkov <openwrt@lukaperkov.net>

SVN-Revision: 31990
12 years ago