Commit Graph

47 Commits

Author SHA1 Message Date
Daniel Agar 6ec2b902cc ROMFS: only copy bootloader binary if systemcmds/bl_update included 2023-03-16 09:43:56 -04:00
Beat Küng 7022d59a54 ROMFS: fix incremental build for airframe processing
Fixes the error:
Aborting due to missing @type tag in file: 'build/px4_fmu-v5_test/etc/init.d/airframes/11001_hexa_cox'

This can happen due to a change to e.g. board_serial_ports, which changes
the CLI command and triggers a re-execution of the airframe processing.
2022-07-06 07:50:18 -04:00
Daniel Agar f5d9b01f5c
NuttX build in place
- cmake NuttX build wrapper compile in place instead of copying source tree to build directory
    - slightly faster skipping necessary copying (depending on system)
    - allows debugging in place
    - easier to work directly in NuttX following official documentation
    - simplifies overall build which should make it easier to resolve any remaining NuttX dependency issues in the build system
 - the downside is switching back and forth between different builds always require rebuilding NuttX, but I think this is worth the improved developer experience
 - also no longer builds px4io and bootloader in every single build, for most users these rarely change and we're wasting a lot of build time
2021-11-15 18:47:38 -05:00
Daniel Agar 326c4f95ce ROMFS cmake remove directory VERBATIM 2021-08-11 13:29:14 -04:00
Beat Küng d300a879f1 cmake: remove romfs content before tar extraction
This avoids incremental build errors when switching between branches with
a different set of airframes.

E.g:
Aborting due to missing @type tag in file: 'Firmware/build/px4_fmu-v5_default/etc/init.d/airframes/13030_generic_vtol_quad_tiltrotor'
2021-05-11 13:14:42 -04:00
Daniel Agar f8eaa6e46b ROMFS handle bl_update generically
- include all available legacy bootloaders
2021-03-11 00:38:18 +01:00
Daniel Agar 4d288512b5 add board architecture specific init defaults 2021-03-09 19:59:41 +01:00
garfieldG 3cd9b3c2cf Added support in Mavlink Ethernet channel parameters
Mavlink Ethernet channel settings such as udp port, remote port and broadcast mode now can be changed dynamically via parameters.
2021-02-25 08:52:38 -08:00
David Sidrane e0e796a2b9 ROMFS:Bake in UAVCAN FW with builds that end in _uavcan
The configuration are mostly for testing now.
2021-02-17 22:47:35 -05:00
David Sidrane f3c2ed5eb6 ROMFS/CMakeLists appease shell check 2020-09-16 21:32:04 -04:00
Beat Küng abf5c2b301 ROMFS/CMakeLists.txt: change dependencies
- moves process airframe deps to the tar generation, to ensure whenever
  airframes are processed, the tar is extracted first.
  This is required, because if the airframe processing is done on pruned
  ROMFS, it's missing the tags.
- avoid using init.d/rcS in dependencies, use a separate file instead.
  This is because pruning modifies the rcS, and the next rebuild was
  seeing a changed rcS, resulting in unnecessary regeneration.
