aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xen/arch/x86/boot/build32.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk
index 3223bcf4f9..a570d42524 100644
--- a/xen/arch/x86/boot/build32.mk
+++ b/xen/arch/x86/boot/build32.mk
@@ -10,8 +10,9 @@ $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
CFLAGS += -Werror -fno-builtin -msoft-float
+# NB. awk invocation is a portable alternative to 'head -n -1'
%.S: %.bin
- (od -v -t x $< | head -n -1 | \
+ (od -v -t x $< | awk 'NR > 1 {print s} {s=$$0}' | \
sed 's/ /,0x/g' | sed 's/^[0-9]*,/ .long /') >$@
%.bin: %.lnk