我编译的固件烧录到luckfox-pico-ultra-w开发板上,/dev目录下为什么没有dri/card0目录,以至于运行luckfox_lvgl_demo时出现:cannot open /dev/dri/card0错误。编译选项要如何选择才能生成/dev/dri/card0目录?
[root@luckfox root]# ./luckfox_lvgl_demo
cannot open /dev/dri/card0
: No such file or directory
[root@luckfox root]# ls /dev
block mpp_service ram3 tty20 tty51 vcodec
char mtd0 ram4 tty21 tty52 vcs
console mtd0ro ram5 tty22 tty53 vcs1
cpu_dma_latency mtd1 ram6 tty23 tty54 vcsa
disk mtd1ro ram7 tty24 tty55 vcsa1
fb0 mtd2 ram8 tty25 tty56 vcsu
fd mtd2ro ram9 tty26 tty57 vcsu1
full mtd3 random tty27 tty58 video0
gpiochip0 mtd3ro rfkill tty28 tty59 video1
gpiochip1 mtd4 rga tty29 tty6 video10
gpiochip2 mtd4ro rk_dma_heap tty3 tty60 video11
gpiochip3 mtd5 rknpu tty30 tty61 video12
gpiochip4 mtd5ro rtc tty31 tty62 video13
hwrng mtd6 rtc0 tty32 tty63 video14
i2c-4 mtd6ro rve tty33 tty7 video15
iio:device0 mtdblock0 shm tty34 tty8 video16
input mtdblock1 snd tty35 tty9 video17
iomux mtdblock2 stderr tty36 ttyFIQ0 video18
kmsg mtdblock3 stdin tty37 ttyS0 video19
log mtdblock4 stdout tty38 ubi0 video2
loop-control mtdblock5 tty tty39 ubi0_0 video20
loop0 mtdblock6 tty0 tty4 ubi4 video3
loop1 null tty1 tty40 ubi4_0 video4
loop2 ptmx tty10 tty41 ubi5 video5
loop3 pts tty11 tty42 ubi5_0 video6
luckfox_lvgl_demo 运行时找不到/dev/dri/card0
您好,默认的配置和网盘镜像确认过 /dev/dri/card0 都是可以注册成功的,使用 cat /var/log/messages | grep "drm" 查看是否有什么异常打印信息,最好说明您编译固件做了什么修改
老师您好!按照您的指导找到原因了,为了适配SPI LCD 显示屏,把rv1106-luckfox-pico-ultra-ipc.dtsi里的panel: panel 节点注释了的原因。
但是又有个新问题,我用 luckfox-pico-pro-max开发板,配置spi0 驱动LCD后,编译烧录到开发板开机也是没有/der/dri/card0目录.这次没有做任何改动,只是配置了SPI0。请问 luckfox-pico-pro-max 配置ILI9488的SPI 接口显示屏,能否用lvgl 显示图片?legl-demo 里没有找到/dev/dri/card0 怎么解决?
luckfox-pico-pro-max 可以用 FBTFT 驱动去控制 TFT 屏幕的显示,会注册为/dev/fb0 设备;5.10的内核版本没有可以驱动 TFT 屏幕的DRM驱动tinydrm,所以不会有 /dev/dri/card0
基于framebuffer使用 lvgl 来显示图片同样是可以的,使用 lvgl9.0以下版本中对framebuffer的优化更好帧率会更高
基于framebuffer使用 lvgl 来显示图片同样是可以的,使用 lvgl9.0以下版本中对framebuffer的优化更好帧率会更高
Last edited by ktls2025 on 2025-04-24 14:12, edited 4 times in total.
老师, 我在lvgl_demo官方例程里,把原来的Luckfox图片更换成自己的图片经过转换的MyPicture.c,在程序中也做了Image declare.为什么编译时会出现undefined reference to `MyPicture'的错误。请参考下面:
# main.c
/*Image declare*/
//LV_IMG_DECLARE(Luckfox);
//LV_IMG_DECLARE(cat);
//LV_IMG_DECLARE(galaxy);
//LV_IMG_DECLARE(saint);
LV_IMG_DECLARE(MyPicture);
下面是编译出错信息:
/home/yangjh/rv1106/luckfox-pico-250313/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/../lib/gcc/arm-rockchip830-linux-uclibcgnueabihf/8.3.0/../../../../arm-rockchip830-linux-uclibcgnueabihf/bin/ld.bfd: ./build/obj/main.o: in function `main':
main.c:(.text.startup+0x68): undefined reference to `MyPicture'
/home/yangjh/rv1106/luckfox-pico-250313/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/../lib/gcc/arm-rockchip830-linux-uclibcgnueabihf/8.3.0/../../../../arm-rockchip830-linux-uclibcgnueabihf/bin/ld.bfd: main.c:(.text.startup+0x6c): undefined reference to `MyPicture'
collect2: error: ld returned 1 exit status
Makefile:56: recipe for target 'default' failed
make: *** [default] Error 1
# main.c
/*Image declare*/
//LV_IMG_DECLARE(Luckfox);
//LV_IMG_DECLARE(cat);
//LV_IMG_DECLARE(galaxy);
//LV_IMG_DECLARE(saint);
LV_IMG_DECLARE(MyPicture);
下面是编译出错信息:
/home/yangjh/rv1106/luckfox-pico-250313/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/../lib/gcc/arm-rockchip830-linux-uclibcgnueabihf/8.3.0/../../../../arm-rockchip830-linux-uclibcgnueabihf/bin/ld.bfd: ./build/obj/main.o: in function `main':
main.c:(.text.startup+0x68): undefined reference to `MyPicture'
/home/yangjh/rv1106/luckfox-pico-250313/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/../lib/gcc/arm-rockchip830-linux-uclibcgnueabihf/8.3.0/../../../../arm-rockchip830-linux-uclibcgnueabihf/bin/ld.bfd: main.c:(.text.startup+0x6c): undefined reference to `MyPicture'
collect2: error: ld returned 1 exit status
Makefile:56: recipe for target 'default' failed
make: *** [default] Error 1
问题解决了,原来是转换图片生成的文件名增加了“_map”,所以在LV_IMG_DECLARE()中文件名要加上_map字符。