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# 68440

2016.4 PetaLinux: Migrating Applications from 2016.3 PetaLinux project to 2016.4 PetaLinux Yocto based project

Description

How do I migrate 2016.3 PetaLinux project applications to a 2016.4 PetaLinux project?

Solution

  1. In the 2016.4 PetaLinux project create a template app using the "petalinux-create -t apps -n myapp" command.

  2. Remove the existing source code and Makefiles in the <2016.4-petalinux-project>/project-spec/meta-user/recipe-apps/myapp/myapp directory and copy your app source code and Makefiles.

  3. Edit the <2016.4-petalinux-project>/project-spec/meta-user/recipe-apps/myapp/myapp.bb file to replace the do_compile() and do_install() functions with the following:

           do_compile() {
               oe_runmake build
           }
           do_install() {
               oe_runmake install 'DESTDIR=${D}'
           }

  1. Edit the Makefile as shown below


a) Update the following:

APP = <yourappname>
APP_OBJS = <yoursorcename.o>

 

b) Remove the following lines:

ifndef PETALINUX
$(error "Error: PETALINUX environment variable not set.  Change to the root of your PetaLinux install, and source the settings.sh file")
endif
include apps.common.mk

 

c) Replace the following line:

install: $(APP)
                $(TARGETINST) -d $(APP) /bin/$(APP)

Replace it with:

install:$(APP)
      install -d $(DESTDIR)/bin
      install  ${APP}  $(DESTDIR)/bin


AR# 68440
Date 05/18/2018
Status Active
Type General Article
Devices
Tools
Boards & Kits
Page Bookmarked