From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [203.143.174.143] (helo=lemon.ken.nicta.com.au) by linuxtogo.org with esmtp (Exim 4.69) (envelope-from ) id 1MsQEF-0000He-Qk for openembedded-devel@lists.openembedded.org; Tue, 29 Sep 2009 02:06:07 +0200 Received: from vampire.ertos.nicta.com.au ([203.143.161.65]:36796 helo=rhino.keg.ertos.in.nicta.com.au.chubb.wattle.id.au) by lemon.ken.nicta.com.au with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MsQDz-0006jA-22 for openembedded-devel@lists.openembedded.org; Tue, 29 Sep 2009 10:05:50 +1000 Date: Tue, 29 Sep 2009 10:05:01 +1000 Message-ID: <87fxa639aq.wl%peter@chubb.wattle.id.au> From: Peter Chubb To: In-Reply-To: References: <87zl8eok2w.wl%peter@chubb.wattle.id.au> <87y6nyohc5.wl%peter@chubb.wattle.id.au> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 MULE XEmacs/21.4 (patch 21) (Educational Television) (i486-linux-gnu) X-Face: GgFg(Z>fx((4\32hvXq<)|jndSniCH~~$D)Ka:P@e@JR1P%Vr}EwUdfwf-4j\rUs#JR{'h# !]])6%Jh~b$VA|ALhnpPiHu[-x~@<"@Iv&|%R)Fq[[, (&Z'O)Q)xCqe1\M[F8#9l8~}#u$S$Rm`S9% \'T@`:&8>Sb*c5d'=eDYI&GF`+t[LfDH="MP5rwOO]w>ALi7'=QJHz&y&C&TE_3j! Organization: National ICT Australia MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") X-SA-Exim-Connect-IP: 203.143.174.143 X-SA-Exim-Mail-From: peter.chubb@nicta.com.au X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:20:07 +0000) X-SA-Exim-Scanned: No (on linuxtogo.org); Unknown failure Subject: Re: x86->x86 GRUB bootable image in OE? X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2009 00:06:07 -0000 X-Groupsio-MsgNum: 13251 Content-Type: multipart/mixed; boundary="Multipart_Tue_Sep_29_10:05:01_2009-1" --Multipart_Tue_Sep_29_10:05:01_2009-1 Content-Type: text/plain; charset=US-ASCII Here's the grub-native recipe. We use it something like this, in a different recipe for building the image: HOST_ARCH may need tweaking. GRUB=${STAGING_DIR}/${HOST_ARCH}-linux/usr/lib/grub/${HOST_ARCH}-pc #Build the image dd if=/dev/zero of="${IMAGE}" bs=1M count=$SZ # Set up mtools echo "drive c: file=\"$IMAGE\" partition=1" > mtoolsrc export MTOOLSRC=mtoolsrc # Create filesystem mpartition -I c: mpartition -c -t $CYLINDERS -h 16 -s 63 c: mformat c: mmd c:/boot mmd c:/boot/grub # Install grub mcopy "${GRUB}/stage1" c:/boot/grub mcopy "${GRUB}/stage2" c:/boot/grub mcopy "${GRUB}/fat_stage1_5" c:/boot/grub echo "(hd0) $IMAGE" > bmap echo -e "geometry (hd0) $CYLINDERS 16 63\nroot (hd0,0)\nsetup (hd0)" | grub --device-map=bmap --batch -- Dr Peter Chubb www.nicta.com.au peter DOT chubb AT nicta.com.au http://www.ertos.nicta.com.au ERTOS within National ICT Australia >From Imagination to Impact Imagining the (ICT) Future --Multipart_Tue_Sep_29_10:05:01_2009-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="grub-native_0.97.bb" Content-Transfer-Encoding: 7bit DESCRIPTION = "GRand Unified Bootloader" HOMEPAGE = "http://www.gnu.org/software/grub" SECTION = "bootloaders" DEPENDS = "libtool-native" PR = "r0" S = "${WORKDIR}/grub-${PV}" SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz" inherit autotools native do_configure() { oe_runconf CFLAGS="-fno-stack-protector" } --Multipart_Tue_Sep_29_10:05:01_2009-1--