[uClinux-dev] Re: Populating blkmem

David McCullough davidm at snapgear.com
Mon Mar 31 20:50:46 EST 2003

Jivin Miles Bader lays it down ...
> David McCullough <davidm at snapgear.com> writes:
> > Another option is to follow the coldfire examples which just cat the
> > romfs onto the end of the image and look for it at _ebss.
> The reason I don't do this for my targets is because I often use a
> debugger to load the image onto the board, and the debugger needs a
> proper ELF file to load.

It is still possible,  from the vendors/SnapGear/SOHO+/Makefile:

	BSS=`m68k-elf-objdump --headers $(ROOTDIR)/$(LINUXDIR)/linux | \
		grep .bss` ; \
		ADDR=`set -- $${BSS} ; echo 0x$${4}` ; \
		m68k-elf-objcopy --add-section=.romfs=$(ROOTDIR)/images/romfs.img \
			--adjust-section-vma=.romfs=$${ADDR} --no-adjust-warnings \
			--set-section-flags=.romfs=alloc,load,data \
			$(ROOTDIR)/$(LINUXDIR)/linux $(ROOTDIR)/images/image.elf

We use this to load elf images with a romfs through gdb/BDM and it works

> As I already need the infrastructure to do that, it's also simpler for
> me to just use the same mechanism for other targets that do just use a
> single binary image (e.g. where I'm booting from flash).

Either way is fine and completely valid.  A lot of other platforms have
done it that way in the past.  I just feel that having the kernel/romfs
step intermixed is a little messy.  Others, I am sure,  would disagree :-) :-)


David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm at snapgear.com  Fx: +61 7 3891 3630  Custom Embedded Solutions + Security

More information about the uClinux-dev mailing list