Edit online

添加板子

一款产品对应一个板子,开发新产品时,需要在 SDK 中创建新的板子以及对应的配置。 全新配置一个板子比较繁琐,Luban SDK 提供快速创建新板子配置的方法。

用户提供一个原厂公板的配置文件,add_board 程序以该配置为模板,创建新板子对应的目录和配置。

  1. 在 SDK 顶层目录执行命令

    make add_board
    
  2. 根据提示,提供必要的信息

    例如:

    Chip list:
            1: aic1602
    Select chip for new board(number): 1
            aic1602
    
    Reference defconfig:(Create new board base on selected defconfig)
            1: aic1602_fpga_mmc_defconfig
            2: aic1602_fpga_spinand_defconfig
            3: aic1602_fpga_spinor_defconfig
            4: aic1602_initramfs_defconfig
            5: aic1602_qemu_defconfig
    Select reference defconfig for new board(number): 1
            aic1602_fpga_mmc_defconfig
    
    Input new board's name: MyTest Board
            MyTest Board
    
    Input manufacturer's name: My Company
            My Company
    
  3. 此处的例子,在创建完相关的目录和配置之后,add_board 程序会列出新建的目录和相关配置文件。后续可以针对新的配置进行客制化修改。

    Created: target/aic1602/MyTest_Board
    Created: source/uboot-2021.10/configs/aic1602_MyTest_Board_defconfig
    Created: source/linux-5.10/arch/riscv/configs/aic1602_MyTest_Board_defconfig
    Created: package/third-party/busybox/configs/aic1602_MyTest_Board_defconfig
    Created: target/configs/aic1602_MyTest_Board_defconfig
    Updated: target/aic1602/Config.in