cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sitting
Voyager
Voyager
509 Views
Registered: ‎05-04-2014

[Petalinux 2021.1] Wrong Petalinux Firmware Version

Jump to solution

Hi, 

I refer to the ug1144(Steps for Firmware Version Configuration) and set petalinux firmware version. The version is wrong when I cat /etc/petalinux/version as below:

Selection_009.png

I also test in 2020.1, the version is correct

picturemessage_e05gexk3.hyv.png

Please help me to solve the version problem in 2021.1

Thanks

Sitting

1 Solution

Accepted Solutions
sandeepg
Moderator
Moderator
329 Views
Registered: ‎04-24-2017

Hi @sitting ,

This is a known issue in 2021.1 release of the PetaLinux tools. I've created an AR #76764 which should be public in 1 or 2 days.

To fix this issue, you will need to follow below steps.

1) Add the below variables to the petalinuxbsp.conf file using a any text editor:

$ vim <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf

PETALINUX_PRODUCT_pn-base-files-plnx = "zynqmp-test"
PETALINUX_VERSION_pn-base-files-plnx = "2021.1.15"

2) Clean the base-files-plnx sstate cache and rebuild the base-files-plnx recipes:

$ petalinux-build -c base-files-plnx -x cleansstate
$ petalinux-build -x cleansstate
$ petalinux-build

 

@patocarr ,

To answer to your questions. These PRODUCT name FW version are specific to PetaLinux tools only.

The /etc/version is the epoch timestamp which is coming from https://github.com/Xilinx/poky/blob/rel-v2021.1/meta/classes/reproducible_build_simple.bbclass#L9 when you convert epoch value 1520598896 to human readable or unix time stamp the it is Friday, March 9, 2018 12:34:56 PM (20180309123456) Hence you see this value 20180309123456  when you read /etc/version.

 

This is due to BUILD_REPRODUCIBLE_BINARIES feature in Yocto.

In 2021.1 release notes we have a similar AR https://www.xilinx.com/support/answers/76559.html for Linux and U-boot timestamp. If you want to update the timestamp of /etc/version then follow the below instructions. This will rebuild all the packages and increase the build time. https://github.com/Xilinx/poky/blob/rel-v2021.1/meta/classes/image.bbclass#L655-L667 

1) Add the below variables to the petalinuxbsp.conf file using a any text editor:

$ vim <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf

BUILD_REPRODUCIBLE_BINARIES = "1"

 

2) Rebuild all the recipes:

$ petalinux-build -x mrproper
$ petalinux-build

 

The reason you see 2021.1 when you read /etc/petalinux/version it is reading the Xilinx Yocto release DISTRO version.

Let me know if you have more questions.

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

3 Replies
patocarr
Teacher
Teacher
448 Views
Registered: ‎01-28-2008

Hi @sitting 

  I'm confirming this difference between 2021.1 and all previous versions. The value used to match the CONFIG_SUBSYSTEM_FW_VERSION in the project-spec/configs/config file. Now it just matches the Petalinux version, disregarding this configuration value.

Thanks,

-Pat

 

Give kudos if helpful. Accept as solution if it solves your problem.
https://tuxengineering.com/blog

patocarr
Teacher
Teacher
427 Views
Registered: ‎01-28-2008

All,

  To add more information on this topic, the Kconfig.part script used in petalinux-config describes the SUBSYSTEM_FW_VERSION as "This is an arbitrary string value that is inserted into /etc/version during the build."- This is also described for SUBSYSTEM_PRODUCT, to be in /etc/product. Both these descriptions need correcting as the resulting values now would end up under /etc/petalinux/...

  There is an /etc/version file present in the rootfs; however, it reads "20180309123456" which does not make much sense.

  Moreover, under /etc/petalinux/ there are four files bsp, product, soc and version:

root@DAQ16-2021:~# cat /etc/petalinux/*
zynqmp-generic
zynqmp-generic
zynqmp-dr
2021.1
root@DAQ16-2021:~# ls -l !$
ls -l /etc/petalinux/*
-rw-r--r--    1 root     root            15 Mar  9  2018 /etc/petalinux/bsp
-rw-r--r--    1 root     root            15 Mar  9  2018 /etc/petalinux/product
-rw-r--r--    1 root     root            10 Mar  9  2018 /etc/petalinux/soc
-rw-r--r--    1 root     root             7 Mar  9  2018 /etc/petalinux/version
root@DAQ16-2021:~# cat /etc/hostname
DAQ16-2021.1-cfg1-scratch

  But the project-spec/configs/config file describes these CONFIG values:

#
# Firmware Version Configuration
#
CONFIG_SUBSYSTEM_HOSTNAME="DAQ16-2021.1-cfg1-scratch"
CONFIG_SUBSYSTEM_PRODUCT="DAQ16-2021.1-cfg1-scratch"
CONFIG_SUBSYSTEM_FW_VERSION="1.00"

#
# Yocto Settings
#
CONFIG_YOCTO_MACHINE_NAME="zynqmp-generic"

  Notice that bsp and product take their values from YOCTO_MACHINE_NAME, and not from their respective CONFIG variables. Perhaps this was intended, but such functionality differs from previous versions.

  So my question would be where do Petalinux put the SUBSYSTEM_PRODUCT and SUBSYSTEM_FW_VERSION values in the rootfs in 2021.1?

Any Xilinx response or acknowledgement will be appreciated.

Thanks in advance,

-Pat

 

Give kudos if helpful. Accept as solution if it solves your problem.
https://tuxengineering.com/blog

sandeepg
Moderator
Moderator
330 Views
Registered: ‎04-24-2017

Hi @sitting ,

This is a known issue in 2021.1 release of the PetaLinux tools. I've created an AR #76764 which should be public in 1 or 2 days.

To fix this issue, you will need to follow below steps.

1) Add the below variables to the petalinuxbsp.conf file using a any text editor:

$ vim <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf

PETALINUX_PRODUCT_pn-base-files-plnx = "zynqmp-test"
PETALINUX_VERSION_pn-base-files-plnx = "2021.1.15"

2) Clean the base-files-plnx sstate cache and rebuild the base-files-plnx recipes:

$ petalinux-build -c base-files-plnx -x cleansstate
$ petalinux-build -x cleansstate
$ petalinux-build

 

@patocarr ,

To answer to your questions. These PRODUCT name FW version are specific to PetaLinux tools only.

The /etc/version is the epoch timestamp which is coming from https://github.com/Xilinx/poky/blob/rel-v2021.1/meta/classes/reproducible_build_simple.bbclass#L9 when you convert epoch value 1520598896 to human readable or unix time stamp the it is Friday, March 9, 2018 12:34:56 PM (20180309123456) Hence you see this value 20180309123456  when you read /etc/version.

 

This is due to BUILD_REPRODUCIBLE_BINARIES feature in Yocto.

In 2021.1 release notes we have a similar AR https://www.xilinx.com/support/answers/76559.html for Linux and U-boot timestamp. If you want to update the timestamp of /etc/version then follow the below instructions. This will rebuild all the packages and increase the build time. https://github.com/Xilinx/poky/blob/rel-v2021.1/meta/classes/image.bbclass#L655-L667 

1) Add the below variables to the petalinuxbsp.conf file using a any text editor:

$ vim <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf

BUILD_REPRODUCIBLE_BINARIES = "1"

 

2) Rebuild all the recipes:

$ petalinux-build -x mrproper
$ petalinux-build

 

The reason you see 2021.1 when you read /etc/petalinux/version it is reading the Xilinx Yocto release DISTRO version.

Let me know if you have more questions.

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post