Changes

Jump to: navigation, search

Building Linux kernel (XUELK)

1,218 bytes added, 15:48, 16 August 2019
History
|Update for new XUELK release
|-
|2.0.01
|Sep 2017
|[[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_2.0.1.2F2.0.2.2F2.0.3|XUELK 2.0.01]]
|Update for new XUELK release
|-
|2.0.2
|Feb 2018
|[[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_2.0.1.2F2.0.2.2F2.0.3|XUELK 2.0.2]]
|Add kernel modules documentation
|-
|2.0.3
|Jan 2019
|[[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_2.0.1.2F2.0.2.2F2.0.3|XUELK 2.0.3]]
|Add support for NOR ISSY
|}
|-
! stable tag
| xuelk-12.20.13
|}
make imx_v7_lynx_defconfig
make UIMAGE_LOADADDR=0x80008000 uImage imx6ul-lynx-som000c.dtb imx6ul-lynx-som0013-cb002f.dtb imx6ul-axelulite-cb0010.dtb
make modules
</pre>
:The former first command selects the default XUELK configuration, while the latter second builds the kernel binary image with the required u-boot header and the kernel device tree, while the last command build kernel modules (if present in kernel configuration).
Default Linux kernel configuration can be changed by using the standard <code>menuconfig</code>, <code>xconfig</code>, or <code>gconfig</code> make target. Subsequent builds just require <code>uImage</code> make target to update the binary image. Once the build process is complete, the kernel binary image is stored into the <code>arch/arm/boot/uImage</code> file. Both this file and the kernel device tree can be copied to the tftp root directory <code>/tftpboot/lynx/</code> with the following commands:
cp arch/arm/boot/uImage /tftpboot/lynx/
cp arch/arm/boot/dts/*.dtb /tftpboot/lynx/
</pre>
 
Usually, kernel modules are installed with <code>make modules_install</code> command, but this method installs the modules into the <code>/lib/modules</code> directory of you MVM, which is not what you want. A better way to deploy kernel modules while cross-compiling is
* generate a <code>.tar.gz</code> archive
* install this archive into the target root file system
 
User can create such an archive, for example, using the following commands:
 
<pre class="workstation-terminal">
mkdir modules-install
make INSTALL_MOD_PATH=modules-install modules_install
 
cd modules-install && tar cvzf ../modules.tar.gz . && cd ..
</pre>
 
Now copy <code>modules.tar.gz</code> into the target root file system and install them as root with the following command
 
<pre class="workstation-terminal">
tar xvzf modules.tar.gz -C /
</pre>
8,154
edits

Navigation menu