mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
78cf3e53b1
Globalscale MOCHAbin is a Armada 7040 based development board. Specifications: * Armada 7040 Quad core ARMv8 Cortex A-72 @ 1.4GHz * 2 / 4 / 8 GB of DDR4 DRAM * 16 GB eMMC * 4MB SPI-NOR (Bootloader) * 1x M.2-2280 B-key socket (for SSD expansion, SATA3 only) * 1x M.2-2250 B-key socket (for modems, USB2.0 and I2C only) * 1x Mini-PCIe 3.0 (x1, USB2.0 and I2C) * 1x SATA 7+15 socket (SATA3) * 1x 16-pin (2×8) MikroBus Connector * 1x SIM card slot (Connected to the mini-PCIe and both M.2 slots) * 2x USB3.0 Type-A ports via SMSC USB5434B hub * Cortex 2x5 JTAG * microUSB port for UART (PL2303GL/PL2303SA onboard) * 1x 10G SFP+ * 1x 1G SFP (Connected to 88E1512 PHY) * 1x 1G RJ45 with PoE PD (Connected to 88E1512 PHY) * 4x 1G RJ45 ports via Topaz 88E6141 switch * RTC with battery holder (SoC provided, requires CR2032 battery) * 1x 12V DC IN * 1x Power switch * 1x 12V fan header (3-pin, power only) * 1x mini-PCIe LED header (2x0.1" pins) * 1x M.2-2280 LED header (2x0.1" pins) * 6x Bootstrap jumpers * 1x Power LED (Green) * 3x Tri-color RGB LEDs (Controllable) * 1x Microchip ATECC608B secure element Note that 1G SFP and 1G WAN cannot be used at the same time as they are in parallel connected to the same PHY. Installation: Copy dtb from build_dir to bin/ and run tftpserver there: $ cp ./build_dir/target-aarch64_cortex-a72_musl/linux-mvebu_cortexa72/image-armada-7040-mochabin.dtb bin/targets/mvebu/cortexa72/ $ in.tftpd -L -s bin/targets/mvebu/cortexa72/ Connect to the device UART via microUSB port and power on the device. Power on the device and hit any key to stop the autoboot. Set serverip (host IP) and ipaddr (any free IP address on the same subnet), e.g: $ setenv serverip 192.168.1.10 # Host $ setenv ipaddr 192.168.1.15 # Device Set the ethernet device (Example for the 1G WAN): $ setenv ethact mvpp2-2 Ping server to confirm network is working: $ ping $serverip Using mvpp2-2 device host 192.168.1.15 is alive Tftpboot the firmware: $ tftpboot $kernel_addr_r openwrt-mvebu-cortexa72-globalscale_mochabin-initramfs-kernel.bin $ tftpboot $fdt_addr_r image-armada-7040-mochabin.dtb Boot the image: $ booti $kernel_addr_r - $fdt_addr_r Once the initramfs is booted, transfer openwrt-mvebu-cortexa72-globalscale_mochabin-squashfs-sdcard.img.gz to /tmp dir on the device. Gunzip and dd the image: $ gunzip /tmp/openwrt-mvebu-cortexa72-globalscale_mochabin-squashfs-sdcard.img.gz $ dd if=/tmp/openwrt-mvebu-cortexa72-globalscale_mochabin-squashfs-sdcard.img of=/dev/mmcblk0 && sync Reboot the device. Hit any key to stop the autoboot. Reset U-boot env and set the bootcmd: $ env default -a $ setenv bootcmd 'load mmc 0 ${loadaddr} boot.scr && source ${loadaddr}' Optionally I would advise to edit the console env variable to remove earlycon as that causes the kernel to never use the driver for the serial console. Earlycon should be used only for debugging before the kernel can configure the console and will otherwise cause various issues with the console. $ setenv console 'console=ttyS0,115200' Save and reset $ saveenv $ reset OpenWrt should boot from eMMC now. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
70 lines
1.7 KiB
Plaintext
70 lines
1.7 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,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)
|
|
ubootenv_add_uci_config "/dev/mtd0" "0x180000" "0x10000" "0x10000"
|
|
;;
|
|
esac
|
|
|
|
config_load ubootenv
|
|
config_foreach ubootenv_add_app_config ubootenv
|
|
|
|
exit 0
|