Difference between revisions of "DESK-MX8M-L/Development/Building Linux kernel"

From DAVE Developer's Wiki
Jump to: navigation, search
(Instructions)
(Quick reference)
Line 1: Line 1:
<section begin=History/>
+
<section begin="History" />
 
{| style="border-collapse:collapse; "
 
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
+
! colspan="4" style="width:100%; text-align:left" ; border-bottom:solid 2px #ededed" |History
 
|-  
 
|-  
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version
+
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Version
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
+
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Issue Date
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
+
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Notes
 
|-
 
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|1.0.0
+
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |1.0.0
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Jan 2022
+
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |Feb 2022
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK-MX8M release
+
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |First DESK-MX8M release
 
|-
 
|-
 
|}
 
|}
<section end=History/>
+
<section end="History" />
 
__FORCETOC__
 
__FORCETOC__
<section begin=Body/>
+
<section begin="Body" />
  
 
==Building Linux==
 
==Building Linux==
Line 20: Line 20:
 
===Quick reference===
 
===Quick reference===
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
!colspan="2" | Repository Information
+
! colspan="2" | Repository Information
 
|-
 
|-
 
! URL
 
! URL
Line 26: Line 26:
 
|-
 
|-
 
! stable branch
 
! stable branch
| desk-mx-l
+
| desk-mx8m-l-rel-2.0.0
 
|-
 
|-
 
! stable tag
 
! stable tag
| desk-mx-l-2.x.x
+
| desk-mx8m-l-2.0.0-rc2
 
|}
 
|}
  
Line 35: Line 35:
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
!colspan="3" | Build Information
+
! colspan="3" | Build Information
 
|-
 
|-
 
! defconfig
 
! defconfig
Line 76: Line 76:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
desk-mx8m-l-rel-2.0.0
+
git checkout desk-mx8m-l-rel-2.0.0
 
</pre>
 
</pre>
  
Line 126: Line 126:
 
----
 
----
  
 
+
[[Category:MITO 8M]]  
[[Category:MITO 8M]] [[Category:MITO 8M Mini]] [[Category:ORCA]]
+
[[Category:MITO 8M Mini]]  
 +
[[Category:ORCA]]

Revision as of 17:47, 14 February 2022

History
Version Issue Date Notes
1.0.0 Feb 2022 First DESK-MX8M release



Building Linux[edit | edit source]

Quick reference[edit | edit source]

Repository Information
URL git@git.dave.eu:desk-mx-l/linux-imx.git
stable branch desk-mx8m-l-rel-2.0.0
stable tag desk-mx8m-l-2.0.0-rc2

Build Information
defconfig imx_v8_defconfig
Kernel binary Image
Device trees Platform DTB
SBC AXEL imx8mm-mito8mmini.dtsb
SBC ORCA imx8mp-mito8mplus-cb1001.dts

Instructions[edit | edit source]

It is assumed that the development environment has been set up properly as described here.

  • start the Linux development VM and login into the system
  • open a terminal window and cd into Linux kernel source code
cd desk-mx-l/linux
  • in case of needs you can update your local repository with the following git command
git pull
  • checkout the right branch
git checkout desk-mx8m-l-rel-2.0.0
  • configure the build environment
source /home/dvdk/desk-mx-l/desk-mx8m-l-2.0.0-rc2_env.sh
  • enter the source tree directory and run the following commands:
make imx_v8_defconfig
make Image freescale/imx8mm-mito8mmini.dtb freescale/imx8mp-mito8mplus-cb1001.dtb

NOTE: this is the default configuration suitable for the latest target.

The former command selects the default DESK-MX8M-L configuration, while the latter builds the kernel binary image with the required u-boot header and the kernel device tree.

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/Image file. Both this file and the kernel device tree can be copied to the tftp root directory /tftpboot/desk-mx-l/ with the following commands:

cp arch/arm/boot/Image /tftpboot/desk-mx-l/
cp arch/arm/boot/dts/*.dtb /tftpboot/desk-mx-l/

Usually, kernel modules are installed with make modules_install command, but this method installs the modules into the /lib/modules directory of your MVM, which is not what you want.

A better way to deploy kernel modules while cross-compiling is

  • generate a .tar.gz archive
  • install this archive into the target root file system

User can create such an archive, for example, using the following commands:

mkdir modules-install
make INSTALL_MOD_PATH=modules-install modules_install

cd modules-install && tar cvzf ../modules.tar.gz . && cd ..

Now copy modules.tar.gz into the target root file system and install them as root with the following command

tar xvzf modules.tar.gz -C /