From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlIQI-0002eB-6O for qemu-devel@nongnu.org; Fri, 16 May 2014 09:43:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlIQ8-00010z-Ak for qemu-devel@nongnu.org; Fri, 16 May 2014 09:43:42 -0400 Message-ID: <53761602.4060606@suse.de> Date: Fri, 16 May 2014 15:43:30 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1400171570-21284-1-git-send-email-agraf@suse.de> <1400171570-21284-9-git-send-email-agraf@suse.de> <1400220407.2573.2.camel@nilsson.home.kraxel.org> <5375F1E3.4010509@suse.de> <1400245912.2573.14.camel@nilsson.home.kraxel.org> In-Reply-To: <1400245912.2573.14.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 8/9] PPC: Add u-boot firmware for e500 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 16.05.14 15:11, Gerd Hoffmann wrote: > Hi, > >> +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 > Hmm. Mucking with the source tree like this will leave the u-boot git > tree in a dirty state, which isn't exactly nice. Fixable by sprinkling > in a "git reset --hard", but that obviously has other downsides, such as > seriously disturbing people trying to build a u-boot tree with local > changes. > > Any chance to fix that without patching the source tree, by passing > SUBDIRS="" to $(MAKE) for example? > Or send patches to u-boot upstream to tackle this? > >> + # 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 > $(powerpc64_cross_prefix)strip I guess ... This is getting too messy. I guess we can live without supporting biarch compilers and just ask people to have a 32bit ppc compiler handy. Then things become a lot more sane. Alex diff --git a/roms/Makefile b/roms/Makefile index 2721b02..610b534 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -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) # @@ -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 @@ -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 @@ -141,3 +149,4 @@ clean: rm -f sgabios/.depend $(MAKE) -C ipxe/src veryclean $(MAKE) -C SLOF clean + rm -rf u-boot/build.e500