Difference between revisions of "Booting Linux Kernel"

From DAVE Developer's Wiki
Jump to: navigation, search
(Boot configurations)
(Configuration net_nfs)
Line 23: Line 23:
 
* has a proper subnet IP address
 
* has a proper subnet IP address
  
If your system does not match this configuration, just change the necessary variables and store them permanently with the u-boot <pre>setenv/saveenv</pre> commands.  
+
If your system does not match this configuration, just change the necessary variables and store them permanently with the u-boot <code>setenv/saveenv</code> commands.  
  
 
To run this configuration just issue the command  
 
To run this configuration just issue the command  

Revision as of 14:10, 9 May 2012

Info Box
Tux.png Applies to Linux

Boot configurations[edit | edit source]

U-Boot is used to boot the Linux kernel and by setting some environment variables it's possible to select how to perform the boot process. The default U-boot environment provides two boot configurations that are explained in more detail in the following sections.

Configuration flash_self[edit | edit source]

This configuration is conceived for standalone operation. Both the kernel and the root file system are retrieved from Flash. Once U-Boot has transferred the control to Linux, its job is completed. From now on Linux kernel has the control of the hardware. At the end of Linux boot process, the user can interact with the system with the typical Unix-like shell through the same serial connection used for U-Boot. To run this configuration just issue the command

run flash_self

Ethernet interface will be enabled by default. To disable it, just remove addip variable from the flash_self variable.

Configuration net_nfs[edit | edit source]

This configuration is very helpful during the software development (both for kernel and applications). The kernel image is downloaded via TFTP while the root file system is remotely mounted via NFS from the host. It is assumed that the development host:

  • is connected with the target host board through an Ethernet LAN
  • exports the directory containing the root file system for the target through the NFS server
  • runs a TFTP server.
  • has a proper subnet IP address

If your system does not match this configuration, just change the necessary variables and store them permanently with the u-boot setenv/saveenv commands.

To run this configuration just issue the command

run net_nfs

Automatic boot[edit | edit source]

If you wish Lizard system to automatically boot with one of the above configurations, just set up and store the

bootcmd

variable. For example, for the

flash_self

configuration, issue the following commands:

setenv setenv bootcmd ${flash_self}
saveenv

Next time the system boots, U-Boot will wait for three seconds (to stop the wait just press any key in the console) before executing the commands stored in the

bootcmd

variable. This time can be changed by setting the

bootdelay

variable. Generally speaking the whole boot process can be further and heavily customized. For more details please refer to the doc/README.autoboot file in the U-Boot sources.