tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xen-kernel boot fix: AT&T vs. GNU od(1)



On 04/01/11 11:46, Christoph Egger wrote:

Hi,

I submitted the fix to xen-devel@ that makes the xen kernel boot.
I got this response:

Sorry, I forgot the patch.

Christoph

On 03/31/11 20:29, Ian Jackson wrote:
Christoph Egger writes ("[Xen-devel] [PATCH] xen: fix reloc.S
generation"):
attached patch fixes generation of reloc.S and makes
xen boot out-of-the box since c/s 19146.
The output of AT&T UNIX and GNU od(1) are different.

Which (if any) of these versions of od is correct ? The SuSv3
specification of od is quite comprehensive so it should be possible to
contrive a rune which doesn't need subsequent seddery. Could you try
to do so ?

Christoph

diff -r cebd5d3f0ec4 xen/arch/x86/boot/build32.mk
--- a/xen/arch/x86/boot/build32.mk      Fri Mar 25 11:29:24 2011 +0100
+++ b/xen/arch/x86/boot/build32.mk      Thu Mar 31 12:13:22 2011 +0200
@@ -9,8 +9,8 @@ CFLAGS := $(filter-out -flto,$(CFLAGS))
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
 %.S: %.bin
-       (od -v -t x $< | awk 'NR > 1 {print s} {s=$$0}' | \
-       sed 's/ /,0x/g' | sed 's/^[0-9]*,/ .long /') >$@
+       (od -v -t x $< | tr -s ' ' | awk 'NR > 1 {print s} {s=$$0}' | \
+       sed 's/ /,0x/g' | sed 's/,0x$$//' | sed 's/^[0-9]*,/ .long /') >$@
 
 %.bin: %.lnk
        $(OBJCOPY) -O binary $< $@


Home | Main Index | Thread Index | Old Index