[PATCH] firmware: make sure builtin firmware is page alignment

From: Zhang Ning
Date: Thu Aug 02 2018 - 21:50:10 EST


when firmware is in filesystem, request_firmware will load it,
and copy it to vmalloc memory, that is page align memory.

but when firmware is builtin, it is 8 bytes or 4 bytes alignment.

make sure builtin firmware is page algnment, that can simplify algorithm
to handle firmware.

Signed-off-by: Zhang Ning <ning.a.zhang@xxxxxxxxx>
Signed-off-by: Li, Ting <ting.li@xxxxxxxxx>
---
firmware/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/firmware/Makefile b/firmware/Makefile
index 29641383e136..d7bfce56378f 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -16,10 +16,11 @@ quiet_cmd_fwbin = MK_FW $@
firmware/%.gen.S,%,$@))))"; \
ASM_WORD=$(if $(CONFIG_64BIT),.quad,.long); \
ASM_ALIGN=$(if $(CONFIG_64BIT),3,2); \
+ ASM_FW_ALIGN=12; \
PROGBITS=$(if $(CONFIG_ARM),%,@)progbits; \
echo "/* Generated by firmware/Makefile */" > $@;\
echo " .section .rodata" >>$@;\
- echo " .p2align $${ASM_ALIGN}" >>$@;\
+ echo " .p2align $${ASM_FW_ALIGN}" >>$@;\
echo "_fw_$${FWSTR}_bin:" >>$@;\
echo " .incbin \"$(2)\"" >>$@;\
echo "_fw_end:" >>$@;\
--
2.18.0