Skip to content
This repository was archived by the owner on Jan 16, 2023. It is now read-only.
johFeldmann edited this page Dec 7, 2017 · 7 revisions

This section describes how to configure and build the kernel. All commands are executed in 'kernel/linux_xlnx/'.

Prerequisites

  • Git repository cloned with --recursive

Clean up

If you already worked with the kernel, I recommend to clean up everything to be sure only new things are taken.

make mrproper

Configure

Use the following command to load the standard config for zynqberry:

make ARCH=arm zynqberry_defconfig

To apply changes to the configuration use the following command:

make ARCH=arm menuconfig

Build

Before you can build the kernel, you need to build the u-boot. To build the kernel use the following command:

make ARCH=arm UIMAGE_LOADADDR=0x8000 uImage

Build modules

To build all kernel modules use the following command:

make ARCH=arm modules

Install headers

First delete the old headers, then create new ones:

rm -r ../rootfs/usr
make ARCH=arm headers_install INSTALL_HDR_PATH=../rootfs/usr

Install modules

First delete the old modules, then create new ones and delete the created links:

rm -r ../rootfs/lib
make ARCH=arm modules_install INSTALL_MOD_PATH=../rootfs
rm ../rootfs/lib/modules/<kernel_name>/source
rm ../rootfs/lib/modules/<kernel_name>/build

Boot up the Zynqberry

Read sd card to get more information how to setup the zynqberry.

Install kernel

On the Zynqberry clone the linux kernel:

cd /usr/src
git clone -b zynq_zynqberry_config https://github.com/tukl-msd/median.demonstrator.linux-xlnx.git linux/

Copy <median.demonstrator>/kernel/rootfs/* to / on the zynqberry.

Create new links to the kernel sources:

ln -s /usr/src/linux /lib/modules/$(uname -r)/source
ln -s /usr/src/linux /lib/modules/$(uname -r)/build

Developer environment

To be able to develop on the Zynqberry, serveral things have to be done:

apt-get install gcc make bc
cd /usr/src/linux/
make ARCH=arm zynqberry_defconfig
make scripts
make prepare
ln -s /usr/src/linux/scripts/dtc/dtc /usr/bin/dtc

Links

Clone this wiki locally