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!

AR# 65538

2015.2 - Petalinux - How to use other tcf-agent versions in Petalinux

Description

In some use cases, there might be bugs in the tcf-agent version shipped with Petalinux that users will need to address by using the latest version of the tcf-agent.

This Answer Record discusses the steps needed to build and package the tcf-agent to be used in Petalinux.

Solution

Build the tcf-agent:

git clone http://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git
cd org.eclipse.tcf.agent/agent
make CC=arm-xilinx-linux-gnueabi-gcc LD=arm-xilinx-linux-gnueabi-ld MACHINE=arm NO_SSL=1 NO_UUID=1

Next, pick the option below which best suits your environment to add the tcf-agent:

Option1: Update package in Petalinux:

Get the tcf-agent package from the petalinux/2015.2.1/components/packages-repo/plnx-repo/pool/main/t/tcf-agent and extract the deb archive:

ar x tcf*

Extract data.tar.gz:

tar xzf data.tar.gz

Next, update the tcf-agent and tcf-client with those built in step1 (from obj/GNU/Linux/arm/Debug to usr/sbin/tcf-agent and tcf-client) and re-create the data archive:

tar czf data.tar.gz ./*

Next, Re-archive the deb package:

ar r tcf-agent_1.3.0+xilinx+git0+442ab51876-r1_cortexa9-vfp-neon.deb debian-binary control.tar.gz data.tar.gz

Note: Make sure to clear the rootfs build folder.

For example:

petalinux-config -c rootfs

Filesystem Packages -> base -> tcf-agent -> [* ] tcf-agent

petalinux-build -c rootfs -x distclean
petalinux-build


Note: The Caveat of this flow is that the user needs write access to the install which might not be applicable to all use-cases.

If this is the case, then use Option 2 below.


Option 2: Create a Custom tcf-agent:

Get the tcf-agent package from the petalinux/2015.2.1/components/packages-repo/plnx-repo/pool/main/t/tcf-agent and extract the deb archive:

ar x tcf*

Extract data.tar.gz:

tar xzf data.tar.gz

Next, create the application:

petalinux-create -t apps --template install --name my_tcf_agent --enable

Copy the content of the extracted data folder to the newly create application data folder.

Next, add the lines below to the install section of the Makefile:

$(TARGETINST) -d data/ /
$(TARGETINST) -s /ect/init.d/tcf-agent /etc/rc5.d/S99tcf-agent

Note: As per the Makefile syntax, there should be no white space to the left of the content, use a <tab> instead:

This will add a symbolic link to the tcf-agent in the init.d folder.

Also, it will add to the startup script in the rc5.d folder so the tcf-agent will be booted automatically.

Note: Make sure to clear the rootfs build folder.

For example:

petalinux-config -c rootfs 

Filesystem Packages -> base -> tcf-agent -> [ ] tcf-agent

petalinux-build -c rootfs -x distclean
petalinux-build
AR# 65538
Date Created 10/01/2015
Last Updated 11/20/2015
Status Active
Type General Article
Tools
  • PetaLinux - 2015.2