1. 程式人生 > >u-boot 中增加自定義命令hjlcmd2------(新增檔案來定義)

u-boot 中增加自定義命令hjlcmd2------(新增檔案來定義)

1,在 "[email protected]:/home/hjl/Downloads/uboot/common#" 目錄中新增檔案 cmd_hjl.c ,加上標頭檔案

    #include <common.h>

         #include <command.h>


2,對應的命令名就是hjl    函式名就是do_hjl

3,在"[email protected]:/home/hjl/Downloads/uboot/common# vi Makefile" 新增

    COBJS-y += cmd_hjl.o

4,"[email protected]:/home/hjl/Downloads/uboot# make distclean"

5, make distclean  → make x210_sd_config → make 最後得到 u-boot.bin

燒錄

[email protected]:/home/hjl/Downloads/uboot/sd_fusing# ./sd_fusing.sh /dev/sdb