You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/target/linux/mvebu/base-files/etc/board.d/02_network

63 lines
1.4 KiB
Plaintext

#!/bin/sh
#
# Copyright (C) 2014-2016 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
armada-385-db-ap)
ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
;;
armada-385-linksys-caiman|\
armada-385-linksys-cobra|\
armada-385-linksys-rango|\
armada-385-linksys-shelby|\
armada-385-linksys-venom|\
armada-xp-linksys-mamba)
ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0" "4:wan" "6@eth1"
;;
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>
7 years ago
armada-385-turris-omnia)
ucidef_set_interface_lan "lan0 lan1 lan2 lan3 lan4"
ucidef_set_interface_wan "eth2"
;;
armada-388-clearfog-*)
# eth0 is standalone ethernet
# eth1 is switch (-pro) or standalone ethernet (-base)
# eth2 is SFP
ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2"
# if switch exists (clearfog-pro)
# switch port 5 is connected to eth1
swconfig list 2>&1 | grep -q switch0 && \
ucidef_add_switch "switch0" \
"0:lan:5" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5u@eth1" "6:lan:6"
;;
armada-xp-gp)
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
;;
mvebu: new subtarget cortex A53 This commit introduces new subtarget for Marvell EBU Armada Cortex A53 processor based devices. The first device is Globalscale ESPRESSObin. Some hardware specs: SoC: Marvell Armada 3700LP (88F3720) dual core ARM Cortex A53 processor up to 1.2GHz RAM: 512MB, 1GB or 2GB DDR3 Storage: SATA interface µSD card slot with footprint for an optional 4GB EMMC 4MB SPI NOR flash for bootloader Ethernet: Topaz Networking Switch (88E6341) with 3x GbE ports Connectors: USB 3.0 USB 2.0 µUSB port connected to PL2303SA (USB to serial bridge controller) for UART access Expansion: 2x 46-pin GPIO headers for accessories and shields with I2C, GPIOs, PWM, UART, SPI, MMC, etc MiniPCIe slot Misc: Reset button, JTAG interface Currently booting only from µSD card is supported. The boards depending on date of dispatch can come with various U-Boot versions. For the newest version 2017.03-armada-17.10 no manual intervention should be needed to boot OpenWrt image. For the older ones it's necessary to modify default U-Boot environment: 1. Interrupt boot process to run U-Boot command line, 2. Run following commands: (for version 2017.03-armada-17.06 and 2017.03-armada-17.08) setenv bootcmd "load mmc 0:1 0x4d00000 boot.scr; source 0x4d00000" saveenv (for version 2015.01-armada-17.02 and 2015.01-armada-17.04) setenv bootargs "console=ttyMV0,115200 root=/dev/mmcblk0p2 rw rootwait" setenv bootcmd "ext4load mmc 0:1 ${fdt_addr} armada-3720-espressobin.dtb; ext4load mmc 0:1 ${kernel_addr} Image; booti ${kernel_addr} - ${fdt_addr}" saveenv 3. Poweroff, insert SD card with OpenWrt image, boot and enjoy. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
globalscale,espressobin)
ucidef_set_interfaces_lan_wan "lan0 lan1" "wan"
;;
mvebu: initial support for Marvell Armada 3720 DB board Add initial support for Marvell Armada cortex-a53 based DB-88F3720-DDR3-Modular development board. Specifications: - Dual core ARMv8 Cortex-A53 CPU (up to 1.0 GHz) - 4Gb 16-bit DDR3/3L DRAM memory - 128Mb SPI NOR flash memory - 8Gb eMMC NAND flash memory - 1 x SATA Rev 3.0 port - 1 x PCI Express (PCIe) Gen 2.0 or 1 x mini PCI Express (PCIe) Gen 2.0 - 1 x 1G Ethernet port via RGMII (RJ45) - 1 x SD card port - 1 x USB3 (USB2 backward) host\device port via type C connector - 1 x USB2 host port via type A connector - 1 x serial COM port driven by the 88F3720 UART interface and converted to USB via FTDI IC (option to connect the UART DB9 adapter) - I2C Master Interface: - 1 x EEPROM @ address 0x57 - 1 x I/O Expanders @ address 0x22 - Sample at Reset (SatR) memory device @ address 0x4C - RTC clock generator PT7C4337AWE @ address 0x68 - USB3 switch PI5USB30213XEA @ address 0x0D - ID component of PHY module @ address 0x24 - 1 x JTAG interface for CPU emulator - 1 x SETM and JTAG debug interface - 1 x power connector for HDD supply - 1 x 12V DC jack power connector - Board dimensions: 150 mm x 179 mm - LED interface for system status Booting from SD card: 1. reset U-Boot environment: env default -a saveenv 2. prepare U-Boot with boot script: setenv bootcmd "load mmc 0:1 0x4d00000 boot.scr; source 0x4d00000" saveenv or manually: setenv fdt_name armada-3720-db.dtb setenv image_name Image setenv bootcmd 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk1p2 rw rootwait; booti $kernel_addr - $fdt_addr' saveenv Signed-off-by: Damir Samardzic <damir.samardzic@sartura.hr>
6 years ago
marvell,armada-3720-db)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
marvell,armada8040-mcbin)
ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
;;
*)
ucidef_set_interface_lan "eth0"
;;
esac
board_config_flush
exit 0