Skip to content

Commit 4e73c78

Browse files
committed
PPC: Add u-boot firmware for e500
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 <[email protected]>
1 parent 903585d commit 4e73c78

File tree

6 files changed

+19
-0
lines changed

6 files changed

+19
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@
2828
[submodule "dtc"]
2929
path = dtc
3030
url = git://git.qemu-project.org/dtc.git
31+
[submodule "roms/u-boot"]
32+
path = roms/u-boot
33+
url = git://git.qemu-project.org/u-boot.git

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5213,6 +5213,7 @@ for bios_file in \
52135213
$source_path/pc-bios/*.dtb \
52145214
$source_path/pc-bios/*.img \
52155215
$source_path/pc-bios/openbios-* \
5216+
$source_path/pc-bios/u-boot.* \
52165217
$source_path/pc-bios/palcode-*
52175218
do
52185219
FILES="$FILES pc-bios/`basename $bios_file`"

pc-bios/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@
4141

4242
- The sources for the Alpha palcode image is available from:
4343
git://github.com/rth7680/qemu-palcode.git
44+
45+
- The u-boot binary for e500 comes from the upstream denx u-boot project where
46+
it was compiled using the qemu-ppce500 target.
47+
A git mirror is available at: git://git.qemu-project.org/u-boot.git
48+
The hash used to compile the current version is: 2072e72

pc-bios/u-boot.e500

323 KB
Binary file not shown.

roms/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ find-cross-gcc = $(firstword $(wildcard $(patsubst %ld,%gcc,$(call find-cross-ld
3131
find-cross-prefix = $(subst gcc,,$(notdir $(call find-cross-gcc,$(1))))
3232

3333
powerpc64_cross_prefix := $(call find-cross-prefix,powerpc64)
34+
powerpc_cross_prefix := $(call find-cross-prefix,powerpc)
3435
x86_64_cross_prefix := $(call find-cross-prefix,x86_64)
3536

3637
#
@@ -55,6 +56,7 @@ default:
5556
@echo " efirom -- update nic roms (bios+efi, this needs"
5657
@echo " the EfiRom utility from edk2 / tianocore)"
5758
@echo " slof -- update slof.bin"
59+
@echo " u-boot.e500 -- update u-boot.e500"
5860

5961
bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k
6062
cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin
@@ -132,6 +134,12 @@ slof:
132134
$(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu
133135
cp SLOF/boot_rom.bin ../pc-bios/slof.bin
134136

137+
u-boot.e500:
138+
$(MAKE) -C u-boot O=build.e500 qemu-ppce500_config
139+
$(MAKE) -C u-boot CROSS_COMPILE=$(powerpc_cross_prefix) \
140+
O=build.e500
141+
$(powerpc_cross_prefix)strip u-boot/build.e500/u-boot -o \
142+
../pc-bios/u-boot.e500
135143

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

roms/u-boot

Submodule u-boot added at 2072e72

0 commit comments

Comments
 (0)