Booting Linux Kernel

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box
Tux.png Applies to Linux

Boot configurations[edit | edit source]

The default environment provides two 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) => setenv serverip 192.168.0.72 => 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.