mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
be0f1c1b26
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>
77 lines
1.9 KiB
Plaintext
77 lines
1.9 KiB
Plaintext
#
|
|
# Copyright (C) 2014-2016 OpenWrt.org
|
|
# Copyright (C) 2016 LEDE-Project.org
|
|
#
|
|
|
|
[ -e /etc/config/ubootenv ] && exit 0
|
|
|
|
touch /etc/config/ubootenv
|
|
|
|
. /lib/uboot-envtools.sh
|
|
. /lib/functions.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
buffalo,ls220de|\
|
|
buffalo,ls421de)
|
|
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000"
|
|
;;
|
|
cznic,turris-omnia)
|
|
idx="$(find_mtd_index u-boot-env)"
|
|
if [ -n "$idx" ]; then
|
|
ubootenv_add_uci_config "/dev/mtd${idx}" "0x0" "0x10000" "0x10000"
|
|
elif grep -q 'U-Boot 2015.10-rc2' /dev/mtd0; then
|
|
ubootenv_add_uci_config "/dev/mtd0" "0xc0000" "0x10000" "0x40000"
|
|
else
|
|
ubootenv_add_uci_config "/dev/mtd0" "0xf0000" "0x10000" "0x10000"
|
|
fi
|
|
;;
|
|
glinet,gl-mv1000)
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1"
|
|
;;
|
|
globalscale,espressobin|\
|
|
globalscale,espressobin-emmc|\
|
|
globalscale,espressobin-ultra|\
|
|
globalscale,espressobin-v7|\
|
|
globalscale,espressobin-v7-emmc|\
|
|
globalscale,mochabin)
|
|
idx="$(find_mtd_index u-boot-env)"
|
|
if [ -n "$idx" ]; then
|
|
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
|
|
else
|
|
ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
|
|
fi
|
|
;;
|
|
marvell,armada8040-mcbin-doubleshot|\
|
|
marvell,armada8040-mcbin-singleshot)
|
|
ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
|
|
;;
|
|
linksys,wrt1200ac|\
|
|
linksys,wrt1900ac-v2|\
|
|
linksys,wrt1900acs)
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
|
|
;;
|
|
linksys,wrt1900ac-v1)
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
|
|
;;
|
|
linksys,wrt3200acm|\
|
|
linksys,wrt32x)
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
|
;;
|
|
methode,udpu|\
|
|
methode,edpu)
|
|
idx="$(find_mtd_index u-boot-env)"
|
|
if [ -n "$idx" ]; then
|
|
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
|
|
else
|
|
ubootenv_add_uci_config "/dev/mtd0" "0x180000" "0x10000" "0x10000"
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
config_load ubootenv
|
|
config_foreach ubootenv_add_app_config ubootenv
|
|
|
|
exit 0
|