Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get uBoot to work with a squashfs / What is FDT in uBoot?

I set-up the Kamikaze toolchain (from openwrt), and compiled Linux 2.6.30.x kernel for an AMCC PPC405ex kilauea reference board. However, for some reason I am doing something wrong in uBoot, as I am not able to run the kernel from an squashfs image. The image loads fine over tftp and uncompresses, but the console output does not start.

I haven't changed the Linux kernel command line and it looks just fine (console=ttyS0,115200 root=/dev/mtdblock). I am also a bit puzzled what is fdt in uBoot?

I am not entirely certain if this really belongs on stackoverflow, but then again this is not really a superuser.com question either (and because this has to do with a development environment it definitely is programming related, even though not exactly a programming question)

like image 250
Kimvais Avatar asked Oct 14 '22 10:10

Kimvais


1 Answers

I was able to solve this myself, I am not supposed to use the openwrt-boardname-squashfs.img but instaed I must use the openwrt-architecture-uImage image, containing just the kernel, take the root.squashfs and openwrt-boardname.dtb from the build_dir as they are not copied in the bin/ directory.

after that, these commands will bring up the board correctly:

tftp 0xfc1e0000 openwrt-kilauea.dtb
tftp 0x400000 openwrt-ppc40x-uImage
tftp 0x200000 root.squashfs
setenv bootargs 'console=ttyS0,115200 root=/dev/mtdblock2 rw'
bootm 0x400000 - 0xfc1e0000

there probably is an easier way, but I haven't figured out how to 'repartition' the mtd so I wouldn't have to initially load the kernel image to user space in the memory.

like image 189
Kimvais Avatar answered Oct 20 '22 19:10

Kimvais