s390/boot: fix compiler error due to missing awk strtonum
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 7 May 2019 11:56:45 +0000 (13:56 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 7 May 2019 12:37:14 +0000 (14:37 +0200)
The strtonum awk function is a GNU extension and is not available with
all versions of awk. The link of bzImage fails with this error message:

>> awk: line 2: function or never defined
>> awk: line 2: function strtonum never defined
   objcopy: --pad-to: bad number: arch/s390/boot/compressed/vmlinux

Drop the awk script and the --pad-to objcopy parameter it generated and
use a FILL pattern with an appropriate alignment in the linker script
for the arch/s390/boot/compressed/vmlinux file.

Fixes: f6780686525c ("s390/boot: pad bzImage to 4K")
Reported-by: kbuild test robot <lkp@intel.com>
Suggested-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/boot/Makefile
arch/s390/boot/compressed/vmlinux.lds.S

index c51496bbac1906c721485be0b2abac71106f6631..7cba96e7587bca0d3d523483884a6c5f5ee48071 100644 (file)
@@ -58,7 +58,6 @@ define cmd_section_cmp
        touch $@
 endef
 
-OBJCOPYFLAGS_bzImage := --pad-to $$(readelf -s $(obj)/compressed/vmlinux | awk '/\<_end\>/ {print or(strtonum("0x"$$2),4095)+1}')
 $(obj)/bzImage: $(obj)/compressed/vmlinux $(obj)/section_cmp.boot.data $(obj)/section_cmp.boot.preserved.data FORCE
        $(call if_changed,objcopy)
 
index 112b8d9f1e4cd9752e70eff11d3a164f5ac72c31..635217eb3d91b2326b05edb0a4c0fc9c87d8027a 100644 (file)
@@ -77,6 +77,8 @@ SECTIONS
                _compressed_start = .;
                *(.vmlinux.bin.compressed)
                _compressed_end = .;
+               FILL(0xff);
+               . = ALIGN(4096);
        }
        . = ALIGN(256);
        .bss : {