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

Snapdragon start instructions don't work #11114

Closed
julianoes opened this issue Dec 29, 2018 · 13 comments
Closed

Snapdragon start instructions don't work #11114

julianoes opened this issue Dec 29, 2018 · 13 comments
Labels
Admin: Wont fix Board: snapdragon Documentation 📑 Anything improving the documentation of the code / ecosystem

Comments

@julianoes
Copy link
Contributor

julianoes commented Dec 29, 2018

I could not figure out (anymore) how to actually start px4 on Snapdragon.
It's not clear reading through https://docs.px4.io/en/flight_controller/snapdragon_flight.html.

I tried the old command (see below) but it doesn't work anymore.
Any chance you could help @karliss? Thanks.

root@linaro-developer:/# cd home/linaro/
root@linaro-developer:/home/linaro# ./px4 mainapp.config
INFO  [px4] Creating symlink mainapp.config -> /home/linaro/etc
ERROR [px4] Error opening startup file, does not exist: etc/init.d/rcS
@julianoes julianoes added Board: snapdragon Documentation 📑 Anything improving the documentation of the code / ecosystem labels Dec 29, 2018
@karliss
Copy link
Contributor

karliss commented Dec 29, 2018

Try "px4 -s mainapp.config".

I observed that some of the scripts copy second config file (px4.config) to adsp folder. From the content of it seems like it should be executed on qurt side. I couldn't get that working. So for starting qurt modules I am using qshell command from main config similar to https://github.com/PX4/Firmware/blob/master/posix-configs/eagle/init/rcS . This comments also indicates that this might be the current intended behavior.

@julianoes
Copy link
Contributor Author

Ok turns out the command is:

./px4 -s mainapp.config rootfs/

It's just not documented anywhere.

@karliss
Copy link
Contributor

karliss commented Dec 29, 2018

It should match the common posix code used by other linux based platfroms.

@julianoes
Copy link
Contributor Author

I agree but that doesn't mean it shouldn't be noted anywhere! 😄

@dagar
Copy link
Member

dagar commented Dec 29, 2018

I also find it quite confusing. My personal preference would be to push everything into the binary itself. This makes debugging and deployment easier/obvious.

@julianoes
Copy link
Contributor Author

@dagar so you would bake the config files into the binary?

@julianoes
Copy link
Contributor Author

The problem is too that we don't have a generic way to have more than one autostart config for targets like Snapdragon or RPi.

@dagar
Copy link
Member

dagar commented Dec 29, 2018

@dagar so you would bake the config files into the binary?

Yes, then at startup we respect the regular SYS_AUTOSTART param. There's also no reason the external script mechanism couldn't be preserved if someone really wanted it.

The problem is too that we don't have a generic way to have more than one autostart config for targets like Snapdragon or RPi.

On Linux we're getting there. I want the vast majority of init to be unified across platforms. We simply miss too many trivial problems with this kind of code sprawl.

@julianoes
Copy link
Contributor Author

I agree but I feel like config files like these should be actual files (and pushed like that) just because it's clearer and less magic. However, I'm all for unifying it all.

@dagar
Copy link
Member

dagar commented Dec 29, 2018

What's needed (either way) is a proper package for deployment. PX4 needs to be installed somewhere on the system, including integration with the init system. Dumping all the files to a home directory and starting out of rc.local isn't great.

In the snapdragon case the package would include both the linux binary, startup config, dsp dynamic library, qurt config file, and probably setup the area for parameter store and logging.

We'd probably use systemd to manage the daemon.

@julianoes
Copy link
Contributor Author

Yes, that all sounds reasonable. And in that case all the startup files should probably go either into /usr/var/ or similar.

@stale
Copy link

stale bot commented Jun 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@julianoes
Copy link
Contributor Author

Closing for now, can be improved if we get more support from people behind Snappy again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin: Wont fix Board: snapdragon Documentation 📑 Anything improving the documentation of the code / ecosystem
Projects
None yet
Development

No branches or pull requests

3 participants