sh:Enhanced compilation system
We'll look for ETC resources from two paths 1.board/src/etc 2.common/etc Search for the content in the board/src/etc directory first Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
a4d61dea80
commit
97da73d9b8
|
@ -30,11 +30,11 @@ $(RCOBJS): $(ETCDIR)$(DELIM)%: %
|
|||
$(Q) mkdir -p $(dir $@)
|
||||
$(call PREPROCESS, $<, $@)
|
||||
|
||||
$(ETCSRC): $(addprefix $(BOARD_DIR)$(DELIM)src$(DELIM),$(RCRAWS)) $(RCOBJS)
|
||||
$(ETCSRC): $(foreach raw,$(RCRAWS), $(if $(wildcard $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw), $(BOARD_COMMON_DIR)$(DELIM)$(raw))) $(RCOBJS)
|
||||
$(foreach raw, $(RCRAWS), \
|
||||
$(shell rm -rf $(ETCDIR)$(DELIM)$(raw)) \
|
||||
$(shell mkdir -p $(dir $(ETCDIR)$(DELIM)$(raw))) \
|
||||
$(shell cp -rfp $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw) $(ETCDIR)$(DELIM)$(raw)))
|
||||
$(shell cp -rfp $(if $(wildcard $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw), $(BOARD_COMMON_DIR)$(DELIM)$(raw)) $(ETCDIR)$(DELIM)$(raw)))
|
||||
$(Q) genromfs -f romfs.img -d $(ETCDIR)$(DELIM)$(CONFIG_ETC_ROMFSMOUNTPT) -V "NSHInitVol"
|
||||
$(Q) echo "#include <nuttx/compiler.h>" > $@
|
||||
$(Q) xxd -i romfs.img | sed -e "s/^unsigned char/const unsigned char aligned_data(4)/g" >> $@
|
||||
|
|
Loading…
Reference in New Issue