diff options
author | Ryan Mounce <ryan@mounce.com.au> | 2017-06-03 02:01:06 +0930 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2018-03-10 01:15:21 +0100 |
commit | 9f3f61a0d968fbe7b93899f948f3c34612683ba6 (patch) | |
tree | 1205b010722855a153e07508176978e0b1c4ca4c /target/linux/mvebu/base-files/lib | |
parent | 657ce9231d6bcbf0612b699a333de0f24508f009 (diff) | |
download | upstream-9f3f61a0d968fbe7b93899f948f3c34612683ba6.tar.gz upstream-9f3f61a0d968fbe7b93899f948f3c34612683ba6.tar.bz2 upstream-9f3f61a0d968fbe7b93899f948f3c34612683ba6.zip |
mvebu: add support for Turris Omnia
Adds support for the Turris Omnia and builds an eMMC sysupgrade image in
the same format as the SolidRun ClearFog.
An initramfs image in the simple yet Omnia-specific 'medkit' image format
is also built in order to ease the initial flashing process.
Notable hardware support omissions are support for switching between SFP
cage and copper PHY, and RGB LED control.
Due to a current limitation of DSA, only 1/2 CPU switch uplinks are used.
Specifications:
- Marvell Armada 385 1.6GHz dual-core ARMv7 CPU
- 1GB DDR3 RAM
- 8GB eMMC Flash
- 5x Gigabit LAN via Marvell 88E6176 Switch (2x RGMII CPU ports)
- 1x switchable RJ45 (88E1514 PHY) / SFP SGMII WAN
- 2x USB 3.0
- 12x dimmable RGB LEDs controlled by independent MCU
- 3x Mini PCIe slots
- Optional Compex WLE200N2 Mini PCIe AR9287 2x2 802.11b/g/n (2.4GHz)
- Optional Compex WLE900VX Mini PCIe QCA9880 3x3 802.11ac (2.4 / 5GHz)
- Optional Quectel EC20 Mini PCIe LTE modem
Flash instructions:
If the U-Boot environment has been modified previously (likely manually via
serial console), first use serial to reset the default environment.
=> env default -a
=> saveenv
Method 1 - USB 'medkit' image w/o serial
- Copy openwrt-mvebu-turris-omnia-sysupgrade.img.gz and
omnia-medkit-openwrt-mvebu-turris-omnia-initramfs.tar.gz to the root of a
USB flash drive formatted with FAT32 / ext2/3/4 / btrfs / XFS.
Note that the medkit MUST be named omnia-medkit*.tar.gz
- Disconnect other USB devices from the Omnia and connect the flash drive
to either USB port.
- Power on the Omnia and hold down the rear reset button until 4 LEDs are
illuminated, then release.
- Wait approximately 2 minutes for the Turris Omnia to flash itself with
the temporary image, during which LEDs will change multiple times.
- Connect a computer to a LAN port of the Turris Omnia with a DHCP client
- (if necessary) ssh-keygen -R 192.168.1.1
- ssh root@192.168.1.1
$ mount /dev/sda1 /mnt
$ sysupgrade /mnt/openwrt-mvebu-turris-omnia-sysupgrade.img.gz
- Wait another minute for the final OpenWrt image to be flashed. The Turris
Omnia will reboot itself and you can remove the flash drive.
Method 2 - TFTP w/ serial
- Extract omnia-medkit-openwrt-mvebu-turris-omnia-initramfs.tar.gz and copy
dtb + zImage to your TFTP server (rename if desired)
- Connect Turris Omnia WAN port to DHCP-enabled network with TFTP server
- Connect serial console and interrupt U-Boot
=> dhcp
=> setenv serverip <tftp_server_ip_here>
=> tftpboot 0x01000000 zImage
=> tftpboot 0x02000000 dtb
=> bootz 0x01000000 - 0x02000000
- OpenWrt will now boot from ramdisk
- Download openwrt-mvebu-turris-omnia-sysupgrade.img.gz to /tmp/
$ sysupgrade /tmp/openwrt-mvebu-turris-omnia-sysupgrade.img.gz
- Wait another minute for the final OpenWrt image to be flashed. The Turris
Omnia will reboot itself.
Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
Diffstat (limited to 'target/linux/mvebu/base-files/lib')
-rwxr-xr-x | target/linux/mvebu/base-files/lib/mvebu.sh | 3 | ||||
-rwxr-xr-x | target/linux/mvebu/base-files/lib/upgrade/platform.sh | 4 | ||||
-rw-r--r-- | target/linux/mvebu/base-files/lib/upgrade/sdcard.sh | 12 |
3 files changed, 17 insertions, 2 deletions
diff --git a/target/linux/mvebu/base-files/lib/mvebu.sh b/target/linux/mvebu/base-files/lib/mvebu.sh index fb3ddee4f5..1cd87507a3 100755 --- a/target/linux/mvebu/base-files/lib/mvebu.sh +++ b/target/linux/mvebu/base-files/lib/mvebu.sh @@ -59,6 +59,9 @@ mvebu_board_detect() { *"SolidRun Clearfog Base A1") name="armada-388-clearfog-base" ;; + *"Turris Omnia") + name="armada-385-turris-omnia" + ;; esac [ -z "$name" ] && name="unknown" diff --git a/target/linux/mvebu/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/base-files/lib/upgrade/platform.sh index b59c765a38..ef8065a44e 100755 --- a/target/linux/mvebu/base-files/lib/upgrade/platform.sh +++ b/target/linux/mvebu/base-files/lib/upgrade/platform.sh @@ -16,7 +16,7 @@ platform_do_upgrade() { armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba) platform_do_upgrade_linksys "$ARGV" ;; - armada-388-clearfog-base|armada-388-clearfog-pro) + armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro) platform_do_upgrade_sdcard "$ARGV" ;; *) @@ -29,7 +29,7 @@ platform_copy_config() { armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba) platform_copy_config_linksys ;; - armada-388-clearfog-base|armada-388-clearfog-pro) + armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro) platform_copy_config_sdcard "$ARGV" ;; esac diff --git a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh index de6e1a920c..fbf121f33d 100644 --- a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh +++ b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh @@ -18,8 +18,20 @@ platform_check_image_sdcard() { } platform_do_upgrade_sdcard() { + local board=$(board_name) + sync get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync + + case "$board" in + armada-385-turris-omnia) + fw_setenv openwrt_bootargs 'earlyprintk console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=auto rootwait' + fw_setenv openwrt_mmcload 'setenv bootargs "$openwrt_bootargs cfg80211.freg=$regdomain"; fatload mmc 0 0x01000000 zImage; fatload mmc 0 0x02000000 armada-385-turris-omnia.dtb' + fw_setenv factory_mmcload 'setenv bootargs "$bootargs cfg80211.freg=$regdomain"; btrload mmc 0 0x01000000 boot/zImage @; btrload mmc 0 0x02000000 boot/dtb @' + fw_setenv mmcboot 'mw 0xf10184a0 0xfd4d4cfa; run openwrt_mmcload || run factory_mmcload; bootz 0x01000000 - 0x02000000' + ;; + esac + sleep 1 } |