Customising U-Boot
Overview
There are 2 areas of customising U-Boot, one is the U-Boot System Customisation and the other is the U-Boot Application Customisation. This section will address both these areas.
U-Boot System Customisation
U-Boot uses PetaLogix AutoConfig technology to automatically target any platform using MicroBlaze system. This allows U-Boot to be automatically ported to the selected platform, without the need to customise the U-Boot system configurations for the platform.
The pre-configured U-Boot will support the U-Boot default command set that should be sufficient to support most embedded systems. The following list the U-Boot configuration parameters for the supported default command set.
- CONFIG_CMD_DFL
- CFG_CMD_NET
- CFG_CMD_PING
Most user should not be required to customise the U-Boot system settings. For more platform specific system customisation refer to the Editing U-Boot configuration file Section in the Advanced Topics Chapter.
U-Boot Platform Customisation
Platform Customisation allows the user to customise the supported features within U-Boot for their target embedded system. U-Boot uses environment variables to configure the supported functionality. For example the 'bootdelay' variable will specific the number of seconds delay before U-Boot tries to boot the Linux Kernel image.
These variables can be set either on run time via the U-Boot command prompt or by a configuration script file. Refer to the U-Boot Manual for more information on U-Boot scripting support and configuration.
An example of the configuration script used by PetaLinux is as per below.
echo PetaLogix MicroBlaze-Auto Board Configuration
echo ---------------------------------------------
echo Network Configuration:
set ethaddr 00:0a:35:00:22:04
set ipaddr 192.168.0.10
set serverip 192.168.0.1
set netkargs macaddr=$(ethaddr)
echo MTD Configuration:
set mtdparts physmap-flash.0:256K(boot),256K(bootenv),256K(config),5M(image),2M(spare)
set mtdkargs mtdparts=$(mtdparts)
echo Clobber DRAM Configuration:
set clobstart 0x10000000
echo Bootloader Configuration:
set bootsize 0x40000
set bootstart 0x28000000
echo Kernel Configuration:
set kernsize 0x400000
set kernstart 0x280c0000
set bootargs $(mtdkargs) $(netkargs)
echo Boot Configuration:
set bootcmd bootm $(kernstart)
set bootdelay 4
echo Saving Configurations...
saveenv
echo Configuration Completed
If you have chosen the "Obtain IP address automatically" option
from the System Configuration Menu, u-boot will not get a static IP
or server IP address.
Instead you can use the u-boot 'dhcp' command to obtain these
addresses from your network DHCP server.
Previous:
Building U-Boot

