openwrt/target/linux/kirkwood/base-files/etc/board.d/02_network

52 lines
1.0 KiB
Plaintext
Raw Normal View History

#
# Copyright (C) 2012-2015 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh
board_config_update
board=$(board_name)
case "$board" in
checkpoint,l-50)
kirkwood: add support for Check Point L-50 This patch adds support for the Check Point L-50 from 600/1100 series routers. Specification: -CPU: Marvell Kirkwood 88F6281 1200MHz -RAM: 512MB -Flash: NAND 512MB -WiFi: mPCIe card based on Atheros AR9287 b/g/n -WAN: 1 Gigabit Port (Marvell 88E1116R PHY) -LAN: 9 Gigabit Ports (2x Marvell 88E6171(5+4)) -USB: 2x USB2.0 -Express card slot -SD card slot -Serial console: RJ-45 115200 8n1 -Unsupported DSL Known issues: -DSL not supported -Expresscard not tested Installation: Step one -> backup: make backup u-boot and env for revert stock posibility make backup dsl_mac_addr, dmz_mac_addr, eth1addr, ethaddr and all lanX_mac_addr Step two -> Use kwboot tool to upload openwrt u-boot to RAM: run kwboot: "kwboot -B 115200 /dev/ttyUSB0 -b u-boot.kwb -p -t" end start u-boot Step three -> Restore macs (e.g. below): setenv eth1addr 00:1C:XX:XX:XX:6C setenv ethaddr 00:1C:XX:XX:XX:6B setenv lan1_mac_addr 00:1C:XX:XX:XX:6C setenv lan2_mac_addr 00:1C:XX:XX:XX:6D setenv lan3_mac_addr 00:1C:XX:XX:XX:6E setenv lan4_mac_addr 00:1C:XX:XX:XX:6F setenv lan5_mac_addr 00:1C:XX:XX:XX:70 setenv lan6_mac_addr 00:1C:XX:XX:XX:71 setenv lan7_mac_addr 00:1C:XX:XX:XX:72 setenv lan8_mac_addr 00:1C:XX:XX:XX:73 setenv dmz_mac_addr 00:1C:XX:XX:XX:74 setenv dsl_mac_addr 00:1C:XX:XX:XX:75 Step four -> flash u-boot: mw 0x0800000 0xffff 0x100000 nand erase 0x0 100000 tftp 0x0800000 openwrt-kirkwood-l50-u-boot.kwb nand write 0x0800000 0x0 0x100000 saveenv Step five -> run initramfs image: tftpboot 0x02000000 openwrt.bin; bootm 0x02000000; Step six -> install sysupgrade OpenWrt image: copy to /tmp/ sysupgrade image run sysupgrade Back to stock: Restore original u-boot end env. Install factory image via stock u-boot. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2020-01-26 17:22:28 +01:00
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 dmz" "eth0"
;;
cisco,on100)
ucidef_set_interface_lan "eth0 eth1"
;;
cloudengines,pogoe02|\
cloudengines,pogoplugv4|\
ctera,c200-v1|\
globalscale,sheevaplug|\
iom,iconnect-1.1|\
iom,ix2-200|\
raidsonic,ib-nas62x0|\
seagate,blackarmor-nas220|\
seagate,dockstar|\
seagate,goflexhome|\
seagate,goflexnet|\
zyxel,nsa310s)
ucidef_set_interface_lan "eth0" "dhcp"
;;
linksys,e4200-v2|\
linksys,ea3500|\
linksys,ea4500)
ucidef_set_interfaces_lan_wan "ethernet1 ethernet2 ethernet3 ethernet4" "internet"
ucidef_set_interface_macaddr "wan" $( mtd_get_mac_ascii u_env eth1addr )
;;
zyxel,nsa310b|\
zyxel,nsa325)
kirkwood: add ZyXEL NSA310b The ZyXEL NSA310 device is a Kirkwood based NAS: - SoC: Marvell 88F6702 1200Mhz - SDRAM memory: 256MB DDR2 400Mhz - Gigabit ethernet: Realtek (over pcie) - Flash memory: 128MB - 1 Power button - 1 Power LED (blue) - 5 Status LED (green/red) - 1 Copy/Sync button - 1 Reset button - 2 SATA II port (1 internal and 1 external) - 2 USB 2.0 ports (1 front and 1 back) - Smart fan The stock u-boot cannot read ubi so it should be replaced with the LEDE/OpenWRT's u-boot or with a u-boot from here https://github.com/mibodhi/u-boot-kirkwood This device's boot ROM supports "kwboot" tool (in mainline u-boot, built automatically if CONFIG_KIRKWOOD is declared) that sends an uboot image to the board over serial connection, it is very easy to unbrick. The stock bootloader can use usb and read from FAT filesystems, so the installation process is simple, place the uboot file on a USB flashdrive formatted as FAT (here it is "openwrt-kirkwood-nsa310.bin", then connect TTL to the board and write the following commands in the bootloader console: usb reset fatload usb 0 0x1000000 openwrt-kirkwood-nsa310.bin nand write 0x1000000 0x00000 0x100000 reset Now you are rebooting in the new u-boot, write this in its console to install the firmware: usb reset fatload usb 0 0x2000000 lede-kirkwood-nsa310b-squashfs-factory.bin nand erase.part ubi nand write 0x2000000 ubi 0x600000 If your firmware file is bigger than 6 MiBs you should write its size in hex instead of 0x600000 above, or remove that number entirely (it will take a while in this case). If you are using another uboot that can read ubi, set mtdparts like this mtdparts=mtdparts=orion_nand:0x00c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi) And set your bootcmd to be like this bootcmd=run setenv bootargs; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000 Then you can install the firmware as described above. After you installed (or configured) the u-boot for booting the firmware, write the device's mac address in the ethaddr u-boot env. The MAC address is usually on a sticker under the device (one of the two codes is the serial), it should begin with "107BEF" as it is assigned to ZyXEL. write in the u-boot console (use your MAC address instead of the example) setenv ethaddr 10:7B:EF:00:00:00 saveenv to save the mac address in the u-boot. Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
2017-01-23 20:34:29 +01:00
ucidef_set_interface_lan "eth0" "dhcp"
ucidef_set_interface_macaddr "lan" $( mtd_get_mac_ascii uboot_env ethaddr )
;;
*)
ucidef_set_interface_lan "eth0"
;;
esac
board_config_flush
exit 0