Mikritik install ~~~~~~~~~~~~~~~~ download https://downloads.openwrt.org/releases/17.01.4/targets/ar71xx/mikrotik/lede-17.01.4-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf https://downloads.openwrt.org/releases/17.01.4/targets/ar71xx/mikrotik/lede-17.01.4-ar71xx-mikrotik-nand-large-squashfs-sysupgrade.bin disable networkmanager (it messes with eth0) connect mikrotik to eth0 # /etc/init.d/network-manager stop # ifconfig eth0 192.168.1.1 up #dnsmasq -i eth0 --dhcp-range=192.168.1.100,192.168.1.200 \ --dhcp-boot=lede-17.01.4-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf \ --enable-tftp --tftp-root=/absolute_path/ -d -u rsnel -p0 -K --log-dhcp --bootp-dynamic 2018/07/01 ~~~~~~~~~~ Fix UBI on RB2011.. ---- This week, I wanted to upgrade my RB2011UiAS-2HnD-IN to a new version of OpenWRT. I got boot loops whenever I installed a version that used UBI (and not the old yaffs2). So I built a serial cable and saw lots of ECC errors scrolling past the screen. Those errors could be reproduced by ubiformat / ubiattach / ubimkvol / ubidetach / ubiattach (last command would fail with said errors) It turned out that my unit has a K9F1G08U0E flash chip which does not support sub-page writes (http://lists.infradead.org/pipermail/linux-mtd/2018-January/078664.html). So I edited target/linux/ar71xx/config-4.9 to include CONFIG_CMDLINE="ubi.mtd=6,2048 rootfstype=squashfs noinitrd" and compiled. This tells the UBI driver not to do sub-page writes (http://linux-mtd.infradead.org/faq/ubi.html#L_force_no_subpage 1). ----- Put resulting for example in ~/Downloads/mikrotik/: openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf openwrt-ar71xx-mikrotik-nand-large-squashfs-sysupgrade.bin Connect mikrotik to spare eth1 device, configure # ifconfig eth1 10.0.0.1 up Then run dnsmasq # dnsmasq -i eth1 --dhcp-range=10.0.0.10,10.0.0.20 --dhcp-boot=openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf --enable-tftp --tftp-root=/home/rsnel/Downloads/mikrotik/ -d -u rsnel -p0 -K --log-dhcp --bootp-dynamic Connect this port to port1 of mikrotik and instruct mikrotik to boot from ethernet (either via RS232 or hold reset button before powerup until beep) connect to 192.168.1.1 (default IP of mikrotik) with ssh and download sysupgrade.bin eniac# nc -l -p 9999 < openwrt-ar71xx-mikrotik-nand-large-squashfs-sysupgrade.bin mikrotik# nc 192.168.1.2 9999 > sysupgrade.bin mikrotik# sysupgrade sysupgrade.bin New Setup ~~~~~~~~~ apt-get install tftpd put openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf in /srv/tftp add entry for router in eniac's dhcpd.conf host rb2011 { hardware ethernet e4:8d:8c:36:12:f4; fixed-address rb2011.hvs.snel.it; server-name "eniac"; filename "openwrt-VERSION-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf"; next-server 192.168.1.1; } Building openwrt ~~~~~~~~~~~~~~~~ git clone https://git.openwrt.org/openwrt/openwrt.git/