mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 15:57:35 +08:00
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: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
#
|
||||
|
||||
+11
-2
@@ -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
|
||||
|
||||
+4
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user