All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 8/9] PPC: Add u-boot firmware for e500
Date: Fri, 16 May 2014 13:09:23 +0200	[thread overview]
Message-ID: <5375F1E3.4010509@suse.de> (raw)
In-Reply-To: <1400220407.2573.2.camel@nilsson.home.kraxel.org>


On 16.05.14 08:06, Gerd Hoffmann wrote:
> On Do, 2014-05-15 at 18:32 +0200, Alexander Graf wrote:
>> This adds a special build of u-boot tailored for the e500 platforms we
>> emulate. It is based on the current version of upstream u-boot which
>> contains all the code necessary to drive our QEMU provided machines.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
> Adding build rules to roms/Makefile would be nice,
> so you can just do "make -C roms uboot" to build it.

Good idea. How about something like this? I had to jump through some 
hoops to make it work with a biarch 64/32 compiler because upstream 
u-boot assumes you always have a cross compiler for a specific target 
architecture which is not the case in normal enterprise distributions.

If you think this approach is fine (I do ;)), then I'll squash it into 
this patch but won't resend the patch - I don't want to clutter people's 
inboxes with random binary blobs.


Alex

diff --git a/roms/Makefile b/roms/Makefile
index 2721b02..1b6996c 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -55,6 +55,7 @@ default:
      @echo "  efirom         -- update nic roms (bios+efi, this needs"
      @echo "                    the EfiRom utility from edk2 / tianocore)"
      @echo "  slof           -- update slof.bin"
+    @echo "  u-boot.e500    -- update u-boot.e500"

  bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k
      cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin
@@ -132,6 +133,19 @@ slof:
      $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu
      cp SLOF/boot_rom.bin ../pc-bios/slof.bin

+u-boot.e500:
+    # examples fail to honor cflags, just remove them
+    rm -rf u-boot/examples
+    sed -i 's/examples//g' u-boot/Makefile
+    # Make linker script biarch aware
+    sed -i 's/OUTPUT_ARCH(powerpc)/OUTPUT_ARCH(powerpc:common)/' \
+        u-boot/arch/powerpc/cpu/mpc85xx/u-boot.lds
+    # Compile u-boot
+    $(MAKE) -C u-boot O=build.e500 qemu-ppce500_config
+    $(MAKE) -C u-boot CROSS_COMPILE=$(powerpc64_cross_prefix) \
+        O=build.e500 KCFLAGS=-m32 KAFLAGS=-m32 \
+        LDFLAGS=-melf32ppc KCPPFLAGS=-m32 V=1 u-boot.bin
+    strip u-boot/build.e500/u-boot -o ../pc-bios/u-boot.e500

  clean:
      rm -rf seabios/.config seabios/out seabios/builds
@@ -141,3 +155,4 @@ clean:
      rm -f sgabios/.depend
      $(MAKE) -C ipxe/src veryclean
      $(MAKE) -C SLOF clean
+    rm -rf u-boot/build.e500

  reply	other threads:[~2014-05-16 11:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15 16:32 [Qemu-devel] [PATCH 0/9] PPC: e500: Use u-boot as firmware Alexander Graf
2014-05-15 16:32 ` [Qemu-devel] [PATCH 1/9] PPC: Make all e500 CPUs SVR aware Alexander Graf
2014-05-15 16:32 ` [Qemu-devel] [PATCH 2/9] PPC: Add definitions for GIVORs Alexander Graf
2014-05-15 16:32 ` [Qemu-devel] [PATCH 3/9] PPC: Fix SPR access control of L1CFG0 Alexander Graf
2014-05-15 16:32 ` [Qemu-devel] [PATCH 4/9] PPC: Add L1CFG1 SPR emulation Alexander Graf
2014-05-15 16:32 ` [Qemu-devel] [PATCH 5/9] PPC: Properly emulate L1CSR0 and L1CSR1 Alexander Graf
2014-05-15 16:32 ` [Qemu-devel] [PATCH 6/9] PPC: Add dcbtls emulation Alexander Graf
2014-05-15 16:32 ` [Qemu-devel] [PATCH 7/9] PPC: e500: Expose kernel load address in dt Alexander Graf
2014-05-15 16:32 ` [Qemu-devel] [PATCH 8/9] PPC: Add u-boot firmware for e500 Alexander Graf
2014-05-16  6:06   ` Gerd Hoffmann
2014-05-16 11:09     ` Alexander Graf [this message]
2014-05-16 13:11       ` Gerd Hoffmann
2014-05-16 13:43         ` Alexander Graf
2014-05-16 14:08           ` Gerd Hoffmann
2014-05-16 14:21             ` Alexander Graf
2014-05-15 16:32 ` [Qemu-devel] [PATCH 9/9] PPC: e500: Move to u-boot as firmware Alexander Graf
2014-05-15 16:38 ` [Qemu-devel] [Qemu-ppc] [PATCH 0/9] PPC: e500: Use " Alexander Graf

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=5375F1E3.4010509@suse.de \
    --to=agraf@suse.de \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.