cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,975 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
Highlighted
Observer
Observer
1,339 Views
Registered: ‎09-14-2017

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
Highlighted
Observer
Observer
1,333 Views
Registered: ‎09-14-2017

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