implicit declaration of function 'lzma_decode'
-
在V821_SDK_V1.1里,采用NOR Flash为介质,当适配SPI LCD,编译时发生如下错误
/data/V821/V821_SDK_V1.1/kernel/linux-5.4-ansc/bsp/modules/gpu/Makefile:72: neither CONFIG_ARM nor CONFIG_ARM64 is found in .config, unsupport 2 sun300iw1p1,/data/V821/V821_SDK_V1.1/kernel/linux-5.4-ansc, /data/V821/V821_SDK_V1.1/out/v821/kernel/build CC drivers/video/backlight/backlight.o AR drivers/video/backlight/built-in.a CC bsp/drivers/video/sunxi/lcd_fb/dev_lcd_fb.o CC bsp/drivers/video/sunxi/lcd_fb/disp_lcd.o CC bsp/drivers/video/sunxi/lcd_fb/dev_fb.o CC bsp/drivers/video/sunxi/lcd_fb/logo.o /data/V821/V821_SDK_V1.1/kernel/linux-5.4-ansc/bsp/drivers/video/sunxi/lcd_fb/logo.c: In function 'Fb_map_kernel_logo': /data/V821/V821_SDK_V1.1/kernel/linux-5.4-ansc/bsp/drivers/video/sunxi/lcd_fb/logo.c:228:10: error: implicit declaration of function 'lzma_decode' [-Werror=implicit-function-declaration] 228 | return lzma_decode(paddr, info); | ^~~~~~~~~~~
通过阅读BSP相关代码,发现在/bsp/drivers/video/sunxi/disp2/disp/dev_fb.c实现lzma_decode函数
#if IS_ENABLED(CONFIG_DECOMPRESS_LZMA) int lzma_decode(uintptr_t paddr, struct fb_info *info) { void *vaddr = NULL; long pos = 0; unsigned char *out = NULL; int ret = -1, i = 0; struct lzma_header lzma_head; ......
通过在make kernel_menuconfig里搜索CONFIG_DECOMPRESS_LZMA也已配置为Y,但为何还会发生这个现象呢?
│ Symbol: DECOMPRESS_LZMA [=y] │ │ Type : tristate │ │ Defined at lib/Kconfig:316 │ │ Selected by [y]: │ │ - RD_LZMA [=y] && BLK_DEV_INITRD [=y] │ │ - AW_DISP2_FB_DECOMPRESS_LZMA [=y] && FB [=y] && AW_DISP2 [=y] │ │ - AW_REMOTEPROC_USE_UNLZMA [=y] && AW_BSP [=y] && AW_REMOTEPROC [=y] && AW_REMOTEPROC_DECOMPRESS_FW [=y] │ │ │ │ │ │ Symbol: AW_DISP2_FB_DECOMPRESS_LZMA [=y] │ │ Type : bool │ │ Prompt: Framebuffer show bootlogo from lzma file │ │ Location: │ │ -> Allwinner BSP │ │ -> Device Drivers │ │ (1) -> Video Drivers │ │ Defined at bsp/drivers/video/sunxi/Kconfig:59 │ │ Depends on: FB [=y] && AW_DISP2 [=y] │ │ Selects: DECOMPRESS_LZMA [=y] │ │
-
-
完美解决,万分感谢!!!
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号