核心内容摘要
漫画脸描述生成在虚拟偶像中的应用:实时直播形象生成
cat /sys/kernel/debug/pinctrl/pinctrl-rockchip-pinctrl/pinmux-pinscat /sys/kernel/debug/gpio20260129让天启AIO-3576Q38开发板跑原厂的Buildroot时适配xc7160【使用原厂DTS】缘起让天启AIO-3576Q38开发板跑原厂的Buildroot时适配xc7160【使用原厂DTS】让天启AIO-3576Q38开发板在Rockchip瑞芯微原厂Buildroot下打开gmac0芯片YT8531H-CA。
我看原理图是YT8531H-CA/RTL8211F-CG硬件兼容设计的。
应该可以直接替换使用的当你把荣品RD-RK3588开发板重新适配一把就相当于从头做了一个项目【荣品RD-RK3588开发板】。
当然开发板的功能都是好的你免除了调试的过程也就没有解决相关硬件出错的经验/机会了
驱动文件直接增加Z:\Linux_SDK\Firefly_SDK\kernel\drivers\media\i2c\xc
cZ:\git_RK3576_Linux
1\kernel-
1\drivers\media\i2c\xc
c
Z:\Linux_SDK\Firefly_SDK\kernel\drivers\media\i2c\MakefileZ:\git_RK3576_Linux
1\kernel-
1\drivers\media\i2c\Makefileobj-$(CONFIG_VIDEO_WM
wm
oobj-$(CONFIG_VIDEO_WM
wm
oobj-$(CONFIG_VIDEO_XC
xc
o
Z:\Linux_SDK\Firefly_SDK\kernel\drivers\media\i2c\KconfigZ:\git_RK3576_Linux
1\kernel-
1\drivers\media\i2c\Kconfigconfig VIDEO_OS02K10tristate OmniVision OS02K10 sensor supportdepends on I2C VIDEO_DEVdepends on MEDIA_CAMERA_SUPPORTselect MEDIA_CONTROLLERselect VIDEO_V4L2_SUBDEV_APIselect V4L2_FWNODEhelpThis is a Video4Linux2 sensor driver for the OmniVisionOS02K10 camera.config VIDEO_XC7160tristate Firefly XC7160 support.depends on I2C VIDEO_DEVdepends on MEDIA_CAMERA_SUPPORTselect MEDIA_CONTROLLERselect VIDEO_V4L2_SUBDEV_APIselect V4L2_FWNODEhelpDriver for sv-taysh camera.This camera consists of ISP xc7160 and sensor sc8238config VIDEO_OS03B10tristate OmniVision OS03B10 sensor supportdepends on I2C VIDEO_DEVdepends on MEDIA_CAMERA_SUPPORTselect MEDIA_CONTROLLERselect VIDEO_V4L2_SUBDEV_APIselect V4L2_FWNODEhelpThis is a Video4Linux2 sensor driver for the OmniVisionOS03B10 camera.
Z:\git_RK3576_Linux
1\kernel-
1\.configY:\A7_RK3576_LINUX\kernel\.configCONFIG_VIDEO_IMX586y# CONFIG_VIDEO_JX_F37 is not set# CONFIG_VIDEO_JX_H62 is not set# CONFIG_VIDEO_JX_H65 is not set# CONFIG_VIDEO_JX_K17 is not set# CONFIG_VIDEO_MIS2031 is not set# CONFIG_VIDEO_MIS4001 is not set# CONFIG_VIDEO_MT9M001 is not set# CONFIG_VIDEO_MT9M032 is not set# CONFIG_VIDEO_MT9M111 is not set# CONFIG_VIDEO_MT9P031 is not set# CONFIG_VIDEO_MT9T001 is not set# CONFIG_VIDEO_MT9T112 is not set# CONFIG_VIDEO_MT9V011 is not set# CONFIG_VIDEO_MT9V032 is not set# CONFIG_VIDEO_MT9V111 is not set# CONFIG_VIDEO_NOON010PC30 is not set# CONFIG_VIDEO_OG01A10 is not set# CONFIG_VIDEO_OG01A1B is not set# CONFIG_VIDEO_OG02B10 is not set# CONFIG_VIDEO_OS02G10 is not set# CONFIG_VIDEO_OS02K10 is not setCONFIG_VIDEO_XC7160y# CONFIG_VIDEO_OS03B10 is not setCONFIG_VIDEO_OS04A10y# CONFIG_VIDEO_OS04D10 is not set# CONFIG_VIDEO_OS05A20 is not setZ:\git_RK3576_Linux
1\kernel-
1\arch\arm64\configs\rockchip_linux_defconfigY:\A7_RK3576_LINUX\kernel\arch\arm64\configs\rockchip_linux_defconfigCONFIG_VIDEO_IMX464yCONFIG_VIDEO_XC7160yCONFIG_VIDEO_OS04A10y
# Found kernels basic config fragment: rk
config make -C /home/rootroot/git_RK3576_Linux
1/kernel/ -j25 CROSS_COMPILE/home/rootroot/git_RK3576_Linux
1/prebuilts/gcc/linux-x86/aarch64/gcc-arm-
1
3-
2
07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCHarm64 rockchip_linux_defconfig rk
configmake: Entering directory /home/rootroot/git_RK3576_Linux
1/kernel-
1## configuration written to .config#Using .config as baseMerging ./arch/arm64/configs/rk
configValue of CONFIG_TOUCHSCREEN_GT9XX is redefined by fragment ./arch/arm64/configs/rk
config:Previous value: # CONFIG_TOUCHSCREEN_GT9XX is not setNew value: CONFIG_TOUCHSCREEN_GT9XXyValue of CONFIG_BLK_DEV_RAM_COUNT is redefined by fragment ./arch/arm64/configs/rk
config:Previous value: CONFIG_BLK_DEV_RAM_COUNT1New value: CONFIG_BLK_DEV_RAM_COUNT16## merged configuration written to .config (needs make)### configuration written to .config#make: Leaving directory /home/rootroot/git_RK3576_Linux
1/kernel-
1 make -C /home/rootroot/git_RK3576_Linux
1/kernel/ -j25 CROSS_COMPILE/home/rootroot/git_RK3576_Linux
1/prebuilts/gcc/linux-x86/aarch64/gcc-arm-
1
3-
2
07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCHarm64 rk3576-evb1-v10-linux.imgmake: Entering directory /home/rootroot/git_RK3576_Linux
1/kernel-
1SYNC include/config/auto.conf.cmdDTC arch/arm64/boot/dts/rockchip/rk3576-evb1-v10-linux.dtbCALL scripts/checksyscalls.sharch/arm64/boot/dts/rockchip/rk3576-evb1-cam-dcphy
dtsi:
2
24-
4
4: ERROR (phandle_references): /i2c2acb0000/xc7160_01b: Reference to non-existent node or label pca9555arch/arm64/boot/dts/rockchip/rk3576-evb1-cam-dcphy
dtsi:
2
24-
4
4: ERROR (phandle_references): /i2c2acb0000/xc7160_01b: Reference to non-existent node or label pca9555arch/arm64/boot/dts/rockchip/rk3576-evb1-cam-dcphy
dtsi:
21-
1
11: ERROR (phandle_references): /cam0-pwr: Reference to non-existent node or label pca9555ERROR: Input tree has errors, aborting (use -f to force output)make[3]: *** [scripts/Makefile.lib:419: arch/arm64/boot/dts/rockchip/rk3576-evb1-v10-linux.dtb] Error 2make[2]: *** [scripts/Makefile.build:503: arch/arm64/boot/dts/rockchip] Error 2make[1]: *** [Makefile:1466: rockchip/rk3576-evb1-v10-linux.dtb] Error 2make[1]: *** Waiting for unfinished jobs....make: *** [arch/arm64/Makefile:221: rk3576-evb1-v10-linux.img] Error 2make: Leaving directory /home/rootroot/git_RK3576_Linux
1/kernel-
1ERROR: Running /home/rootroot/git_RK3576_Linux
1/device/rockchip/common/scripts/mk-kernel.sh - run_command failed!ERROR: exit code 2 from line 36:$ERROR: call stack:build-helper: run_command(
mk-kernel.sh: do_build(
mk-kernel.sh: build_hook(
mk-kernel.sh: main(
ERROR: Running /home/rootroot/git_RK3576_Linux
1/device/rockchip/common/build-hooks/99-all.sh - build_all failed!ERROR: exit code 2 from line 20:$RK_SCRIPTS_DIR/mk-kernel.shERROR: call stack:99-all.sh: build_all(
99-all.sh: build_hook(
build-helper: try_func(
build-helper: try_hook(
build-helper: source(
99-all.sh: main(
ERROR: Running /home/rootroot/git_RK3576_Linux
1/device/rockchip/common/build-hooks/99-all.sh - try_func build_hook all failed!ERROR: exit code 2 from line 67:build_hookERROR: call stack:build-helper: try_func(
build-helper: try_hook(
build-helper: source(
99-all.sh: main(
rootrootrootroot-X99-Turbo:~/git_RK3576_Linux
1$ ./build.sh
rootrk3576-buildroot:/#rootrk3576-buildroot:/#rootrk3576-buildroot:/# i2cdetect -y 20 1 2 3 4 5 6 7 8 9 a b c d e f00: -- -- -- -- -- -- -- --10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --20: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU --50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --70: -- -- -- -- -- -- -- --rootrk3576-buildroot:/#rootrk3576-buildroot:/#rootrk3576-buildroot:/# i2cdetect -y 80 1 2 3 4 5 6 7 8 9 a b c d e f00: -- -- -- -- -- -- -- --10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --70: -- -- -- -- -- -- -- --rootrk3576-buildroot:/#rootrk3576-buildroot:/#rootrk3576-buildroot:/# dmesg | grep xc7160[
174122] platform csi2-dphy0: Fixed dependency cycle(s) with /i2c2ac90000/xc7160_11b[
174943] platform csi2-dcphy0: Fixed dependency cycle(s) with /i2c2acb0000/xc7160_01b[
211941] xc7160
b: T-chip firefly camera driver version:
00.
0
04[
211976] xc7160
b: Failed to get power-gpios, maybe no use[
212072] xc7160
b: supply avdd not found, using dummy regulator[
212141] xc7160
b: supply dovdd not found, using dummy regulator[
212180] xc7160
b: supply dvdd not found, using dummy regulator[
212202] xc7160
b: could not get default pinstate[
212208] xc7160
b: could not get sleep pinstate[
212218] xc7160
b: Success to get xc7160 endpoint data lanes, dts uses 4 lanes[
225660] xc7160
b: isp chip is xc7160[
226493] xc7160
b: T-chip firefly camera driver version:
00.
0
04[
226521] xc7160
b: Failed to get power-gpios, maybe no use[
228694] xc7160
b: supply avdd not found, using dummy regulator[
228760] xc7160
b: supply dovdd not found, using dummy regulator[
228789] xc7160
b: supply dvdd not found, using dummy regulator[
228814] xc7160
b: could not get default pinstate[
228820] xc7160
b: could not get sleep pinstate[
228830] xc7160
b: Success to get xc7160 endpoint data lanes, dts uses 4 lanes[
241625] xc7160
b: write XC7160_REG_HIGH_SELECT failed[
242578] xc7160: probe of
b failed with error -5[
281321] xc7160
b: Consider updating driver xc7160 to match on endpoints[
281342] rockchip-csi2-dphy csi2-dphy0: dphy0 matches m01_f_xc7160
b:bus type 5[
209663] xc7160
b: isp chip is xc7160[
249623] xc7160
b: isp chip is xc7160[
281585] xc7160
b: isp chip is xc7160rootrk3576-buildroot:/#rootrk3576-buildroot:/#很容易知道Z:\git_RK3576_Linux
1\kernel-
1\arch\arm64\boot\dts\rockchip\rk3576-firefly-aio-3576q38-cam-8ms1m.dtsiZ:\git_RK3576_Linux
1\kernel-
1\arch\arm64\boot\dts\rockchip77-min原厂\rk3576-evb1-cam-dcphy
dtsi【这个挂载i2c8了】Z:\git_RK3576_Linux
1\kernel-
1\arch\arm64\boot\dts\rockchip\rk3576-firefly-aio-3576q38-cam-dcphy-8ms1m不是这个.dtsi
还是不行rootrk3576-buildroot:/#rootrk3576-buildroot:/#rootrk3576-buildroot:/# i2cdetect -y 20 1 2 3 4 5 6 7 8 9 a b c d e f00: -- -- -- -- -- -- -- --10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --20: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU --50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --70: -- -- -- -- -- -- -- --rootrk3576-buildroot:/#rootrk3576-buildroot:/# i2cdetect -y 6Error: Could not open file /dev/i2c-6 or /dev/i2c/6: No such file or directoryrootrk3576-buildroot:/#rootrk3576-buildroot:/#rootrk3576-buildroot:/# dmesg | grep xc7160rootrk3576-buildroot:/#rootrk3576-buildroot:/#很容易知道i2c6的GPIO冲突了【正常】pin 50 (gpio1-
: wireless-bluetooth gpio1:50 function uart4 group uart4m1-rtsnpin 51 (gpio1-
: 2ad
serial (GPIO UNCLAIMED) function uart4 group uart4m1-ctsnpin 52 (gpio1-
: 2ad
serial (GPIO UNCLAIMED) function uart4 group uart4m1-xferpin 53 (gpio1-
: 2ad
serial (GPIO UNCLAIMED) function uart4 group uart4m1-xferpin 54 (gpio1-
: (MUX UNCLAIMED) (GPIO UNCLAIMED)【异常】pin 50 (gpio1-
: 2ac
i2c (GPIO UNCLAIMED) function i2c6 group i2c6m1-xferpin 51 (gpio1-
: 2ac
i2c (GPIO UNCLAIMED) function i2c6 group i2c6m1-xferpin 52 (gpio1-
: (MUX UNCLAIMED) (GPIO UNCLAIMED)pin 53 (gpio1-
: (MUX UNCLAIMED) (GPIO UNCLAIMED)pin 54 (gpio1-
: (MUX UNCLAIMED) gpio1:
拿掉UART4rootrk3576-buildroot:/#rootrk3576-buildroot:/# ls -ltotal 68lrwxrwxrwx 1 root root 7 Jan 26 04:22 bin - usr/bin-rwxr-xr-x 1 root root 489 Jan 20 07:28 busybox.fragmentlrwxrwxrwx 1 root root 8 Jan 29 12:08 data - userdatadrwxr-xr-x 14 root root 3920 Jan 29 12:49 devdrwxr-xr-x 23 root root 4096 Jan 29 12:49 etcdrwxr-xr-x 2 root root 4096 Jan 29 12:08 infolrwxrwxrwx 1 root root 7 Jan 26 04:22 lib - usr/liblrwxrwxrwx 1 root root 3 Jan 26 04:22 lib64 - liblrwxrwxrwx 1 root root 11 Jan 26 05:01 linuxrc - bin/busyboxdrwx------ 2 root root 16384 Jan 29 12:10 lostfounddrwxr-xr-x 11 root root 4096 Jan 26 05:41 mediadrwxr-xr-x 5 root root 4096 Jan 29 12:08 mntdrwxr-xr-x 3 root root 4096 Jan 29 12:49 oemdrwxr-xr-x 3 root root 4096 Jan 26 05:41 optdr-xr-xr-x 257 root root 0 Jan 29 12:49 procdrwxr-xr-x 17 root root 4096 Jan 29 12:08 rockchip-testdrwx------ 2 root root 4096 Jan 20 07:28 rootdrwxr-xr-x 10 root root 500 Jan 29 12:49 runlrwxrwxrwx 1 root root 8 Jan 26 04:22 sbin - usr/sbinlrwxrwxrwx 1 root root 10 Jan 29 12:08 sdcard - mnt/sdcarddr-xr-xr-x 14 root root 0 Jan 29 12:49 sysdrwxr-xr-x 3 root root 4096 Jan 29 12:08 systemdrwxrwxrwt 5 root root 180 Jan 29 12:49 tmplrwxrwxrwx 1 root root 9 Jan 29 12:08 udisk - mnt/udiskdrwxr-xr-x 4 root root 4096 Jan 29 12:49 userdatadrwxr-xr-x 7 root root 4096 Jan 29 12:08 usrdrwxr-xr-x 6 root root 4096 Jan 29 12:10 varlrwxrwxrwx 1 root root 6 Jan 29 12:08 vendor - systemrootrk3576-buildroot:/#rootrk3576-buildroot:/# v4l2-ctl --list-devices[
6
231950] xc7160
b: isp chip is xc7160[
6
267912] xc7160
b: isp chip is xc7160[
6
299938] xc7160
b: isp chip is xc7160[
6
331956] xc7160
b: isp chip is xc7160[
6
363792] xc7160
b: isp chip is xc7160[
6
395954] xc7160
b: isp chip is xc7160[
6
427939] xc7160
b: isp chip is xc7160[
6
459946] xc7160
b: isp chip is xc7160[
6
491954] xc7160
b: isp chip is xc7160[
6
524000] xc7160
b: isp chip is xc7160[
6
555908] xc7160
b: isp chip is xc7160rkcif (platform:rkcif-mipi-lvds
:/dev/video0/dev/video1/dev/video2/dev/video3/dev/video4/dev/video5/dev/video6/dev/video7/dev/video8/dev/video9/dev/video10/dev/media0[
6