diff mbox

[kvm-unit-tests,v2] powerpc: fix boot_rom.bin build

Message ID 1457111357-5809-1-git-send-email-pfeiner@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Feiner March 4, 2016, 5:09 p.m. UTC
My powerpc objcopy (version 2.23.52.20130305) did a seek() that
bash process substitution couldn't handle! I've changed the
Makefile to do things the old fashioned way.

Signed-off-by: Peter Feiner <pfeiner@google.com>

---

v2:
	* rm the temporary file
	* renamed temporary file to .tmp instead of .suffix
---
 powerpc/Makefile.common | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Andrew Jones March 4, 2016, 6:34 p.m. UTC | #1
On Fri, Mar 04, 2016 at 09:09:17AM -0800, Peter Feiner wrote:
> My powerpc objcopy (version 2.23.52.20130305) did a seek() that
> bash process substitution couldn't handle! I've changed the
> Makefile to do things the old fashioned way.
> 
> Signed-off-by: Peter Feiner <pfeiner@google.com>

Reviewed-by: Andrew Jones <drjones@redhat.com>

Thanks for the v2!

drew

> 
> ---
> 
> v2:
> 	* rm the temporary file
> 	* renamed temporary file to .tmp instead of .suffix
> ---
>  powerpc/Makefile.common | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
> index 424983e..2074289 100644
> --- a/powerpc/Makefile.common
> +++ b/powerpc/Makefile.common
> @@ -48,7 +48,9 @@ FLATLIBS = $(libcflat) $(LIBFDT_archive)
>  
>  $(TEST_DIR)/boot_rom.bin: $(TEST_DIR)/boot_rom.elf
>  	dd if=/dev/zero of=$@ bs=256 count=1
> -	$(OBJCOPY) -O binary $^ >(cat - >>$@)
> +	$(OBJCOPY) -O binary $^ $@.tmp
> +	cat $@.tmp >> $@
> +	$(RM) $@.tmp
>  
>  $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
>  $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o
> -- 
> 2.7.0.rc3.207.g0ac5344
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paolo Bonzini March 8, 2016, 12:49 p.m. UTC | #2
On 04/03/2016 18:09, Peter Feiner wrote:
> My powerpc objcopy (version 2.23.52.20130305) did a seek() that
> bash process substitution couldn't handle! I've changed the
> Makefile to do things the old fashioned way.
> 
> Signed-off-by: Peter Feiner <pfeiner@google.com>
> 
> ---
> 
> v2:
> 	* rm the temporary file
> 	* renamed temporary file to .tmp instead of .suffix
> ---
>  powerpc/Makefile.common | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
> index 424983e..2074289 100644
> --- a/powerpc/Makefile.common
> +++ b/powerpc/Makefile.common
> @@ -48,7 +48,9 @@ FLATLIBS = $(libcflat) $(LIBFDT_archive)
>  
>  $(TEST_DIR)/boot_rom.bin: $(TEST_DIR)/boot_rom.elf
>  	dd if=/dev/zero of=$@ bs=256 count=1
> -	$(OBJCOPY) -O binary $^ >(cat - >>$@)
> +	$(OBJCOPY) -O binary $^ $@.tmp
> +	cat $@.tmp >> $@
> +	$(RM) $@.tmp
>  
>  $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
>  $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o
> 


Applied, thanks.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
index 424983e..2074289 100644
--- a/powerpc/Makefile.common
+++ b/powerpc/Makefile.common
@@ -48,7 +48,9 @@  FLATLIBS = $(libcflat) $(LIBFDT_archive)
 
 $(TEST_DIR)/boot_rom.bin: $(TEST_DIR)/boot_rom.elf
 	dd if=/dev/zero of=$@ bs=256 count=1
-	$(OBJCOPY) -O binary $^ >(cat - >>$@)
+	$(OBJCOPY) -O binary $^ $@.tmp
+	cat $@.tmp >> $@
+	$(RM) $@.tmp
 
 $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
 $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o