cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
2,751 Views
Registered: ‎10-13-2017

petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

Hi,

 

     I am using petalinux 2016.04. I noticed that firmware version is not reflecting in /etc/version whereas same is happening in petalinux 2014.04.

 

INPUTS :

1 . On board =>

root@plnx_arm:/etc# cat version
20171019083148

 

2 . petalinux config =>

Firmware Version Configuration  --->

 (2.00) Firmware Version

 

How can I get the expected result in /etc/version.

 

Any help will be appreciated.

 

Regards,

Pritam

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
3,852 Views
Registered: ‎06-29-2017

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

you can do that in bb file itself

 

something like 

sysconf = "${TOPDIR}/../project-spec/configs"
FILESEXTRAPATHS_append := ":${sysconf}"

SRC_URI_append ="\
    file://config\
"

do_install () {

firmware=$(cat config | grep SUBSYSTEM_FW_VERSION |  cut -d '=' -f 2 | tr -d '"' )

< your code >

}

adding SRCURI also solves the dependency issue, means for every change in petalinux-config, it will rebuild

View solution in original post

10 Replies
Highlighted
Mentor
Mentor
2,740 Views
Registered: ‎06-16-2013

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

Hi @pritya

 

I'm not sure what did you do by petalinux.

But, if you don't modify rootfs file, it doen't change it at least.

 

[Note]

If you'd like to know kernel version, I recommend to use "lsb_releas" command or "uname" command, if you prepare on your linux kernel and rootfs.

 

Thank you.

Best regards,

0 Kudos
Highlighted
Observer
Observer
2,726 Views
Registered: ‎10-13-2017

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

Hi,

   I am beginner to petalinux.

  

   I have used following steps to create project and images.

1 . petalinux-create --type project --template zynq --name <PROJECT_NAME>

2 . petalinux-config --get-hw-description=<path-to-hardwaredescription-file-directory-exported-by-Vivado>

3 . petalinux-build

4 . petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga <FPGA bitstream> --u-boot

 

And board is booted by same images.

 

But in Petalinux_2014.04 "build/linux/rootfs/sys_init/Makefile +137" I can see clear command that version is being written.

Whereas in Petalinux_2016.04 I am not able to see such a Makefile.

 

So Where time-stamp is getting written to /etc/version from ?

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
2,687 Views
Registered: ‎06-29-2017

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

from 2016.4 onwards petalinux is using Yocto under neath, which changed many of things 

0 Kudos
Highlighted
Observer
Observer
2,683 Views
Registered: ‎10-13-2017

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

Thanks for your reply.

 

Is there not any other way that I will have fix version string rather than time stamp ... ?

How time stamp is getting written to /etc/version  ?

 

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
2,663 Views
Registered: ‎06-29-2017

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

This is the patch 

 

https://github.com/Xilinx/meta-petalinux/commit/5586c987c88f40f1454e6bd06250f17175faa6ed

 

add the bbappend in meta-user 

0 Kudos
Highlighted
Observer
Observer
2,654 Views
Registered: ‎10-13-2017

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

Thanks for this valuable reply.

 

And I would like to use "SUBSYSTEM_FW_VERSION"  in version.

 

ATTEMPT :

So that I have created a app and inside Makefile of app, I have included "project-spec/configs/config". 

I am directing CONFIG_SUBSYSTEM_FW_VERSION to file fw_version. Finally I am installing this fw_version file in RFS.

App files I have attached below.

 

The ATTEMPT that I used is not proper.

 

So in above patch, recipes-core/base-file/bbappend file,

how can i import/include "project-spec/configs/config" file to bbappend ?

So that in RFS, I can use some of the symbols like "SUBSYSTEM_FW_VERSION".

 

Any help will be appreciated .

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
3,853 Views
Registered: ‎06-29-2017

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

you can do that in bb file itself

 

something like 

sysconf = "${TOPDIR}/../project-spec/configs"
FILESEXTRAPATHS_append := ":${sysconf}"

SRC_URI_append ="\
    file://config\
"

do_install () {

firmware=$(cat config | grep SUBSYSTEM_FW_VERSION |  cut -d '=' -f 2 | tr -d '"' )

< your code >

}

adding SRCURI also solves the dependency issue, means for every change in petalinux-config, it will rebuild

View solution in original post

Highlighted
Observer
Observer
2,588 Views
Registered: ‎10-13-2017

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

Appreciated and thanks for this solution.

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
2,581 Views
Registered: ‎06-29-2017

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

give kudos to the solution :) 

0 Kudos
Highlighted
240 Views
Registered: ‎12-12-2019

Re: petalinux 2016.04 firmware version is not reflecting in /etc/version

Jump to solution

You have to look at /etc/petalinux/version; not /etc/version

0 Kudos