Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Xilinx ZCU102 #427

Open
wants to merge 4 commits into
base: dunfell
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,15 @@
path = sources/meta-rockchip
url = git://git.yoctoproject.org/meta-rockchip
branch = dunfell
[submodule "sources/meta-xilinx"]
path = sources/meta-xilinx
url = https://github.com/Xilinx/meta-xilinx
branch = master
[submodule "sources/meta-xilinx-tools"]
path = sources/meta-xilinx-tools
url = https://github.com/Xilinx/meta-xilinx-tools
branch = master
[submodule "sources/meta-petalinux"]
path = sources/meta-petalinux
url = https://github.com/Xilinx/meta-petalinux
branch = master
6 changes: 6 additions & 0 deletions conf/bblayers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,10 @@ BBLAYERS = " \
${BASELAYERS} \
${TOPDIR}/sources/openembedded-core/meta \
${TOPDIR}/sources/meta-rockchip \
${TOPDIR}/sources/meta-xilinx/meta-xilinx-bsp \
${TOPDIR}/sources/meta-xilinx/meta-xilinx-contrib \
${TOPDIR}/sources/meta-xilinx/meta-xilinx-pynq \
${TOPDIR}/sources/meta-xilinx/meta-xilinx-standalone \
${TOPDIR}/sources/meta-xilinx-tools \
${TOPDIR}/sources/meta-petalinux \
"
1 change: 1 addition & 0 deletions conf/site.conf
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,4 @@ IMG_VERSION = "0.0.1"
#-l ${@int(os.sysconf(os.sysconf_names['SC_NPROCESSORS_ONLN'])) * 150/100} \
#"
#

30 changes: 30 additions & 0 deletions docs/xilinx-zcu102.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Notes on using Yoe on the Xilinx ZCU102

[up](README.md)

[BSP Layer documentation](meta-xilinx/meta-xilinx-bsp/README.building.md)

## Building/installing an image

1. `git clone git://github.com/YoeDistro/yoe-distro.git`
1. `cd yoe-distro`
1. `. zcu102-zynqmp-envsetup.sh`
1. `yoe_setup`
1. add following to conf/local.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we would advise putting these changes in site.conf to be captured in git and shared with the team. local.conf is intended only for settings that are use specific and not checked into git.

https://github.com/YoeDistro/yoe-distro/blob/dunfell/docs/conf-files.md

However, I wonder if these settings can be captured just for these machines (machine conf, etc)?

One thing we try to do with Yoe is keep the system such that you can build for multiple machines in one build system -- this is handy if you are maintaining multiple projects/products.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cbrake I am adding them to site.conf with machine specific variables, something like this.
diff --git a/conf/site.conf b/conf/site.conf
index f643f48..81d26d5 100644
--- a/conf/site.conf
+++ b/conf/site.conf
@@ -71,6 +71,14 @@ IMAGE_BOOT_FILES_append_sama5d27-som1-ek-sd = "
"
WKS_FILE_sama5d27-som1-ek-sd = "yoe-sdimage.wks"

+# Xilinx zcu102 specific configurations
+IMAGE_BOOT_FILES_append_zcu102-zynqmp = " boot.bin"
+PREFERRED_PROVIDER_qemu-native_zcu102-zynqmp = "qemu-xilinx-native"
+PREFERRED_PROVIDER_virtual/pmu-firmware_zcu102-zynqmp = "pmu-firmware"
+PREFERRED_PROVIDER_virtual/boot-bin_zcu102-zynqmp = "xilinx-bootbin"
+PREFERRED_PROVIDER_virtual/dtb_zcu102-zynqmp = "device-tree"

It works fine.

Maybe its the inclusion of the Xilinx machine (which also provides QEMU) there is NOTE in the build.

NOTE: Resolving any missing task queue dependencies
NOTE: Multiple providers are available for qemu-native (qemu-native, qemu-xilinx-native)
Consider defining a PREFERRED_PROVIDER entry to match qemu-native
NOTE: Multiple providers are available for runtime nativesdk-qemu (nativesdk-qemu, nativesdk-qemu-xilinx)
Consider defining a PREFERRED_RPROVIDER entry to match nativesdk-qemu

Kindly advice on how to resolve.
Also what to do about these warnings (introduced by Xilinx layers) ?

WARNING: No recipes available for:
/home/kpoduval/workspace/yoe-zcu/sources/meta-xilinx/meta-xilinx-bsp/recipes-microblaze/gcc/gcc-source_10.%.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-xilinx/meta-xilinx-bsp/recipes-microblaze/newlib/libgloss_3.3.%.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-xilinx/meta-xilinx-bsp/recipes-microblaze/newlib/newlib_3.3.%.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-petalinux/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-petalinux/recipes-browser/chromium/chromium-x11_%.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-petalinux/recipes-browser/chromium/gn-native_%.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-petalinux/recipes-extended/images/xen-image-minimal.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-petalinux/recipes-extended/xen/xen_git.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-petalinux/recipes-multimedia/gstreamer-1.0/gst-shark_0.2.1.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-petalinux/recipes-support/opencv/opencv_4.3%.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-xilinx/meta-xilinx-standalone/recipes-core/newlib/libgloss_3.1.0.bbappend
/home/kpoduval/workspace/yoe-zcu/sources/meta-xilinx/meta-xilinx-standalone/recipes-core/newlib/newlib_3.1.0.bbappend

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess those warnings are because of stale recipes from Xilinx layers, I wish there was patch process on the layers themselves :). For the NOTE I think I have it working with defining some defaults before the xilinx specific confs.
+PREFERRED_PROVIDER_qemu-native ?= "qemu-native"
+PREFERRED_PROVIDER_nativesdk-qemu ?= "nativesdk-qemu"

I will put up a new pull request now, thanks.

```console
IMAGE_BOOT_FILES_append = " boot.bin"
PREFERRED_PROVIDER_virtual/pmu-firmware = "pmu-firmware"
PREFERRED_PROVIDER_virtual/boot-bin = "xilinx-bootbin"
PREFERRED_PROVIDER_virtual/dtb = "device-tree"
PREFERRED_PROVIDER_qemu-native = "qemu-xilinx-native"
PREFERRED_PROVIDER_qemu-helper-native = "qemu-helper-native"
IMAGE_INSTALL_remove = " qemu"
```
1. `bitbake petalinux-image-minimal`
1. insert SD card
1. `lsblk` (note sd card device, and substitute for /dev/sdX below)
1. `yoe_install_image /dev/sdX petalinux-image-minimal`
1. optional: configure console for serial port (see below)
1. `sudo eject /dev/sdX`

*core-image-minimal also works, but yoe-simple-image builds but would not boot up and gets stuck in kernel *
1 change: 1 addition & 0 deletions sources/meta-petalinux
Submodule meta-petalinux added at 6daf05
1 change: 1 addition & 0 deletions sources/meta-xilinx
Submodule meta-xilinx added at 084f9d
1 change: 1 addition & 0 deletions sources/meta-xilinx-tools
Submodule meta-xilinx-tools added at 0e1e3b
1 change: 1 addition & 0 deletions zcu102-zynqmp-envsetup.sh