2020-09-16 09:30:58 -04:00
Beat Küng 0a061160f7 cmake px4_add_board: add EMBEDDED_METADATA
Allowing to put additional metadata into the ROMFS, the first is
parameters.json.gz.
2020-09-15 09:30:16 +02:00
Beat Küng 809d05053b posix: add support for ROMFSROOT
- add missing ROMFS files to CMakeLists.txt
- rename genromfs to etc, so that it's clearer for SITL use
2020-09-15 09:30:16 +02:00
Daniel Agar f769b80fde cmake px4_add_romfs_files FATAL_ERROR if file doesn't exist 2019-12-12 13:42:30 -05:00
Daniel Agar a694f0bbdd bl_update: build and include board bootloader if config available 2019-11-16 11:43:42 +01:00
Daniel Agar 2af262ed1d NuttX cmake build wrapper thorough dependencies 2019-11-16 11:43:42 +01:00
garfieldG bbb96cbd0c Mavlink startup script per board
-moved rc.mavlink to the boards optional rc additions (now it's called rc.board_mavlink) to handle board specific mavlink needs (mavlink over usb, ethernet, additional streams, etc.)
-mavlink module will be responsible to usb defaults, therefore less args are needed to be passed to mavlink module if one wants to use mavlink over usb.
-the way to check if connection is usb is by it's designated variable and not by config mode.
2019-09-29 10:46:08 -04:00
Julien Lecoeur 24c2846750 ROMFS: add explicit dependency to parser scripts 2019-07-24 05:40:53 -07:00
Julien Lecoeur daeba4e75f Add airframe .post scripts on NuttX targets 2019-07-22 13:02:45 +02:00
Beat Küng 84bca7e4d0 shellcheck: disable SC2181
The combination of 'if mycmd' and a logical expression is not supported in
NuttX.
2019-07-16 08:09:22 +02:00
Daniel Agar 0c226e9b64 cmake fix ROMFS build dependencies 2019-04-03 12:33:12 -04:00
Daniel Agar 489ea68b8d ROMFS fix pruned dependency and cleanup 2019-01-29 15:34:36 -05:00
David Sidrane 78619514b7 ROMFS/CMakeLists build gencromfs 2019-01-25 06:32:37 -08:00
David Sidrane 5036a09e22 Add support from cromfs generation 2019-01-25 06:32:37 -08:00
Daniel Agar fef65bf5c8 ROMFS split rc.board into defaults, sensors, and extras 2019-01-15 23:52:46 -08:00
Julian Oes 35f2c39f30 ROMFS: remove leftover CMakeLists.txt files
These files are copied by accident and then discovered by shellcheck.
2018-12-19 07:36:43 +00:00
Julian Oes d265aaab41 ROMFS: don't forget to prune rc.board
The startup file rc.board is copied to the build/../genromfs folder
after the pruning of the files happened. Thus, about 2000 bytes of
comments and whitespace were included in the ROMFS.

This commit moves pruning of the files in ROMFS to a separate cmake
custom command which happens after the ROMFS files have been copied and
the extra files have been added.

Testing showed that this change only affected the rc.board file as
expected.
2018-12-19 07:36:43 +00:00
Daniel Agar 38c84e6e9d rc.autostart restart shellcheck fix (161cf7) and exclude check
- fixes #10972
2018-12-03 15:11:45 +01:00
Daniel Agar 161cf7f5d9 shellcheck fix rc.autostart return and improve globbing 2018-12-01 10:03:19 -05:00
Daniel Agar 25799c6e75 create board specific init script and use with fmu-v5 2018-12-01 10:03:19 -05:00
Daniel Agar f692ad04d0 boards organization 2018-11-26 14:40:14 -08:00
Beat Küng 37338e442f NuttX shell scripts: replace operator == with =
- NuttX supports both versions
- POSIX shell only supports '='
2018-09-27 23:39:20 +02:00
Beat Küng 39db2a6bf9 shellcheck: ignore SC2154 on NuttX
This is because NuttX uses a different assignment for variables.
2018-09-25 07:53:29 +02:00
Beat Küng dae292631c Tools/serial: use per-module serial port config params, instead of per-port 2018-09-25 07:53:29 +02:00
Beat Küng c237221a81 cmake: add serial param & ROMFS generation to the build system
- only a few configs done yet
2018-09-25 07:53:29 +02:00
Beat Küng 84c6b5ac6b fmu-v2: add bootloader binary and SYS_BL_UPDATE param for BL updates
This allows a simple-to-use bootloader update mechanism to switch from
fmu-v2 to fmu-v3 target that has more flash.
2018-09-14 17:06:19 +02:00
fredowski ad6e48c372 cmake - check directory existence before copy_directory (#10402)
Starting with cmake version 3.12 the cmake -E copy_directory
command fails if the source directory does not exist. This results
in a build failure. This fix creates the source directory before
the copy which does not harm if the source directory exists.

Closes: #10368
2018-09-03 20:27:32 -04:00
Daniel Agar 52e1b59e60 cmake add nuttx shellcheck helper 2018-08-25 20:12:29 +02:00
Beat Küng ac5988fd35 ROMFS cmake: do not copy init.d-posix and mixers-sitl
Otherwise these files are added to the NuttX ROMFS build.
2018-08-08 21:09:39 +02:00
Daniel Agar 4818e3abe0 ROMFS cmake combine copy, rc.autostart, prune steps 2018-07-24 10:50:24 -04:00
Daniel Agar 1481015675 ROMFS cmake update dependency handling 2018-07-24 09:12:44 +02:00
Beat Küng 3f615695b6 ROMFS: fix some cmake issues
- every incremental rebuild extended ${config_romfs_files_list}, the
  chached variable was never reset
- cmake -E copy_directory did not remove deleted files

remaining issue: removing a file from the ROMFS & px4_add_romfs_files()
does not trigger the px_romfs_pruner.py COMMANDs to be re-executed.
2018-07-23 18:23:46 +02:00
Beat Küng 873e036e85 px_romfs_pruner: reduce multiple consecutive spaces into a single space for mixers (#9457)
Reduces FLASH usage by about 3kb.

Plus add a missing cmake dependency.
2018-05-14 14:05:29 -04:00
ksschwabe 500a1c808d ROMFS list files explicitly instead of using GLOB_RECURSE (#9107)
* Lists ROMFS files explicity instead of using GLOB_RECURSE

Previously, when ROMFS files that were not airframes were touched, the ROMFS
would not be rebuilt. The ROMFS files are now specified explicityl in a
CMakeLists.txt file that is located in the root ROMFS directory.

Now when one of the ROMFS files is touched the whole ROMFS is rebuilt.

When new files are added to the ROMFS, they need to be explicity added to
the CMakeLists in the ROMFS root directory.

* ROMFS: adds individual CMakeLists files in each subdirectory

Also moves the temporary ROMFS build directory to ${PX4_BINARY_DIR}/ROMFS/genromfs
so that the cmake_install.cmake files and the CMakeFiles directories (generated whenever
are not add_subdirectory() is called) are not generated in the temporary ROMFS directory
from which the ROMFS binary is created.

* cmake ROMFS generate add px4_add_romfs_files function

* ROMFS CMakeLists: adds explanatory comment to px4_add_romfs_files function

* ROMFS CMakeLists: updates copyright headers
2018-03-26 11:19:00 -04:00
Daniel Agar f7a17ad5e5
cmake improve ROMFS dependencies for px4io inclusion (#8860)
- fixes #8858
2018-02-09 12:57:34 -05:00
Daniel Agar 474f216a0a UAVCAN bootloaders split into separate repository (#7878) 2017-09-29 10:13:51 -04:00
Daniel Agar 01b3e6fd25 NuttX upgrade cmake wrapper (#7873)
* NuttX cmake

* px4_macros:Pass the stringified predicate as second arg to static assert

   CC_ASSERT mapes to the c++ static_assert or provides the same
   funtionality for c via the other macros. The c++ static assert
   takes 2 argumants the prdicate and a message. This fixes the
   lacking second argument.

* Updated nuttx and apps submodule to upstream nuttx 7.21+==master

   This is the latest uptake of upstream nuttx and apps.

* ROMFS generate with xxd instead of objcopy

* delete nuttx-patches

* NuttX update submodules to latest px4_nuttx-master

* fix nuttx apps and board dependency

* docker_run update to latest container 2017-08-29

* cmake ROMFS portable sed usage

* NuttX update submodules to latest px4_nuttx-master
2017-09-29 10:13:51 -04:00