Share the ROMFS prototype betwen FMUv1 and v2

This commit is contained in:
px4dev 2013-04-06 11:16:54 -07:00
parent e5fa9dbcea
commit aa09ebd7d3
19 changed files with 7 additions and 5 deletions

View File

@ -5,7 +5,7 @@
# #
# Use the configuration's ROMFS. # Use the configuration's ROMFS.
# #
ROMFS_ROOT = $(PX4_BASE)/ROMFS/$(CONFIG) ROMFS_ROOT = $(PX4_BASE)/ROMFS/px4fmu_common
# #
# Transitional support - add commands from the NuttX export archive. # Transitional support - add commands from the NuttX export archive.

View File

@ -5,7 +5,7 @@
# #
# Use the configuration's ROMFS. # Use the configuration's ROMFS.
# #
ROMFS_ROOT = $(PX4_BASE)/ROMFS/$(CONFIG) ROMFS_ROOT = $(PX4_BASE)/ROMFS/px4fmu_common
# #
# Board support modules # Board support modules

View File

@ -246,6 +246,9 @@ include $(PX4_MK_DIR)/nuttx.mk
################################################################################ ################################################################################
ifneq ($(ROMFS_ROOT),) ifneq ($(ROMFS_ROOT),)
ifeq ($(wildcard $(ROMFS_ROOT)),)
$(error ROMFS_ROOT specifies a directory that does not exist)
endif
# #
# Note that there is no support for more than one root directory or constructing # Note that there is no support for more than one root directory or constructing
@ -272,7 +275,7 @@ $(ROMFS_OBJ): $(ROMFS_IMG) $(GLOBAL_DEPS)
# Generate the ROMFS image from the root # Generate the ROMFS image from the root
$(ROMFS_IMG): $(ROMFS_DEPS) $(GLOBAL_DEPS) $(ROMFS_IMG): $(ROMFS_DEPS) $(GLOBAL_DEPS)
@$(ECHO) %% generating $@ @$(ECHO) "ROMFS: $@"
$(Q) $(GENROMFS) -f $@ -d $(ROMFS_ROOT) -V "NSHInitVol" $(Q) $(GENROMFS) -f $@ -d $(ROMFS_ROOT) -V "NSHInitVol"
EXTRA_CLEANS += $(ROMGS_OBJ) $(ROMFS_IMG) EXTRA_CLEANS += $(ROMGS_OBJ) $(ROMFS_IMG)
@ -318,7 +321,7 @@ endef
# Don't generate until modules have updated their command files # Don't generate until modules have updated their command files
$(BUILTIN_CSRC): $(GLOBAL_DEPS) $(MODULE_OBJS) $(BUILTIN_COMMAND_FILES) $(BUILTIN_CSRC): $(GLOBAL_DEPS) $(MODULE_OBJS) $(BUILTIN_COMMAND_FILES)
@$(ECHO) %% generating $@ @$(ECHO) "CMDS: $@"
$(Q) $(ECHO) '/* builtin command list - automatically generated, do not edit */' > $@ $(Q) $(ECHO) '/* builtin command list - automatically generated, do not edit */' > $@
$(Q) $(ECHO) '#include <nuttx/config.h>' >> $@ $(Q) $(ECHO) '#include <nuttx/config.h>' >> $@
$(Q) $(ECHO) '#include <nuttx/binfmt/builtin.h>' >> $@ $(Q) $(ECHO) '#include <nuttx/binfmt/builtin.h>' >> $@

View File

@ -145,7 +145,6 @@ MODULE_COMMAND_FILES := $(addprefix $(WORK_DIR)/builtin_commands/COMMAND.,$(MODU
$(MODULE_COMMAND_FILES): command = $(word 2,$(subst ., ,$(notdir $(@)))) $(MODULE_COMMAND_FILES): command = $(word 2,$(subst ., ,$(notdir $(@))))
$(MODULE_COMMAND_FILES): exclude = $(dir $@)COMMAND.$(command).* $(MODULE_COMMAND_FILES): exclude = $(dir $@)COMMAND.$(command).*
$(MODULE_COMMAND_FILES): $(GLOBAL_DEPS) $(MODULE_COMMAND_FILES): $(GLOBAL_DEPS)
@$(ECHO) COMMAND: $(command)
@$(REMOVE) -f $(exclude) @$(REMOVE) -f $(exclude)
@$(MKDIR) -p $(dir $@) @$(MKDIR) -p $(dir $@)
$(Q) $(TOUCH) $@ $(Q) $(TOUCH) $@