UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer pritya
Observer
2,261 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
Xilinx Employee
Xilinx Employee
3,362 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

9 Replies
Scholar watari
Scholar
2,250 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
Observer pritya
Observer
2,236 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
Xilinx Employee
Xilinx Employee
2,197 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
Observer pritya
Observer
2,193 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
Xilinx Employee
Xilinx Employee
2,173 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
Observer pritya
Observer
2,164 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
Xilinx Employee
Xilinx Employee
3,363 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

Observer pritya
Observer
2,098 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
Xilinx Employee
Xilinx Employee
2,091 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