On 04/01/11 13:18, Christoph Egger wrote:
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.
I attached the reloc.bin which is the input. This is what the build system does to generate the reloc.S: (od -v -t x reloc.bin | awk 'NR > 1 {print s} {s=$0}' | \ sed 's/ /,0x/g' | sed 's/^[0-9]*,/ .long /') >reloc.S The attached reloc.S.atandt is the result with AT&T od(1) The attached reloc.S is the result with GNU od(1) - and what is expected. The xen_boot.diff changes above reloc.S generation to produce the same output with both AT&T and GNU od(1). Christoph
On 03/31/11 20:29, Ian Jackson wrote:Christoph Egger writes ("[Xen-devel] [PATCH] xen: fix reloc.Sgeneration"):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
Attachment:
reloc.bin
Description: Binary data
.long 0x,0x,0x,0x,0x,0x,0x,0x,0x08c000bf,0x,0x,0x,0x,0x,0x,0x,0x0000e800,0x,0x,0x,0x,0x,0x,0x,0x835e0000,0x,0x,0x,0x,0x,0x,0x,0x3cb90aee .long 0x,0x,0x,0x,0x,0x,0x,0x,0xf3000001,0x,0x,0x,0x,0x,0x,0x,0xb9c031a4,0x,0x,0x,0x,0x,0x,0x,0x0008c13c,0x,0x,0x,0x,0x,0x,0x,0xaaf3f929 .long 0x,0x,0x,0x,0x,0x,0x,0x,0x08c090b8,0x,0x,0x,0x,0x,0x,0x,0x89e0ff00,0x,0x,0x,0x,0x,0x,0x,0x27bc8df6,0x,0x,0x,0x,0x,0x,0x,0x00000000 .long 0x,0x,0x,0x,0x,0x,0x,0x,0x53c68956,0x,0x,0x,0x,0x,0x,0x,0x158bd389,0x,0x,0x,0x,0x,0x,0x,0x0008c138,0x,0x,0x,0x,0x,0x,0x,0xe283da29 .long 0x,0x,0x,0x,0x,0x,0x,0x,0x89db85f0,0x,0x,0x,0x,0x,0x,0x,0x08c13815,0x,0x,0x,0x,0x,0x,0x,0x31117400,0x,0x,0x,0x,0x,0x,0x,0x00768dc9 .long 0x,0x,0x,0x,0x,0x,0x,0x,0x3104b60f,0x,0x,0x,0x,0x,0x,0x,0x41110488,0x,0x,0x,0x,0x,0x,0x,0xf475d939,0x,0x,0x,0x,0x,0x,0x,0x5ed0895b .long 0x,0x,0x,0x,0x,0x,0x,0x,0x900debc3,0x,0x,0x,0x,0x,0x,0x,0x90909090,0x,0x,0x,0x,0x,0x,0x,0x90909090,0x,0x,0x,0x,0x,0x,0x,0x90909090 .long 0x,0x,0x,0x,0x,0x,0x,0x,0xba003880,0x,0x,0x,0x,0x,0x,0x,0x00000001,0x,0x,0x,0x,0x,0x,0x,0xc2890f74,0x,0x,0x,0x,0x,0x,0x,0x0026748d .long 0x,0x,0x,0x,0x,0x,0x,0x,0x003a8042,0x,0x,0x,0x,0x,0x,0x,0xc229fa75,0x,0x,0x,0x,0x,0x,0x,0x90a5eb42,0x,0x,0x,0x,0x,0x,0x,0x0026748d .long 0x,0x,0x,0x,0x,0x,0x,0x,0xba10ec83,0x,0x,0x,0x,0x,0x,0x,0x00000034,0x,0x,0x,0x,0x,0x,0x,0x1424448b,0x,0x,0x,0x,0x,0x,0x,0x89241c89 .long 0x,0x,0x,0x,0x,0x,0x,0x,0x89042474,0x,0x,0x,0x,0x,0x,0x,0x8908247c,0x,0x,0x,0x,0x,0x,0x,0xe80c246c,0x,0x,0x,0x,0x,0x,0x,0xffffff80 .long 0x,0x,0x,0x,0x,0x,0x,0x,0x890400f6,0x,0x,0x,0x,0x,0x,0x,0xf67175c3,0x,0x,0x,0x,0x,0x,0x,0x2c750803,0x,0x,0x,0x,0x,0x,0x,0x904003f6 .long 0x,0x,0x,0x,0x,0x,0x,0x,0x538b0e74,0x,0x,0x,0x,0x,0x,0x,0x30438b2c,0x,0x,0x,0x,0x,0x,0x,0xffff63e8,0x,0x,0x,0x,0x,0x,0x,0x304389ff .long 0x,0x,0x,0x,0x,0x,0x,0x,0x894f2383,0x,0x,0x,0x,0x,0x,0x,0x241c8bd8,0x,0x,0x,0x,0x,0x,0x,0x0424748b,0x,0x,0x,0x,0x,0x,0x,0x08247c8b .long 0x,0x,0x,0x,0x,0x,0x,0x,0x0c246c8b,0x,0x,0x,0x,0x,0x,0x,0xc310c483,0x,0x,0x,0x,0x,0x,0x,0x8b14538b,0x,0x,0x,0x,0x,0x,0x,0xe2c11843 .long 0x,0x,0x,0x,0x,0x,0x,0x,0xff3ae804,0x,0x,0x,0x,0x,0x,0x,0xc589ffff,0x,0x,0x,0x,0x,0x,0x,0x8b184389,0x,0x,0x,0x,0x,0x,0x,0xc0851443 .long 0x,0x,0x,0x,0x,0x,0x,0x,0xff31ba74,0x,0x,0x,0x,0x,0x,0x,0x08ebc031,0x,0x,0x,0x,0x,0x,0x,0x147b3b47,0x,0x,0x,0x,0x,0x,0x,0xac73f889 .long 0x,0x,0x,0x,0x,0x,0x,0x,0x8d04e0c1,0x,0x,0x,0x,0x,0x,0x,0x8b000574,0x,0x,0x,0x,0x,0x,0x,0xc0850846,0x,0x,0x,0x,0x,0x,0x,0x4de8ea74 .long 0x,0x,0x,0x,0x,0x,0x,0x,0x89ffffff,0x,0x,0x,0x,0x,0x,0x,0xe0eb0846,0x,0x,0x,0x,0x,0x,0x,0xe810408b,0x,0x,0x,0x,0x,0x,0x,0xffffff40 .long 0x,0x,0x,0x,0x,0x,0x,0x,0xeb104389,0x,0x,0x,0x,0x,0x,0x,0x00000082,0x,0x,0x,0x,0x,0x,0x,0x0008c000,0x,0x,0x,0x,0x,0x,0x,0x,0x,0x,0x,0x,0x,0x,0x,0x
.long 0x07c000bf,0x0000e800,0x835e0000,0x24b90aee .long 0xf3000001,0xb9c031a4,0x0007c124,0xaaf3f929 .long 0x07c07bb8,0x55e0ff00,0x5657e589,0xa1c68953 .long 0x0007c120,0xc389d029,0x89f0e383,0x201d89df .long 0x850007c1,0xb91174d2,0x00000000,0x3104b60f .long 0x41190488,0xf475d139,0x5e5bf889,0x55c35d5f .long 0xc289e589,0x74003880,0x42c28908,0x75003a80 .long 0x42c229fa,0xffffaee8,0x55c35dff,0x5657e589 .long 0x04ec8353,0x000048ba,0x08458b00,0xffff96e8 .long 0xf6c389ff,0x0b740400,0xe810408b,0xffffffbf .long 0xf6104389,0x43740803,0xc114538b,0x438b04e2 .long 0xff71e818,0x4589ffff,0x184389f0,0x00147b83 .long 0x00bf2974,0xb8000000,0x00000000,0x8b04e0c1 .long 0xc601f075,0x8508468b,0xe80874c0,0xffffff7f .long 0x47084689,0x7b39f889,0xf6e17714,0x0e744003 .long 0x8b2c538b,0x2ce83043,0x89ffffff,0x43f63043 .long 0x0b740201,0xe840438b,0xffffff53,0x81404389 .long 0x00024f23,0x83d88900,0x5e5b04c4,0x00c35d5f .long 0x0007c000
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 $< $@