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

Enabling camera in custom image #51

Open
jtc42 opened this issue Sep 14, 2020 · 2 comments
Open

Enabling camera in custom image #51

jtc42 opened this issue Sep 14, 2020 · 2 comments

Comments

@jtc42
Copy link

jtc42 commented Sep 14, 2020

Hi,

I'm trying to get to grips with Ubuntu Core a bit, and one thing I'm looking to do is create a custom image with a couple of application snaps, but importantly the camera interface needs to be enabled without any user intervention. A lot of online tutorials talk about just editing the boot config.txt, but obviously this doesn't really work for what we want.

Am I right in thinking that the workflow should be:

  • Fork this gadget snap
  • Rename, and enable the camera module usingconfig.txt.armhf and config.txt.arm64
  • Publish the forked gadget snap
  • Build a custom image with the gadget set to the forked snap

I've read a bunch of the documentation but I'm either missing something about how to actually use custom gadgets in custom images, or it's really not obvious.

Any pointers would be great,

Thanks!

@alfonsosanchezbeato
Copy link
Member

There are some changes in config.txt that are allowed by snapd options (see https://forum.snapcraft.io/t/system-options/87), however it does not look that controlling camera settings is among them yet.

So, while this does not get supported, you are correct in that you will need to fork the gadget and create your own image. You can get some ideas from:
https://ubuntu.com/core/docs/image-building
https://ubuntu.com/core/docs/gadget-building
Also the forum is a great source of information:
https://forum.snapcraft.io/

@anonymouse64
Copy link
Member

@alfonsosanchezbeato @jtc42 we do sometimes just add new options to configure this sort of thing through snapd since it's an already established precedence (even if it's a bit awkward on our side), so I think we would accept a PR to snapd adding this new option/setting for system.pi-config.camera=foo or whatever the option is named

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants