This is an old revision of the document!
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
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"
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/Vitis/
If building just the rootfs, go into the cloned buildroot directory
cd <buildroot> make microblaze_adi_rootfs_defconfig make
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
A list of supported images for Microblaze:
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
If building just the rootfs, go into the cloned buildroot directory
cd <buildroot> make nios2_adi_rootfs_defconfig make
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
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