打开 include/configs/sun8i.h
添加:
#define CONFIG_VIDEO_BMP_GZIP
#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1366*767*4)
#define CONFIG_CMD_UNZIP
#define CONFIG_CMD_BMP
#define CONFIG_BMP_16BPP
编译,烧录,运行, 等待测试.
离线
先烧一个 bmp 到 spi flash:
$ sudo sunxi-fel -p spiflash-write 0x600000 LOGO3.bmp
首先把 LOGO3.bmp 读到内存地址 0x600000:
=> sf probe 0 50000000; sf read 0x41000000 0x600000 0x100000;
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0x600000, size 0x100000
SF: 1048576 bytes @ 0x600000 Read: OK
查看图片信息:
=> bmp info 0x41000000
Image size : 800 x 480
Bits per pixel: 16
Compression : 3
卧槽,居然显示不了:
=> bmp display 0x41000000 0 0
Error: compression type 3 not supported
离线
上面的bmp图片是16bit格式的,理论上可以正常显示的,引文一楼已经有加宏了 CONFIG_BMP_16BPP
倒是 8bit和24bit图片可以显示.
离线
bmp display 不能显示gz压缩的图片,
貌似在gunzip分配内存就出错了?
=> sf probe 0 1080000000; sf read 0x41000000 0x600000 149510;bmp display 0x41000000 0 0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0x600000, size 0x149510
SF: 1348880 bytes @ 0x600000 Read: OK
Error: malloc in gunzip failed!
There is no valid bmp file at the given address
离线