Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added VFS system for virtual filesystem backends #13793

Merged
merged 21 commits into from
Mar 28, 2020
Merged

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Mar 12, 2020

This implements a virtual filesystem space, allowing for multiple filesystem backends. This initial commit adds the @ROMFS/ prefix for ROMFS files. This allows Lua scripts to be embedded in ROMFS.
This replaces #13749 as it is much more general
Flash cost on CubeOrange is 1144 bytes
For ChibiOS builds scripts are placed in libraries/AP_HAL_ChibiOS/hwdef/BoardName/scripts/*.lua
For SITL builds scripts are in ROMFS/scripts in top level of build

@peterbarker
Copy link
Contributor

+ modules/waf/waf-light all
Waf: Entering directory `/home/runner/ardupilot/build/fmuv3'
Failed to embed /home/runner/ardupilot/build/fmuv3/hw.dat
Failed to created ap_romfs_embedded.h

@tridge
Copy link
Contributor Author

tridge commented Mar 12, 2020

+ modules/waf/waf-light all
Waf: Entering directory `/home/runner/ardupilot/build/fmuv3'
Failed to embed /home/runner/ardupilot/build/fmuv3/hw.dat
Failed to created ap_romfs_embedded.h

fixed, it depends on order of clean and configure. Interestingly, that also affected our build size!

@peterbarker
Copy link
Contributor

Installing collected packages: pyflakes, pycodestyle, entrypoints, mccabe, flake8
Successfully installed entrypoints-0.3 flake8-3.7.9 mccabe-0.6.1 pycodestyle-2.5.0 pyflakes-2.1.1
./build/fmuv3/env.py:1:1: E999 ValueError: source code string cannot contain null bytes
��}q(X�HAL_WITH_UAVCANq�X�1q�X
^
1     E999 ValueError: source code string cannot contain null bytes
1

@tridge
Copy link
Contributor Author

tridge commented Mar 13, 2020

source code string cannot contain null bytes

yep, semaphore should not be checking generated python file env.py, I've added build to the excluded directories for flake8 in semaphore

@peterbarker
Copy link
Contributor

Shouldn't we be writing out an env.pkl rather than env.py?

Doesn't look like we generate any Python in our build process ATM (yay!), but if we do then blanket-whitelisting the build directory may remove some useful static checking.

this ensures that optimisation levels are added regardless of whether
clean is run before or after a configure
@rmackay9
Copy link
Contributor

I'll give this a test, sorry for the delay!

@rmackay9
Copy link
Contributor

I've successfully tested this, thanks!

@tridge tridge merged commit e7fdf8f into ArduPilot:master Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants