Creating a multilib image for the ZCU102 using Yocto
"The Yocto build system offers the ability to build libraries with different target optimizations or architecture formats and combine these together into one system image". 1.
This page provides instructions for creating a multilib version of the core-image-minimal target for the ZCU102 Zynq UltraScale+ MPSoC eval board, allowing the user to run both 32-bit and 64-bit applications.
Please note that the process outlined on this page is provided for informational purposes only and is not officially supported by Xilinx.
Instructions
Fetch the required sources
Create a workspace directory.$ source oe-init-build-env
$ bitbake -c menuconfig linux-xlnx
Execute the Build
$ bitbake core-image-minimal
Generate 32-bit and 64-bit test applications
Test application#include <stdio.h> int main() { printf("Hello World, the size of long int is %zd\n", sizeof(long int)); return 0; } Compile the test application for 32-bit and 64-bit
$ aarch64-linux-gnu-gcc -Wall hello_world.c -o hello_world_64b $ arm-linux-gnueabihf-gcc -Wall hello_world.c -o hello_world_32b
Test the Image
Generate BOOT.bin (not covered here).Copy the following files to an SD Card
- Boot.bin
- build/tmp/deploy/images/zcu102-zynqmp/Image-initramfs-zcu102.bin (Rename to Image)
- build/tmp/deploy/zcu102-zynqmp/images (Rename to system.dtb)
- hello_world_64b
- hello_world_32b
Mount the SD Card and run the test applications.
Author: Alvin Clark