Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/scarthgap' into master
Browse files Browse the repository at this point in the history
Move to a scarthgap base.  Styhead and master is known not to work at this time.

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
  • Loading branch information
mhatle committed Nov 19, 2024
2 parents b770877 + 10531c2 commit 9880dfa
Show file tree
Hide file tree
Showing 989 changed files with 34,134 additions and 12,871 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "gen-machine-conf"]
path = meta-xilinx-core/gen-machine-conf
url = https://github.com/Xilinx/gen-machine-conf.git
branch = xlnx_rel_v2024.1
branch = xlnx_rel_v2024.2
10 changes: 6 additions & 4 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ the [meta-xilinx mailing list](https://lists.yoctoproject.org/g/meta-xilinx):
When sending patches, please make sure the email subject line includes
`[meta-xilinx][<BRANCH_NAME>][PATCH]` and cc'ing the maintainers.

For more details follow the OE community patch submission guidelines, as described in:
For more details follow the Yocto Project community patch submission guidelines,
as described in:

https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
https://docs.yoctoproject.org/dev/contributor-guide/submit-changes.html#

`git send-email --to meta-xilinx@lists.yoctoproject.org *.patch`

Expand All @@ -24,13 +24,14 @@ https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
`git format-patch -s --subject-prefix="meta-xilinx][<BRANCH_NAME>][PATCH" -1`

**Example:**
`git format-patch -s --subject-prefix="meta-xilinx][langdale][PATCH" -1`
`git format-patch -s --subject-prefix="meta-xilinx][scarthgap][PATCH" -1`

**Maintainers:**

Mark Hatle <mark.hatle@amd.com>
Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
John Toomey <john.toomey@amd.com>
Trevor Woerner <trevor.woerner@amd.com>

> **Note:**
Expand All @@ -43,3 +44,4 @@ https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
Mark Hatle <mark.hatle@xilinx.com>
Sandeep Gundlupet Raju <sandeep.gundlupet-raju@xilinx.com>
John Toomey <john.toomey@xilinx.com>
Trevor Woerner <trevor.woerner@amd.com>
139 changes: 111 additions & 28 deletions README.building.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,34 @@ layers.
The following instructions require OE-Core meta and BitBake. Poky provides these
components, however they can be acquired separately.

> **Pre-requisites:** Refer [Preparing Build Host](https://docs.yoctoproject.org/4.1.2/singleindex.html#preparing-the-build-host) documentation.
> **Pre-requisites:** Refer [Preparing Build Host](https://docs.yoctoproject.org/5.0.4/singleindex.html#preparing-the-build-host) documentation.
1. Create a project directory.
```
$ mkdir sources
$ cd sources
```
2. Clone the poky, openembedded and amd xilinx repository.

2. Clone the poky, openembedded and AMD repository.
> **Note:**
> * *release_branch:* refers to upstream stable release branch.
> * *rel-version:* refers to amd xilinx release version.
> * *rel-version:* refers to AMD release version.
> * *README:* By default README file link will be pointing to master branch so make
> sure to checkout the release_branch or rel-version branch.
> * *Upstream Pending Patches:* It is intended to resync Scarthgap (upstream) for
> both meta-virtualization and meta-openamp, but currently there are some patches
> in there that have not yet been accepted by upstream. So using the fork from
> https://github.com/Xilinx is recommended.
```
$ mkdir sources
$ git clone -b <release-branch> https://git.yoctoproject.org/poky.git
$ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded.git
$ git clone -b <release-branch> https://git.yoctoproject.org/git/meta-virtualization
$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git --recurse-submodules
$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git
$ git clone -b <release-branch> https://git.yoctoproject.org/poky
$ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded
$ git clone -b <release-branch> https://git.yoctoproject.org/meta-virtualization
$ git clone -b <release-branch> https://git.yoctoproject.org/meta-arm
$ git clone -b <release-branch> https://github.com/OpenAMP/meta-openamp
$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx --recurse-submodules
$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools
```
> **Note:**
> * When meta-xilinx layer is cloned using git tool by default it will clone
Expand All @@ -37,6 +46,7 @@ $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git
```
$ source poky/oe-init-build-env
```

4. Once initialized configure `bblayers.conf` by adding dependency layers as shown
below using `bitbake-layers` command.
> **Note:** From step 3 by default `meta-yocto-bsp` will be included in bblayers.conf
Expand All @@ -46,66 +56,139 @@ $ source poky/oe-init-build-env
```
$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-oe
$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-python
$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems
$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-networking
$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems
$ bitbake-layers add-layer ./<path-to-layer>/meta-virtualization
$ bitbake-layers add-layer ./<path-to-layer>/meta-arm/meta-arm-toolchain
$ bitbake-layers add-layer ./<path-to-layer>/meta-arm/meta-arm
$ bitbake-layers add-layer ./<path-to-layer>/meta-openamp
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone-sdt
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-bsp
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-vendor
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-contrib
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-tools
```
> **Note:** We recommend using meta-xilinx-tools, the version that is built as
> standalone may not work on many boards as it does not know the board configuration.
5. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf
file for a specific target which can boot and run the in the board or QEMU.
> **Note:**
> 1. For SDT build flow user can remove meta-xilinx-tools as this layer is
> optional.
> 2. If user wants to build machine files supported by meta-xilinx-vendor or
> met-xilinx-contrib layer then include these layer running following commands.
```
MACHINE = "<target_machine_name>"
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-vendor
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-contrib
```
* For list of available target machines see meta layer README files.

* [meta-xilinx-bsp README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files)
* [meta-kria README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files)
5. Create a new layer to for SDT or XSCT machine files geneated using gen-machineconf
tool. If user already has a custom-bsp layer then you can skip this step.
```
$ bitbake-layers create-layer --add-layer --layerid <layerid> <layername>
```

6. For NFS build host system modify the build/conf/local.conf and add TMPDIR
path as shown below. On local storage $TMPDIR will be set to build/tmp
```
TMPDIR = "/tmp/$USER/yocto/release_version/build"
```

7. Modify the build/conf/local.conf file to add wic image to default target
7. Follow generating SDT or XSCT machine configuration file instructions using
gen-machineconf tool. SDT or XSCT machine files are generated using sdtgen
output or xsa.
* [SDT](https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-standalone-sdt/README.sdt.bsp.md)
* [XSCT](https://github.com/Xilinx/meta-xilinx-tools/blob/master/README.xsct.bsp.md)

8. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf
file for a specific target which can boot and run the in the board or QEMU.
```
MACHINE = "<target_machine_name>"
```
* For list of available pre-built target machines see meta layer README files.

* [meta-amd-adaptive-socs-bsp README](https://github.com/Xilinx/meta-amd-adaptive-socs/blob/master/meta-amd-adaptive-socs-bsp/README.asoc.bsp.md)
* [meta-xilinx-tools README](https://github.com/Xilinx/meta-xilinx-tools/blob/master/README.xsct.bsp.md)
* [meta-kria README](https://github.com/Xilinx/meta-kria/blob/master/README.kria.bsp.md)

9. Once machine files are generated in <conf-directory>/machine/<soc-family>-<board-name>-<sdt-or-xsct>-<design-name>.conf,
include the QEMU DT files, See [QEMU Configurations](#qemu-configurations)
section for more details. This step can be skipped if you are using pre-built
target machines files.

10. Modify the build/conf/local.conf file to add wic image to default target
image as shown below.
```
IMAGE_FSTYPES += "wic"
WKS_FILES = "xilinx-default-sd.wks"
```

8. Build the qemu-helper-native package to setup QEMU network tap devices.
11. Build the qemu-helper-native package to setup QEMU network tap devices.
```
$ bitbake qemu-helper-native
```

9. Manually configure a tap interface for your build system. As root run
12. Manually configure a tap interface for your build system. As root run
<path-to>/sources/poky/scripts/runqemu-gen-tapdevs, which should generate a
list of tap devices. Once tap interfaces are successfully create you should
be able to see all the interfaces by running ifconfig command.

```
$ sudo ./<path-to-layer>/poky/scripts/runqemu-gen-tapdevs $(id -u $USER) $(id -g $USER) 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
$ sudo ./<path-to-layer>/poky/scripts/runqemu-gen-tapdevs $(id -g $USER) 4
```

10. Build an OS image for the target using `bitbake` command.
13. Build an OS image for the target using `bitbake` command.
> **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt
> for available target image-name. e.g. core-image-minimal or petalinux-image-minimal
```
$ bitbake <target-image>
```

7. Once complete the images for the target machine will be available in the output
14. Once complete the images for the target machine will be available in the output
directory `${TMPDIR}/deploy/images/${MACHINE}/`.

8. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md)
15. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md)

## QEMU Configurations

This section describes the QEMU settings which must be added to the generated
machine configuration file in order to use the runqemu command. The following
board settings need to be added in sdt or xsct machine configuration file to
define which QEMU device trees should be used.

> **Variable usage examples:**
>
> QEMU Device tree deploy directory: `QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch"`
>
> QEMU PMU Device tree: `QEMU_HW_DTB_PMU = "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb"`
>
> QEMU PS Device tree: `QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb"`
>
> QEMU PMC Board Device tree: `QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb"`
>
> QEMU Memory: Some boards for example VEK280 and VH158 memory configurations are
> different, Hence we need to adjust the same in QB_MEM to match board dtsi files.
> Below are some examples.
> * ZynqMP `QB_MEM = "-m 4096"`
> * Versal VEK280 `QB_MEM = "-m 12G"`
> **Note:** QEMU_HW_DTB_PS files are based on eval board schematics. If you are
> using a custom board then user has to create a QEMU_HW_DTB_PS to match their
> custom boards. Refer https://github.com/Xilinx/qemu-devicetrees/blob/master/board-versal-ps-vek280.dts
> as an example.
| Devices | Evaluation Board | QEMU PMC or PMU DTB file | QEMU PS DTB file | QB Mem |
|---------|-------------------------------------------------------------------------------|-----------------------------|-------------------------------|--------|
| ZynqMP | [ZCU102](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
| | [ZCU104](https://www.xilinx.com/products/boards-and-kits/zcu104.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
| | [ZCU106](https://www.xilinx.com/products/boards-and-kits/zcu106.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
| | [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
| | [ZCU208](https://www.xilinx.com/products/boards-and-kits/zcu208.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
| | [ZCU216](https://www.xilinx.com/products/boards-and-kits/zcu216.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
| | [ZCU670](https://www.xilinx.com/products/boards-and-kits/zcu670.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
| Versal | [VCK190](https://www.xilinx.com/products/boards-and-kits/vck190.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vck190.dtb` | 8G |
| | [VMK180](https://www.xilinx.com/products/boards-and-kits/vmk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vmk180.dtb` | 8G |
| | [VPK120](https://www.xilinx.com/products/boards-and-kits/vpk120.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk120.dtb` | 8G |
| | [VPK180](https://www.xilinx.com/products/boards-and-kits/vpk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk180.dtb` | 8G |
| | [VEK280](https://www.xilinx.com/products/boards-and-kits/vek280.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vek280.dtb` | 12G |
| | [VHK158](https://www.xilinx.com/products/boards-and-kits/vhk158.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vhk158.dtb` | 32G |

> **Note:** Additional information on AMD Adaptive SoC's and FPGA's can be found at:
https://www.amd.com/en/products/adaptive-socs-and-fpgas.html
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ components, kernel etc.
* **meta-xilinx-standalone**: layer containing the AMD Xilinx Baremetal or
Standalone Toolchains metadata to build baremetal firmware and applications.

* **meta-xilinx-standalone-experimental**: layer containing metadata to build
* **meta-xilinx-standalone-sdt**: layer containing metadata to build
all the boot images using lopper and system device tree without using the
meta-xilinx-tools layer.

Expand Down
50 changes: 38 additions & 12 deletions docs/README.booting.microblaze.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@

Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI boot modes.

* [Setting Up the Target](#setting-up-the-target)
* [Booting from JTAG](#booting-from-jtag)
* [Sourcing the XSDB tools](#sourcing-the-xsdb-tools)
* [Deploying the images to target](#deploying-the-images-to-target)
* [Using devtool boot-jtag script](#using-devtool-boot-jtag-script)
* [Manually executing xsdb commands](#manually-executing-xsdb-commands)
* [Loading Bitstream using XSDB](#loading-bitstream-using-xsdb)
* [Loading U-boot using XSDB](#loading-u-boot-using-xsdb)
* [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script)
* [Using XSDB](#using-xsdb)
* [Using TFTP](#using-tftp)
* [Booting Linux](#booting-linux)
- [Booting OS Images on MicroBlaze target boards](#booting-os-images-on-microblaze-target-boards)
- [Setting Up the Target](#setting-up-the-target)
- [Booting from JTAG](#booting-from-jtag)
- [Sourcing the XSDB tools](#sourcing-the-xsdb-tools)
- [Deploying the images to target](#deploying-the-images-to-target)
- [Using devtool boot-jtag script](#using-devtool-boot-jtag-script)
- [Manually executing xsdb commands](#manually-executing-xsdb-commands)
- [Loading Bitstream using XSDB](#loading-bitstream-using-xsdb)
- [Loading U-boot using XSDB](#loading-u-boot-using-xsdb)
- [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script)
- [Using XSDB](#using-xsdb)
- [Using TFTP](#using-tftp)
- [Booting Linux](#booting-linux)
- [Limitation](#limitation)

## Setting Up the Target

Expand Down Expand Up @@ -195,3 +197,27 @@ xsdb% exit
```
U-Boot> boot
```

## Limitation

1. Booting core-image-minimal or other image target excluding
petalinux-image-minimal you can observe below error message.

```
Error: argument "/en*" is wrong: "dev" not a valid ifname
Starting syslogd/klogd: done
Poky (Yocto Project Reference Distro) 5.0.2 kcu105-microblazeel ttyUL0
INIT: Id "1" respawning too fast: disabled for 5 minutes
kcu105-microblazeel login:
```

This is due to pni-names distro feature is not enabled by default and eudev uses
classic network interface naming scheme. To resolve this issue add pni-names
distro feature from <distro>.conf or local.file.

```
DISTRO_FEATURES:append:microblaze = " pni-names"
```
Loading

0 comments on commit 9880dfa

Please sign in to comment.