Difference between revisions of "The bootloader U-Boot"

From IGEP - ISEE Wiki

Jump to: navigation, search
(U-Boot v2009.11 (stable))
Line 1: Line 1:
== How to cross compile U-Boot ==
+
= U-Boot for IGEP platforms =
 
 
=== Overview of How-To ===
 
 
 
This How-To is meant to be a starting point for people to learn build the u-boot software for IGEP v2 devices as quickly and easily as possible.
 
 
 
This How-To works with the Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine but most of the contents are valid also for other GNU/Linux distributions. We do not issue any guarantee that this will work on other distributions.
 
 
 
=== Requirements ===
 
 
 
*'''Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine'''
 
 
 
=== Feedback and Contributing ===
 
 
 
At any point, if you see a mistake you can contribute to this How-To.
 
 
 
=== U-Boot for IGEP v2 ===
 
  
 
First of all setup the build environment sourcing this script
 
First of all setup the build environment sourcing this script
Line 27: Line 11:
 
if you have updated your SDK environment to latest version (see [[Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine]])
 
if you have updated your SDK environment to latest version (see [[Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine]])
  
==== U-Boot v2009.11 (stable) ====
+
== U-Boot v2009.11-2 (stable) ==
 
 
This version support full OneNAND DDP
 
  
Download the IGEP v2 U-Boot sources and follow next steps:
+
Download the IGEP X-loader sources and follow next steps:
 
<pre>
 
<pre>
$ wget http://downloads.igep.es/sources/u-boot-arm-2009.11-1.tar.gz
+
$ wget http://downloads.igep.es/sources/x-loader-1.4.3-0.tar.gz
$ tar xzf u-boot-arm-2009.11-0.tar.gz
+
$ tar xzf x-loader-1.4.3-0.tar.gz
$ cd u-boot-arm-2009.11-0
+
$ cd x-loader-1.4.3-0
$ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_igep0020_config
+
$ scripts/./autobuild.sh arm-none-linux-gnueabi-
$ make CROSS_COMPILE=arm-none-linux-gnueabi-  
 
 
</pre>
 
</pre>
 +
The result will be :
 +
* For IGEP v2 platform
 +
**x-load-ddp.bin.ift in autobuild/igep0020/flash directory (for OneNAND DDP)
 +
**x-load.bin.ift in autobuild/igep0020/sdcard directory (for SD card)
 +
*For OMAP3 IGEP module
 +
**x-load-ddp.bin.ift in autobuild/igep0030/flash directory (for OneNAND DDP)
 +
**x-load.bin.ift in autobuild/igep0030/sdcard directory (for SD card)
 +
 +
 +
Download the IGEP U-Boot sources and follow next steps:
 +
 +
$ wget http://downloads.igep.es/sources/u-boot-arm-2009.11-2.tar.gz
 +
$ tar xzf u-boot-arm-2009.11-2.tar.gz
 +
$ cd u-boot-arm-2009.11-2
 +
 +
Configure for your board with,
 +
 +
$ make CROSS_COMPILE=arm-none-linux-gnueabi- <board-config>
 +
 +
where:
 +
 +
* <board-config> is omap3_igep0020_config for IGEP v2 platform.
 +
* <board-config> is omap3_igep0030_config for OMAP3 IGEP module.
 +
 +
Finally, build with
 +
 +
$ make CROSS_COMPILE=arm-none-linux-gnueabi-
 +
 
The result will be an u-boot.bin file in arch/arm/boot directory.
 
The result will be an u-boot.bin file in arch/arm/boot directory.
  
==== U-Boot mainline tree (development) ====
+
== U-Boot mainline tree (development) ==
 +
 
 +
