Skip to contentSkip to conversation

ppc64: Fix out-of-tree builds

PATCH Superseded Andreas Färber 3 participants 8 messages May 1, 2011 – May 8, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ppc64: Fix out-of-tree builds

On ppc64 host, recursion into pc-bios/spapr-rtas/ fails for out-of-tree builds. Add missing dir and symlink.

Cc David Gibson <[email protected]>
Cc Alexander Graf <[email protected]>
---
 configure |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
configure +2 -0
index 6f75e2e..491f77a 100755
@@ -3457,11 +3457,13 @@ done # for target in $targets
 
 # build tree in object directory in case the source is not in the current directory
 DIRS="tests tests/cris slirp audio block net pc-bios/optionrom"
+DIRS="pc-bios/spapr-rtas"
 DIRS="$DIRS roms/seabios roms/vgabios"
 DIRS="$DIRS fsdev ui"
 FILES="Makefile tests/Makefile"
 FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
 FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
+FILES="$FILES pc-bios/spapr-rtas/Makefile"
 FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"
 for bios_file in $source_path/pc-bios/*.bin $source_path/pc-bios/*.rom $source_path/pc-bios/*.dtb $source_path/pc-bios/openbios-*; do
     FILES="$FILES pc-bios/`basename $bios_file`"
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 2/2 ppc64: Don't try to build sPAPR RTAS on Darwin

The Darwin assembler fails to build it.

Cc David Gibson <[email protected]>
Cc Alexander Graf <[email protected]>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index 491f77a..1f2485a 100755
@@ -2540,7 +2540,7 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
         "$softmmu" = yes ; then
   roms="optionrom"
 fi
-if test "$cpu" = "ppc64" ; then
+if test "$cpu" = "ppc64" -a "$targetos" != "Darwin" ; then
   roms="$roms spapr-rtas"
 fi
 
Signature · 1 line
1.7.3.4
#2 lore raw
In reply to Andreas Färber

Someone on Linux should check if a similar patch is necessary for roms/SLOF/:

Am 01.05.2011 um 18:23 schrieb Andreas Färber:

Quoted 10 lines
configure +0 -0
index 6f75e2e..491f77a 100755
@@ -3457,11 +3457,13 @@ done # for target in $targets
 
 # build tree in object directory in case the source is not in the current directory

DIRS="tests tests/cris slirp audio block net pc-bios/optionrom" +DIRS="pc-bios/spapr-rtas"
DIRS="$DIRS roms/seabios roms/vgabios"

DIRS="$DIRS roms/SLOF"

And git-submodule shows me a fourth one there... roms/ipxe

Quoted 6 lines

DIRS="$DIRS fsdev ui"
FILES="Makefile tests/Makefile"
FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit" FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" +FILES="$FILES pc-bios/spapr-rtas/Makefile" FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"

FILES="$FILES roms/SLOF/Makefile"

Quoted 4 lines

for bios_file in $source_path/pc-bios/*.bin $source_path/pc-bios/*.rom $source_path/pc-bios/*.dtb $source_path/pc-bios/openbios-*; do
FILES="$FILES pc-bios/basename $bios_file"

Signature · 1 line
1.7.3.4
#3 lore raw
Quoted 1 line · Andreas Färber

Someone on Linux should check if a similar patch is necessary for roms/SLOF/:

Mind to just send a patch I can try out with some instruction on how to trigger this? :)

Alex

#4 lore raw

Am 03.05.2011 um 12:18 schrieb Alexander Graf:

Quoted 5 lines · Andreas Färber
Quoted 2 lines

Someone on Linux should check if a similar patch is necessary for roms/SLOF/:

Mind to just send a patch I can try out with some instruction on how to trigger this? :)

Well, using a build directory other than the source directory is common practice to either try multiple configurations (e.g., ppc and ppc64) or to be able to just `rm -rf' and start from scratch.

git clone git://git.qemu.org/qemu.git
mkdir qemu-something # or mkdir -p qemu/subdir
cd qemu-something
../qemu/configure ... && make

# observe error occurring without my patches
git am ...
# check if any further errors occur with my patches on Linux

During my attempts to get things compiling I did `git submodule init'.

$ git submodule
-d1d6b53b713a2b7c2c25685268fa932d28a4b4c0 roms/SLOF
-7aee315f61aaf1be6d2fff26339f28a1137231a5 roms/ipxe
-cc975646af69f279396d4d5e1379ac6af80ee637 roms/seabios
-19ea12c230ded95928ecaef0db47a82231c2e485 roms/vgabios

roms/{seabios,vgabios}/Makefile were being symlinked in configure, the other two not.

If I

$ git submodule update roms/SLOF
I see there is a roms/SLOF/Makefile, too. But at least with my two patches in place, SLOF is not being built automatically on Darwin.
David or Ben will be better suited for instructions on how to build SLOF. :)

Andreas

#5 lore raw
In reply to Andreas Färber
Quoted 2 lines · Andreas Färber

On ppc64 host, recursion into pc-bios/spapr-rtas/ fails for out-of-tree builds. Add missing dir and symlink.

Ah, thank you.

Quoted 12 lines
Cc David Gibson <[email protected]>
Cc Alexander Graf <[email protected]>
---
 configure |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
configure +0 -0
index 6f75e2e..491f77a 100755

configure done # for target in $targets · line 3460

Quoted 4 lines
configure +1 -0
@@ -3457,11 +3457,13 @@ done # for target in $targets
 
 # build tree in object directory in case the source is not in the current directory
 DIRS="tests tests/cris slirp audio block net pc-bios/optionrom"
+DIRS="pc-bios/spapr-rtas"

Surely it should be:
DIRS="$DIRS pc-bios/spapr-rtas"
though.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#6 lore raw

PATCH v2 1/2 ppc64: Fix out-of-tree builds

On ppc64 host, recursion into pc-bios/spapr-rtas/ fails for out-of-tree builds. Add missing dir and symlink.

Cc David Gibson <[email protected]>
Cc Alexander Graf <[email protected]>

---
v2:
* Don't discard previous $DIRS, it would break a fresh build. Spotted by David Gibson.

 configure |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
configure +2 -0
index 6f75e2e..9244260 100755
@@ -3457,11 +3457,13 @@ done # for target in $targets
 
 # build tree in object directory in case the source is not in the current directory
 DIRS="tests tests/cris slirp audio block net pc-bios/optionrom"
+DIRS="$DIRS pc-bios/spapr-rtas"
 DIRS="$DIRS roms/seabios roms/vgabios"
 DIRS="$DIRS fsdev ui"
 FILES="Makefile tests/Makefile"
 FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
 FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
+FILES="$FILES pc-bios/spapr-rtas/Makefile"
 FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"
 for bios_file in $source_path/pc-bios/*.bin $source_path/pc-bios/*.rom $source_path/pc-bios/*.dtb $source_path/pc-bios/openbios-*; do
     FILES="$FILES pc-bios/`basename $bios_file`"
Signature · 1 line
1.7.3.4
#7 lore raw

PATCH v2 2/2 ppc64: Don't try to build sPAPR RTAS on Darwin

The Darwin assembler fails to build it.

Cc David Gibson <[email protected]>
Cc Alexander Graf <[email protected]>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index 9244260..b6276f3 100755
@@ -2540,7 +2540,7 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
         "$softmmu" = yes ; then
   roms="optionrom"
 fi
-if test "$cpu" = "ppc64" ; then
+if test "$cpu" = "ppc64" -a "$targetos" != "Darwin" ; then
   roms="$roms spapr-rtas"
 fi
 
Signature · 1 line
1.7.3.4