2010-08-22 16:48:28 +00:00
|
|
|
#
|
2014-05-20 12:45:02 +00:00
|
|
|
# Copyright (C) 2010-2014 OpenWrt.org
|
2010-08-22 16:48:28 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2020-04-11 13:44:14 +00:00
|
|
|
PKG_VERSION:=2020.04
|
2010-08-22 16:48:28 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
2020-04-11 13:44:14 +00:00
|
|
|
PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
|
2014-02-15 23:53:07 +00:00
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
include $(INCLUDE_DIR)/u-boot.mk
|
2010-08-22 16:48:28 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/Default
|
|
|
|
BUILD_TARGET:=kirkwood
|
2010-08-22 16:48:28 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/dockstar
|
|
|
|
NAME:=Seagate DockStar
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=seagate_dockstar
|
2010-08-22 16:48:28 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/dockstar_second_stage
|
|
|
|
NAME:=Seagate DockStar (second stage)
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=seagate_dockstar
|
2014-02-15 23:53:07 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/goflexhome
|
|
|
|
NAME:=the Seagate GoFlexHome/GoFlexNet
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=seagate_goflexhome seagate_goflexnet
|
2014-02-16 00:14:26 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/ib62x0
|
|
|
|
NAME:=RaidSonic ICY BOX NAS6210 and NAS6220
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=raidsonic_ib-nas62x0
|
2014-02-15 23:53:07 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/ib62x0_second_stage
|
|
|
|
NAME:=RaidSonic ICY BOX NAS6210 and NAS6220 (second stage)
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=raidsonic_ib-nas62x0
|
2010-08-22 16:48:28 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/iconnect
|
|
|
|
NAME:=Iomega iConnect Wireless
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=iom_iconnect-1.1
|
2010-10-04 09:49:49 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/iconnect_second_stage
|
|
|
|
NAME:=Iomega iConnect Wireless (second stage)
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=iom_iconnect-1.1
|
2014-02-15 23:53:07 +00:00
|
|
|
endef
|
|
|
|
|
2020-01-24 06:13:24 +00:00
|
|
|
define U-Boot/l-50
|
|
|
|
NAME:=CheckPoint L-50
|
|
|
|
BUILD_DEVICES:=checkpoint_l-50
|
|
|
|
endef
|
|
|
|
|
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 U-Boot/nas220
|
|
|
|
NAME:=Seagate Blackarmor NAS220
|
|
|
|
BUILD_DEVICES:=seagate_blackarmor-nas220
|
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/nsa310
|
|
|
|
NAME:=Zyxel NSA310
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=zyxel_nsa310b
|
2017-01-22 13:43:51 +00:00
|
|
|
endef
|
|
|
|
|
2020-05-09 20:08:02 +00:00
|
|
|
define U-Boot/nsa310s
|
|
|
|
NAME:=Zyxel NSA310S
|
|
|
|
BUILD_DEVICES:=zyxel_nsa310s
|
|
|
|
endef
|
|
|
|
|
2017-02-06 10:39:21 +00:00
|
|
|
define U-Boot/nsa325
|
|
|
|
NAME:=Zyxel NSA325v1 and v2
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=zyxel_nsa325
|
2017-02-06 10:39:21 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/pogo_e02
|
|
|
|
NAME:=Cloud Engines Pogoplug E02
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=cloudengines_pogoe02
|
2014-02-15 23:53:07 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define U-Boot/pogo_e02_second_stage
|
|
|
|
NAME:=Cloud Engines Pogoplug E02 (second stage)
|
2017-12-28 09:39:19 +00:00
|
|
|
BUILD_DEVICES:=cloudengines_pogoe02
|
2014-05-23 08:17:01 +00:00
|
|
|
endef
|
|
|
|
|
2018-01-02 14:54:07 +00:00
|
|
|
define U-Boot/pogoplugv4
|
|
|
|
NAME:=Cloud Engines Pogoplug V4
|
|
|
|
BUILD_DEVICES:=cloudengines_pogoplugv4
|
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
UBOOT_TARGETS := \
|
2014-02-15 23:53:07 +00:00
|
|
|
dockstar dockstar_second_stage \
|
2014-02-16 00:14:26 +00:00
|
|
|
goflexhome \
|
2014-02-15 23:53:07 +00:00
|
|
|
ib62x0 ib62x0_second_stage \
|
|
|
|
iconnect iconnect_second_stage \
|
2020-01-24 06:13:24 +00:00
|
|
|
l-50 \
|
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
|
|
|
nas220 \
|
2017-01-22 13:43:51 +00:00
|
|
|
nsa310 \
|
2020-05-09 20:08:02 +00:00
|
|
|
nsa310s \
|
2017-02-06 10:39:21 +00:00
|
|
|
nsa325 \
|
2018-01-02 14:54:07 +00:00
|
|
|
pogo_e02 pogo_e02_second_stage \
|
|
|
|
pogoplugv4
|
2010-08-22 16:48:28 +00:00
|
|
|
|
|
|
|
define Build/Configure
|
2014-11-30 03:55:44 +00:00
|
|
|
$(if $(findstring _second_stage,$(BUILD_VARIANT)),
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_BUILD_DIR)/configs/$(subst _second_stage,,$(BUILD_VARIANT))_defconfig \
|
|
|
|
$(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
|
|
|
|
echo CONFIG_SECOND_STAGE=y >> $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
|
|
|
|
)
|
2014-02-15 23:53:07 +00:00
|
|
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
2014-11-30 03:55:44 +00:00
|
|
|
$(BUILD_VARIANT)_config V=1
|
2010-08-22 16:48:28 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2014-02-15 23:53:07 +00:00
|
|
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
2010-10-04 09:49:49 +00:00
|
|
|
u-boot.kwb \
|
2010-08-22 16:48:28 +00:00
|
|
|
CROSS_COMPILE=$(TARGET_CROSS)
|
2014-02-15 23:53:07 +00:00
|
|
|
mkimage -A $(ARCH) -O linux -T kernel -C none \
|
|
|
|
-a 0x600000 -e 0x600000 \
|
2017-01-23 08:25:26 +00:00
|
|
|
-n 'U-Boot uImage' \
|
2014-02-15 23:53:07 +00:00
|
|
|
-d $(PKG_BUILD_DIR)/u-boot.bin $(PKG_BUILD_DIR)/u-boot.img
|
2010-08-22 16:48:28 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define Package/u-boot/install
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_BUILD_DIR)/u-boot.bin \
|
|
|
|
$(PKG_BUILD_DIR)/u-boot.kwb \
|
|
|
|
$(PKG_BUILD_DIR)/u-boot.img \
|
|
|
|
$(1)/
|
2010-08-22 16:48:28 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/kwboot $(STAGING_DIR_HOST)/bin/
|
2010-08-22 16:48:28 +00:00
|
|
|
endef
|
|
|
|
|
2017-01-23 08:25:26 +00:00
|
|
|
$(eval $(call BuildPackage/U-Boot))
|