<span style="color: rgb(255, 0, 0);">'''Note:''' The 'master' branch is where the development work takes place and you should use this if you're after to work with the latest cutting edge developments. It is possible trunk can suffer temporary periods of instability while new features are developed and if this is undesirable we recommend using one of the release branches. '''Use ONLY for development purposes.'''</span>
 +
 
 +
Clone the GIT repository from git.igep.es
 +
 
 +
$ git clone git://git.igep.es/pub/scm/u-boot-arm.git
 +
$ cd u-boot-arm
 +
$ git checkout origin/u-boot-2009.11.y -b u-boot-2009.11.y
 +
 
 +
Configure for your board with,
 +
 
 +
$ make CROSS_COMPILE=arm-none-linux-gnueabi- <board-config>
 +
 
 +
where:
 +
 
 +
* <board-config> is omap3_igep0020_config for IGEP v2 platform.
 +
* <board-config> is omap3_igep0030_config for OMAP3 IGEP module.
 +
 
 +
Finally, build with
 +
 
 +
$ make CROSS_COMPILE=arm-none-linux-gnueabi-
  
Clone the GIT repository from git.myigep.com
 
<pre>
 
$ git clone git://git.igep.es/pub/scm/u-boot-arm.git
 
$ cd u-boot-arm
 
$ git checkout origin/u-boot-2009.11.y -b u-boot-2009.11.y
 
</pre>
 
and build with
 
<pre>
 
$ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_igep0020b_config
 
$ make CROSS_COMPILE=arm-none-linux-gnueabi-
 
</pre>
 
 
The result will be an u-boot.bin file in arch/arm/boot directory.
 
The result will be an u-boot.bin file in arch/arm/boot directory.
  
=== Annex: default u-boot environment ===
+
== CHANGELOG ==
 +
 
 +
* [http://git.igep.es/?p=pub/scm/u-boot-arm.git;a=commit;h=10f386973ff68d604323b1e7787a0f3bd3b3c381 2010-06-15 Release 2009.11-2]
 +
** improve SMSC LAN9221 throughput
 +
** add support for OMAP3 IGEP module (igep0030)
  
<pre>
+
= Annex: default u-boot environment =
setenv distro poky
 
setenv machine igep0020
 
setenv project poky-image-sato
 
setenv ethaddr ac:de:48:00:02:54
 
setenv ipaddr 192.168.254.254
 
setenv netmask 255.255.255.0
 
setenv gatewayip 192.168.254.10
 
setenv serverip 192.168.254.10
 
setenv addip 'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}::eth0:'
 
setenv bootargs-base 'mem=512M console=ttyS2,115200n8 console=tty0 omapfb.mode=dvi:1024x768MR-16@60'
 
setenv mmc-bootargs 'setenv bootargs ${bootargs-base} root=/dev/mmcblk0p2 rw rootwait'
 
setenv mmc-boot 'mmc init 0; if fatload mmc 0 80000000 boot.ini; then source; else if fatload mmc 0 80000000 uImage; then run mmc-bootargs; bootm; fi; fi'
 
setenv onenand-bootargs 'setenv bootargs ${bootargs-base} root=/dev/mtdblock4 rootfstype=jffs2 ; run addip'
 
setenv onenand-boot 'run onenand-bootargs; onenand read 80000000 280000 400000 ; bootm 80000000'
 
setenv nfs-bootargs 'setenv bootargs ${bootargs-base} root=/dev/nfs nfsroot=${serverip}:/srv/nfs/${distro}/${project}/${machine} ; run addip'
 
setenv nfs-boot 'if ping ${serverip}; then run nfs-bootargs; tftp 0x80000000 ${distro}/${project}/${machine}/uImage; bootm; fi;'
 
setenv bootcmd 'run mmc-boot; run nfs-boot; run onenand-boot'
 
</pre>
 
  
--- That's all folks ---
+
setenv distro poky
 +
setenv machine igep0020
 +
setenv project poky-image-sato
 +
setenv ethaddr ac:de:48:00:02:54
 +
setenv ipaddr 192.168.254.254
 +
setenv netmask 255.255.255.0
 +
setenv gatewayip 192.168.254.10
 +
setenv serverip 192.168.254.10
 +
setenv addip 'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}::eth0:'
 +
setenv bootargs-base 'mem=512M console=ttyS2,115200n8 console=tty0 omapfb.mode=dvi:1024x768MR-16@60'
 +
setenv mmc-bootargs 'setenv bootargs ${bootargs-base} root=/dev/mmcblk0p2 rw rootwait'
 +
setenv mmc-boot 'mmc init 0; if fatload mmc 0 80000000 boot.ini; then source; else if fatload mmc 0 80000000 uImage; then run mmc-bootargs; bootm; fi; fi'
 +
setenv onenand-bootargs 'setenv bootargs ${bootargs-base} root=/dev/mtdblock4 rootfstype=jffs2 ; run addip'
 +
setenv onenand-boot 'run onenand-bootargs; onenand read 80000000 280000 400000 ; bootm 80000000'
 +
setenv nfs-bootargs 'setenv bootargs ${bootargs-base} root=/dev/nfs nfsroot=${serverip}:/srv/nfs/${distro}/${project}/${machine} ; run addip'
 +
setenv nfs-boot 'if ping ${serverip}; then run nfs-bootargs; tftp 0x80000000 ${distro}/${project}/${machine}/uImage; bootm; fi;'
 +
setenv bootcmd 'run mmc-boot; run nfs-boot; run onenand-boot'
  
 
[[Category:Software|Uboot]]
 
[[Category:Software|Uboot]]

Revision as of 17:17, 18 June 2010

U-Boot for IGEP platforms

First of all setup the build environment sourcing this script

$ source /usr/local/poky/eabi-glibc/arm/environment-setup

or

$ source /usr/local/poky/eabi-glibc/environment-setup-arm-none-linux-gnueabi

if you have updated your SDK environment to latest version (see Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine)

U-Boot v2009.11-2 (stable)

Download the IGEP X-loader sources and follow next steps:

$ wget http://downloads.igep.es/sources/x-loader-1.4.3-0.tar.gz
$ tar xzf x-loader-1.4.3-0.tar.gz
$ cd x-loader-1.4.3-0
$ scripts/./autobuild.sh arm-none-linux-gnueabi-

The result will be :

  • For IGEP v2 platform
    • x-load-ddp.bin.ift in autobuild/igep0020/flash directory (for OneNAND DDP)
    • x-load.bin.ift in autobuild/igep0020/sdcard directory (for SD card)
  • For OMAP3 IGEP module
    • x-load-ddp.bin.ift in autobuild/igep0030/flash directory (for OneNAND DDP)
    • x-load.bin.ift in autobuild/igep0030/sdcard directory (for SD card)


Download the IGEP U-Boot sources and follow next steps:

$ wget http://downloads.igep.es/sources/u-boot-arm-2009.11-2.tar.gz
$ tar xzf u-boot-arm-2009.11-2.tar.gz
$ cd u-boot-arm-2009.11-2

Configure for your board with,

$ make CROSS_COMPILE=arm-none-linux-gnueabi- <board-config>

where:

  • <board-config> is omap3_igep0020_config for IGEP v2 platform.
  • <board-config> is omap3_igep0030_config for OMAP3 IGEP module.

Finally, build with

$ make CROSS_COMPILE=arm-none-linux-gnueabi- 

The result will be an u-boot.bin file in arch/arm/boot directory.

U-Boot mainline tree (development)

Note: The 'master' branch is where the development work takes place and you should use this if you're after to work with the latest cutting edge developments. It is possible trunk can suffer temporary periods of instability while new features are developed and if this is undesirable we recommend using one of the release branches. Use ONLY for development purposes.

Clone the GIT repository from git.igep.es

$ git clone git://git.igep.es/pub/scm/u-boot-arm.git
$ cd u-boot-arm
$ git checkout origin/u-boot-2009.11.y -b u-boot-2009.11.y

Configure for your board with,

$ make CROSS_COMPILE=arm-none-linux-gnueabi- <board-config>

where:

  • <board-config> is omap3_igep0020_config for IGEP v2 platform.
  • <board-config> is omap3_igep0030_config for OMAP3 IGEP module.

Finally, build with

$ make CROSS_COMPILE=arm-none-linux-gnueabi- 

The result will be an u-boot.bin file in arch/arm/boot directory.

CHANGELOG

Annex: default u-boot environment

setenv distro poky
setenv machine igep0020
setenv project poky-image-sato
setenv ethaddr ac:de:48:00:02:54
setenv ipaddr 192.168.254.254
setenv netmask 255.255.255.0
setenv gatewayip 192.168.254.10
setenv serverip 192.168.254.10
setenv addip 'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}::eth0:'
setenv bootargs-base 'mem=512M console=ttyS2,115200n8 console=tty0 omapfb.mode=dvi:1024x768MR-16@60'
setenv mmc-bootargs 'setenv bootargs ${bootargs-base} root=/dev/mmcblk0p2 rw rootwait'
setenv mmc-boot 'mmc init 0; if fatload mmc 0 80000000 boot.ini; then source; else if fatload mmc 0 80000000 uImage; then run mmc-bootargs; bootm; fi; fi'
setenv onenand-bootargs 'setenv bootargs ${bootargs-base} root=/dev/mtdblock4 rootfstype=jffs2 ; run addip'
setenv onenand-boot 'run onenand-bootargs; onenand read 80000000 280000 400000 ; bootm 80000000'
setenv nfs-bootargs 'setenv bootargs ${bootargs-base} root=/dev/nfs nfsroot=${serverip}:/srv/nfs/${distro}/${project}/${machine} ; run addip'
setenv nfs-boot 'if ping ${serverip}; then run nfs-bootargs; tftp 0x80000000 ${distro}/${project}/${machine}/uImage; bootm; fi;'
setenv bootcmd 'run mmc-boot; run nfs-boot; run onenand-boot'