-
Notifications
You must be signed in to change notification settings - Fork 0
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
cmake ROMFS generate add px4_add_romfs_files function #1
cmake ROMFS generate add px4_add_romfs_files function #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dagar: I like the addition of px4_add_romfs_files
. This is a lot better than what I initially had! 👍
You have changed the destination path for the px4io.bin file, though. I don't think that your change is correct (unless I am missing something). - See my line comment.
@@ -68,7 +68,7 @@ file(RELATIVE_PATH fw_io_bin_relative ${CMAKE_CURRENT_BINARY_DIR} ${fw_io_bin}) | |||
set(fw_io_bin ${fw_io_bin} PARENT_SCOPE) | |||
|
|||
add_custom_command(OUTPUT ${fw_io_bin} | |||
COMMAND mkdir -p ${PX4_BINARY_DIR}/ROMFS/genromfs/extras/ | |||
COMMAND mkdir -p ${PX4_BINARY_DIR}/genromfs/${config_romfs_root}/extras/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dagar: Is there a reason why you changed the path to where the px4io.bin file is placed? It is now placing the px4io.bin file in ROMFS/genromfs/px4fmu_common/extras/
. I think it should be placed directly in ROMFS/genromfs/extras/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's really only an arbitrary temp directory to point the genromfs tool at. ${PX4_BUILD_DIR}/ROMFS is the cmake build working directory, so I explicitly chose a path outside of that. Let's just make sure the px4io binary ultimately ends up in ROM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that... but... what you have done is set it up so that the extras/
directory is now buried one level deeper within a px4fmu_common
directory in the final ROMFS that ends up on the FMU.
The old ROMFS directory tree looked like this
|- /dev/
|- /etc/
|- init.d/
|- mixers/
|-extras/
|- px4io.bin
|- /fs/
Your build is generating the following:
|- /dev/
|- /etc/
|- init.d/
|- mixers/
|-px4fmu_common
|-extras/
|- px4io.bin
|- /fs/
I guess you want it to still result in the old directory structure ON the Px4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that is a blatant late night hacking error. The final generated ROMFS that's embedded should be identical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, good. We are on the same page, then. :-)
I'll merge in your changes, fix the path bug and then we can have another look at the final PR.
No description provided.