summaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/image
diff options
context:
space:
mode:
authorDaniel González Cabanelas <dgcbueu@gmail.com>2023-02-21 00:43:55 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2023-02-26 22:22:48 +0100
commitbe0f1c1b268a99ea25c9797a4ed725835ca79fea (patch)
treed0dc20130b8b087d82c5bc6b653e01b184d4d208 /target/linux/mvebu/image
parent107f7374c9ef3e3ea6d589b187671cd3e138e63c (diff)
downloadopenwrt-be0f1c1b268a99ea25c9797a4ed725835ca79fea.tar.gz
openwrt-be0f1c1b268a99ea25c9797a4ed725835ca79fea.tar.bz2
openwrt-be0f1c1b268a99ea25c9797a4ed725835ca79fea.zip
mvebu: add support for Buffalo LinkStation LS220DE
The Buffalo LinkStation LS220DE is a dual bay NAS, based on Marvell Armada 370 Hardware: SoC: Marvell Armada 88F6707 CPU: Cortex-A9 800 MHz, 1 core Flash 1: SPI-NOR 1 MiB (U-Boot) Flash 2: NAND 512 MiB (OS) RAM: DDR3 256 MiB Ethernet: 1x 1GbE USB: 1x 2.0 SATA: 2x 3Gb/s LEDs/Input: 5x / 2x (1x button, 1x slide-switch) Fan: 1x casing Flash instructions, from hard drive: 1. Get access to the "boot" partition at the hard drive where the stock firmware is installed. It can be done with acp-commander or by plugging the hard drive to a computer. 2. Backup the stock uImage: mv /boot/uImage.buffalo /boot/uImage.buffalo.bak 3. Move and rename the Openwrt initramfs image to the boot partition: mv openwrt-initramfs-kernel.bin /boot/uImage.buffalo 4. Power on the Linkstation with the hardrive inside. Now Openwrt will boot, but still not installed. 5. Connect via ssh to OpenWrt: ssh root@192.168.1.1 6. Rename boot files inside boot partition mount -t ext3 /dev/sda1 /mnt mv /mnt/uImage.buffalo /mnt/uImage.buffalo.openwrt.bak mv /mnt/initrd.buffalo /mnt/initrd.buffalo.bak 7. Format ubi partitions at the NAND flash ("kernel_ubi" and "ubi"): ubiformat /dev/mtd0 -y ubidetach -p /dev/mtd1 ubiformat /dev/mtd1 -y 8. Flash the sysupgrade image: sysupgrade -n openwrt-squashfs-sysupgrade.bin 9. Wait until it finish, the device will reboot with OpenWrt installed on the NAND flash. Restore the stock firmware: 1. Take the hard drive used for the installation and restore boot backup files to their original names: mount -t ext3 /dev/sda1 /mnt mv /mnt/uImage.buffalo.bak /mnt/uImage.buffalo mv /mnt/initrd.buffalo.bak /mnt/initrd.buffalo 2. Boot from the hard drive and perform a stock firmware update using the Buffalo utility. The NAND will be restored to the original state. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Diffstat (limited to 'target/linux/mvebu/image')
-rw-r--r--target/linux/mvebu/image/Makefile10
-rw-r--r--target/linux/mvebu/image/cortexa9.mk15
2 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index b0498d34c9..57129d2dcb 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -53,6 +53,16 @@ define Build/buffalo-kernel-jffs2
rm -rf $(KDIR)/kernel_jffs2 $@.fakerd
endef
+define Build/buffalo-kernel-ubifs
+ rm -rf $@-ubidir
+ mkdir -p $@-ubidir
+ mv $@ $@-ubidir/uImage.buffalo
+ touch $@
+ $(call Build/append-uImage-fakehdr, ramdisk)
+ mv $@ $@-ubidir/initrd.buffalo
+ $(STAGING_DIR_HOST)/bin/mkfs.ubifs $(KERNEL_UBIFS_OPTS) -r $@-ubidir $@
+endef
+
# 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.
diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index aed1d47646..56381ab5f8 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -14,6 +14,21 @@ define Device/kernel-size-migration
Upgrade via sysupgrade mechanism is not possible, so new installation via factory style image is required.
endef
+define Device/buffalo_ls220de
+ $(Device/NAND-128K)
+ DEVICE_VENDOR := Buffalo
+ DEVICE_MODEL := LinkStation LS220DE
+ KERNEL_UBIFS_OPTS = -m $$(PAGESIZE) -e 124KiB -c 172 -x none
+ KERNEL := kernel-bin | append-dtb | uImage none | buffalo-kernel-ubifs
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
+ DEVICE_DTS := armada-370-buffalo-ls220de
+ DEVICE_PACKAGES := \
+ kmod-hwmon-gpiofan kmod-hwmon-drivetemp kmod-linkstation-poweroff \
+ kmod-md-mod kmod-md-raid0 kmod-md-raid1 kmod-md-raid10 kmod-fs-xfs \
+ mdadm mkf2fs e2fsprogs partx-utils
+endef
+TARGET_DEVICES += buffalo_ls220de
+
define Device/buffalo_ls421de
$(Device/NAND-128K)
DEVICE_VENDOR := Buffalo