Skip to contentSkip to conversation

powerpc: fix boot_rom.bin build

kvm-unit-tests Applied Peter Feiner 3 participants 7 messages Mar 3, 2016 – Mar 8, 2016 KVM

lore
Share & tools
lore
#0 lore raw

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.

---
 powerpc/Makefile.common | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
powerpc/Makefile.common +2 -1
index 424983e..7818c48 100644
@@ -48,7 +48,8 @@ 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 $^ [email protected]
+	cat [email protected] >> $@
 
 $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
 $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o
Signature · 1 line
2.7.0.rc3.207.g0ac5344
Reviewed-by
#1 lore raw
Quoted 25 lines · Peter Feiner

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.

---
 powerpc/Makefile.common | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
powerpc/Makefile.common +2 -1
index 424983e..7818c48 100644
@@ -48,7 +48,8 @@ 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 $^ [email protected]
+	cat [email protected] >> $@
 
 $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
 $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o
Signature · 1 line
2.7.0.rc3.207.g0ac5344
#2 lore raw
Quoted 22 lines · Andrew Jones
Quoted 21 lines · Peter Feiner

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.

---
 powerpc/Makefile.common | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
powerpc/Makefile.common +2 -1
index 424983e..7818c48 100644
@@ -48,7 +48,8 @@ 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 $^ [email protected]
+	cat [email protected] >> $@
 
Quoted 6 lines
Quoted 4 lines
powerpc/Makefile.common +0 -0
 $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
 $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o
Signature · 1 line
2.7.0.rc3.207.g0ac5344

Actually, Unreviewed-by: drew

This leaves boot_rom.bin.suffix laying around. We need rm -f [email protected] too. And, why '.suffix'? How about '.tmp', or even use a tempfile?

Thanks,
drew

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 30 lines · Andrew Jones
Quoted 22 lines · Andrew Jones
Quoted 21 lines · Peter Feiner

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.

---
 powerpc/Makefile.common | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
powerpc/Makefile.common +2 -1
index 424983e..7818c48 100644
@@ -48,7 +48,8 @@ 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 $^ [email protected]
+   cat [email protected] >> $@
 
Quoted 6 lines
Quoted 4 lines
powerpc/Makefile.common +0 -1
 $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
 $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o
--

2.7.0.rc3.207.g0ac5344

Quoted 4 lines

Actually, Unreviewed-by: drew

This leaves boot_rom.bin.suffix laying around. We need rm -f [email protected] too. And, why '.suffix'? How about '.tmp', or even use a tempfile?

.suffix because it's the end of the file.

I don't think tempfile is necessary because, in general, a Makefile has first refusal on the files in a directory. If you create a boot_rom.bin.suffix and make overwrites it, it's your problem!

I'll add the rm -f.

#4 lore raw

PATCH v2 1/1 powerpc: fix boot_rom.bin build

In reply to Peter Feiner

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.

---

v2:
* rm the temporary file
* renamed temporary file to .tmp instead of .suffix

---
 powerpc/Makefile.common | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
powerpc/Makefile.common +3 -1
index 424983e..2074289 100644
@@ -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 $^ [email protected]
+	cat [email protected] >> $@
+	$(RM) [email protected]
 
 $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
 $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o
Signature · 1 line
2.7.0.rc3.207.g0ac5344
Reviewed-by on v2 1/1
#5 lore raw
Quoted 5 lines · Peter Feiner

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.

Thanks for the v2!

drew

Quoted 32 lines

---

v2:
* rm the temporary file
* renamed temporary file to .tmp instead of .suffix

---
 powerpc/Makefile.common | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
powerpc/Makefile.common +3 -1
index 424983e..2074289 100644
@@ -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 $^ [email protected]
+	cat [email protected] >> $@
+	$(RM) [email protected]
 
 $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
 $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o
Signature · 6 lines
2.7.0.rc3.207.g0ac5344

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Applied
#6 lore raw
In reply to Peter Feiner
Quoted 21 lines · Peter Feiner

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.

---

v2:
* rm the temporary file
* renamed temporary file to .tmp instead of .suffix

---
 powerpc/Makefile.common | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
powerpc/Makefile.common +0 -0
index 424983e..2074289 100644

powerpc/Makefile.common FLATLIBS = $(libcflat) $(LIBFDT_archive) · line 56

Quoted 10 lines
powerpc/Makefile.common +3 -1
@@ -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 $^ [email protected]
+	cat [email protected] >> $@
+	$(RM) [email protected]
 
 $(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian
 $(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o

Applied, thanks.

Paolo