aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/image
diff options
context:
space:
mode:
authorDaniel González Cabanelas <dgcbueu@gmail.com>2020-04-07 14:35:26 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2020-04-13 22:41:14 +0200
commit85ef69b20299c2c4f42d6bfbfaf807358ebe2078 (patch)
tree8f57972d148ce3ab120bb62dfcd77cccb14034f8 /target/linux/mvebu/image
parent1647790ae6202bd70b199e2aa44f8eb43e8d3af1 (diff)
downloadupstream-85ef69b20299c2c4f42d6bfbfaf807358ebe2078.tar.gz
upstream-85ef69b20299c2c4f42d6bfbfaf807358ebe2078.tar.bz2
upstream-85ef69b20299c2c4f42d6bfbfaf807358ebe2078.zip
mvebu: add support for Buffalo LinkStation LS421DE
Buffalo LinkStation LS421DE is a dual bay NAS, based on Marvell Armada 370 Hardware: SoC: Marvell Armada 88F6707-A1 CPU: Cortex-A9 1200 MHz, 1 core Flash: SPI-NOR 1 MiB, NAND 512 MiB RAM: DDR3 512 MiB Ethernet: 1x 10/100/1000 Mbps USB: 1x 2.0, 1x 3.0 SATA: 2x 3.0 Gbps LEDs/Input : 5x / 2x (1x button, 1x slide-switch) RTC: Ricoh RS5C372A, I2C, no battery Flash instruction (UART+TFTP): 1. Downgrade the OEM firmware to 1.34 version (BUFFALO_BOOTVER=0.13) 2. Remove any hard drive from inside the bays. 3. Boot the Openwrt initramfs image using the U-Boot serial console: tftpboot 0x1200000 buffalo_ls421de-initramfs-kernel.bin bootm 0x1200000 4. Flash the sysupgrade image using the Openwrt console: sysupgrade -n buffalo_ls421de-squashfs-sysupgrade.bin 5. Wait until it finish, the device will reboot with Openwrt installed on the NAND flash. Note: - Device shuting down doesn't work, even if the power slide switch is used. We must first, via MDIO, set the unused LED2 at the ethernet phy0 to off state. Reboot works ok. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Diffstat (limited to 'target/linux/mvebu/image')
-rw-r--r--target/linux/mvebu/image/Makefile14
-rw-r--r--target/linux/mvebu/image/cortexa9.mk16
2 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index ef9274866d..3a47878069 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -40,6 +40,20 @@ define Build/boot-img-ext4
make_ext4fs -J -L kernel -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M $@.bootimg $@.boot
endef
+define Build/buffalo-kernel-jffs2
+ rm -rf $(KDIR)/kernel_jffs2 $@.fakerd
+ mkdir -p $(KDIR)/kernel_jffs2
+ dd if=/dev/zero of=$@.fakerd bs=131008 count=1 conv=sync
+ $(STAGING_DIR_HOST)/bin/mkimage \
+ -T ramdisk -A $(LINUX_KARCH) -O linux -C gzip -n 'fake initrd' \
+ -d $@.fakerd $(KDIR)/kernel_jffs2/initrd.buffalo
+ cp $@ $(KDIR)/kernel_jffs2/uImage.buffalo
+ $(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
+ --little-endian -v --squash-uids -q -f -n -x lzma -x rtime -m none \
+ --eraseblock=128KiB --pad=$(KERNEL_SIZE) -d $(KDIR)/kernel_jffs2 -o $@
+ rm -rf $(KDIR)/kernel_jffs2 $@.fakerd
+endef
+
define Build/sdcard-img
SIGNATURE="$(IMG_PART_SIGNATURE)" \
./gen_mvebu_sdcard_img.sh $@ \
diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index 85bfa94dbd..4ab6f4a7e8 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -6,6 +6,22 @@
# See /LICENSE for more information.
#
+define Device/buffalo_ls421de
+ $(Device/NAND-128K)
+ DEVICE_VENDOR := Buffalo
+ DEVICE_MODEL := LinkStation LS421DE
+ SUBPAGESIZE :=
+ KERNEL_SIZE := 33554432
+ FILESYSTEMS := squashfs ubifs
+ KERNEL := kernel-bin | append-dtb | uImage none | buffalo-kernel-jffs2
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
+ DEVICE_DTS := armada-370-buffalo-ls421de
+ DEVICE_PACKAGES := \
+ kmod-rtc-rs5c372a kmod-hwmon-gpiofan kmod-usb3 kmod-md-raid0 \
+ kmod-md-raid1 kmod-md-mod kmod-fs-xfs mkf2fs e2fsprogs partx-utils
+endef
+TARGET_DEVICES += buffalo_ls421de
+
define Device/cznic_turris-omnia
DEVICE_VENDOR := CZ.NIC
DEVICE_MODEL := Turris Omnia