cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
2,034 Views
Registered: ‎01-26-2016

Petalinux 2018.3: missing Zynq UltraScale+ cross compiler

Jump to solution

I cannot use the PetaLinux rootfs because it is missing needed applications. An example of a needed missing item is tinydb Python module. The buildroot rootfs has the needed applications. But, in order to use the buildroot rootfs, I need the compiler executable.

When I run “petalinux-build --verbose”, and dig through the output, it looks like the name of the executable is “aarch64-xilinx-linux-gcc”. The following was found in the petalinux-build output.

make -f scripts/Makefile.build obj=libbb

   rm -f libbb/built-in.o; aarch64-xilinx-linux-ar rcs libbb/built-in.o
  aarch64-xilinx-linux-gcc  --sysroot=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot -Wp,-MD,libbb/.appletlib.o.d   -std=gnu99 -Iinclude -Ilibbb  -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D"BB_VER=KBUILD_STR(1.24.1)" -DBB_BT=AUTOCONF_TIMESTAMP  -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-builtin-printf -Os -O2 -pipe -g -feliminate-unused-debug-types  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0=/usr/src/debug/busybox/1.24.1-r0 -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot=    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(appletlib)"  -D"KBUILD_MODNAME=KBUILD_STR(appletlib)" -c -o libbb/appletlib.o libbb/appletlib.c
  aarch64-xilinx-linux-gcc  --sysroot=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot -Wp,-MD,libbb/.ask_confirmation.o.d   -std=gnu99 -Iinclude -Ilibbb  -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D"BB_VER=KBUILD_STR(1.24.1)" -DBB_BT=AUTOCONF_TIMESTAMP  -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-builtin-printf -Os -O2 -pipe -g -feliminate-unused-debug-types  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0=/usr/src/debug/busybox/1.24.1-r0 -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot=    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(ask_confirmation)"  -D"KBUILD_MODNAME=KBUILD_STR(ask_confirmation)" -c -o libbb/ask_confirmation.o libbb/ask_confirmation.c

  aarch64-xilinx-linux-gcc  --sysroot=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot -Wp,-MD,libbb/.auto_string.o.d   -std=gnu99 -Iinclude -Ilibbb  -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D"BB_VER=KBUILD_STR(1.24.1)" -DBB_BT=AUTOCONF_TIMESTAMP  -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-builtin-printf -Os -O2 -pipe -g -feliminate-unused-debug-types  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0=/usr/src/debug/busybox/1.24.1-r0 -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot=    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(auto_string)"  -D"KBUILD_MODNAME=KBUILD_STR(auto_string)" -c -o libbb/auto_string.o libbb/auto_string.c

  BIN     /home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/arm-trusted-firmware/1.5-xilinx-v2018.3+gitAUTOINC+08560c36ea-r0/build/zynqmp/release/bl31.bin

  OD      /home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/arm-trusted-firmware/1.5-xilinx-v2018.3+gitAUTOINC+08560c36ea-r0/build/zynqmp/release/bl31/bl31.dump

  aarch64-xilinx-linux-gcc  --sysroot=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot -Wp,-MD,libbb/.bb_askpass.o.d   -std=gnu99 -Iinclude -Ilibbb  -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D"BB_VER=KBUILD_STR(1.24.1)" -DBB_BT=AUTOCONF_TIMESTAMP  -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-builtin-printf -Os -O2 -pipe -g -feliminate-unused-debug-types  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0=/usr/src/debug/busybox/1.24.1-r0 -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/busybox/1.24.1-r0/recipe-sysroot=    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(bb_askpass)"  -D"KBUILD_MODNAME=KBUILD_STR(bb_askpass)" -c -o libbb/bb_askpass.o libbb/bb_askpass.c



Built /home/geoffrey/pzu19_udx_4k/build/tmp/work/aarch64-xilinx-linux/arm-trusted-firmware/1.5-xilinx-v2018.3+gitAUTOINC+08560c36ea-r0/build/zynqmp/release/bl31.bin successfully

But, when I try to run "aarch64-xilinx-linux-gcc --help", I end up with a "aarch64-xilinx-linux-gcc: command not found" error.

When I look at the directory tree structure generated by the PetaLinux 2018.3 tools install, I can find the following compilers.

./tools/linux-i386/microblazeel-xilinx-linux-gnu/bin/microblazeel-xilinx-linux-gnu-gcc
./tools/linux-i386/aarch64-none-elf/bin/aarch64-none-elf-gcc
./tools/linux-i386/gcc-arm-none-eabi/bin/arm-none-eabi-gcc
./tools/linux-i386/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc
./tools/linux-i386/gcc-arm-none-eabi-r5/bin/armr5-none-eabi-gcc
./tools/linux-i386/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
./tools/linux-i386/microblaze-xilinx-elf/bin/microblaze-xilinx-elf-gcc
./tools/linux-i386/microblaze-xilinx-elf/bin/mb-gcc

Which compiler should be used? Where does aarch64-xilinx-linux-gcc come from?

The closest name in the list of available compilers above is aarch64-linux-gnu-gcc. Is this the one to use?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Voyager
Voyager
1,997 Views
Registered: ‎10-21-2015

Hi

Use aarch64-linux-gnu-gcc

aarch64-xilinx-linux-gcc,which is located under build/tmp/work subdirectory, is built from scratch or copied from cache at the beginning of petalinux-build 

When petalinux-build ends building process, it is removed 

This is the reason you can't find aarch64-xilinx-linux-gcc

  

View solution in original post

0 Kudos
2 Replies
Highlighted
Voyager
Voyager
1,998 Views
Registered: ‎10-21-2015

Hi

Use aarch64-linux-gnu-gcc

aarch64-xilinx-linux-gcc,which is located under build/tmp/work subdirectory, is built from scratch or copied from cache at the beginning of petalinux-build 

When petalinux-build ends building process, it is removed 

This is the reason you can't find aarch64-xilinx-linux-gcc

  

View solution in original post

0 Kudos
Highlighted
1,961 Views
Registered: ‎01-26-2016

I continued to dig after posting...

Reply from @hokim is consistent with https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841973/Build+U-Boot#Zynq

0 Kudos