gzip file has 4-byte little-endian file size encoded at the end of file,
while all the other compressed kernel file has size_append operation in
the Makefile which also append the 4-byte little-endian file size. There
is no need to do endianness transforming by mkpiggy.
Signed-off-by: Cao jin <[email protected]>
---
A simple printf debug line before transformation also shows they are the
same among 6 compression.
arch/x86/boot/compressed/Makefile | 1 -
arch/x86/boot/compressed/mkpiggy.c | 2 --
2 files changed, 3 deletions(-)
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 466f66c8a7f8..8b2bcfd65920 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -58,7 +58,6 @@ endif
LDFLAGS_vmlinux := -T
hostprogs-y := mkpiggy
-HOST_EXTRACFLAGS += -I$(srctree)/tools/include
sed-voffset := -e 's/^\([0-9a-fA-F]*\) [ABCDGRSTVW] \(_text\|__bss_start\|_end\)$$/\#define VO_\2 _AC(0x\1,UL)/p'
diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c
index 72bad2c8debe..d5402fcd844a 100644
--- a/arch/x86/boot/compressed/mkpiggy.c
+++ b/arch/x86/boot/compressed/mkpiggy.c
@@ -28,7 +28,6 @@
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
-#include <tools/le_byteshift.h>
int main(int argc, char *argv[])
{
@@ -61,7 +60,6 @@ int main(int argc, char *argv[])
}
ilen = ftell(f);
- olen = get_unaligned_le32(&olen);
printf(".section \".rodata..compressed\",\"a\",@progbits\n");
printf(".globl z_input_len\n");
--
2.17.0
Cao,
On Fri, 9 Nov 2018, Cao jin wrote:
> gzip file has 4-byte little-endian file size encoded at the end of file,
> while all the other compressed kernel file has size_append operation in
> the Makefile which also append the 4-byte little-endian file size. There
> is no need to do endianness transforming by mkpiggy.
Did you test that on a BE host cross-compiling the kernel for x86?
Thanks,
tglx
On 11/9/18 9:00 PM, Thomas Gleixner wrote:
> Cao,
>
> On Fri, 9 Nov 2018, Cao jin wrote:
>
>> gzip file has 4-byte little-endian file size encoded at the end of file,
>> while all the other compressed kernel file has size_append operation in
>> the Makefile which also append the 4-byte little-endian file size. There
>> is no need to do endianness transforming by mkpiggy.
>
> Did you test that on a BE host cross-compiling the kernel for x86?
>
Oh, I don't know and never think of there is this kind of condition,
thanks for your info and sorry for the noise.
Sincerely,
Cao jin