rk356x 关于yocto编译linux及bitbake实用方法

发布于:2024-05-02 ⋅ 阅读:(38) ⋅ 点赞:(0)

Yocto 完整编译

  source oe-init-build-env
  bitbake core-image-minimal

Yocto 查询包名

bitbake -s | grep XXX
// 获取rockchip相关包
:~/rk3568/yocto$ bitbake -s | grep rockchip
android-tools-conf-rockchip                           :1.0-r0
gstreamer1.0-rockchip                                 :1.0-r0
linux-rockchip                                       :5.10-r0                  :4.19-r0
rockchip-alsa-config                                  :1.0-r0
rockchip-libmali                                      :1.0-r0
rockchip-librga                                       :1.0-r0
rockchip-mpp                                          :1.0-r0
rockchip-npu                                          :1.0-r0
rockchip-rkaiq                                        :1.0-r0
udev-conf-rockchip                                    :1.0-r0

Yocto 确定包的源码目录

// 从包名确认内核名为linux-rockchip    
:~/rk3568/yocto$ bitbake -e linux-rockchip  | grep ^S=
S="/homexx/yocto/rk3568/yocto/build/tmp/work-shared/roc-rk3568-pc/kernel-source"

Yocto 确定包的下载地址

:~/rk3568/yocto$ bitbake -e linux-rockchip | grep ^SRC_URI=
SRC_URI="       git://gitlab.com/firefly-linux/kernel.git;protocol=https;nobranch=1;branch=rk356x/firefly;    file:///home4/yocto/rk3568/yocto/build/../meta-rockchip/recipes-kernel/linux/files/cgroups.cfg  file:///home4/yocto/rk3568/yocto/build/../meta-rockchip/recipes-kernel/linux/files/ext4.cfg file:///home4/yocto/rk3568/yocto/build/../meta-rockchip/recipes-kernel/linux/linux-rockchip_4.19/0001-perf-bench-Share-some-global-variables-to-fix-build-.patch file:///home4/yocto/rk3568/yocto/build/../meta-rockchip/recipes-kernel/linux/linux-rockchip_4.19/0002-perf-parse-events-Use-asprintf-instead-of-strncpy-to.patch file:///home4/yocto/rk3568/yocto/build/../meta-rockchip/recipes-kernel/linux/linux-rockchip_4.19/0003-perf-tests-bp_account-Make-global-variable-static.patch file:///home4/yocto/rk3568/yocto/build/../meta-rockchip/recipes-kernel/linux/linux-rockchip_4.19/0004-libtraceevent-Fix-build-with-binutils-2.35.patch file:///home4/yocto/rk3568/yocto/build/../meta-rockchip/recipes-kernel/linux/linux-rockchip_4.19/0005-init-do_mounts.c-Retry-all-fs-after-failed-to-mount-.patch file:///home4/yocto/rk3568/yocto/build/../meta-rockchip/recipes-kernel/linux/linux-rockchip_4.19/0006-HACK-drm-rockchip-Force-enable-legacy-cursor-update.patch file:///home4/yocto/rk3568/yocto/build/../meta-rockchip/recipes-kernel/linux/linux-rockchip_4.19/0007-HACK-drm-rockchip-Prefer-non-cluster-overlay-planes.patch"

参考:

  • bitbake
    https://wiki.t-firefly.com/zh_CN/Firefly-Linux-Guide/manual_yocto.html
    https://blog.csdn.net/weixin_39542936/article/details/116712595

  • yocto
    https://zhuanlan.zhihu.com/p/685808207
    https://zhuanlan.zhihu.com/p/685360730