OpenWrt Forum Archive

Topic: Can't find Uboot compatible bin file in bin/ramips/

The content of this topic has been archived on 26 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have successfully built OpenWRT for Linkit MT7688 SoC.
Now I would like to flash it to some noname MT7688 dev board. This board comes per-programed with OpenWRT, but I think I will need to boot new firmware from Uboot.

Below is bin/ramips output:
ross@ross:~/projects/openwrt/bin/ramips$ ll
total 22072
drwxr-xr-x 3 ross ross     4096 чер 13 22:32 ./
drwxr-xr-x 3 ross ross     4096 чер 13 15:38 ../
-rw-r--r-- 1 ross ross      318 чер 14 12:52 md5sums
-rw-r--r-- 1 ross ross 14548992 чер 14 12:52 openwrt-ramips-mt7688-root.squashfs
-rw-r--r-- 1 ross ross  1153668 чер 14 12:52 openwrt-ramips-mt7688-uImage.bin
-rwxr-xr-x 1 ross ross  3435100 чер 14 12:52 openwrt-ramips-mt7688-vmlinux.bin*
-rwxr-xr-x 1 ross ross  3440104 чер 14 12:52 openwrt-ramips-mt7688-vmlinux.elf*
drwxr-xr-x 9 ross ross     4096 чер 13 22:32 packages/
-rw-r--r-- 1 ross ross      518 чер 14 12:52 sha256sums

As far as I understand, neither of these files are suitable for Uboot. I am expecting archive with kernel and rootfs, like openwrt-ramips-mt7688-LinkIt7688-squashfs.bin (for another dev board, Linkit Smart).
But seems that kernel (openwrt-ramips-mt7688-uImage.bin) and rootfs (openwrt-ramips-mt7688-root.squashfs) are two separate files. How am I supposed to feed them to Uboot?

p.s. In 'menu makeconfig' I have only specified following parameters:
    Target System: Ralink RT288x/RT3xxx
    Subtarget: MT7688 based boards
    Target Profile: default

The uImage is the kernel, it goes first in flash and uboot should boot it.  Then the kernel needs to find and mount the rootfs.  It may work to just cat them together.

Seems that concatenation of both files will do the job (I did not expect such a simple solution smile ).
Although I can't test this now, as my kernel does not boot even if being load separately. Will need to investigate kernel issue first.

To load manually and boot from RAM, use an initrd image.  You can select to make one in menuconfig.

After I concatenate both file and flash device via Uboot, Linux stopped booting:

## Booting image at bc050000 ...
   Image Name:   MIPS OpenWrt Linux-3.18.23
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1150983 Bytes =  1.1 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 128

Starting kernel ...

[    0.000000] Linux version 3.18.23 (rostokus@rossbook) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r48532) ) #1 Wed Jun 21 12:04:36 EEST 2017
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7688 ver:1 eco:2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[    0.000000] Linux version 3.18.23 (rostokus@rossbook) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r48532) ) #1 Wed Jun 21 12:04:36 EEST 2017
...

What can be the reason?

The discussion might have continued from here.