How to enable tc command when building a kernel using Yocto recipes

三世轮回 提交于 2021-02-10 14:56:19

问题


I want to enable tc command that comes in iproute2 on my linux kernel. My kernel is built using yocto and bitbake.

So, I copied the iproute recipes and whole directory from the following link to try -- https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-connectivity/iproute2

And included in my yocto build. That picked up recipe and built it all well. But I tc command is still not available on the built kernel.

Question:
What am I missing and how to enable tc in the kernel of a linux image built using Yocto recipes?


回答1:


You shouldn't need to copy the whole recipe, poky should be in your sources directory. So just reference the recipe in your image. You need both iproute2 and iproute2-tc.

IMAGE_INSTALL += "iproute2 \
        iproute2-tc"

Additionally you may need to enable some kernel modules that tc make use of, depending on your needs:

CONFIG_NET_SCHED
CONFIG_NET_SCH_CBQ
CONFIG_NET_SCH_HTB
CONFIG_NET_SCH_HFSC
CONFIG_NET_SCH_ATM
CONFIG_NET_SCH_PRIO
CONFIG_NET_SCH_MULTIQ
CONFIG_NET_SCH_RED
CONFIG_NET_SCH_SFQ
CONFIG_NET_SCH_TEQL
CONFIG_NET_SCH_TBF
CONFIG_NET_SCH_GRED
CONFIG_NET_SCH_DSMARK
CONFIG_NET_SCH_NETEM
CONFIG_NET_SCH_INGRESS


来源:https://stackoverflow.com/questions/52669185/how-to-enable-tc-command-when-building-a-kernel-using-yocto-recipes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!