Hi, I’m trying to run Raspberry Pi camera with RockPi 4 Plus V1.72.
I use debian. I enabled the modules and installed gstreamer, but I the images I get are quite bad looking and almost completely dark.
With this command: gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! jpegenc ! filesink location=test.jpg
I get:
This is not only present in debian, but also in linearo image here → https://wiki.radxa.com/Rockpi4/MIPI_Camera
When I run this: test_camera-rkisp1.sh
I get this result (green thing is the led of rockpi, without it it’s almost black)
I also enabled this one from kernel config: Hidden v4l2 configs for GKI (NEW)
but the result is compilation fail:
CC drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.o
drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.c: In function 'kbase_devfreq_init':
drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.c:409:18: error: 'kbase_dcp' undeclared (first use in this function); did you mean 'kbase_vmap'?
(u32 *)&kbase_dcp->dyn_power_coeff);
^~~~~~~~~
kbase_vmap
drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.c:409:18: note: each undeclared identifier is reported only once for each function it appears in
At top level:
drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.c:334:37: warning: 'kbase_cooling_power' defined but not used [-Wunused-variable]
error, forbidden warning:mali_kbase_devfreq.c:334
static struct devfreq_cooling_power kbase_cooling_power = {
^~~~~~~~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:334: drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.o] Error 1
make[3]: *** [scripts/Makefile.build:637: drivers/gpu/arm/bifrost_for_linux] Error 2
make[2]: *** [scripts/Makefile.build:637: drivers/gpu/arm] Error 2
make[1]: *** [scripts/Makefile.build:637: drivers/gpu] Error 2
make: *** [Makefile:1198: drivers] Error 2
Ok thanks, I will try this, but I wanted to first finish this kernel thing because after 5 hours of fixing bugs(C compile issues, disabling modules), I finally compiled and installed the kernel. However, I cannot boot anymore; no IP, no display, I can use keyboard but I can only reset. The blue led blinks with some constant frequency.
I disabled these modules:
USB Gadget Support (USB_GADGET) [Y/n/m/?] y
Debugging messages (DEVELOPMENT) (USB_GADGET_DEBUG) [N/y/?] n
Debugging information files (DEVELOPMENT) (USB_GADGET_DEBUG_FILES) [Y/n/?] y
Debugging information files in debugfs (DEVELOPMENT) (USB_GADGET_DEBUG_FS) [N/y/?] n
Maximum VBUS Power usage (2-500 mA) (USB_GADGET_VBUS_DRAW) [500] 500
Number of storage pipeline buffers (USB_GADGET_STORAGE_NUM_BUFFERS) [2] 2
Serial gadget console support (U_SERIAL_CONSOLE) [N/y/?] n
USB Gadget functions configurable through configfs (USB_CONFIGFS) [M/n/y/?] m
Uevent notification of Gadget state (USB_CONFIGFS_UEVENT) [N/y/?] n
Generic serial bulk in/out (USB_CONFIGFS_SERIAL) [N/y/?] n
Abstract Control Model (CDC ACM) (USB_CONFIGFS_ACM) [Y/n/?] y
Object Exchange Model (CDC OBEX) (USB_CONFIGFS_OBEX) [N/y/?] n
Network Control Model (CDC NCM) (USB_CONFIGFS_NCM) [N/y/?] n
Ethernet Control Model (CDC ECM) (USB_CONFIGFS_ECM) [N/y/?] n
Ethernet Control Model (CDC ECM) subset (USB_CONFIGFS_ECM_SUBSET) [N/y/?] n
RNDIS (USB_CONFIGFS_RNDIS) [Y/n/?] y
Ethernet Emulation Model (EEM) (USB_CONFIGFS_EEM) [N/y/?] n
Mass storage (USB_CONFIGFS_MASS_STORAGE) [Y/n/?] y
Loopback and sourcesink function (for testing) (USB_CONFIGFS_F_LB_SS) [N/y/?] n
Function filesystem (FunctionFS) (USB_CONFIGFS_F_FS) [Y/n/?] y
Accessory gadget (USB_CONFIGFS_F_ACC) [N/y/?] n
Audio Source gadget (USB_CONFIGFS_F_AUDIO_SRC) [N/y/?] n
Audio Class 1.0 (USB_CONFIGFS_F_UAC1) [N/y/?] n
Audio Class 1.0 (legacy implementation) (USB_CONFIGFS_F_UAC1_LEGACY) [N/y/?] n
Audio Class 2.0 (USB_CONFIGFS_F_UAC2) [N/y/?] n
MIDI function (USB_CONFIGFS_F_MIDI) [Y/n/?] y
HID function (USB_CONFIGFS_F_HID) [N/y/?] n
USB Webcam function (USB_CONFIGFS_F_UVC) [Y/n/?] y
Printer function (USB_CONFIGFS_F_PRINTER) [N/y/?] n
USB Gadget precomposed configurations [M/n/y/?] m
Gadget Zero (DEVELOPMENT) (USB_ZERO) [N/m/?] n
Audio Gadget (USB_AUDIO) [N/m/?] (NEW) n
Ethernet Gadget (with CDC Ethernet support) (USB_ETH) [M/n/?] m
RNDIS support (USB_ETH_RNDIS) [Y/n/?] y
Ethernet Emulation Model (EEM) support (USB_ETH_EEM) [N/y/?] n
Network Control Model (NCM) support (USB_G_NCM) [M/n/?] m
Gadget Filesystem (USB_GADGETFS) [M/n/?] m
Function Filesystem (USB_FUNCTIONFS) [M/n/?] m
Include configuration with CDC ECM (Ethernet) (USB_FUNCTIONFS_ETH) [Y/n/?] y
Include configuration with RNDIS (Ethernet) (USB_FUNCTIONFS_RNDIS) [Y/n/?] y
Include 'pure' configuration (USB_FUNCTIONFS_GENERIC) [Y/n/?] y
Mass Storage Gadget (USB_MASS_STORAGE) [M/n/?] m
Serial Gadget (with CDC ACM and CDC OBEX support) (USB_G_SERIAL) [M/n/?] m
MIDI Gadget (USB_MIDI_GADGET) [M/n/?] m
Printer Gadget (USB_G_PRINTER) [M/n/?] m
CDC Composite Device (Ethernet and ACM) (USB_CDC_COMPOSITE) [M/n/?] m
CDC Composite Device (ACM and mass storage) (USB_G_ACM_MS) [M/n/?] m
Multifunction Composite Gadget (USB_G_MULTI) [M/n/?] m
RNDIS + CDC Serial + Storage configuration (USB_G_MULTI_RNDIS) [Y/n/?] y
CDC Ethernet + CDC Serial + Storage configuration (USB_G_MULTI_CDC) [Y/n/?] y
HID Gadget (USB_G_HID) [M/n/?] m
EHCI Debug Device Gadget (USB_G_DBGP) [N/m/?] n
USB Webcam Gadget (USB_G_WEBCAM) [M/n/?] m
USB Raw Gadget (USB_RAW_GADGET) [N/m/?] n
USB Gadget Support (USB_GADGET) [Y/n/m/?] y
Debugging messages (DEVELOPMENT) (USB_GADGET_DEBUG) [N/y/?] n
Debugging information files (DEVELOPMENT) (USB_GADGET_DEBUG_FILES) [Y/n/?] y
Debugging information files in debugfs (DEVELOPMENT) (USB_GADGET_DEBUG_FS) [N/y/?] n
Maximum VBUS Power usage (2-500 mA) (USB_GADGET_VBUS_DRAW) [500] 500
Number of storage pipeline buffers (USB_GADGET_STORAGE_NUM_BUFFERS) [2] 2
Serial gadget console support (U_SERIAL_CONSOLE) [N/y/?] n
USB Gadget functions configurable through configfs (USB_CONFIGFS) [M/n/y/?] m
Uevent notification of Gadget state (USB_CONFIGFS_UEVENT) [N/y/?] n
Generic serial bulk in/out (USB_CONFIGFS_SERIAL) [N/y/?] n
Abstract Control Model (CDC ACM) (USB_CONFIGFS_ACM) [Y/n/?] y
Object Exchange Model (CDC OBEX) (USB_CONFIGFS_OBEX) [N/y/?] n
Network Control Model (CDC NCM) (USB_CONFIGFS_NCM) [N/y/?] n
Ethernet Control Model (CDC ECM) (USB_CONFIGFS_ECM) [N/y/?] n
Ethernet Control Model (CDC ECM) subset (USB_CONFIGFS_ECM_SUBSET) [N/y/?] n
RNDIS (USB_CONFIGFS_RNDIS) [Y/n/?] y
Ethernet Emulation Model (EEM) (USB_CONFIGFS_EEM) [N/y/?] n
Mass storage (USB_CONFIGFS_MASS_STORAGE) [Y/n/?] y
Loopback and sourcesink function (for testing) (USB_CONFIGFS_F_LB_SS) [N/y/?] n
Function filesystem (FunctionFS) (USB_CONFIGFS_F_FS) [Y/n/?] y
Accessory gadget (USB_CONFIGFS_F_ACC) [N/y/?] n
Audio Source gadget (USB_CONFIGFS_F_AUDIO_SRC) [N/y/?] n
Audio Class 1.0 (USB_CONFIGFS_F_UAC1) [N/y/?] n
Audio Class 1.0 (legacy implementation) (USB_CONFIGFS_F_UAC1_LEGACY) [N/y/?] n
Audio Class 2.0 (USB_CONFIGFS_F_UAC2) [N/y/?] n
MIDI function (USB_CONFIGFS_F_MIDI) [Y/n/?] y
HID function (USB_CONFIGFS_F_HID) [N/y/?] n
USB Webcam function (USB_CONFIGFS_F_UVC) [Y/n/?] y
Printer function (USB_CONFIGFS_F_PRINTER) [N/y/?] n
USB Gadget precomposed configurations [M/n/y/?] m
Gadget Zero (DEVELOPMENT) (USB_ZERO) [N/m/?] n
Audio Gadget (USB_AUDIO) [N/m/?] n
Ethernet Gadget (with CDC Ethernet support) (USB_ETH) [M/n/?] m
RNDIS support (USB_ETH_RNDIS) [Y/n/?] y
Ethernet Emulation Model (EEM) support (USB_ETH_EEM) [N/y/?] n
Network Control Model (NCM) support (USB_G_NCM) [M/n/?] m
Gadget Filesystem (USB_GADGETFS) [M/n/?] m
Function Filesystem (USB_FUNCTIONFS) [M/n/?] m
Include configuration with CDC ECM (Ethernet) (USB_FUNCTIONFS_ETH) [Y/n/?] y
Include configuration with RNDIS (Ethernet) (USB_FUNCTIONFS_RNDIS) [Y/n/?] y
Include 'pure' configuration (USB_FUNCTIONFS_GENERIC) [Y/n/?] y
Mass Storage Gadget (USB_MASS_STORAGE) [M/n/?] m
Serial Gadget (with CDC ACM and CDC OBEX support) (USB_G_SERIAL) [M/n/?] m
MIDI Gadget (USB_MIDI_GADGET) [M/n/?] m
Printer Gadget (USB_G_PRINTER) [M/n/?] m
CDC Composite Device (Ethernet and ACM) (USB_CDC_COMPOSITE) [M/n/?] m
CDC Composite Device (ACM and mass storage) (USB_G_ACM_MS) [M/n/?] m
Multifunction Composite Gadget (USB_G_MULTI) [M/n/?] m
RNDIS + CDC Serial + Storage configuration (USB_G_MULTI_RNDIS) [Y/n/?] y
CDC Ethernet + CDC Serial + Storage configuration (USB_G_MULTI_CDC) [Y/n/?] y
HID Gadget (USB_G_HID) [M/n/?] m
EHCI Debug Device Gadget (USB_G_DBGP) [N/m/?] n
USB Webcam Gadget (USB_G_WEBCAM) [N/m/?] (NEW) n
USB Raw Gadget (USB_RAW_GADGET) [N/m/?] n
It could be a kernel config or you missed to enable HDMI and eth in dts. Both things are related.
For this case, you need a USB-TTL serial debug.
BTW, i found some cheap imx219 cameras, just ordered one and i will test it on Rock 3A and see what i get.
Device 0: unknown device
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: pxeuuid
Retrieving file: /extlinux/pxelinux.cfg/01-b6-d1-14-54-41-6b
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
Retrieving file: /extlinux/pxelinux.cfg/00000000
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
Retrieving file: /extlinux/pxelinux.cfg/0000000
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
Retrieving file: /extlinux/pxelinux.cfg/000000
ethernet@fe300000 Waiting for PHY auto negotiation to complete..
it might be trying to boot over ethernet because when I plug in the ethernet cable, I get
Using ethernet@fe300000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.213
Load address: 0x600000
Loading: T T T T T (some more T)
Retry count exceeded; starting again
I don’t know how to check which u-boot I’m using. I’m using extlinux.conf file to change the boot order.
I think the problem is my bad because I assumed rockchip kernel would work on rockpi. It might be the kernel not supporting rockpi4 because there is no such file as rk3399-rock-pi-4b.dtb inside the build directory (but I have tons of dtb file there), it might be this kernel -> https://github.com/rockchip-linux/kernel/tree/develop-4.19 will never work on rockpi4b.
The error is: ** Unable to read file /dtbs/4.19.206-rt87/rockchip/rk3399-rock-pi-4b.dtb