Difference between revisions of "Template:Building-Linux kernel"
(→Quick reference) |
|||
Line 3: | Line 3: | ||
!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"|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"| | + | |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"|{{oldid|xxxx|Year/Month/Day}} |
− | | | ||
|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"|TBD | |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"|TBD | ||
|- | |- | ||
|- | |- | ||
− | + | !style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|Year/Month/Day | |
− | + | !style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|TBD | |
− | |||
|- | |- | ||
|} | |} | ||
Line 123: | Line 120: | ||
</pre> | </pre> | ||
− | + | <section end=Body/> | |
[[Category:{{{nome-som}}}]] | [[Category:{{{nome-som}}}]] |
Latest revision as of 17:04, 16 January 2024
History | |||
---|---|---|---|
Issue Date | Notes | ||
TBD | |||
Year/Month/Day | TBD |
Building Linux[edit source]
Quick reference[edit source]
Repository Information | |
---|---|
URL | git@git.dave.eu:{{{kit-repo}}}/linux-TBD.git |
stable branch | {{{kit-repo}}} |
stable tag | {{{kit-repo}}}-1.x.x |
Build Information | ||
---|---|---|
defconfig | <defconfig> | |
Kernel binary | UIMAGE_LOADADDR=<loadaddr> uImage | |
Device trees | Platform | DTB |
SBC | <carrier>.dtb | |
EVB | <carrier>.dtb |
Instructions[edit source]
It is assumed that the development environment has been set up properly as described [[DESK-{{{kit-code}}}-L#Quick_start_guide|here]].
- start the Linux development VM and login into the system
- open a terminal window and cd into Linux kernel source code
cd {{{kit-repo}}}/linux
- in case of needs you can update your local repository with the following git command
git pull
- configure the build environment
source ~/env.sh
- enter the source tree directory and run the following commands:
make imx_v7_{{{kit-repo}}}_defconfig make UIMAGE_LOADADDR=''<loadaddr>'' uImage ''<carrier>''.dtb
NOTE: this is the default configuration suitable for latest target.
- The former command selects the default DESK-{{{kit-code}}}-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/uImage
file. Both this file and the kernel device tree can be copied to the tftp root directory /tftpboot/{{{kit-repo}}}/
with the following commands:
cp arch/arm/boot/uImage /tftpboot/{{{kit-repo}}}/ cp arch/arm/boot/dts/*.dtb /tftpboot/{{{kit-repo}}}/
Usually, kernel modules are installed with make modules_install
command, but this method installs the modules into the /lib/modules
directory of you 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 /
[[Category:{{{nome-som}}}]]