board/Board.mk: Make romfs_img 4 byte aligned

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2022-01-25 11:03:51 +08:00 committed by Petro Karashchenko
parent bc2dd37051
commit 4b6ca9432b

View File

@ -36,7 +36,8 @@ $(ETCSRC): $(RCRAWS) $(RCOBJS)
$(shell mkdir -p $(dir $(ETCDIR)$(DELIM)$(raw))) \
$(shell cp -rfp $(raw) $(ETCDIR)$(DELIM)$(raw)))
$(Q) genromfs -f romfs.img -d $(ETCDIR)$(DELIM)$(CONFIG_NSH_ROMFSMOUNTPT) -V "$(basename $<)"
$(Q) xxd -i romfs.img | sed -e "s/^unsigned/const unsigned/g" > $@
$(Q) echo "#include <nuttx/compiler.h>" > $@
$(Q) xxd -i romfs.img | sed -e "s/^unsigned char/const unsigned char aligned_data(4)/g" >> $@
$(Q) rm romfs.img
endif