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: 
Explorer
Explorer
2,688 Views
Registered: ‎05-23-2017

How to add application binary to petalinux? is it should be a .elf file?

Hi,

 I am following the UG1144 page50 to include prebuilt applications to petalinux.

 

1.Create an application with the following command.
    $ petalinux-create -t apps --template install --name myapp --enable

2Change to the newly created application directory.
   $ cd <plnx-proj-root>/project-spec/meta-user/recipes-apps/myapp/files/
3. Remove existing myapp app and copy the prebuilt myapp.
   $ rm myapp
   $ cp <path-to-prebuilt-app> .

 

In my case the prebuilt myapp is a .elf file from the SDK (using a standalone application project) .

After I copy the .elf to the location mentioned on the 3rd steps and execute "petalinux-build" commond, a error show up:

ERROR: Nothing RPROVIDES 'helloworldSanJose' (but /home/petalinux_project/armcore_project0606/for_test_lib/project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb RDEPENDS on or otherwise requires it)

Then I checked the helloworldSnajose.bb  file.

#
# This file is the helloworldSnajose recipe.
#

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

SRC_URI = "file://helloworldSnajose \
	"

S = "${WORKDIR}"

do_install() {
	     install -d ${D}/${bindir}
	     install -m 0755 ${S}/helloworldSnajose ${D}/${bindir}
}

 I didn't find some hint from that.

 

But when I build a template $ petalinux-create -t apps --template install --name myapp --enable, notice the binary file has no .elf.

 

Now I am confuse with which kind of binary file should I put in the petalinux?

0 Kudos
3 Replies
Observer sconvertini
Observer
352 Views
Registered: ‎09-06-2018

Re: How to add application binary to petalinux? is it should be a .elf file?

Hi mathmaxsean

first of all, I think that you shoul compile the application for the linux enviroment.

Standalon and linux are two different worlds.

Hope that this shoul be helpful for you.

Bye

0 Kudos
Observer senkoo
Observer
337 Views
Registered: ‎08-28-2018

Re: How to add application binary to petalinux? is it should be a .elf file?

Hello @mathmaxsean,

 

What I can see is the following:

install -m 0755 ${S}/helloworldSnajose ${D}/${bindir}

 

Look at how you did Snaj? And the error says: 

Nothing RPROVIDES 'helloworldSanJose'

 

Maybe because you install helloworldSnaJose and SanJose.

 

**Also make sure the .elf file is compiled with the same compiler as your kernel uses.

0 Kudos
Adventurer
Adventurer
200 Views
Registered: ‎09-08-2016

回复: How to add application binary to petalinux? is it should be a .elf file?

Please try as the picture shown

Image 1.png

 

 

0 Kudos