diff --git a/Makefile b/Makefile index fbf5898519..4c009af00d 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ testbuild: $(Q) (cd $(PX4_BASE) && $(MAKE) distclean && $(MAKE) archives && $(MAKE) -j8) $(Q) (zip -r Firmware.zip $(PX4_BASE)/Images) -testrun: +linuxrun: Tools/linux_run.sh # diff --git a/Tools/linux_run.sh b/Tools/linux_run.sh index 4572a4e3e2..8005b65539 100755 --- a/Tools/linux_run.sh +++ b/Tools/linux_run.sh @@ -3,7 +3,7 @@ if [ ! -c /tmp/ttyS0 ] || [ ! -c /tmp/ttyS1 ] then echo "Need to create /tmp/ttyS[01]" - echo "socat PTY,link=/tmp/ttyS0 PTY,link=/tmp/ttyS1" + echo "sudo socat PTY,link=/tmp/ttyS0 PTY,link=/tmp/ttyS1" exit 1 fi @@ -12,6 +12,15 @@ if [ ! -d /fs/msdcard ] && [ ! -w /fs/msdcard ] echo "Need to create/mount writable /fs/microsd" echo "sudo mkdir -p /fs/msdcard" echo "sudo chmod 777 /fs/msdcard" + exit 1 fi -Build/linux_default.build/mainapp +if [ ! -d /eeprom ] && [ ! -w /eeprom ] + then + echo "Need to create/mount writable /eeprom" + echo "sudo mkdir -p /eeprom" + echo "sudo chmod 777 /eeprom" + exit 1 +fi + +Build/linux_default.build/mainapp linux-config/linuxtest/init/rc.S diff --git a/makefiles/setup.mk b/makefiles/setup.mk index fd4cbb1a77..d8ba1304c9 100644 --- a/makefiles/setup.mk +++ b/makefiles/setup.mk @@ -33,8 +33,11 @@ # Path and tool setup # -#export PX4_TARGET_OS = nuttx +ifdef ($(PX4_TARGET_OS),nuttx) +export PX4_TARGET_OS = nuttx +else export PX4_TARGET_OS = linux +endif # # Some useful paths.