Become a leader in the IoT community!
New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!
The dfirst thing is to make use of _Configuration Fragments_. These are files ending in `.cfg` that contain fragments of configuration for things like the Kernel. The configuration fragment will be applied to the configuration _after_ the main `.config` file has been applied.
e.g. to enable USB Cameras, you can create a `cameras.cfg` file containing:
“`
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_VIDEO_V4L2_SUBDEV_API=y
ONFIG_V4L2_FWNODE=y
CONFIG_V4L2_ASYNC=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
“`
Then, you will need an append file in **your** layer, e.g. `layers/project/meta-my_bsp/recipes-kernel/linux-yocto/linux-yocto_%.bbappend` containing
“`
FILESEXTRAPATHS:prepend := “${THISDIR}/${PN}:”
SRC_URI:append= ” file://cameras.cfg”
“`
Then put the `cameras.cfg` in `layers/project/meta-my_bsp/recipes-kernel/linux-yocto/linux-yocto/cameras.cfg`
This will get applied to _all_ machines.
If you now have two machines defined, say, `my-eye` that has a camera and `my-blind` , then to configure it so that only `my-eye` picks up the camera configuration, you can change the append file to make use of `conditional overrides`.
This makes use of the OVERRIDES variable, which by default contains the Architecture, the OS and the Machine name.
The format of an override is
`VARIABLE:append:override`
So, to only have `my-eye` pick up the camera configuration, the value of `SRC_URI` needs to be
`SRC_URI:append:my-eye = ” file://cameras.cfg”`
This way the `camera.cfg` would **only** get picked up if the machine `my-eye` is used.
CONTRIBUTE TO THIS THREAD