Skip to content

Commit

Permalink
Align zImage data to 16 bytes
Browse files Browse the repository at this point in the history
Kernels that carry xz compressed payload fail to decompress itself if the
source address is not properly aligned.
  • Loading branch information
zonque committed Jul 13, 2018
1 parent 8942c45 commit bf68ca7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ version.h:

zimage.o: $(APPEND_KERNEL)
cp $(APPEND_KERNEL) input/zImage
$(OBJCOPY) -I binary -O $(BINFMT) -B arm input/zImage $@
$(OBJCOPY) -I binary -O $(BINFMT) -B arm --prefix-sections zImage input/zImage $@
$(MAKE) -C libfdt

dtbs-bin.o: $(APPEND_DTBS)
Expand Down
6 changes: 5 additions & 1 deletion matcher.lds
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ PHDRS {

SECTIONS {
.text : { * (.text_main); * (.text); }:text = 0
.data : { * (.data); }
.rodata : { * (.rodata); }
.bss : { * (.bss); }
.data : {
* (.data);
. = ALIGN(16);
* (zImage.data);
}
}

0 comments on commit bf68ca7

Please sign in to comment.