as said before, I add those flags in ./kernel/arch/arm/configs/mdm9607_defconfig and change UBI_ROOTFS_SIZE ?= “48MiB”
I already changed but the result as before.
I modify 5 file.
- mdm9x28-image.inc
- add meta-swi/meta-swi-mdm9x28/recipes-kernel/linux/files/camera.cfg
- linux-quic_git.bb
- /kernel/drivers/usb/gadget/function/f_uvc.c
- swi-mdm9x28.conf
# meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc
# Add Gstreamer for webcam
IMAGE_INSTALL += "gstreamer1.0"
IMAGE_INSTALL += "gstreamer1.0-plugins-base"
IMAGE_INSTALL += "gstreamer1.0-plugins-good"
# meta-swi/meta-swi-mdm9x28/recipes-kernel/linux/files/camera.cfg
[camera.zip|attachment](upload://rKwtBDQzsYuGrZy9CcHuY8j4fm1.zip) (13.0 KB)
CONFIG_MEDIA_SUPPORT=m
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEOBUF2_CORE=m
CONFIG_VIDEOBUF2_MEMOPS=m
CONFIG_VIDEOBUF2_VMALLOC=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_V4L_PLATFORM_DRIVERS=y
# linux-quic_git.bb
KERNEL_CUSCONFIG = "${THISDIR}/files/camera.cfg"
do_configure_prepend() {
...
cat ${KERNEL_CUSCONFIG} >> ${WORKDIR}/defconfig
...
oe_runmake_cell -C ${S} ARCH=${ARCH} ${KERNEL_EXTRA_ARGS} ${WORKDIR}/defconfig
}
# /kernel/drivers/usb/gadget/function/f_uvc.c
void uvc_function_connect(struct uvc_device *uvc) {
...
/**/
if ((ret = usb_function_activate(&uvc->func)) < 0)
INFO(cdev, "UVC connect failed with %d\n, ret");
...
}
void uvc_function_disconnect(struct uvc_device *uvc) {
...
/**/
if ((ret = usb_function_deactivate(&uvc->func)) < 0)
INFO(cdev, "UVC disconnect failed with %d\n", ret);
...
}
Could you help me to check my modify ?
you can revert everything back to original and then add those flags in./kernel/arch/arm/configs/mdm9607_defconfig and change UBI_ROOTFS_SIZE ?= “48MiB”
Hi @jyijyi ,
You mean that revert all modify then modify UBI_ROOTFS_SIZE ?= “48MiB” and do comipled first ?
yes, you can try.
then add those flags in ./kernel/arch/arm/configs/mdm9607_defconfig
of course you also need to modify //kernel/drivers/usb/gadget/function/f_uvc.c to get the compilation passed
as said before, revert everything back to original, then do the followings:
- modify UBI_ROOTFS_SIZE ?= “48MiB”
- add those flags in ./kernel/arch/arm/configs/mdm9607_defconfig
- modify //kernel/drivers/usb/gadget/function/f_uvc.c
Hi @jyijyi
OK, I will modify
- f_uvc.c
- UBI_ROOTFS_SIZE ?= “48MiB”
- add all the flags into swi-mdm9x28.conf
Right?
BTW your image can use. Thanks!!!
Hi @jyijyi ,
I got error
Build image of minimal rootfs (for swi-mdm9x28).
ERROR: Unable to start bitbake server
ERROR: Server log for this session (/home/test/workspace/yocto/build_bin/bitbake-cookerdaemon.log):
--- Starting bitbake server pid 30671 at 2023-05-11 09:53:55.629665 ---
WARNING: Layer swi-wp-bin should set LAYERSERIES_COMPAT_swi-wp-bin in its conf/layer.conf file to list the core layer names it is compatible with.
ERROR: ParseError at /home/test/workspace/yocto/meta-swi/meta-swi-mdm9x28/conf/machine/swi-mdm9x28.conf:119: unparsed line: 'CONFIG_MEDIA_SUPPORT=m'
Makefile:300: recipe for target 'image_bin' failed
make: *** [image_bin] Error 1
Should I add camera.cfg into swi-mdm9x28.conf ?
sorry, I paste the wrong file path.
I add those flags in ./kernel/arch/arm/configs/mdm9607_defconfig
Hi @jyijyi ,
Also include Gstreamer ?
no, i did not include gstreamer as i just wanna test the uvcvideo driver
you can add it later after verifying the driver is working fine
Hi @jyijyi ,
OK I will try add driver first then add gstreamer.
yes, it will update the rootfs
Hi @jyijyi ,
I didn’t the version will change after I update by one-click.
Should I reset to default by "swiflash -r wp76 -f "?
BTW I can build finished with R16 but I can update the image
Image size out of range? Why? How can I fix it?
How big is your yocto image?
You can see my image is about 32MB
Hi @jyijyi
My image is 41.3MB what item can close ?
That means you did not revert back to original source …
Hi @jyijyi ,
I revert to original source but I don’t make clean, then I add driver and gstreamer