For Kirkstone branch, error building cgos-mod recipe in do_intsall task
Facing an error while building in cgos-mod recipe from kirkstone branch in the do_intsall task, Error message as follow:
| make[2]: Entering directory '/work/build/tmp-cx/work-shared/congatec-tca7-64/kernel-source'
| make[3]: Entering directory '/work/build/tmp-cx/work-shared/congatec-tca7-64/kernel-build-artifacts'
| INSTALL /work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/image/lib/modules/5.15.119-intel-pk-standard/extra/cg
osdrv.ko
| DEPMOD /work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/image/lib/modules/5.15.119-intel-pk-standard
| Warning: modules_install: missing 'System.map' file. Skipping depmod.
| make[3]: Leaving directory '/work/build/tmp-cx/work-shared/congatec-tca7-64/kernel-build-artifacts'
| make[2]: Leaving directory '/work/build/tmp-cx/work-shared/congatec-tca7-64/kernel-source'
| make[1]: Leaving directory '/work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/CGOS_DIRECT_Lx_common_R2.00.0021/Cg
osDrv/Lx'
| cp: cannot create regular file '/lib/udev/rules.d/99-cgos.rules': Permission denied
| Copied CGOS udev rule to /lib/udev/rules.d.
| mkdir: cannot create directory ‘/usr/lib/modules-load.d’: Permission denied
| make: *** [Makefile:46: install_mod] Error 1
| ERROR: oe_runmake failed
| WARNING: /work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/temp/run.do_install.2162928:214 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
| #1: bbfatal_log, /work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/temp/run.do_install.2162928, line 214
| #2: die, /work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/temp/run.do_install.2162928, line 198
| #3: oe_runmake, /work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/temp/run.do_install.2162928, line 193
| #4: module_do_install, /work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/temp/run.do_install.2162928, line
157
| #5: do_install, /work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/temp/run.do_install.2162928, line 150
| #6: main, /work/build/tmp-cx/work/congatec_tca7_64-poky-linux/cgos-mod/2.00.0024-r2/temp/run.do_install.2162928, line 227
ERROR: Task (mc:cx:/work/meta-epc/layers/meta-congatec-x86/recipes-tools/cgos/cgos-mod_2.00.0024.bb:do_install) failed with exit code '1'
As a temp solution I did create a patch to comment the lines copying udev rules and config files in the Makefile, as the files are already handled correctly by "module_do_install" in the recipe.