BORA Xpress SOM/BXELK-L/Development/Building Linux kernel

From DAVE Developer's Wiki
Jump to: navigation, search


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 git@git.dave.eu: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 mkimage tool is required for building the uImage binary. This tool must be installed on the Linux development server (please refer to the package manager of the Linux distribution).

update the kernel configuration[edit | edit source]

Default Linux kernel configuration can be changed by using the standard menuconfig or nconfig as make target. Subsequent builds just require uImage make target to update the binary image.

make menuconfig

BELK-make-menuconfig.png

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 menuconfig, xconfig, or 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