Compiler WP7702 error

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.

  1. mdm9x28-image.inc
  2. add meta-swi/meta-swi-mdm9x28/recipes-kernel/linux/files/camera.cfg
  3. linux-quic_git.bb
  4. /kernel/drivers/usb/gadget/function/f_uvc.c
  5. 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

Hi @jyijyi ,

You mean modify swi-mdm9x28.conf that include gstreamer and drivers ? like below:

as said before, revert everything back to original, then do the followings:

  1. modify UBI_ROOTFS_SIZE ?= “48MiB”
  2. add those flags in ./kernel/arch/arm/configs/mdm9607_defconfig
  3. modify //kernel/drivers/usb/gadget/function/f_uvc.c

Hi @jyijyi

OK, I will modify

  1. f_uvc.c
  2. UBI_ROOTFS_SIZE ?= “48MiB”
  3. 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.

Hi @jyijyi

I have a question about one-click FW in windows

Does it update rootfs ?

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