Skip to content

Commit

Permalink
PPC: Add u-boot firmware for e500
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
agraf committed Jun 16, 2014
1 parent 903585d commit 4e73c78
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
[submodule "dtc"]
path = dtc
url = git://git.qemu-project.org/dtc.git
[submodule "roms/u-boot"]
path = roms/u-boot
url = git://git.qemu-project.org/u-boot.git
1 change: 1 addition & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5213,6 +5213,7 @@ for bios_file in \
$source_path/pc-bios/*.dtb \
$source_path/pc-bios/*.img \
$source_path/pc-bios/openbios-* \
$source_path/pc-bios/u-boot.* \
$source_path/pc-bios/palcode-*
do
FILES="$FILES pc-bios/`basename $bios_file`"
Expand Down
5 changes: 5 additions & 0 deletions pc-bios/README
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@

- The sources for the Alpha palcode image is available from:
git://github.com/rth7680/qemu-palcode.git

- The u-boot binary for e500 comes from the upstream denx u-boot project where
it was compiled using the qemu-ppce500 target.
A git mirror is available at: git://git.qemu-project.org/u-boot.git
The hash used to compile the current version is: 2072e72
Binary file added pc-bios/u-boot.e500
Binary file not shown.
9 changes: 9 additions & 0 deletions roms/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ find-cross-gcc = $(firstword $(wildcard $(patsubst %ld,%gcc,$(call find-cross-ld
find-cross-prefix = $(subst gcc,,$(notdir $(call find-cross-gcc,$(1))))

powerpc64_cross_prefix := $(call find-cross-prefix,powerpc64)
powerpc_cross_prefix := $(call find-cross-prefix,powerpc)
x86_64_cross_prefix := $(call find-cross-prefix,x86_64)

#
Expand All @@ -55,6 +56,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
Expand Down Expand Up @@ -132,6 +134,12 @@ slof:
$(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu
cp SLOF/boot_rom.bin ../pc-bios/slof.bin

u-boot.e500:
$(MAKE) -C u-boot O=build.e500 qemu-ppce500_config
$(MAKE) -C u-boot CROSS_COMPILE=$(powerpc_cross_prefix) \
O=build.e500
$(powerpc_cross_prefix)strip u-boot/build.e500/u-boot -o \
../pc-bios/u-boot.e500

clean:
rm -rf seabios/.config seabios/out seabios/builds
Expand All @@ -141,3 +149,4 @@ clean:
rm -f sgabios/.depend
$(MAKE) -C ipxe/src veryclean
$(MAKE) -C SLOF clean
rm -rf u-boot/build.e500
1 change: 1 addition & 0 deletions roms/u-boot
Submodule u-boot added at 2072e7

0 comments on commit 4e73c78

Please sign in to comment.