Changes

Jump to: navigation, search

Booting Linux Kernel

2,161 bytes added, 14:16, 15 October 2019
no edit summary
{{InfoBoxTop}}
{{Applies To Linux}}
{{AppliesToNaonFamily}}
{{AppliesToLizard}}
{{Applies To Diva}}
{{Applies To Bora}}
{{Applies To BoraX}}
{{Applies To BoraLite}}
{{AppliesToAxel}}
{{AppliesToAxelLite}}
{{AppliesToAxelEsatta}}
{{AppliesToSBCLynx}}
{{AppliesToAXELULite}}
{{InfoBoxBottom}}
= Boot configurations =
 [[:Category:U-Boot|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==
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  <pre>run flash_self.</pre>
Ethernet interface will be enabled by default. To disable it, just remove addip variable from the flash_self variable.
* 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 <code>setenv/saveenv </code> commands. To do that, from the U-boot shell, please check the following parameters and set them accordingly with your host and target configuration: # <code>serverip</code> - IP address of the host machine running the tftp/nfs server# <code>ipaddr</code> - IP address of the target# <code>ethaddr</code> - MAC address of the target# <code>netmask</code> - Netmask of the target# <code>gateway</code> - IP address of the gateway# <code>netdev</code> - Ethernet device name# <code>rootpath</code> - Path to the NFS-exported directory# <code>bootfile</code> - Path to the kernel binary image on the tftp server# <code>fdtfile</code> - Path to the device tree binary image on the tftp server# <code>nfsargs</code> - Kernel command line with parameters for loading the root file system through NFS To run this configuration just issue the command
To <pre>run this configuration just issue net_nfs</pre> == Booting from SD/MMC == When a bootable SD/microSD/MMC is available and the carrier board provides a SD/microSD/MMC slot, the system can boot from the card.  Assuming that: * the first (if more that one is available) partition of MMC is formatted as FAT12/16 or FAT32, is marked as primary and is active* the command first partition contains, besides the ''MLO'' (U-Boot 1st stage) and u-boot.bin (U-Boot 2nd stage) files, the ''uImage'' file (which is the kernel image)* the second partition is formatted as ext3 and contains a plain root file system the following commands can be used to start the system reading the kernel from the card boot partition and mounting the root file system stored in the second partition (/dev/mmcblk0p2): <pre>mmc rescan 0fatload mmc 0 81000000 uImagesetenv mmcargs 'setenv bootargs root=/dev/mmcblk0p2 rw'run net_nfs.mmcargs addip addcons addmembootm 81000000</pre>
== Automatic boot ==
If you wish Lizard system to automatically boot with one of the above configurations, just set up and store the <pre>bootcmd </pre> variable. For example, for the <code>flash_self </code> configuration, issue the following commands:=<pre> setenv setenv bootcmd $({flash_self)}=> setenv serverip 192.168.0.72saveenv=</pre> 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 <pre>bootcmd </pre> variable. This time can be changed by setting the <pre>bootdelay </pre> 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.
8,154
edits

Navigation menu