您尚未登录。

楼主 # 2022-01-26 15:04:45

pjrstar
会员
注册时间: 2022-01-26
已发帖子: 15
积分: 10

小白新人求教uboot中怎么开启logo显示

用的2020.07版本的uboot,是不是要再buildroot中配置一下,找来找去没找到,请大神指教
大概原因好像是 uboot tool/bmp-logo.c没有参与编译,没有bmp-logo.o生成,开机时提示 Unknown command 'bmp' - try 'help'

离线

#2 2022-01-26 16:39:32

孤星泪
会员
注册时间: 2020-03-18
已发帖子: 235
积分: 231

Re: 小白新人求教uboot中怎么开启logo显示

check CONFIG_CMD_BMP=y

离线

楼主 #3 2022-01-26 19:31:08

pjrstar
会员
注册时间: 2022-01-26
已发帖子: 15
积分: 10

Re: 小白新人求教uboot中怎么开启logo显示

孤星泪 说:

check CONFIG_CMD_BMP=y

BMP命令已添加,但是又报了个错 Error: compression type 3 not supported 会是啥情况

启动日志
U-Boot 2020.07 (Jan 26 2022 - 18:05:38 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM:  64 MiB
MMC:   mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 800x480 lcd console (overscan 0x0)
In:    serial
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
Card did not respond to voltage select!
unrecognized JEDEC id bytes: ff, c8, 51
Failed to initialize SPI flash at 0:0 (error -2)
List of MTD devices:
* spi-nand0
  - device: spi-nand@1
  - parent: spi@1c05000
  - driver: spi_nand
  - type: NAND flash
  - block size: 0x20000 bytes
  - min I/O: 0x800 bytes
  - OOB size: 128 bytes
  - OOB available: 4 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
=========================
Boot Device: spi
Boot Slot 0: empty
Boot Slot 1: spi-nand
=========================
Reading 524288 byte(s) (256 page(s)) at offset 0x00080000
Error: compression type 3 not supported
gpio: pin 134 (gpio 134) value is 1
DFU waiting on SPI-NAND...
musb-hdrc: peripheral reset irq lost!
Booting from SPI-NAND...
Reading 5242880 byte(s) (2560 page(s)) at offset 0x00100000
## Loading kernel from FIT Image at 81000000 ...
   Using 'conf@0' configuration
   Trying 'kernel@0' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x810000cc
     Data Size:    4309760 Bytes = 4.1 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80000000
     Entry Point:  0x80000000
     Hash algo:    crc32
     Hash value:   e551ac88
   Verifying Hash Integrity ... crc32+ OK
## Loading fdt from FIT Image at 81000000 ...
   Using 'conf@0' configuration
   Trying 'fdt@0' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x8141c4b0
     Data Size:    15650 Bytes = 15.3 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   cb0aa1f9
   Verifying Hash Integrity ... crc32+ OK
   Booting using the fdt blob at 0x8141c4b0
   Loading Kernel Image
   Loading Device Tree to 817f9000, end 817ffd21 ... OK

Starting kernel ...

离线

#4 2022-03-14 19:25:12

xfdr0805
会员
注册时间: 2020-07-23
已发帖子: 291
积分: 344

Re: 小白新人求教uboot中怎么开启logo显示

@pjrstar
LZ,解决没有,一模一样的问题

离线

楼主 #5 2022-03-22 15:26:00

pjrstar
会员
注册时间: 2022-01-26
已发帖子: 15
积分: 10

Re: 小白新人求教uboot中怎么开启logo显示

xfdr0805 说:

@pjrstar
LZ,解决没有,一模一样的问题

解决了,一两句也说不清楚,慢慢摸索出来的,跟应用场景有关
1、bmp命令是在uboot的 menuconfig里可以配置的;
2、git上的r3 down下来的源码中uboot的env在调用bmp_display的时候变量名有点问题 (TF卡启动时是 mmcx,这里少了个x,x是0还是1,忘记了);
3、TF启动时的加载bmp到内存的地址似乎不太合适,是要换到后面点;
4、原始的 splash.bmp的格式,并不能用bmp_display打开显示;
5、uboot中要显示还需要加个宏
在 uboot/include/configs/suniv.h 中加入两个宏定义:
#define CONFIG_VIDEO_LOGO
#define CONFIG_VIDEO_BMP_LOGO

下面的env我只是加载了logo.dat文件的内容,并没有显示,因为我准备在kernel中再显示,并且logo.dat的格式是我自定义,但是关于bmp的问题这里已经修改了
mmc_kernel=kernel.itb
mmc_splash=logo.dat
mmc_ubootpart=1
mmc_bootpart=2
mmc_rootpart=3

nand_size=0x8000000
nand_splash_offset=0x80000
nand_kernel_offset=0x100000
nand_kernel_length=0x500000

sf_size=0x1000000
sf_splash_offset=0x80000
sf_kernel_offset=0x100000
sf_kernel_length=0x500000

splash_addr=0x80000000
splash_length=0x80000
mmc_splash_addr=0x81E00000

kernel_addr_r=0x81000000

bootm_size=0x1800000

stderr=serial
stdin=serial
stdout=serial

boot_slot_0=empty
boot_slot_1=empty
scan_boot_slot_0=if mmc dev 0; then setenv boot_slot_0 mmc0; fi;
scan_boot_slot_1=if mmc dev 1; then setenv boot_slot_1 mmc1; else if sf probe; then setenv boot_slot_1 spi-nor; else if mtd list; then setenv boot_slot_1 spi-nand; fi; fi; fi;
scan_boot_slot=run scan_boot_slot_0; run scan_boot_slot_1; echo "========================="; echo "Boot Device: ${boot_device}"; echo "Boot Slot 0: ${boot_slot_0}"; echo "Boot Slot 1: ${boot_slot_1}"; echo "=========================";

dfu_wait_timeout=3
mmc_dfu_info=setenv dfu_alt_info "all raw 0x0 0x37000;u-boot raw 0x10 0x7f0;boot part ${dfu_mmc_dev} ${mmc_bootpart};rom part ${dfu_mmc_dev} ${mmc_rootpart};kernel fat ${dfu_mmc_dev} ${mmc_bootpart}"
nand_dfu_info=setenv dfu_alt_info "all raw 0x0 ${nand_size};u-boot raw 0x0 0x80000;kernel raw ${nand_kernel_offset} ${nand_kernel_length};rom raw 0x600000 0x2a00000;vendor raw 0x3000000 0x1000000"
nor_dfu_info=setenv dfu_alt_info "all raw 0x0 ${sf_size};u-boot raw 0x0 0x80000;kernel raw ${sf_kernel_offset} ${sf_kernel_length};rom raw 0x600000 0x700000"
dfu_mmc=mmc dev ${dfu_mmc_dev}; run mmc_dfu_info; dfu 0 mmc ${dfu_mmc_dev} ${dfu_wait_timeout};
dfu_nand=run nand_dfu_info; dfu 0 mtd spi-nand0 ${dfu_wait_timeout};
dfu_nor=run nor_dfu_info; dfu 0 sf 0:0 ${dfu_wait_timeout};
dfu_boot=if test "${boot_slot_1}" = "spi-nand"; then echo "DFU waiting on SPI-NAND..."; run dfu_nand; fi; if test "${boot_slot_1}" = "spi-nor"; then echo "DFU waiting on SPI-NOR..."; run dfu_nor; fi; if test "${boot_slot_1}" = "mmc1"; then echo "DFU waiting on MMC1..."; setenv dfu_mmc_dev 1; run dfu_mmc; fi; if test "${boot_slot_1}" = "empty" && test "${boot_slot_0}" = "mmc0"; then echo "DFU waiting on MMC0..."; setenv dfu_mmc_dev 0; run dfu_mmc; fi;

fel_boot=echo "Booting from FEL..."; bootm ${kernel_addr_r};
mmc_boot=mmc dev ${devnum}; echo "Booting from MMC${devnum}..."; load mmc ${devnum}:${mmc_bootpart} $kernel_addr_r ${mmc_kernel}; bootm ${kernel_addr_r};
nor_nand_boot=if test "${boot_slot_1}" = "spi-nor"; then run nor_boot; fi; if test "${boot_slot_1}" = "spi-nand"; then run nand_boot; fi;
nor_boot=echo "Booting from SPI-NOR..."; sf probe; sf read ${kernel_addr_r} ${sf_kernel_offset} ${sf_kernel_length}; bootm ${kernel_addr_r};
nand_boot=echo "Booting from SPI-NAND..."; mtd read spi-nand0 ${kernel_addr_r} ${nand_kernel_offset} ${nand_kernel_length}; bootm ${kernel_addr_r};

bootcmd_fel=if test "${boot_device}" = "fel"; then run fel_boot; fi;
bootcmd_dfu=if test "${boot_device}" != "mmc0" || test "${boot_slot_1}" = "empty"; then run dfu_boot; fi;
bootcmd_mmc0=if test "${boot_device}" = "mmc0"; then devnum=0; run mmc_boot; fi;
bootcmd_mmc1=if test "${boot_device}" = "mmc1"; then devnum=1; run mmc_boot; fi;
bootcmd_spi=if test "${boot_device}" = "spi"; then run nor_nand_boot; fi;
bootcmd_loopdfu=setenv dfu_wait_timeout; run bootcmd_dfu;

boot_targets=fel dfu mmc0 mmc1 spi loopdfu

splash_nor=sf probe; sf read ${splash_addr} ${sf_splash_offset} ${splash_length};
splash_nand=mtd read spi-nand0 ${splash_addr} ${nand_splash_offset} ${splash_length};
splash_spi=if test "${boot_slot_1}" = "spi-nor"; then run splash_nor; fi; if test "${boot_slot_1}" = "spi-nand"; then run splash_nand; fi;
splash_mmc0=echo "mmc_splash_addr: ${mmc_splash_addr}"; load mmc ${devnum}:${mmc_bootpart} ${mmc_splash_addr} ${mmc_splash};
show_splash=run splash_${boot_device}; gpio set ${lcd_bl_pin};

distro_bootcmd=run scan_boot_slot; run show_splash; for target in ${boot_targets}; do run bootcmd_${target}; done

最近编辑记录 pjrstar (2022-03-22 15:27:55)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn