2021-02-10 13:52:34 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2009-05-02 12:48:42 +00:00
|
|
|
#
|
2013-10-03 02:50:02 +00:00
|
|
|
# Copyright (C) 2009-2013 OpenWrt.org
|
2009-05-02 12:48:42 +00:00
|
|
|
|
2015-08-05 13:55:52 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
|
2015-11-10 00:16:35 +00:00
|
|
|
KERNEL_LOADADDR:=0x8000
|
|
|
|
|
2021-08-16 15:42:56 +00:00
|
|
|
# Some info about Ctera firmware:
|
|
|
|
# 1. It's simple tar file (GNU standard), but it must have ".firm" suffix.
|
|
|
|
# 2. It contains two images: kernel and romdisk. Both are required.
|
|
|
|
# 3. Every image has header and trailer file.
|
|
|
|
# 4. The struct of tar firmware is: header kernel trailer header romdisk trailer
|
|
|
|
# 5. In header file are some strings used to describe image. It was decoded from
|
|
|
|
# factory image.
|
|
|
|
# 6. Version format in header file is restricted by Original FW.
|
|
|
|
# 7. Trailer file contains MD5 sum string of header and image file.
|
|
|
|
# 8. Firmware file must have <=24MB size.
|
|
|
|
|
|
|
|
define Build/ctera-firmware
|
|
|
|
mkdir -p $@.tmp
|
|
|
|
|
|
|
|
# Prepare header and trailer file for kernel
|
|
|
|
echo "# CTera firmware information file" > $@.tmp/header
|
|
|
|
echo "image_type=kernel" >> $@.tmp/header
|
|
|
|
echo "arch=Kirkwood" >> $@.tmp/header
|
|
|
|
echo "board=Any" >> $@.tmp/header
|
|
|
|
echo "version=3.1.22.30669" >> $@.tmp/header
|
|
|
|
echo "kernel_cmd=console=ttyS0,115200 earlyprintk" >> $@.tmp/header
|
|
|
|
echo "date=$$(date $(if $(SOURCE_DATE_EPOCH),-d@$(SOURCE_DATE_EPOCH)))" \
|
|
|
|
>> $@.tmp/header
|
|
|
|
|
|
|
|
cp $@ $@.tmp/kernel
|
|
|
|
|
|
|
|
echo "MD5=$$(cat $@.tmp/header $@.tmp/kernel | $(MKHASH) md5)" \
|
|
|
|
> $@.tmp/trailer
|
|
|
|
|
|
|
|
tar $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
|
|
|
-H gnu -C $@.tmp -cf $@.tar header kernel trailer
|
|
|
|
|
|
|
|
# Prepare header and trailer file for fake romdisk
|
|
|
|
echo "# CTera firmware information file" > $@.tmp/header
|
|
|
|
echo "image_type=romdisk" >> $@.tmp/header
|
|
|
|
echo "initrd=yes" >> $@.tmp/header
|
|
|
|
echo "arch=Kirkwood" >> $@.tmp/header
|
|
|
|
echo "board=Any" >> $@.tmp/header
|
|
|
|
echo "version=3.1.22.30669" >> $@.tmp/header
|
|
|
|
echo "date=$$(date $(if $(SOURCE_DATE_EPOCH),-d@$(SOURCE_DATE_EPOCH)))" \
|
|
|
|
>> $@.tmp/header
|
|
|
|
|
|
|
|
rm -f $@
|
|
|
|
touch $@
|
|
|
|
$(call Build/append-uImage-fakehdr, ramdisk)
|
|
|
|
cp $@ $@.tmp/romdisk
|
|
|
|
|
|
|
|
echo "MD5=$$(cat $@.tmp/header $@.tmp/romdisk | $(MKHASH) md5)" \
|
|
|
|
> $@.tmp/trailer
|
|
|
|
|
|
|
|
tar $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
|
|
|
-H gnu -C $@.tmp -rf $@.tar header romdisk trailer
|
|
|
|
|
|
|
|
mv $@.tar $@
|
|
|
|
rm -rf $@.tmp
|
|
|
|
endef
|
|
|
|
|
2020-04-29 16:12:51 +00:00
|
|
|
define Device/kernel-size-migration
|
|
|
|
DEVICE_COMPAT_VERSION := 2.0
|
|
|
|
DEVICE_COMPAT_MESSAGE := Partition design has changed compared to \
|
|
|
|
older versions (up to 21.02) due to kernel size restrictions. \
|
|
|
|
Upgrade via sysupgrade mechanism is not possible, so new \
|
|
|
|
installation via factory style image is required.
|
2020-07-14 14:18:10 +00:00
|
|
|
endef
|
|
|
|
|
2015-11-10 00:16:35 +00:00
|
|
|
define Device/Default
|
2016-12-22 16:26:27 +00:00
|
|
|
PROFILES := Default
|
2020-07-31 11:50:37 +00:00
|
|
|
DEVICE_DTS = kirkwood-$(lastword $(subst _, ,$(1)))
|
2016-01-06 18:39:06 +00:00
|
|
|
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
2015-11-10 00:16:35 +00:00
|
|
|
KERNEL := kernel-bin | append-dtb | uImage none
|
|
|
|
KERNEL_NAME := zImage
|
2016-05-23 12:38:20 +00:00
|
|
|
KERNEL_SUFFIX := -uImage
|
2017-12-27 23:25:41 +00:00
|
|
|
KERNEL_IN_UBI := 1
|
2016-03-14 17:06:08 +00:00
|
|
|
|
|
|
|
PAGESIZE := 2048
|
|
|
|
SUBPAGESIZE := 512
|
2016-09-04 06:56:05 +00:00
|
|
|
BLOCKSIZE := 128k
|
2017-12-27 23:25:41 +00:00
|
|
|
IMAGES := sysupgrade.bin factory.bin
|
2017-12-28 08:22:45 +00:00
|
|
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
2017-12-27 23:25:41 +00:00
|
|
|
IMAGE/factory.bin := append-ubi
|
2016-07-19 14:38:25 +00:00
|
|
|
endef
|
|
|
|
|
2020-01-26 16:22:28 +00:00
|
|
|
define Device/checkpoint_l-50
|
|
|
|
DEVICE_VENDOR := Check Point
|
|
|
|
DEVICE_MODEL := L-50
|
|
|
|
DEVICE_PACKAGES := kmod-ath9k kmod-gpio-button-hotplug kmod-mvsdio \
|
2020-07-27 10:30:41 +00:00
|
|
|
kmod-rtc-s35390a kmod-usb-ledtrig-usbport wpad-basic-wolfssl
|
2020-01-26 16:22:28 +00:00
|
|
|
IMAGES := sysupgrade.bin
|
|
|
|
endef
|
|
|
|
TARGET_DEVICES += checkpoint_l-50
|
|
|
|
|
2018-01-08 22:49:22 +00:00
|
|
|
define Device/cisco_on100
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := Cisco Systems
|
|
|
|
DEVICE_MODEL := ON100
|
2018-01-08 22:49:22 +00:00
|
|
|
KERNEL_SIZE := 5376k
|
2019-06-05 09:25:44 +00:00
|
|
|
KERNEL_IN_UBI :=
|
2018-01-08 22:49:22 +00:00
|
|
|
UBINIZE_OPTS := -E 5
|
|
|
|
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
2020-04-30 10:27:09 +00:00
|
|
|
DEVICE_PACKAGES := kmod-mvsdio
|
2020-07-31 11:50:37 +00:00
|
|
|
SUPPORTED_DEVICES += on100
|
2015-11-10 00:16:35 +00:00
|
|
|
endef
|
2018-01-08 22:49:22 +00:00
|
|
|
TARGET_DEVICES += cisco_on100
|
2015-11-10 00:16:35 +00:00
|
|
|
|
2018-01-08 22:49:22 +00:00
|
|
|
define Device/cloudengines_pogoe02
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := Cloud Engines
|
|
|
|
DEVICE_MODEL := Pogoplug E02
|
2020-07-31 11:50:37 +00:00
|
|
|
DEVICE_DTS := kirkwood-pogo_e02
|
|
|
|
SUPPORTED_DEVICES += pogo_e02
|
2016-03-14 17:06:12 +00:00
|
|
|
endef
|
2018-01-08 22:49:22 +00:00
|
|
|
TARGET_DEVICES += cloudengines_pogoe02
|
2016-03-14 17:06:12 +00:00
|
|
|
|
2018-01-08 22:49:22 +00:00
|
|
|
define Device/cloudengines_pogoplugv4
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := Cloud Engines
|
|
|
|
DEVICE_MODEL := Pogoplug V4
|
2018-01-08 22:49:22 +00:00
|
|
|
DEVICE_DTS := kirkwood-pogoplug-series-4
|
2020-07-03 16:15:52 +00:00
|
|
|
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-mvsdio kmod-usb3 \
|
|
|
|
kmod-gpio-button-hotplug
|
2016-03-14 17:06:12 +00:00
|
|
|
endef
|
2018-01-08 22:49:22 +00:00
|
|
|
TARGET_DEVICES += cloudengines_pogoplugv4
|
|
|
|
|
2021-08-16 15:42:56 +00:00
|
|
|
define Device/ctera_c200-v1
|
|
|
|
DEVICE_VENDOR := Ctera
|
|
|
|
DEVICE_MODEL := C200
|
|
|
|
DEVICE_VARIANT := V1
|
|
|
|
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-gpio-button-hotplug \
|
|
|
|
kmod-hwmon-lm63 kmod-rtc-s35390a kmod-usb-ledtrig-usbport
|
|
|
|
KERNEL := kernel-bin | append-dtb | uImage none | ctera-firmware
|
|
|
|
KERNEL_IN_UBI :=
|
|
|
|
KERNEL_SUFFIX := -factory.firm
|
|
|
|
IMAGES := sysupgrade.bin
|
|
|
|
endef
|
|
|
|
TARGET_DEVICES += ctera_c200-v1
|
|
|
|
|
2021-01-02 18:49:42 +00:00
|
|
|
define Device/globalscale_sheevaplug
|
|
|
|
DEVICE_VENDOR := Globalscale
|
|
|
|
DEVICE_MODEL := Sheevaplug
|
|
|
|
DEVICE_PACKAGES := kmod-mvsdio
|
|
|
|
endef
|
|
|
|
TARGET_DEVICES += globalscale_sheevaplug
|
|
|
|
|
2018-01-08 22:49:22 +00:00
|
|
|
define Device/iom_iconnect-1.1
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := Iomega
|
|
|
|
DEVICE_MODEL := Iconnect
|
2020-07-31 11:50:37 +00:00
|
|
|
DEVICE_DTS := kirkwood-iconnect
|
|
|
|
SUPPORTED_DEVICES += iconnect
|
2018-01-08 22:49:22 +00:00
|
|
|
endef
|
|
|
|
TARGET_DEVICES += iom_iconnect-1.1
|
2016-03-14 17:06:12 +00:00
|
|
|
|
2020-02-23 15:12:23 +00:00
|
|
|
define Device/iom_ix2-200
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := Iomega
|
|
|
|
DEVICE_MODEL := StorCenter ix2-200
|
kirkwood: add support for Iomega Storcenter ix2-200
Iomega Storcenter ix2-200 is a dual SATA NAS powered by a Marvell
Kirkwood SoC clocked at 1GHz. It has 256MB of RAM and 32MB of
flash memory, 3x USB 2.0 and 1x 1Gbit/s NIC
Specification:
- SoC: Marvell Kirkwood 88F6281
- CPU/Speed: 1000Mhz
- Flash-Chip: Hynix NAND
- Flash size: 32 MiB,erase size:16 KiB,page size:512,OOB size:16
- RAM: 256MB
- LAN: 1x 1000 Mbps Ethernet
- WiFi: none
- 3x USB 2.0
- UART: for serial console
Installation instructions - easy steps:
1. download factory.bin and copy into tftp server
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
setenv serverip 192.168.1.1
setenv ipaddr 192.168.1.13
tftpboot 0x00800000 factory.bin
nand erase 0x100000 $(filesize)
nand write 0x00800000 0x100000 $(filesize)
run bootcmd
```
3. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Installation steps nand bad blocks proof:
1. download initramfs-uImage and copy into usb ext2 partition
```
mkfs.ext2 -L ext2 /dev/sdh1
mount -t ext2 /dev/sdh1 /mnt
cp initramfs-uImage /mnt/initramfs.bin
umount /mnt
```
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
usb reset; ext2load usb 0:1 0x00800000 /initramfs.bin; bootm 0x00800000
```
3. log into openwrt and sysupgrade to install into flash
```
sysupgrade -n /tmp/sysupgrade.bin
```
4. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Signed-off-by: Ademar Arvati Filho <arvati@hotmail.com>
2018-07-06 00:56:58 +00:00
|
|
|
DEVICE_DTS := kirkwood-iomega_ix2_200
|
2020-05-03 19:52:21 +00:00
|
|
|
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \
|
|
|
|
kmod-gpio-button-hotplug kmod-hwmon-lm63
|
kirkwood: add support for Iomega Storcenter ix2-200
Iomega Storcenter ix2-200 is a dual SATA NAS powered by a Marvell
Kirkwood SoC clocked at 1GHz. It has 256MB of RAM and 32MB of
flash memory, 3x USB 2.0 and 1x 1Gbit/s NIC
Specification:
- SoC: Marvell Kirkwood 88F6281
- CPU/Speed: 1000Mhz
- Flash-Chip: Hynix NAND
- Flash size: 32 MiB,erase size:16 KiB,page size:512,OOB size:16
- RAM: 256MB
- LAN: 1x 1000 Mbps Ethernet
- WiFi: none
- 3x USB 2.0
- UART: for serial console
Installation instructions - easy steps:
1. download factory.bin and copy into tftp server
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
setenv serverip 192.168.1.1
setenv ipaddr 192.168.1.13
tftpboot 0x00800000 factory.bin
nand erase 0x100000 $(filesize)
nand write 0x00800000 0x100000 $(filesize)
run bootcmd
```
3. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Installation steps nand bad blocks proof:
1. download initramfs-uImage and copy into usb ext2 partition
```
mkfs.ext2 -L ext2 /dev/sdh1
mount -t ext2 /dev/sdh1 /mnt
cp initramfs-uImage /mnt/initramfs.bin
umount /mnt
```
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
usb reset; ext2load usb 0:1 0x00800000 /initramfs.bin; bootm 0x00800000
```
3. log into openwrt and sysupgrade to install into flash
```
sysupgrade -n /tmp/sysupgrade.bin
```
4. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Signed-off-by: Ademar Arvati Filho <arvati@hotmail.com>
2018-07-06 00:56:58 +00:00
|
|
|
PAGESIZE := 512
|
|
|
|
SUBPAGESIZE := 256
|
2020-02-23 15:16:16 +00:00
|
|
|
BLOCKSIZE := 16k
|
kirkwood: add support for Iomega Storcenter ix2-200
Iomega Storcenter ix2-200 is a dual SATA NAS powered by a Marvell
Kirkwood SoC clocked at 1GHz. It has 256MB of RAM and 32MB of
flash memory, 3x USB 2.0 and 1x 1Gbit/s NIC
Specification:
- SoC: Marvell Kirkwood 88F6281
- CPU/Speed: 1000Mhz
- Flash-Chip: Hynix NAND
- Flash size: 32 MiB,erase size:16 KiB,page size:512,OOB size:16
- RAM: 256MB
- LAN: 1x 1000 Mbps Ethernet
- WiFi: none
- 3x USB 2.0
- UART: for serial console
Installation instructions - easy steps:
1. download factory.bin and copy into tftp server
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
setenv serverip 192.168.1.1
setenv ipaddr 192.168.1.13
tftpboot 0x00800000 factory.bin
nand erase 0x100000 $(filesize)
nand write 0x00800000 0x100000 $(filesize)
run bootcmd
```
3. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Installation steps nand bad blocks proof:
1. download initramfs-uImage and copy into usb ext2 partition
```
mkfs.ext2 -L ext2 /dev/sdh1
mount -t ext2 /dev/sdh1 /mnt
cp initramfs-uImage /mnt/initramfs.bin
umount /mnt
```
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
usb reset; ext2load usb 0:1 0x00800000 /initramfs.bin; bootm 0x00800000
```
3. log into openwrt and sysupgrade to install into flash
```
sysupgrade -n /tmp/sysupgrade.bin
```
4. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Signed-off-by: Ademar Arvati Filho <arvati@hotmail.com>
2018-07-06 00:56:58 +00:00
|
|
|
KERNEL_SIZE := 3072k
|
2019-06-05 09:25:44 +00:00
|
|
|
KERNEL_IN_UBI :=
|
|
|
|
UBINIZE_OPTS := -E 5
|
2020-02-23 15:16:16 +00:00
|
|
|
IMAGE_SIZE := 31744k
|
|
|
|
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
|
2020-03-10 13:58:27 +00:00
|
|
|
check-size
|
kirkwood: add support for Iomega Storcenter ix2-200
Iomega Storcenter ix2-200 is a dual SATA NAS powered by a Marvell
Kirkwood SoC clocked at 1GHz. It has 256MB of RAM and 32MB of
flash memory, 3x USB 2.0 and 1x 1Gbit/s NIC
Specification:
- SoC: Marvell Kirkwood 88F6281
- CPU/Speed: 1000Mhz
- Flash-Chip: Hynix NAND
- Flash size: 32 MiB,erase size:16 KiB,page size:512,OOB size:16
- RAM: 256MB
- LAN: 1x 1000 Mbps Ethernet
- WiFi: none
- 3x USB 2.0
- UART: for serial console
Installation instructions - easy steps:
1. download factory.bin and copy into tftp server
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
setenv serverip 192.168.1.1
setenv ipaddr 192.168.1.13
tftpboot 0x00800000 factory.bin
nand erase 0x100000 $(filesize)
nand write 0x00800000 0x100000 $(filesize)
run bootcmd
```
3. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Installation steps nand bad blocks proof:
1. download initramfs-uImage and copy into usb ext2 partition
```
mkfs.ext2 -L ext2 /dev/sdh1
mount -t ext2 /dev/sdh1 /mnt
cp initramfs-uImage /mnt/initramfs.bin
umount /mnt
```
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
usb reset; ext2load usb 0:1 0x00800000 /initramfs.bin; bootm 0x00800000
```
3. log into openwrt and sysupgrade to install into flash
```
sysupgrade -n /tmp/sysupgrade.bin
```
4. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Signed-off-by: Ademar Arvati Filho <arvati@hotmail.com>
2018-07-06 00:56:58 +00:00
|
|
|
endef
|
2020-02-23 15:12:23 +00:00
|
|
|
TARGET_DEVICES += iom_ix2-200
|
kirkwood: add support for Iomega Storcenter ix2-200
Iomega Storcenter ix2-200 is a dual SATA NAS powered by a Marvell
Kirkwood SoC clocked at 1GHz. It has 256MB of RAM and 32MB of
flash memory, 3x USB 2.0 and 1x 1Gbit/s NIC
Specification:
- SoC: Marvell Kirkwood 88F6281
- CPU/Speed: 1000Mhz
- Flash-Chip: Hynix NAND
- Flash size: 32 MiB,erase size:16 KiB,page size:512,OOB size:16
- RAM: 256MB
- LAN: 1x 1000 Mbps Ethernet
- WiFi: none
- 3x USB 2.0
- UART: for serial console
Installation instructions - easy steps:
1. download factory.bin and copy into tftp server
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
setenv serverip 192.168.1.1
setenv ipaddr 192.168.1.13
tftpboot 0x00800000 factory.bin
nand erase 0x100000 $(filesize)
nand write 0x00800000 0x100000 $(filesize)
run bootcmd
```
3. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Installation steps nand bad blocks proof:
1. download initramfs-uImage and copy into usb ext2 partition
```
mkfs.ext2 -L ext2 /dev/sdh1
mount -t ext2 /dev/sdh1 /mnt
cp initramfs-uImage /mnt/initramfs.bin
umount /mnt
```
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
usb reset; ext2load usb 0:1 0x00800000 /initramfs.bin; bootm 0x00800000
```
3. log into openwrt and sysupgrade to install into flash
```
sysupgrade -n /tmp/sysupgrade.bin
```
4. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)
Signed-off-by: Ademar Arvati Filho <arvati@hotmail.com>
2018-07-06 00:56:58 +00:00
|
|
|
|
2020-06-12 22:36:01 +00:00
|
|
|
define Device/linksys
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := Linksys
|
2020-07-27 10:30:41 +00:00
|
|
|
DEVICE_PACKAGES := kmod-mwl8k wpad-basic-wolfssl kmod-gpio-button-hotplug
|
2020-06-12 22:36:01 +00:00
|
|
|
KERNEL_IN_UBI :=
|
|
|
|
UBINIZE_OPTS := -E 5
|
|
|
|
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Device/linksys_e4200-v2
|
|
|
|
$(Device/linksys)
|
2020-04-29 16:12:51 +00:00
|
|
|
$(Device/kernel-size-migration)
|
2020-06-12 22:36:01 +00:00
|
|
|
DEVICE_MODEL := E4200
|
|
|
|
DEVICE_VARIANT := v2
|
2020-04-29 16:12:51 +00:00
|
|
|
KERNEL_SIZE := 3072k
|
2020-06-12 22:36:01 +00:00
|
|
|
SUPPORTED_DEVICES += linksys,viper linksys-viper
|
|
|
|
endef
|
|
|
|
TARGET_DEVICES += linksys_e4200-v2
|
|
|
|
|
|
|
|
define Device/linksys_ea3500
|
|
|
|
$(Device/linksys)
|
2020-04-29 16:12:51 +00:00
|
|
|
$(Device/kernel-size-migration)
|
2020-06-12 22:36:01 +00:00
|
|
|
DEVICE_MODEL := EA3500
|
2019-09-21 04:44:16 +00:00
|
|
|
PAGESIZE := 512
|
|
|
|
SUBPAGESIZE := 256
|
2020-02-23 15:16:16 +00:00
|
|
|
BLOCKSIZE := 16k
|
2020-04-29 16:12:51 +00:00
|
|
|
KERNEL_SIZE := 3072k
|
2020-06-12 22:36:01 +00:00
|
|
|
SUPPORTED_DEVICES += linksys,audi linksys-audi
|
2015-11-10 00:16:35 +00:00
|
|
|
endef
|
2020-06-12 22:36:01 +00:00
|
|
|
TARGET_DEVICES += linksys_ea3500
|
2015-11-10 00:16:35 +00:00
|
|
|
|
2020-06-12 22:36:01 +00:00
|
|
|
define Device/linksys_ea4500
|
|
|
|
$(Device/linksys)
|
2020-04-29 16:12:51 +00:00
|
|
|
$(Device/kernel-size-migration)
|
2020-06-12 22:36:01 +00:00
|
|
|
DEVICE_MODEL := EA4500
|
2020-04-29 16:12:51 +00:00
|
|
|
KERNEL_SIZE := 3072k
|
2020-06-12 22:36:01 +00:00
|
|
|
SUPPORTED_DEVICES += linksys,viper linksys-viper
|
2015-11-10 00:16:35 +00:00
|
|
|
endef
|
2020-06-12 22:36:01 +00:00
|
|
|
TARGET_DEVICES += linksys_ea4500
|
2015-11-10 00:16:35 +00:00
|
|
|
|
2018-01-08 22:49:22 +00:00
|
|
|
define Device/raidsonic_ib-nas62x0
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := RaidSonic
|
|
|
|
DEVICE_MODEL := ICY BOX IB-NAS62x0
|
2020-07-31 11:50:37 +00:00
|
|
|
DEVICE_DTS := kirkwood-ib62x0
|
2020-05-03 19:52:21 +00:00
|
|
|
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4
|
2020-07-31 11:50:37 +00:00
|
|
|
SUPPORTED_DEVICES += ib62x0
|
2016-12-22 14:07:38 +00:00
|
|
|
endef
|
2018-01-08 22:49:22 +00:00
|
|
|
TARGET_DEVICES += raidsonic_ib-nas62x0
|
|
|
|
|
kirkwood: add support for Seagate BlackArmor NAS220
The Seagate BlackArmor NAS220 is a consumer NAS
with two internal drive bays. The stock OS runs
RAID 1 over the disks via mdadm.
Device specification:
- SoC: Marvell 88F6192 800 MHz
- RAM: 128 MB
- Flash: 32 MB
- 2 x internal SATA II drives
- Ethernet: 10/100/1000 Mbps (single port, no switch)
- WLAN: None
- LED: Power, Status, Sata Activity
- Key: Power, Reset
- Serial: 10 pin header, (115200,8,N,1), 3.3V TTL
9|x - x|10
7|x - x|8
5|x - GND|6
3|x - RX|4
1|TX - x|2
front of case
- USB ports: 2 x USB 2.0
Flash instruction:
NOTE: this process uses a serial connection. It will upgrade the
bootloader and reset the bootloader environment variables
TFTP server setup
- Setup PC with TFTP server set the PC IP to 10.4.50.5 as TFTP server
- Copy these files to TFTP server location
- u-boot.kwb
- seagate_blackarmor-nas220-initramfs-uImage
- seagate_blackarmor-nas220-squashfs-sysupgrade.bin
- seagate_blackarmor-nas220-squashfs-factory.bin
Seagate NAS setup
- Connect LAN cable between PC and seagate device
- Connect to serial to seagate device
Install u-boot
- Boot seagate device and stop in bootloader by pressing any key
- run 'printenv' from u-boot and save the values
- tftpboot 0x2000000 u-boot.kwb
- nand erase.part uboot
- nand write 0x2000000 0x0 ${filesize}
- reset
Update MAC address in u-boot env
- Stop in u-boot by pressing any key
- Get your MAC address from your saved printenv. Is also on chassis
- setenv ethaddr <your MAC>
- saveenv
Option 1 (recommended) - Install OpenWrt via initramfs and sysupgrade
- tftpboot 0x2000000 seagate_blackarmor-nas220-initramfs-uImage
- bootm 0x2000000
- *OpenWrt should be running now, however it is not written to flash yet*
- From the running instance of OpenWrt use Luci's "flash image" feature
from the web site or use sysupgrade from the console to write
seagate_blackarmor-nas220-squashfs-sysupgrade.bin to flash
Option 2 - Install OpenWrt by flashing factory image from u-boot
- nand erase.part ubi
- tftpboot 0x2000000 seagate_blackarmor-nas220-squashfs-factory.bin
- nand write 0x2000000 ubi ${filesize}
- reset
Signed-off-by: Kip Porterfield <kip.porterfield@gmail.com>
2020-08-03 14:07:51 +00:00
|
|
|
define Device/seagate_blackarmor-nas220
|
|
|
|
DEVICE_VENDOR := Seagate
|
|
|
|
DEVICE_MODEL := Blackarmor NAS220
|
|
|
|
DEVICE_PACKAGES := kmod-hwmon-adt7475 kmod-fs-ext4 kmod-ata-marvell-sata \
|
|
|
|
mdadm kmod-gpio-button-hotplug
|
|
|
|
PAGESIZE := 512
|
|
|
|
SUBPAGESIZE := 256
|
|
|
|
BLOCKSIZE := 16k
|
|
|
|
UBINIZE_OPTS := -e 1
|
|
|
|
endef
|
|
|
|
TARGET_DEVICES += seagate_blackarmor-nas220
|
|
|
|
|
2018-01-08 22:49:22 +00:00
|
|
|
define Device/seagate_dockstar
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := Seagate
|
|
|
|
DEVICE_MODEL := FreeAgent Dockstar
|
2020-07-31 11:50:37 +00:00
|
|
|
SUPPORTED_DEVICES += dockstar
|
2018-01-08 22:49:22 +00:00
|
|
|
endef
|
|
|
|
TARGET_DEVICES += seagate_dockstar
|
|
|
|
|
|
|
|
define Device/seagate_goflexnet
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := Seagate
|
|
|
|
DEVICE_MODEL := GoFlexNet
|
2020-05-03 19:52:21 +00:00
|
|
|
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4
|
2020-07-31 11:50:37 +00:00
|
|
|
SUPPORTED_DEVICES += goflexnet
|
2018-01-08 22:49:22 +00:00
|
|
|
endef
|
|
|
|
TARGET_DEVICES += seagate_goflexnet
|
|
|
|
|
|
|
|
define Device/seagate_goflexhome
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := Seagate
|
|
|
|
DEVICE_MODEL := GoFlexHome
|
2020-05-03 19:52:21 +00:00
|
|
|
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4
|
2020-07-31 11:50:37 +00:00
|
|
|
SUPPORTED_DEVICES += goflexhome
|
2018-01-08 22:49:22 +00:00
|
|
|
endef
|
|
|
|
TARGET_DEVICES += seagate_goflexhome
|
2016-12-22 14:07:38 +00:00
|
|
|
|
2017-12-28 09:39:19 +00:00
|
|
|
define Device/zyxel_nsa310b
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := ZyXEL
|
|
|
|
DEVICE_MODEL := NSA310b
|
2020-05-03 19:52:21 +00:00
|
|
|
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-r8169 kmod-fs-ext4 \
|
2020-04-30 10:18:24 +00:00
|
|
|
kmod-gpio-button-hotplug kmod-hwmon-lm85
|
2020-07-31 11:50:37 +00:00
|
|
|
SUPPORTED_DEVICES += nsa310b
|
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>
2017-01-23 19:34:29 +00:00
|
|
|
endef
|
2017-12-28 09:39:19 +00:00
|
|
|
TARGET_DEVICES += zyxel_nsa310b
|
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>
2017-01-23 19:34:29 +00:00
|
|
|
|
2020-05-02 13:33:14 +00:00
|
|
|
define Device/zyxel_nsa310s
|
|
|
|
DEVICE_VENDOR := ZyXEL
|
|
|
|
DEVICE_MODEL := NSA310S
|
|
|
|
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-gpio-button-hotplug
|
|
|
|
endef
|
|
|
|
TARGET_DEVICES += zyxel_nsa310s
|
|
|
|
|
2017-12-28 09:39:19 +00:00
|
|
|
define Device/zyxel_nsa325
|
2019-07-07 13:17:31 +00:00
|
|
|
DEVICE_VENDOR := ZyXEL
|
|
|
|
DEVICE_MODEL := NSA325
|
|
|
|
DEVICE_VARIANT := v1/v2
|
2020-05-03 19:52:21 +00:00
|
|
|
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \
|
|
|
|
kmod-gpio-button-hotplug kmod-rtc-pcf8563 kmod-usb3
|
2020-07-31 11:50:37 +00:00
|
|
|
SUPPORTED_DEVICES += nsa325
|
2017-02-06 10:40:52 +00:00
|
|
|
endef
|
2017-12-28 09:39:19 +00:00
|
|
|
TARGET_DEVICES += zyxel_nsa325
|
2017-02-06 10:40:52 +00:00
|
|
|
|
2009-05-02 12:48:42 +00:00
|
|
|
$(eval $(call BuildImage))
|