85d9fd6f0e
This patch adds support for Mikrotik RB5009UG+S+IN. Specifications: - SoC: Marvell Armada 7040 (88F7040) - 4 cores, ARMv8 Cortex-A72, 1.4GHz, 64bit - RAM: 1024MB DDR4 - Flash: 16MB SPI NOR flash, 1024MB NAND - Ethernet: * Marvell 88E6393X - Amethyst: * one 2.5G RJ45 port via Qualcomm QCA8081 PHY * seven 1G RJ45 ports via built-in PHY-s * one 10G SFP+ cage * All ports share the same 10G switch uplink to the CPU - LED: User, SFP, Hdr1, Hdr2 - Buttons: Reset - UART: 115200 8n1 on the MikroTik 16 pin header - USB: One USB3 port - Power: 24-57 V via * DC jack * 802.3af/at PoE on Ethernet 1 * 2-pin terminal on the side 16 Pin header pinout: 1 GND Vcc RX ? GND #--------------------# |.-. .-. .-. .-. .-. | |'-' '-' '-' '-' '-' | |.-. .-. .-. .-. .-. | |'-' '-' '-' '-' '-' | #--------------------# 2 CLK DO /CS TX DI Do note that the default RouterBoot has disabled UART even when the required hard-config bit is set to indicate UART support. Patched RouterBoot must be used if UART is desired. Also, since ARM64 Linux support does not support in any way appending the DTB to the kernel image we use mainline U-Boot with added RB5009 support in order to boot OpenWrt. MikroTik uses YAFFS to store the boot kernel and we use YAFUT to put U-Boot as the kernel which RouterBoot then simply boots as an ELF. Install instructions: NOTE: In case you are using an existing out of tree version of OpenWrt make sure to reinstall RouterOS via Netinstall to return the expected partition layout. 1. Prepare FAT or EXT4 formatted USB drive with OpenWrt initramfs: * Copy bin/targets/mvebu/cortexa72/openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb to the root of FAT or EXT4 formatted USB drive. * Plug in the drive to the RB5009 USB port 2. Boot the modified OpenWrt built U-Boot ELF: u-boot.elf from bin/targets/mvebu/cortexa72/u-boot-rb5009/u-boot.elf Consult OpenWrt wiki for common instructions on switching to boot from Ethernet once as well as serving the file: https://openwrt.org/toh/mikrotik/common Once U-Boot is booted it will attempt to boot in the following order: 1. NAND 2. USB 3. Network NAND is expected to fail but USB or Networking need to serve the OpenWrt initramfs image and after booting it will be accessible from LAN ports on the default 192.168.1.1 IP with default credentials. 3. Flash modified RouterBoot that enables UART (Optional but recommended): https://public.robimarko.eu/RB5009/70x0-7.15-uart.fwf * Copy the file over to the booted OpenWrt initramfs to /tmp * Run: mtd erase RouterBOOT-primary * Run: mtd write /tmp/70x0-7.15-uart.fwf RouterBOOT-primary 4. Install U-Boot to boot OpenWrt: * Copy the u-boot.elf from bin/targets/mvebu/cortexa72/u-boot-rb5009/u-boot.elf to OpenWrt initramfs to /tmp. * Run: . /lib/functions.sh * Run: yafut -d /dev/mtd$(find_mtd_index "YAFFS") -w -i /tmp/u-boot.elf -o kernel -T This will use yafut to copy the U-Boot as kernel in YAFFS so that RouterBoot boots it. 5. Wipe the NAND UBI partition: * Run: ubiformat /dev/mtd$(find_mtd_index "ubi") -y This will prepare the existing RouterOS rootfs partition for OpenWrt. 6. Flash OpenWrt: * Copy the bin/targets/mvebu/cortexa72/openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-sysupgrade.bin to OpenWrt initramfs to /tmp. * Run: sysupgrade /tmp/openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-sysupgrade.bin Device will reboot, boot U-Boot and then OpenWrt. Recovery: In case you need to reinstall OpenWrt if it crashes after U-Boot, there is a recovery mechanism in OpenWrt to boot the OpenWrt initramfs. You need to hold the reset button while U-Boot is booting and then it will boot the OpenWrt initramfs from: 1. USB 2. Networking In recovery mode U-Boot will light all of the LED-s except for the switch ones. In case you want to return to RouterOS, you can simply do that via Netinstall like on any other MikroTik board. Credits also go to Serhii Serhieiev <adron@mstnt.com> who origininally figured out the RouterBoot modification for UART, the missing 10G MVPP2 support in U-Boot as well as the custom aux loader to boot directly via RouterBoot. Link: https://github.com/openwrt/openwrt/pull/15765 Signed-off-by: Robert Marko <robimarko@gmail.com> |
||
---|---|---|
.devcontainer/ci-env | ||
.github | ||
LICENSES | ||
config | ||
include | ||
package | ||
scripts | ||
target | ||
toolchain | ||
tools | ||
.gitattributes | ||
.gitignore | ||
BSDmakefile | ||
COPYING | ||
Config.in | ||
Makefile | ||
README.md | ||
feeds.conf.default | ||
rules.mk |
README.md
OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.
Sunshine!
Download
Built firmware images are available for many architectures and come with a package selection to be used as WiFi home router. To quickly find a factory image usable to migrate from a vendor stock firmware to OpenWrt, try the Firmware Selector.
If your device is supported, please follow the Info link to see install instructions or consult the support resources listed below.
An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:
Development
To build your own firmware you need a GNU/Linux, BSD or macOS system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system.
Requirements
You need the following tools to compile OpenWrt, the package names vary between distributions. A complete list with distribution specific packages is found in the Build System Setup documentation.
binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.7+ rsync subversion unzip which
Quickstart
-
Run
./scripts/feeds update -a
to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default -
Run
./scripts/feeds install -a
to install symlinks for all obtained packages into package/feeds/ -
Run
make menuconfig
to select your preferred configuration for the toolchain, target system & firmware packages. -
Run
make
to build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.
Related Repositories
The main repository uses multiple sub-repositories to manage packages of
different categories. All packages are installed via the OpenWrt package
manager called opkg
. If you're looking to develop the web interface or port
packages to OpenWrt, please find the fitting repository below.
-
LuCI Web Interface: Modern and modular interface to control the device via a web browser.
-
OpenWrt Packages: Community repository of ported packages.
-
OpenWrt Routing: Packages specifically focused on (mesh) routing.
-
OpenWrt Video: Packages specifically focused on display servers and clients (Xorg and Wayland).
Support Information
For a list of supported devices see the OpenWrt Hardware Database
Documentation
Support Community
- Forum: For usage, projects, discussions and hardware advise.
- Support Chat: Channel
#openwrt
on oftc.net.
Developer Community
- Bug Reports: Report bugs in OpenWrt
- Dev Mailing List: Send patches
- Dev Chat: Channel
#openwrt-devel
on oftc.net.
License
OpenWrt is licensed under GPL-2.0