Wiki

This version (15 Nov 2022 10:58) was approved by Stefan-Robert Raus.The Previously approved version (11 Nov 2022 13:36) is available.Diff

Building with buildroot

Aside from building the Linux kernel manually, there is also the possibility of building the ADI Linux kernel with the ADI buildroot repository.

Ideally, you should already be familiar with buildroot, but even if not, the steps in this guide should be pretty straight forward.

The starting point is to clone the ADI buildroot repository

git clone https://github.com/analogdevicesinc/buildroot

Building for Microblaze

First make sure that the GNU toolchain for Microblaze is in the shell path.

Example:

export PATH="/opt/Xilinx/Vitis/2021.2/gnu/microblaze/linux_toolchain/lin64_le/bin:$PATH"
Note: There are 2 toolchains for GCC. The recommended ones, should be under /opt/Xilinx/Vitis/2021.2/gnu/microblaze/linux_toolchain/.

And also make sure that the the directory to the Vivado Vitis is correct. The current example assumes that it is Vivado 2021.2 and it's installed in /opt/Xilinx/

Building for Microblaze - rootfs only

Root File-system

If building just the rootfs, go into the cloned buildroot directory

cd <buildroot>
make microblaze_adi_rootfs_defconfig
make

Building for Microblaze - simpleImage.<board>

If building an entire simpleImage that can be ran on a board:

cd <buildroot>
make microblaze_adi_defconfig
make BR2_LINUX_KERNEL_INTREE_DTS_NAME=kcu105_fmcdaq2
kcu105_fmcdaq2 is an example. Valid device-tree names can be found in https://github.com/analogdevicesinc/linux/tree/master/arch/microblaze/boot/dts or in the list below

A list of supported images for Microblaze:

  • kc705
  • kc705_fmcdaq2
  • kc705_fmcjesdadc1
  • kc705_fmcomms1
  • kc705_fmcomms2-3
  • kc705_fmcomms4
  • kcu105_adrv9371x
  • kcu105
  • kcu105_fmcdaq2
  • kcu105_fmcdaq3
  • kcu105_fmcomms2-3
  • kcu105_fmcomms4
  • vc707_ad6676evb
  • vc707
  • vc707_fmcadc2
  • vc707_fmcadc5
  • vc707_fmcdaq2
  • vc707_fmcjesdadc1
  • vc707_fmcomms1
  • vc707_fmcomms2-3
  • vc707_fmcomms4

Building for Nios2

First make sure that the GNU toolchain for Nios2 is in the shell path.

Example:

export PATH=/<your path>/CodeSourcery/Sourcery_CodeBench_Lite_for_Nios_II_GNU_Linux/bin/:$PATH

Building for Nios2 - rootfs only

Root File-system

If building just the rootfs, go into the cloned buildroot directory

cd <buildroot>
make nios2_adi_rootfs_defconfig
make

Building for Nios2 - zImage

If building an entire zImage that can be ran on a board:

cd <buildroot>
cp <rootfs-path> arch/nios2/boot/rootfs.cpio.gz
make adi_nios2_defconfig
make clean
cp arch/nios2/boot/dts/a10gx_daq2.dts arch/nios2/boot/devicetree.dts
make zImage
a10gx_daq2 is an example. Valid device-tree names can be found in linux/tree/master/arch/nios2/boot/dts

Build output & device images

They are always present under:

<path-to-buildroot>/output/images

For Microblaze it's simpleImage.<board-name> (example: simpleImage.kcu105_fmcdaq2)

For Nios2 it's zImage

resources/tools-software/linux-build/generic/buildroot.txt · Last modified: 15 Nov 2022 10:58 by Stefan-Robert Raus