Building Linux kernel (BELK/BXELK)
As the structure of the BELK/BXELK is based on several tools, it is strongly recommended the reading of this document first.
History[edit | edit source]
|November 2015||3.0.0||First release|
|1.1.0||August 2018||4.0.0||Update for BELK-4.x.x|
|1.1.1||January 2020||4.1.0||Update for BELK-4.1.x|
Building Linux kernel[edit | edit source]
It is assumed that the development environment has been set up properly as described here.
- start the Linux development server and login into the system
- assuming that a local repository has not been created, clone the remote Linux git repository (the “-b” option is used to automatically checkout the current branch):
git clone email@example.com:dave/bora/linux-xlnx.git -b bora-4.x.x
- setup the server environment (please refer to this section)
- enter the source tree directory and run the following commands:
make bora_defconfig make UIMAGE_LOADADDR=0x8000 uImage bora.dtb
- The former command selects the default BORA configuration, while the latter builds the kernel binary image with the required u-boot header and the kernel device tree. Please note that the
mkimagetool is required for building the
uImagebinary. This tool must be installed on the Linux development server (please refer to the package manager of the Linux distribution).
kernel modules[edit | edit source]
It is possible to build the kernel modules too, together with the kernel image:
make UIMAGE_LOADADDR=0x8000 uImage modules bora.dtb
then, the built modules have to be prepared for being installed in the rfs:
make INSTALL_MOD_PATH=<directory_for_modules> modules_install
and properly copy them in the target root file system
tftpboot[edit | edit source]
Default linux kernel configuration can be changed by using the standard
gconfig make target. Subsequent builds just require
uImage make target to update the binary image. Once the build process is complete, the kernel binary image is stored into the
arch/arm/boot/uImage file. Both this file and the kernel device tree can be copied to the tftp root directory (eg.
/tftpboot/bora/) with the following commands:
cp arch/arm/boot/uImage /tftpboot/bora cp arch/arm/boot/dts/bora.dtb /tftpboot/bora