[uClinux-dev] Re: Populating blkmem
miles at lsi.nec.co.jp
Mon Mar 31 02:16:08 EST 2003
John Williams <jwilliams at itee.uq.edu.au> writes:
> How do I populate the blkmem device or memory region to start with? Do
> I create a romfs image (with genromfs?) and cat it on the end of the
> kernel image? If so, how do the symbols blkmem_0_start and blkmem_0_end
> get set after the fact?
> Clearly there's nothing in the blkmem region (size is 0), so it's not
> going to work.
arch/v850/Makefile contains this (the section-name ".root" is what I
currently use; you apparently started from an old version of the code
that used ".blkmem0"):
# Deal with the initial contents of the blkmem device
# Embed it in the kernel
ROOT_FS_IMAGE_OBJ = root_fs_image.o
CORE_FILES += $(ROOT_FS_IMAGE_OBJ)
$(LINUX) : $(ROOT_FS_IMAGE_OBJ)
# Note that we use the build-system's objcopy, as the v850 tools are fairly
# old, and don't have the --rename-section option.
objcopy -I binary -O elf32-little -B i386 --rename-section .data=.root,alloc,load,readonly,data,contents $< $@
endif # !CONFIG_SIM
endif # ROOT_FS_IMAGE
Then when I do a make, I just do `make ROOT_FS_IMAGE=my-root-image'
where my-root-image is a file created with genromfs.
[Note that the build system in linux-2.5.x is completely different so
all the above details are different there.]
`To alcohol! The cause of, and solution to,
all of life's problems' --Homer J. Simpson
More information about the uClinux-dev