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
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.