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 dpizzitolo
Observer
229 Views
Registered: ‎08-11-2018

Petalinux SDK Errors when building Petalinux for Microblaze

Guys,

                    I'm trying to build Petalinux for the microblaze using the Petalinux SDK. I get the following errors when I run petalinux-build:

| aarch64-xilinx-linux-gcc: error: unrecognized command line option '-mno-xl-soft-mul'
| aarch64-xilinx-linux-gcc: error: unrecognized command line option '-mno-xl-soft-mul'
| aarch64-xilinx-linux-gcc: error: unrecognized command line option '-mno-xl-soft-div'
| aarch64-xilinx-linux-gcc: error: unrecognized command line option '-mno-xl-soft-div'
| aarch64-xilinx-linux-gcc: error: unrecognized command line option '-mxl-barrel-shift'
| aarch64-xilinx-linux-gcc: error: unrecognized command line option '-mxl-barrel-shift'

                   I know this is because the petalinux-build utility is not cross compiling for the right architecture. I tried the following commands:

source settings.sh
export CROSS_COMPILE=microblazeel-xilinx-linux-gnu-
export ARCH=microblazeel

                But petalinux-build is still trying to compile for the ARM. I also tried specifing

microblazeel-xilinx-linux-gnu-

                In the petalinux-config -c kernel options. I'm at a loss as how to force the tool to cross compile against the correct device, any help will be appreciated.

 

Thanks

0 Kudos
3 Replies
Highlighted
Observer dpizzitolo
Observer
172 Views
Registered: ‎08-11-2018

Re: Petalinux SDK Errors when building Petalinux for Microblaze

This is what is making me think it is an issue of the tools failing to obey the CROSS_COMPILE env var that I set:

Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 32 CROSS_COMPILE=aarch64-xilinx-linux- CC=aarch64-xilinx-linux-gcc

Shouldn't be compiling against aarch64 for microblaze

0 Kudos
Observer dpizzitolo
Observer
144 Views
Registered: ‎08-11-2018

Re: Petalinux SDK Errors when building Petalinux for Microblaze

Just as an update, I tried Petalinux 18.2 on Ubuntu 16.04 and it yields the same error. I noticed this tutorial here that used Petalinux SDK 17.4:

http://www.fpgadeveloper.com/2017/11/petalinux-for-artix-7-arty-base-project.html

So I tried the exact same instructions with 17.4 on a separate machine and still get the same error. I don't know what I'm doing that is causing the petalinux-build tool to insist on building against the wrong architecture.

Wish someone from Xilinx could help out on this, this is getting way harder than it needs to be.

I'll try to continue playing with flag overrides in the meantime.

0 Kudos
Observer dpizzitolo
Observer
109 Views
Registered: ‎08-11-2018

Re: Petalinux SDK Errors when building Petalinux for Microblaze

So I eventually gave up trying Petalinux SDK and built from the linux_xlnx.git repository for the kernel and the device-tree.git repository. I even had some tcl script errors in the device-tree build that I had to patch myself.

It is worth noting that I had the exact same errors with the manual kernel build process also, but was able to easily fix them using the CROSS_COMPILE override.

It would've been nice to get the petalinux SDK tools working since it is more time consuming building everything from scratch. However, it was a valuable learning experience.

 

0 Kudos