[uClinux-dev] CONFIG_ROMFS_FS and MCF532x
Wolfgang Wegner
wolfgang at leila.ping.de
Thu Nov 29 19:19:23 EST 2007
Hi Greg,
On Fri, Nov 30, 2007 at 09:50:28AM +1000, Greg Ungerer wrote:
>
> This is due to the almost universal way that images are put
> together on ColdFire. The single image file (which is a kernel
> and filesystem concatenated) means that the fs needs to be copied
> at kernel start to a more suitable place. And this is the
> code you are seeing above, _copy_romfs.
I begin to understand. ;-) So this code is needed when the
root fs image is concatenated with the kernel but not in the
"regular" initramfs-cpio archive? (Maybe like Davidm proposed in
an answer to my initrd problem)
Thank you for patiently explaining all this to me!
> What is the format of the image that you load with uboot?
> I assume it is not the usual kernel+filesystem image.bin?
>
> Sounds like you should conditional out the code in the
> startup head.S, if your image format is different.
> (Say if you are loading the kernel and romfs/ramdisk
> as 2 separate files/loads).
It depends - as I did not have time to further investigate the initramfs
problem yet I am using two images at the moment. One is the kernel
itself in a special U-Boot image file format (compressed and with a
checksum), the other is the root filesystem that is just held in flash
and used by the kernel directly. The kernel image is generated from
vmlinux.bin, which - if configured - does also include the initramfs,
but I did not try another method of including a root filesystem yet.
Having everything in a single file (like with initramfs) would have
several advantages:
- only 1 file to update in case of software update
- no U-Boot (and flashing cycle) needed during development, the complete
image can be loaded to RAM by a debugger
- using U-Boot (or probably any other bootloader), the checksum over the
complete image allows secure software update or even a rather simple
fallback to a different image if one is corrupted
The disadvantage is, of course, higher RAM usage because the filesystem
is held in RAM during execution.
For the moment i conditionaled the _copy_romfs part out and now the kernel
starts up reliably. I hope to have time for further investigating all
this initramfs/image stuff next week...
> Regards
> Greg
Regards,
Wolfgang
More information about the uClinux-dev
mailing list