OpenWrt Forum Archive

Topic: Openwrt and ramdisk on adm5120

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

I am trying to compile an openwrt kamikaze on an adm5120 board similar to br6104k

The kernel boots but it don't find jffs2/squashfs  (there is a failure when is trying to clean the flash)
I' m trying to use a ramfs filesystem, but seem that this filesystem isn't found.

I worked in this way:
1 - make menuconfig / target image ->  ramdisk

2 - make V=99

3 - i worked a bit to have a .trx file .. i obtained a file working and booting..

The kernel seem not to be able to find the ramfs filesystem. may be it need to append something similar to root=/dev/ram0 ? (this one is not working)
In make kernel_menuconfig i saw a configuration line to decide where the ramfs has to be. This line is normally empty. Sure that the kernel include the ramfs filesystem ?

boh..

In a 2.6 kernel specifying ramdisk actually uses initramfs, which is a CPIO archive linked into the kernel.  This is used all the time with the RB1xx series (ADM5120 based), so I know it works.  RB1xx boards load an ELF file, and the final flash format is Yaffs, so it does not use .trx files, but if the kernel is loading properly it should be there and work.  Actually there is ALWAYS an initramfs in a 2.6 kernel, its just that normally it is (all but) empty.  If you look at the output from cat /proc/mounts you will see that there are two things mounted as /, one of which is marked as rootfs, this is the initramfs.  Obviously on your system if you have nothing else mounted as root you should find this as your only root.

David

I know there is ever a filesystem.
the kernel boot and the filesystem is sure not empty,

I used trx (that i pack by myself) mainly because the flash of my board is too little to use elf format (i can upload max 2mb, also in ram).

and then: is not so obvious that the ramfs is ever mounted:

during boot:
"
...
Initrd not found or empty - disabling initrd
"

This mean that the magic number for the initrd filesystem is not found in the compressed kernel, so this filesystem is not mounted. The kernel can boot only if it found a jffs2 or a squashfs.
This is my problem: the variabile "_end" give me a wrong address for the end of the kernel in arch/mips/kernel/setup.c or the initrd filesystem is in a wrong format?

(Last edited by ilBets on 15 Jun 2007, 18:13)

The discussion might have continued from here.