-
Notifications
You must be signed in to change notification settings - Fork 2
Kernel
This section describes how to configure and build the kernel. All commands are executed in 'kernel/linux_xlnx/'.
- Git repository cloned with
--recursive
If you already worked with the kernel, I recommend to clean up everything to be sure only new things are taken.
make mrproper
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
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
To build all kernel modules use the following command:
make ARCH=arm modules
First delete the old headers, then create new ones:
rm -r ../rootfs/usr
make ARCH=arm headers_install INSTALL_HDR_PATH=../rootfs/usr
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
Read sd card to get more information how to setup the zynqberry.
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
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