PetaLinux build artifacts

These tips apply to PetaLinux 2020.2.

To save disk space, the PetaLinux tools deletes all build artifacts at the end of the build process. If you want to keep them for debugging or to help you develop a patch, you can add the following line to the project-spec/meta-user/conf/petalinuxbsp.conf file:

RM_WORK_EXCLUDE += “recipe”

Where recipe must be substituted with a valid recipe name such as the following:

Sources Recipe name
Kernel linux-xlnx
FSBL fsbl
U-Boot u-boot-xlnx
PMU firmware pmu-firmware
Device tree device-tree

If you want to preserve the build artifacts of more than one component, you can append the recipe names, separated by spaces, for example, to preserve the kernel sources and the FSBL:

RM_WORK_EXCLUDE += “linux-xlnx fsbl”

Alternatively you can add a line for each:

RM_WORK_EXCLUDE += “linux-xlnx”
RM_WORK_EXCLUDE += “fsbl”

You can also preserve the sources of custom applications, kernel modules, packages, etc, just by using their names. For example, to preserve the sources for a custom application called “myapp”, as well as Busybox and Glibc, add this line:

RM_WORK_EXCLUDE += “myapp busybox glibc”

How to keep ALL build artifacts
The setting that makes PetaLinux tools delete build artifacts in the first place is contained in the build/conf/local.conf file.

INHERIT += “rm_work”
If you want to keep all build artifacts, just add the following line to the project-spec/meta-user/conf/petalinuxbsp.conf file:

INHERIT_remove = “rm_work”

Where to find the build artifacts

In general, you will find the build artifacts in build/tmp/work/.
Digging deeper, you’ll find the various components in these directories:

Sources Build artifacts location
Kernel build/tmp/work/-xilinx-linux/linux-xlnx
FSBL build/tmp/work/-xilinx-linux/fsbl
U-Boot build/tmp/work/-xilinx-linux/u-boot-xlnx
PMU firmware build/tmp/work/-xilinx-linux/pmu-firmware
Device tree build/tmp/work/-xilinx-linux/device-tree
Apps/pkg/mod build/tmp/work/aarch64-xilinx-linux

In the above paths, you must replace with the Yocto machine name given to your PetaLinux project. The Yocto machine name is the value of CONFIG_YOCTO_MACHINE_NAME in the project-spec/configs/config file.

How to delete the build artifacts
Finally, you can clean the project and delete the build artifacts by running this command: petalinux-build -x mrproper

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值