Skip to content
Snippets Groups Projects
Commit cf71db74 authored by Mark Charlebois's avatar Mark Charlebois
Browse files

Support to specify build time OS target


Now run:

make PX4_TARGET_OS=nuttx

or

make PX4_TARGET_OS=linux

To test the linux build and make sure that the required directories
exist, run:

make linuxrun

Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
parent aedf6fe6
No related branches found
No related tags found
No related merge requests found
......@@ -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
#
......
......@@ -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
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
Build/linux_default.build/mainapp linux-config/linuxtest/init/rc.S
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment