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: 
Visitor rolf_kary
Visitor
8,004 Views
Registered: ‎09-24-2014

How can I create an own toolchain for petalinux?

Hello,

 

Petalinux contains 4 toolchains (2 for arm and 2 for microblaze)

I want to create a toolchain for arm that uses hard float instead of floating point emulation.

 

The available toolchain is "arm-xilinx-linux-gnueabi", which supports floating point emulation.

 -mfloat-abi=softfp

 

I built a toochain with buildroot called "arm-xilinx-linux-gnueabihf", which supports the hard floating point model.

 -mfloat-abi=hard

 

How can I tell petalinux to use my buildroot toolchain?

 

Kind regards

Rolf Kary-Ehlers

 

 

0 Kudos
6 Replies
Scholar sampatd
Scholar
7,931 Views
Registered: ‎09-05-2011

Re: How can I create an own toolchain for petalinux?

0 Kudos
Adventurer
Adventurer
7,805 Views
Registered: ‎02-14-2014

Re: How can I create an own toolchain for petalinux?

That AR doesn't say whether hard-float is supported or even mention compatibility, it assumes a compatible cross-compiler.

 

Petalinux relies on some pre-built binary packages for the basic system; these would be compiled as soft-float so even successfully setting up a hard-float compiler will produce a petalinux root fs with a working system but user binaries which can't run.   AFAIK the build system (yocto/bitbake recipes) for those packages is not made available, so using hard-float is currently not possible under petalinux. 

 

I would love to be proved wrong, I would also like to go full hard-float!

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
7,800 Views
Registered: ‎11-12-2007

Re: How can I create an own toolchain for petalinux?

The CodeSourcery toolchain is softfp, which uses hardware floating point with the soft floating point calling conventions. Xilinx doesn't make available a toolchain supporting full hard floating point. Your best bet would be to use Yocto to do a full hardfp cross-compilation.

 

PetaLinux is essentially a build tool that allows you to easily customize and build the kernel with U-Boot and a Yocto-based root file system. There are no recipes for the rootfs that aren't made available. A good starting point would be the meta-xilinx layer.

 

http://github.com/Xilinx/meta-xilinx/

0 Kudos
Visitor ashukla16
Visitor
4,363 Views
Registered: ‎05-16-2016

Re: How can I create an own toolchain for petalinux?

>PetaLinux is essentially a build tool that allows you to easily customize and build the kernel with U-Boot and a >Yocto-based root file system. There are no recipes for the rootfs that aren't made available. A good starting point >would be the meta-xilinx layer.

[ashukla16] I checked meta-xilinx layers in yocto and it also uses -mfloat-abi=hard and hard calling conventions.

Petaliinux uses soft floating point abi toolchain and meta-xilinx uses hard floating point abi toolchain. Please see below logs and lines in red color --

 

ashukla@ashukla-SVE1413XPNB:~/zc706-yocto/openembedded-core/build$ bitbake core-image-minimal
Loading cache: 100% |###########################################################################################################| ETA:  00:00:00
Loaded 1312 entries from dependency cache.
Parsing recipes: 100% |#########################################################################################################| Time: 00:00:00
Parsing of 882 .bb files complete (881 cached, 1 parsed). 1312 targets, 84 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.31.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-oe-linux-gnueabi"
MACHINE           = "zc706-zynq7"
DISTRO            = "nodistro"
DISTRO_VERSION    = "nodistro.0"
TUNE_FEATURES     = "arm armv7a vfp thumb neon       callconvention-hard       cortexa9"
TARGET_FPU        = "hard"
meta              = "master:ece101be5158beee709cdfbb85ecdbdc8d9fb864"
meta-xilinx       = "master:82a45be11067324f33e15f525cf39fe454332f8b"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1355 tasks of which 1355 didn't need to be rerun and all succeeded.

 

Is xilinx shipping petalinux with toolchain having support for hard floating point abi and calling conventions ?

0 Kudos
Explorer
Explorer
4,340 Views
Registered: ‎11-22-2015

Re: How can I create an own toolchain for petalinux?

 

I'm sure I read somewhere that 2016.1 has a toolchain with hard float.   So that would be an option if you can upgrade.

 

jeff

 

0 Kudos
Highlighted
Observer alxn
Observer
4,147 Views
Registered: ‎07-22-2013

Re: How can I create an own toolchain for petalinux?

It's true! hardfloat is alive!

 

0 Kudos