RS / RSPRO FreeBSD
Jayachandran C.
c.jayachandran at gmail.com
Tue Feb 1 10:33:34 UTC 2011
On Tue, Feb 1, 2011 at 3:02 PM, Monthadar Al Jaberi <monthadar at gmail.com> wrote:
> Sure,
>
> I used the standard kernel configuration file and modifed this:
> options MD_ROOT
> options MD_ROOT_SIZE=40960
> options ROOTDEVNAME=\"ufs:md0\"
>
> to generate filesystem:
> makefs -t ffs -B big -s 40m rootfs.img path-to-filesystem/
>
> to embedd the filesystem (script code):
> addr=($(strings -td kernel | grep "MFS Filesystem" | awk '{print
> $1}')) #calculate start and end address for mdroot
> rootfs_start=${addr[0]}
> rootfs_end=$((${addr[1]}+1))
> echo "Generating kernel image"
> head -c ${rootfs_start} kernel > kernel.new
> cat rootfs.img >> kernel.new
> tail -c +${rootfs_end} kernel >> kernel.new
> gzip -9 kernel.new
>
> Sorry for the extreme delay, hope it helps...
You can just set the MFS_IMAGE environment variable, and the 'make
buildkernel' will patch the mfs image during the kernel build process.
The script it uses is sys/tools/embed_mfs.sh
JC.
More information about the freebsd-mips
mailing list