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 peter.kuchnio
Observer
1,722 Views
Registered: ‎11-16-2015

Petalinux 2016.4 - Compile / clean behaviour

Petalinux behaves strangely in terms of keeping track of when source files change.

 

Let's say I have an app ... the only way I've found to consistently get the package to update with my changes is to:

 

petalinux-build -c <myapp> -x do_clean

petalinux-build -x mrproper

petalinux-build

 

Is there an easier/better way for it to pick up your source changes? I'd love to just be able to build my apps / modules individually and get them into the final image.ub file ...

 

Any tips?

0 Kudos
2 Replies
Observer derekparks
Observer
1,086 Views
Registered: ‎09-14-2017

Re: Petalinux 2016.4 - Compile / clean behaviour

I have similar inconsistency with respect to petalinux-build and found some success with removing the bitbake timestamp for tasks.  I also speed up my development by copying the application to my host filesystem in the do_install so i can copy it directly to the board rather than waiting for a new image to build then having to reinstall and reboot. 

 

Example from /[project root dir]/project-spec/meta-user/recipes-apps/myapp/myapp.bb

 

#
# This file is the myapp recipe.
#

SUMMARY = "Simple myapp application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://myapp.cpp \
  file://myapp.h \
  file://Makefile \
"

S = "${WORKDIR}"

 

do_compile[nostamp] = "1"
do_build[nostamp] = "1"
do_install[nostamp] = "1"

 

do_compile() {
  oe_runmake
}

 

do_install() {
  cp -f myapp /home/builduser/
  install -d ${D}${bindir}
  install -m 0755 myapp ${D}${bindir}
}

 

0 Kudos
Observer derekparks
Observer
1,080 Views
Registered: ‎09-14-2017

Re: Petalinux 2016.4 - Compile / clean behaviour

addendum....

 

With the nostamp lines in the bitbake recipe, i can use 'petalinux-build -c myapp' to recompile without cleaning or running petalinux-build.

0 Kudos