In 2021.x and later release version of Yocto or PetaLinux builds, U-boot and the kernel do not show the current build timestamp.
Host Build logs:
xilinx-vck190-es1-2021.1 $ ls -la images/linux/ | grep -i Image
-rw-r--r-- 1 sandeepg boulder 21M Jun 4 09:06 Image
-rw-r--r-- 1 sandeepg boulder 14M Jun 4 09:06 image.ub
xilinx-vck190-es1-2021.1 $
Target logs:
root@xilinx-vck190-es1-2021_1:~# uname -a
Linux xilinx-vck190-es1-2021_1 5.10.0-xilinx-v2020.2 #1 SMP Fri May 28 08:10:27 UTC 2021 aarch64 GNU/Linux
root@xilinx-vck190-es1-2021_1:~#
This is the default behavior in Yocto 3.2 (Gatesgarth release) and later releases.
The timestamp is based on the last git commit so if any modification is made to linux-xlnx or other recipes the timestamp will be updated.
For more details see https://wiki.yoctoproject.org/wiki/Reproducible_Builds
To work around this issue, disable reproducible binaries by adding the below variables in petalinuxbsp.conf or local.conf
PetaLinux:
The work-around should be applied to <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf configuration files.
1) Modify petalinuxbsp.conf with the below content using a text editor:
$ vim <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf
# For linux-xlnx
BUILD_REPRODUCIBLE_BINARIES_pn-linux-xlnx = "0"
# For u-boot-xlnx
BUILD_REPRODUCIBLE_BINARIES_pn-u-boot-xlnx = "0"
2) Clean the linux-xlnx/u-boot-xlnx sstate cache and rebuild the linux-xlnx/u-boot-xlnx recipes:
$ petalinux-build -c linux-xlnx -x cleansstate; petalinux-build -c u-boot-xlnx -x cleansstate
$ petalinux-build -c linux-xlnx; petalinux-build -c u-boot-xlnx
Yocto:
The work-around should be applied to the <yocto-proj-root>/build/conf/local.conf configuration files.
1) Modify the local.conf file with the below content using a text editor:
$ vim <yocto-proj-root>/build/conf/local.conf
# For linux-xlnx
BUILD_REPRODUCIBLE_BINARIES_pn-linux-xlnx = "0"
# For u-boot-xlnx
BUILD_REPRODUCIBLE_BINARIES_pn-u-boot-xlnx = "0"
2) Clean the linux-xlnx/u-boot-xlnx sstate cache and rebuild the linux-xlnx/u-boot-xlnx recipes:
$ bitbake linux-xlnx -c cleansstate; bitbake u-boot-xlnx -c cleansstate;
$ bitbake linux-xlnx; bitbake u-boot-xlnx
Answer Number | 问答标题 | 问题版本 | 已解决问题的版本 |
---|---|---|---|
76526 | PetaLinux 2021.1 - Product Update Release Notes and Known Issues | N/A | N/A |
AR# 76559 | |
---|---|
日期 | 06/21/2021 |
状态 | Active |
Type | 综合文章 |
Tools | |
Boards & Kits |