qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] New way of working with upstream Bochs BIOS
Date: Fri, 19 Dec 2008 12:13:50 +0100	[thread overview]
Message-ID: <494B81EE.4090800@amd.com> (raw)
In-Reply-To: <49497394.3010106@us.ibm.com>

Anthony Liguori wrote:
> I've setup a git mirror of Bochs on repo.or.cz.  I've also restructured 
> the bios.diff into a patch queue and recorded what changeset we're 
> using.  Now, to recreate the bios.bin that we ship, use the following 
> instructions:
Nice. But is requiring guilt (ever googled for it ;-) and poking around 
in .git really necessary? I'd suggest to force all patches to be in a 
(at least simulated) mbox format (as 0002-0005 are) and using "git am" 
in a for loop.

> $ export QEMUSRC=/path/to/qemu/svn

> $ git clone git://repo.or.cz/bochs-mirror.git
> $ cd bochs-mirror
> $ git checkout -b qemu-bios $(cat $QEMUSRC/pc-bios/bios-pq/HEAD)
If you would create a branch on the remote repo, one could use
$ git init && git fetch git://... qemu-bios:qemu-bios
which would directly get the desired branch only.

> $ mkdir -p .git/patches
> $ ln -s $QEMUSRC/pc-bios/bios-pq .git/patches/qemu-bios
> $ touch .git/patches/qemu-bios/status
> $ guilt push -a
could be replaced with
$ for p in $(cat $QEMUSRC/pc-bios/bios-pq/series); do git am $p; done

> $ ./configure

> $ cd bios
> $ make
> $ cp BIOS-bochs-latest $QEMUSRC/pc-bios/bios.bin
$ make bios
covers the above three steps.

> New patches against bochs should go in pc-bios/bios-pq with series being 
> updated appropriately.  When we bump to a new version of the bochs bios, 
> we should update pc-bios/HEAD appropriately.  The bochs mirror gets 
> updated daily with a cron job for now.

BTW: I think the #define BX_QEMU does not belong in a header file, but 
in a Makefile. What about pouring the above commands in a Makefile, 
which automatically fetches, patches and builds the BIOS? Normally this 
process would not be triggered, but only on explicit request.

Or patch the Makefile in the bochs-mirror.git:qemu-bios branch:
diff --git a/bios/Makefile.in b/bios/Makefile.in
index 5c7bd4f..0205dbe 100644
--- bochs-mirror/bios/Makefile.in
+++ bochs-mirror/bios/Makefile.in
@@ -41,7 +41,7 @@ RANLIB = @RANLIB@

  BCC = bcc
  GCC = gcc
-GCC32 = gcc -m32 -fno-stack-protector
+GCC32 = gcc -m32 -fno-stack-protector -DBX_QEMU
  AS86 = as86

  BX_INCDIRS = -I.. -I$(srcdir)/.. -I../iodev -I$(srcdir)/../iodev


Regards,
Andre.

-- 
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
AMD Saxony Limited Liability Company & Co. KG,
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896, General Partner authorized
to represent: AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy

  reply	other threads:[~2008-12-19 11:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17 21:48 [Qemu-devel] New way of working with upstream Bochs BIOS Anthony Liguori
2008-12-19 11:13 ` Andre Przywara [this message]
2008-12-19 14:19   ` Anthony Liguori
2008-12-19 14:59     ` Andre Przywara
2008-12-19 16:19       ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=494B81EE.4090800@amd.com \
    --to=andre.przywara@amd.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).