Skip to main content.
Navigation:
DENX
>
DULG
>
LinuxConfiguration
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
%CONTENTS{topic=LinuxConfiguration}% %SECTION0{name=SECTION}% Embedded Linux Configuration %SECTION1{name=SECTION}% Download and Unpack the Linux Kernel Sources %IF{ "%CVS_KERNEL_MODULE%" ne "" }% You can download the Linux Kernel Sources from our anonymous CVS server at [[http://www.denx.de]]. To checkout the module for the first time, proceed as follows: <pre> bash$ cd /opt/eldk/usr/src bash$ cvs -d :pserver:anonymous@www.denx.de:/cvsroot login [Press return when asked for a password] bash$ cvs -z6 -d :pserver:anonymous@www.denx.de:/cvsroot co -P %CVS_KERNEL_MODULE% bash$ cd %CVS_KERNEL_MODULE% </pre> %ENDIF% %IF0{ "%GIT_KERNEL_MODULE%" ne "" }% You can download the Linux Kernel Sources from our anonymous [[http://git.or.cz/][git]] server at [[http://git.denx.de/]]. To checkout the module for the first time, proceed as follows: %IF1{ "%HAVE_TESTING_BRANCH%" ne "" }% <pre> bash$ cd /opt/eldk/usr/src bash$ git clone git://git.denx.de/%GIT_KERNEL_MODULE%.git %GIT_KERNEL_MODULE% bash$ cd %GIT_KERNEL_MODULE% bash$ git checkout -b duts remotes/origin/%BOARD_LINUX_CONF% Branch duts set up to track remote branch %BOARD_LINUX_CONF% from origin. Switched to a new branch 'duts' bash$ </pre> %ELSE1% <pre> bash$ cd /opt/eldk/usr/src bash$ git clone git://git.denx.de/%GIT_KERNEL_MODULE%.git %GIT_KERNEL_MODULE% bash$ cd %GIT_KERNEL_MODULE% </pre> %ENDIF1% %ELSE0% %ENDIF0% %SECTION1{name=SECTION}% Kernel Configuration and Compilation The %BOARDNAME% board is fully supported by DENX Software Engineering. This means that you will always be able to build a working default configuration with just minimal interaction. Please be aware that you will need the "%ARCHITECTURE%" cross development tools for the following steps. Make sure that the directory which contains the binaries of your [[ELDK]] are in your *PATH*. To be sure that no intermediate results of previous builds are left in your Linux kernel source tree you can clean it up as follows: <pre> bash$ make mrproper </pre> The following command selects a standard configuration for the %BOARDNAME% board that has been extensively tested. It is recommended to use this as a starting point for other, customized configurations: %IF0{ "%VERSION_LINUX%" ge "2.6" }% <pre> bash$ make ARCH=%ARCH% CROSS_COMPILE=%CROSS_COMPILE% %BOARD_LINUX_CONF%_defconfig </pre> %ELSE0% <pre> bash$ make %BOARD_LINUX_CONF%_config </pre> %ENDIF0% <!-- Add hint for boards with more than one configuration --> %INCLUDE{DULGData_%BOARD%.LinuxConfig}% %T% Note: %IF{ "%VERSION_LINUX%" lt "2.6" }% When you type ="make XXX_config"= this means that a default configuration file for the board named =XXX= gets selected. %ENDIF% The name of this default configuration file is %IF{ "%ARCHITECTURE%" eq "powerpc" }% ==arch/%ARCH%/configs/%BOARD_LINUX_CONF%_defconfig== %ENDIF% %IF{ "%ARCHITECTURE%" eq "arm" }% ==arch/arm/configs/XXX== %ENDIF% %IF{ "%ARCHITECTURE%" eq "mips" }% ==arch/mips/defconfig-XXX== %ENDIF% . By (recursively) listing the contents of the %IF{ "%ARCHITECTURE%" eq "powerpc" }% ==arch/%ARCH%/configs/== %ENDIF% %IF{ "%ARCHITECTURE%" eq "arm" }% ==arch/arm/configs/== %ENDIF% %IF{ "%ARCHITECTURE%" eq "mips" }% ==arch/mips/== %ENDIF% directory you can easily find out which other default configurations are available. If you don't want to change the default configuration you can now continue to use it to build a kernel image: %IF0{ "%VERSION_LINUX%" ge "2.6" }% <pre> bash$ make ARCH=%ARCH% CROSS_COMPILE=%CROSS_COMPILE% uImage </pre> %ELSE0% <verbatim> bash$ make oldconfig bash$ make dep bash$ make uImage </verbatim> %ENDIF0% Otherwise you can modify the kernel configuration as follows: %IF0{ "%VERSION_LINUX%" ge "2.6" }% <pre> bash$ make ARCH=%ARCH% CROSS_COMPILE=%CROSS_COMPILE% config </pre> %ELSE0% <verbatim> bash$ make config </verbatim> %ENDIF0% or %IF0{ "%VERSION_LINUX%" ge "2.6" }% <pre> bash$ make ARCH=%ARCH% CROSS_COMPILE=%CROSS_COMPILE% menuconfig </pre> %ELSE0% <verbatim> bash$ make menuconfig </verbatim> %ENDIF0% %X% Note: Because of problems (especially with some older Linux kernel versions) the use of "<verbatim>make xconfig</verbatim>" is *not* recommended. %IF0{ "%VERSION_LINUX%" ge "2.6" }% <pre> bash$ make ARCH=%ARCH% CROSS_COMPILE=%CROSS_COMPILE% uImage </pre> %ELSE0% <verbatim> bash$ make uImage </verbatim> %ENDIF0% The *make* target *uImage* uses the tool *mkimage* (from the U-Boot package) to create a Linux kernel image in %IF{ "%ARCHITECTURE%" eq "powerpc" }% %IF0{ "%ARCH%" eq "powerpc" }% _arch/powerpc/boot/uImage_ %ELSE0% _arch/ppc/boot/images/uImage_ %ENDIF0% %ENDIF% %IF{ "%ARCHITECTURE%" eq "arm" }% _arch/arm/boot/uImage_ %ENDIF% %IF{ "%ARCHITECTURE%" eq "mips" }% _arch/mips/incaip/uImage_ %ENDIF% which is immediately usable for download and booting with U-Boot. %IF{ "%HAVE_FDT%" eq "true" }% In case you need a DTB to boot your linux kernel, you need the following step: <pre> bash$ make %BOARDNAME%.dtb </pre> %ENDIF% In case you configured modules you will also need to compile the modules: %IF0{ "%VERSION_LINUX%" ge "2.6" }% <pre> make ARCH=%ARCH% CROSS_COMPILE=%CROSS_COMPILE% modules </pre> %ELSE0% <pre> bash$ make modules </pre> %ENDIF0% add install the modules (make sure to pass the correct root path for module installation): %IF0{ "%VERSION_LINUX%" ge "2.6" }% <pre> bash$ make ARCH=%ARCH% CROSS_COMPILE=%CROSS_COMPILE% INSTALL_MOD_PATH=%ROOTPATH% modules_install </pre> %ELSE0% <pre> bash$ make INSTALL_MOD_PATH=%ROOTPATH% modules_install </pre> %ENDIF0% %IF{ "%VERSION_LINUX%" lt "2.6" }% %T% If your host computer is not the same architecture as the target system, and if you got your kernel tree from kernel.org or other "official" sources, then you may have to supply an architecture override and a cross compiler definition. The most reliable way to do this is to specify them on the make command line as part of the <tt>make</tt> command. If this is the case, use for example: <pre> bash$ make ARCH=ppc CROSS_COMPILE=%CROSS_COMPILE%- </pre> %ENDIF% %SECTION1{name=SECTION}% Installation For now it is sufficient to copy the Linux kernel image into the directory used by your TFTP server: %IF{ "%ARCHITECTURE%" eq "powerpc" }% %IF0{ "%ARCH%" eq "powerpc" }% <verbatim> bash$ cp arch/powerpc/boot/uImage /tftpboot/uImage </verbatim> %ELSE0% <verbatim> bash$ cp arch/ppc/boot/images/uImage /tftpboot/uImage </verbatim> %ENDIF0% %ENDIF% %IF{ "%ARCHITECTURE%" eq "arm" }% <verbatim> bash$ cp arch/arm/boot/uImage /tftpboot/uImage </verbatim> %ENDIF% %IF{ "%ARCHITECTURE%" eq "mips" }% <verbatim> bash$ cp arch/mips/incaip/uImage /tftpboot/uImage </verbatim> %ENDIF%
5.14.1. Boot Count Limit
1. Abstract
7. Booting Embedded Linux
Prev
Home
Next