I tried to build LEDE from source from the github. I successfully cloned and compiled the image. When I tried to transfer the image to my Mikrotik rb433 board, I encountered this error: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0).
I followed the instructions here:
https://wiki.openwrt.org/toh/mikrotik/common
For flashing the image on my Mikrotik rb433, first I tried to use initramfs image of LEDE to boot the board with usual tftp boot. When I saw the /proc/mtd values, I got the following:
root@LEDE:/# cat /proc/mtd
dev: size erasesize name
mtd0: 0000b000 00008000 "routerboot"
mtd1: 00001000 00008000 "hard_config"
mtd2: 00002000 00008000 "bios"
mtd3: 00001000 00001000 "soft_config"
mtd4: 00040000 00020000 "booter"
mtd5: 003c0000 00020000 "kernel"
mtd6: 07c00000 00020000 "ubi"
So I rebooted with old openwrt initramfs image, on which I got the following:
root@OpenWrt:/# cat /proc/mtd
dev: size erasesize name
mtd0: 0000b000 00001000 "routerboot"
mtd1: 00001000 00001000 "hard_config"
mtd2: 00002000 00001000 "bios"
mtd3: 00001000 00001000 "soft_config"
mtd4: 00040000 00020000 "booter"
mtd5: 003c0000 00020000 "kernel"
mtd6: 07c00000 00020000 "rootfs"
I proceeded with the website instructions for manually flashing the image as follows. (I've also tried wget2nand, but that also did not work). The commands I gave for manual flashing and their outputs are:
root@OpenWrt:/# mtd erase /dev/mtd5
Unlocking /dev/mtd5 ...
Erasing /dev/mtd5 ...
root@OpenWrt:/# mtd erase /dev/mtd6
Unlocking /dev/mtd6 ...
Erasing /dev/mtd6 ...Skipping bad block at 0x980000
Skipping bad block at 0x1640000
Skipping bad block at 0x23a0000
Skipping bad block at 0x25e0000
Skipping bad block at 0x4ae0000
root@OpenWrt:/# mkdir mnt/kernel
root@OpenWrt:/# mkdir mnt/rootfs
root@OpenWrt:/# mount /dev/mtdblock5 /mnt/kernel
[ 428.170000] yaffs: dev is 32505861 name is "mtdblock5" rw
[ 428.180000] yaffs: passed flags ""
root@OpenWrt:/# mount /dev/mtdblock6 /mnt/rootfs
[ 444.250000] yaffs: dev is 32505862 name is "mtdblock6" rw
[ 444.260000] yaffs: passed flags ""
Following this, I did scp to transfer lede-ar71xx-mikrotik-vmlinux-lzma.elf and lede-ar71xx-mikrotik-default-rootfs.tar.gz images from host to the /tmp folder of the board, and finally ran the the following commands:
root@OpenWrt:/# mv /tmp/lede-ar71xx-mikrotik-vmlinux-lzma.elf /mnt/kernel/kernel
root@OpenWrt:/# chmod +x /mnt/kernel/kernel
root@OpenWrt:/# umount /mnt/kernel/
root@OpenWrt:/mnt/rootfs# tar -xvzf /tmp/lede-ar71xx-mikrotik-default-rootfs.tar.gz
root@OpenWrt:/# umount /mnt/rootfs
root@OpenWrt:/# sync
root@OpenWrt:/# reboot
On rebooting (from NAND), I am getting the following errors (few last lines of the boot-time messages):
[ 2.340051] rb: no calibration data found
[ 2.347285] UBI error: no valid UBI magic found inside mtd6VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 2.360039] Please append a correct "root=" boot option; here are the available partitions:
[ 2.368389] 1f00 44 mtdblock0 (driver?)
[ 2.373442] 1f01 4 mtdblock1 (driver?)
[ 2.378498] 1f02 8 mtdblock2 (driver?)
[ 2.383545] 1f03 4 mtdblock3 (driver?)
[ 2.388603] 1f04 256 mtdblock4 (driver?)
[ 2.393650] 1f05 3840 mtdblock5 (driver?)
[ 2.398708] 1f06 126976 mtdblock6 (driver?)
[ 2.403756] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 2.412909] Rebooting in 1 seconds..
Any help is greatly appreciated. Did I do some mistake in generating images? I also want to understand why rootfs is not mounting?
Regards.
Inam