Edit online

配置 BootLoader

3 Mar 2025
Read time: 3 minute(s)

本节介绍不同存储介质类型的 BootLoader 配置步骤。

配置 SPI NOR BootLoader

  1. 在 SDK 根目录下执行下列命令之一,进入 BootLoader 的配置界面:
    • bm 命令

    • scons –apply-def=dxxx_xxx-nor_baremetal_bootloaderscons –menuconfig

  2. 打开 SPI NOR 设备:
    Board options  --->
        [*] SPI0 Devices: SPINOR  ----
  3. 打开 SPI NOR 驱动选项:
    Drivers options  --->
        Peripheral  --->
            [*] SPINOR Driver SFUD: Serial Flash Universal Driver  ----
        Drivers examples  --->
                    [*] Enable MTD driver test command
    注: BootLoader 和 SPL 分区一般都比较小,如开启过多的 SPI NAND 型号,会导致存储容易越界,建议仅打开需要用到的型号。
  4. 打开 BootLoader 相关参数:
    Bootloader options  --->
        Commands  --->
            [*] spinor
            [*] nor boot
        [*] Upgrading  --->
            [*]   Write to NOR support
        Drivers  --->
            [*] SPI NOR boot support

配置 SPI NAND BootLoader

  1. 在 SDK 根目录下执行下列命令之一,进入 BootLoader 的配置界面:
    • bm 命令

    • scons –apply-def=dxxx_xxx-nor_baremetal_bootloaderscons –menuconfig

  2. 打开 SPI NAND 设备:
    Board options  --->
        [*] SPI0 Devices: SPINAND  --->
  3. 打开 SPI NAND 驱动选项:
    Drivers options  --->
        Peripheral  --->
            [*]   Support Winbond SPI NAND (NEW)        //根据 SPINAND 厂商使能配置,如华邦等
            [*] Aic NFTL support
            [*]   Aic NFTL use lib
    注: BootLoader 和 SPL 分区一般都比较小,如开启过多的 SPI NAND 型号,会导致存储容易越界,建议仅打开需要用到的型号。
  4. 打开 BootLoader 相关参数:
    Bootloader options  --->
        Drivers  --->
            [*] SPI NAND boot support
        [*] Upgrading  --->
            [*]   Write to NAND support
        Commands  --->
            [*] nand boot
            [*] spinand
SPINAND Driver library 中会列示不同品牌的存储芯片,如 Dosilicon 和 Macronix,确保选中相应的驱动支持:
-*- SPINAND Driver library
[*]   Support Dosilicon SPI NAND
[*]   Support Etron SPI NAND
[*]   Support Micron SPI NAND
[*]   Support Macronix SPI NAND
[*]   Support Winbond SPI NAND
[*]   Support GigaDevice SPI NAND
[*]   Support Toshiba SPI NAND
[*]   Support Foresee SPI NAND
[*]   Support Xtx SPI NAND
[*]   Support Zetta SPI NAND
[ ]   Support Zbit SPI NAND
[ ]   Support ESMT SPI NAND
[ ]   Support UMTEK SPI NAND
[ ]   Support QUANXING SPI NAND

配置 eMMC BootLoader

  1. 在 SDK 根目录下执行下列命令之一,进入 BootLoader 的配置界面:
    • bm 命令

    • scons –apply-def=dxxx_xxx-nor_baremetal_bootloaderscons –menuconfig

  2. 打开 eMMC 设备:
    Board options  --->
        [*] Using SDMC0
  3. 打开 BootLoader 相关参数:
    Bootloader options  --->
        Commands  --->
            [*] mmc boot
  4. 关闭 DE 进度条:
    Board options  --->
        [ ] Using Wireless LAN  ----
        [ ] Using Display Engine (DE)   //EMMC 需要关闭进度条