Jetson nano - When I built kernel image for jetson nano, I got ‘V4L2_CID_USER_ADDI9036_BASE’ undeclared error.

Hello,

I want to build kernel image for jetson nano by myself.

I refer to following URL and acted step by step. Unfortunately, when built zImage I got following error. Could you please kindly help to solve the build error ?

https://wiki.analog.com/resources/eval/user-guides/ad-96tof1-ebz/ug_jetson

https://developer.ridgerun.com/wiki/index.php?title=Jetson_Nano/Development/Building_the_Kernel_from_Source

--------------------------------------------------------------------------------------

kashima@kashima-ThinkPad-T420s:~/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public$ make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} menuconfig
make: Entering directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9'
make[1]: Entering directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
  GEN     ./Makefile
scripts/kconfig/mconf  Kconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

make[1]: Leaving directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
make: Leaving directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9'
kashima@kashima-ThinkPad-T420s:~/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public$ make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target zImage
^[[Dmake[1]: Entering directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
  GEN     ./Makefile
make[1]: Leaving directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
make[1]: Entering directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
  CHK     include/config/kernel.release
make[1]: Leaving directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
make[1]: Entering directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
  CHK     include/generated/uapi/linux/version.h
make[1]: Leaving directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
make[1]: Entering directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
  CHK     include/generated/utsrelease.h
make[1]: Leaving directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
make[1]: Entering directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
  Using /home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9 as source for kernel
make[1]: Leaving directory '/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/build'
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
^[[D^[[D^[[D^[[D  CALL    /home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  CC      drivers/media/i2c/addi9036.o
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/media/i2c/addi9036.c: In function ‘addi9036_s_ctrl’:
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/media/i2c/addi9036.c:32:49: error: ‘V4L2_CID_USER_ADDI9036_BASE’ undeclared (first use in this function); did you mean ‘V4L2_CID_USER_ADV7180_BASE’?
 #define V4L2_CID_AD_DEV_SET_CHIP_CONFIG_QUERY  (V4L2_CID_USER_ADDI9036_BASE + 0)
                                                 ^
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/media/i2c/addi9036.c:141:7: note: in expansion of macro ‘V4L2_CID_AD_DEV_SET_CHIP_CONFIG_QUERY’
  case V4L2_CID_AD_DEV_SET_CHIP_CONFIG_QUERY:
       ^
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/media/i2c/addi9036.c:32:49: note: each undeclared identifier is reported only once for each function it appears in
 #define V4L2_CID_AD_DEV_SET_CHIP_CONFIG_QUERY  (V4L2_CID_USER_ADDI9036_BASE + 0)
                                                 ^
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/media/i2c/addi9036.c:141:7: note: in expansion of macro ‘V4L2_CID_AD_DEV_SET_CHIP_CONFIG_QUERY’
  case V4L2_CID_AD_DEV_SET_CHIP_CONFIG_QUERY:
       ^
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/media/i2c/addi9036.c: At top level:
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/media/i2c/addi9036.c:32:49: error: ‘V4L2_CID_USER_ADDI9036_BASE’ undeclared here (not in a function); did you mean ‘V4L2_CID_USER_ADV7180_BASE’?
 #define V4L2_CID_AD_DEV_SET_CHIP_CONFIG_QUERY  (V4L2_CID_USER_ADDI9036_BASE + 0)
                                                 ^
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/media/i2c/addi9036.c:186:10: note: in expansion of macro ‘V4L2_CID_AD_DEV_SET_CHIP_CONFIG_QUERY’
   .id  = V4L2_CID_AD_DEV_SET_CHIP_CONFIG_QUERY,
          ^
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/Makefile.build:335: recipe for target 'drivers/media/i2c/addi9036.o' failed
make[4]: *** [drivers/media/i2c/addi9036.o] Error 1
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/Makefile.build:649: recipe for target 'drivers/media/i2c' failed
make[3]: *** [drivers/media/i2c] Error 2
make[3]: *** Waiting for unfinished jobs....
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/Makefile.build:649: recipe for target 'drivers/media' failed
make[2]: *** [drivers/media] Error 2
make[2]: *** Waiting for unfinished jobs....
/home/kashima/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/Makefile:1104: recipe for target 'drivers' failed
make[1]: *** [drivers] Error 2
Makefile:171: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
kashima@kashima-ThinkPad-T420s:~/workspace/jeston_nano/public_sources/Linux_for_Tegra/source/public$ 

----------------------------------------------------------------------------------------------

Best regards,

H.Kashima