Implement custom u-boot command

前端 未结 2 1131
你的背包
你的背包 2021-01-27 12:00

I want to add custom command command to u-boot be it a simple hello world command.

After searching I found this link Yocto u-boot Custom Commands where it s

2条回答
  •  生来不讨喜
    2021-01-27 12:45

    doc/README.commands describes how commands should be implemented.

    Your new C file should be in directory cmd/. In cmd/Makefile you will have to add your object file, e.g.

    obj-$(CONFIG_CMD_TIMER) += timer.o
    

    In cmd/Kconfig add a new configuration option for your command. The Kconfig syntax is described in https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt.

    Run

    make menuconfig
    

    to enable your configuration option.

提交回复
热议问题