Problem building own application in yocto

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem building own application in yocto

1,608 Views
jko
Contributor I

I'm trying to compile our own application using Yocto for a phyFlex board but am not able to get it running. 

Following the Makefile

CFLAGS=${KERNEL_SRC}
CFLAGS=-lrt -lpthread
#CFLAGS += -I../../platform-Spectro2/build-target/linux-2.6.24/include/

#CFLAGS += -D_GNU_SOURCE
CFLAGS += -g

all: automat

automat: automat.c
automat +: vm/vm.c vm/vm.h vm/componentdefs.c vm/componentdefs.h vm/blobtags.h vm/spectrometer.c vm/spectrometer.h speconfig/speconfiglib.c speconfig/speconfiglib.h
automat +: vm/chemometry.c vm/chemometry.h vm/chemoengine.h vm/textfile.c vm/textfile.h vm/tcpsocket.c vm/tcpsocket.h vm/datastore.c vm/datastore.h vm/dynamicdefs.c vm/dynamicdefs.h
automat +: vm/configuration.c vm/configuration.h vm/realtimeclock.c vm/realtimeclock.h vm/visualization.c vm/visualization.h
automat +: CANopen/CANopen.c CANopen/CANopen.h CANopen/mcp2515.c CANopen/mcp2515.h CANopen/lock.c CANopen/lock.h CANopen/Event.c CANopen/Event.h CANopen/CanBasic.c CANopen/CanBasic.h
automat +: CANopen/ComObj.c CANopen/ComObj.h CANopen/nmt.c CANopen/nmt.h CANopen/ObjDict.c CANopen/ObjDict.h

clean:
rm automat

and this is how my .bb looks like (the last version i've tried)

DESCRIPTION = "autod"
SECTION = "automat"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"

SRC_URI = "file://Makefile"

S = "${WORKDIR}"

EXTRA_OEMAKE = "'CFLAGS=${CFLAGS} -lrt -lpthread -I${KERNEL_SRC} -g'"

do_install() {
oe_runmake all:
install -d ${D}${bindir}
install -m 0755 automat ${D}${bindir}

and finally the error

ERROR: Function failed: do_configure (log file is located at /opt/PHYTEC_BSPs/phyFLEX-i.MX6/build/tmp-glibc/work/cortexa9hf-vfp-neon-phytec-linux-gnueabi/automat/0.1-r0/temp/log.do_configure.12497)
ERROR: Logfile of failure stored in: /opt/PHYTEC_BSPs/phyFLEX-i.MX6/build/tmp-glibc/work/cortexa9hf-vfp-neon-phytec-linux-gnueabi/automat/0.1-r0/temp/log.do_configure.12497
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function do_configure
| NOTE: make CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -lrt -lpthread -I${KERNEL_SRC} -g clean
| rm automat
| rm: cannot remove `automat': No such file or directory
| make: *** [clean] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /opt/PHYTEC_BSPs/phyFLEX-i.MX6/build/tmp-glibc/work/cortexa9hf-vfp-neon-phytec-linux-gnueabi/automat/0.1-r0/temp/log.do_configure.12497)
ERROR: Task 3 (/opt/PHYTEC_BSPs/phyFLEX-i.MX6/sources/poky/meta-ired/recipes/automat/automat_0.1.bb, do_configure) failed with exit code '1'

I'm really new into yocto and kernelbuilding in general. Any hints are very appreciated!

Tags (1)
0 Kudos
2 Replies

955 Views
jko
Contributor I

Hi Igor,

i had no problems with including a simple "Hello World" example, but I don't get i how to compile our application using a bitbake recipe based on our makefile. I've been using ptxdist and rules in the first place but the current versions of the phytec BSPs are based on Yocto.

Best regards

0 Kudos

955 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jakub

one can look at hellow world building steps :

http://phytec.com/wiki/index.php?title=PhyFLEX-i.MX6_Linux_Quickstart-PD13.1.0
http://www.variwiki.com/index.php?title=VAR-SOM-MX6_Hello_World
https://community.nxp.com/docs/DOC-95003

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos