From owner-freebsd-mips@FreeBSD.ORG Tue Feb 1 17:19:05 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0721106566C for ; Tue, 1 Feb 2011 17:19:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A7B248FC0A for ; Tue, 1 Feb 2011 17:19:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id p11HEl5l050540 for ; Tue, 1 Feb 2011 10:14:47 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D483F87.4020801@bsdimp.com> Date: Tue, 01 Feb 2011 10:14:47 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101211 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-mips@freebsd.org References: <201101200928.45264.freebsd-mips@dino.sk> <527911.58663.qm@web33203.mail.mud.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: RS / RSPRO FreeBSD X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2011 17:19:06 -0000 On 02/01/2011 03:33, Jayachandran C. wrote: > On Tue, Feb 1, 2011 at 3:02 PM, Monthadar Al Jaberi 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.s while that is true, I wonder if anybody has tried to create a linker script that would allow you to add the MFS image as an ELF section and use ldscript magic to get the start/end address. This would allow you to generate MFS images of different sizes and attach them to the same kernel. Warner