diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-27 16:11:41 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-27 16:11:41 +0200 |
commit | 0104f070c6f469df6acdb308ae54638e017813c0 (patch) | |
tree | 3fbfa7ef47472d266813574007f9f81728747c66 /makefiles | |
parent | a897b3d88e5d1c3e8c005d0d5fd7b0dacd434ed0 (diff) | |
parent | 3380d40a7d9a8d1946510fab42abdc7a3a6f1525 (diff) | |
download | px4-firmware-0104f070c6f469df6acdb308ae54638e017813c0.tar.gz px4-firmware-0104f070c6f469df6acdb308ae54638e017813c0.tar.bz2 px4-firmware-0104f070c6f469df6acdb308ae54638e017813c0.zip |
Merge branch 'multirotor' into fixedwing_l1
Diffstat (limited to 'makefiles')
-rw-r--r-- | makefiles/config_px4fmu-v1_default.mk | 7 | ||||
-rw-r--r-- | makefiles/config_px4fmu-v2_default.mk | 10 | ||||
-rw-r--r-- | makefiles/firmware.mk | 22 | ||||
-rw-r--r-- | makefiles/setup.mk | 1 |
4 files changed, 36 insertions, 4 deletions
diff --git a/makefiles/config_px4fmu-v1_default.mk b/makefiles/config_px4fmu-v1_default.mk index 452ab8a92..ea73129db 100644 --- a/makefiles/config_px4fmu-v1_default.mk +++ b/makefiles/config_px4fmu-v1_default.mk @@ -6,6 +6,7 @@ # Use the configuration's ROMFS. # ROMFS_ROOT = $(PX4_BASE)/ROMFS/px4fmu_common +ROMFS_OPTIONAL_FILES = $(PX4_BASE)/Images/px4io-v1_default.bin # # Board support modules @@ -91,6 +92,12 @@ MODULES += examples/flow_speed_control MODULES += modules/sdlog2 # +# Unit tests +# +MODULES += modules/unit_test +MODULES += modules/commander/commander_tests + +# # Library modules # MODULES += modules/systemlib diff --git a/makefiles/config_px4fmu-v2_default.mk b/makefiles/config_px4fmu-v2_default.mk index bd18a25cd..f0acada7b 100644 --- a/makefiles/config_px4fmu-v2_default.mk +++ b/makefiles/config_px4fmu-v2_default.mk @@ -3,9 +3,11 @@ # # -# Use the configuration's ROMFS. +# Use the configuration's ROMFS, copy the px4iov2 firmware into +# the ROMFS if it's available # ROMFS_ROOT = $(PX4_BASE)/ROMFS/px4fmu_common +ROMFS_OPTIONAL_FILES = $(PX4_BASE)/Images/px4io-v2_default.bin # # Board support modules @@ -85,6 +87,12 @@ MODULES += modules/multirotor_pos_control MODULES += modules/sdlog2 # +# Unit tests +# +MODULES += modules/unit_test +MODULES += modules/commander/commander_tests + +# # Library modules # MODULES += modules/systemlib diff --git a/makefiles/firmware.mk b/makefiles/firmware.mk index 8a027a0a8..b3e50501c 100644 --- a/makefiles/firmware.mk +++ b/makefiles/firmware.mk @@ -322,7 +322,7 @@ endif # a root from several templates. That would be a nice feature. # -# Add dependencies on anything in the ROMFS root +# Add dependencies on anything in the ROMFS root directory ROMFS_FILES += $(wildcard \ $(ROMFS_ROOT)/* \ $(ROMFS_ROOT)/*/* \ @@ -334,7 +334,14 @@ ifeq ($(ROMFS_FILES),) $(error ROMFS_ROOT $(ROMFS_ROOT) specifies a directory containing no files) endif ROMFS_DEPS += $(ROMFS_FILES) + +# Extra files that may be copied into the ROMFS /extras directory +# ROMFS_EXTRA_FILES are required, ROMFS_OPTIONAL_FILES are optional +ROMFS_EXTRA_FILES += $(wildcard $(ROMFS_OPTIONAL_FILES)) +ROMFS_DEPS += $(ROMFS_EXTRA_FILES) + ROMFS_IMG = romfs.img +ROMFS_SCRATCH = romfs_scratch ROMFS_CSRC = $(ROMFS_IMG:.img=.c) ROMFS_OBJ = $(ROMFS_CSRC:.c=.o) LIBS += $(ROMFS_OBJ) @@ -345,9 +352,18 @@ $(ROMFS_OBJ): $(ROMFS_IMG) $(GLOBAL_DEPS) $(call BIN_TO_OBJ,$<,$@,romfs_img) # Generate the ROMFS image from the root -$(ROMFS_IMG): $(ROMFS_DEPS) $(GLOBAL_DEPS) +$(ROMFS_IMG): $(ROMFS_SCRATCH) $(ROMFS_DEPS) $(GLOBAL_DEPS) @$(ECHO) "ROMFS: $@" - $(Q) $(GENROMFS) -f $@ -d $(ROMFS_ROOT) -V "NSHInitVol" + $(Q) $(GENROMFS) -f $@ -d $(ROMFS_SCRATCH) -V "NSHInitVol" + +# Construct the ROMFS scratch root from the canonical root +$(ROMFS_SCRATCH): $(ROMFS_DEPS) $(GLOBAL_DEPS) + $(Q) $(MKDIR) -p $(ROMFS_SCRATCH) + $(Q) $(COPYDIR) $(ROMFS_ROOT)/* $(ROMFS_SCRATCH) +ifneq ($(ROMFS_EXTRA_FILES),) + $(Q) $(MKDIR) -p $(ROMFS_SCRATCH)/extras + $(Q) $(COPY) $(ROMFS_EXTRA_FILES) $(ROMFS_SCRATCH)/extras +endif EXTRA_CLEANS += $(ROMGS_OBJ) $(ROMFS_IMG) diff --git a/makefiles/setup.mk b/makefiles/setup.mk index 42f9a8a7f..183b143d6 100644 --- a/makefiles/setup.mk +++ b/makefiles/setup.mk @@ -73,6 +73,7 @@ export RMDIR = rm -rf export GENROMFS = genromfs export TOUCH = touch export MKDIR = mkdir +export FIND = find export ECHO = echo export UNZIP_CMD = unzip export PYTHON = python |