[1] http://www.openembedded.org/wiki/DevshellWhat is the correct way of adding custom commands to u-boot in a Yocto setup (currently using Petalinux 2016.4 by Xilinx)?Should I add the relevant source files to the u-boot source through a recipe/patch, to be included in the compilation of u-boot?Is there a better way to do this during development to get a faster turn around.In what folder should the code be placed - under u-boot/board or added to u-boot/commands?Thanks 解决方案 IMHO you have two options for adding the additional sourcecode to your YP build:If you have only a small number of changes: Add the patches to your layer and "activate" them via SRC_URI.If you have more changes: create a separate git branch/repo for "your" U-Boot version.The fastest way of testing your changes may be to checkout a separate U-Boot repo somewhere and use a generated SDK. Another way may be to use the devshell [1]I'm not an expert on U-Boot's source layout, but I would say it depends which type of command it is. If it's a "generic" one like date the cmd/ subdirectory would be best.If you're looking for an example on which you can base your work maybe the timer command in cmd/misc.c would be a good start.[1] http://www.openembedded.org/wiki/Devshell 这篇关于Yocto u-boot 自定义命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-22 14:15
查看更多