From 85ef69b20299c2c4f42d6bfbfaf807358ebe2078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Tue, 7 Apr 2020 14:35:26 +0200 Subject: mvebu: add support for Buffalo LinkStation LS421DE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tomasz Maciej Nowak --- target/linux/mvebu/image/Makefile | 14 ++++++++++++++ target/linux/mvebu/image/cortexa9.mk | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'target/linux/mvebu/image') 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 -- cgit v1.2.3