Difference between revisions of "The bootloader U-Boot"

From IGEP - ISEE Wiki

Jump to: navigation, search
(add section on mainline u-boot with SPL)
Line 1: Line 1:
 +
<meta name="description" content="All you need to know about the U-Boot bootloader for IGEP Processor Boards. How to cross compile, get stable versions and get the latest development versions, etc."></meta>
 +
<meta name="keywords" content="U-Boot, IGEP, ARM, OMAP3, AM335x, OMAP5"></meta>
 +
 
= U-Boot for IGEP platforms =
 
= U-Boot for IGEP platforms =
  
Line 16: Line 19:
  
 
== Mainline U-Boot, 2012.10 release ==
 
== Mainline U-Boot, 2012.10 release ==
 +
 +
See the [[U-Boot Mainline Series]] article.
  
 
As of the 2012.10 release, mainline U-Boot has got SPL (Secondary Program Loader) integrated, which replaces X-Loader ('''not IGEP-X-Loader!''') in the [[Boot up sequence|boot sequence]].  
 
As of the 2012.10 release, mainline U-Boot has got SPL (Secondary Program Loader) integrated, which replaces X-Loader ('''not IGEP-X-Loader!''') in the [[Boot up sequence|boot sequence]].  
Line 43: Line 48:
  
 
== U-Boot 2010.06-y series (stable) ==
 
== U-Boot 2010.06-y series (stable) ==
 +
 +
See the [[U-Boot 2010.06-y series]] article.
 +
  
 
Download the IGEP U-Boot sources and follow next steps:
 
Download the IGEP U-Boot sources and follow next steps:
Line 89: Line 97:
  
 
== U-Boot 2009.11-y series (stable) ==
 
== U-Boot 2009.11-y series (stable) ==
 +
 +
See the [[U-Boot 2009.11-y series]] article.
 +
  
 
Download the IGEP U-Boot sources and follow next steps:
 
Download the IGEP U-Boot sources and follow next steps:
Line 116: Line 127:
 
** improve SMSC LAN9221 throughput
 
** improve SMSC LAN9221 throughput
 
** add support for OMAP3 IGEP module (igep0030)
 
** add support for OMAP3 IGEP module (igep0030)
 
= Quality assurance: Test Cases =
 
 
== Status table ==
 
 
== Test case definitions ==
 
 
''' #001 : SDCARD boot '''
 
 
How to test: Put u-boot to sdcard and check if booting. Result should be like :
 
 
U-Boot 2011.03-00534-gb39628a-dirty (May 19 2011 - 13:39:01)
 
 
OMAP3630/3730-GP ES1.0, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
 
IGEP v2 board + LPDDR/ONENAND
 
I2C:  ready
 
DRAM:  512 MiB
 
Muxed OneNAND(DDP) 512MB 1.8V 16-bit (0x58)
 
OneNAND version = 0x0031
 
Chip support all block unlock
 
Chip has 2 plane
 
block = 2048, wp status = 0x2
 
Scanning device for bad blocks
 
OneNAND: 512 MiB
 
MMC:  OMAP SD/MMC: 0
 
*** Warning - bad CRC, using default environment
 
 
In:    serial
 
Out:  serial
 
Err:  serial
 
Die ID #2a700000000000000156087c06013022
 
Net:  smc911x-0
 
Hit any key to stop autoboot:  0
 
 
''' #002 : ONENAND boot '''
 
 
How to test: Put u-boot to onenand and check if booting.
 
 
Script : flash u-boot using u-boot
 
 
mmc rescan 0
 
fatload mmc 0 0x80300000 u-boot.bin
 
onenand erase 0x80000 0x180000
 
onenand write 0x80300000 0x80000 0x180000
 
 
''' #003 : Run OS from SDCARD using ext2 filesystem '''
 
 
How to test:
 
 
''' #004 : Run OS from ONENAND using UBIFS filesystem '''
 
 
How to test:
 
 
''' #005 : Run OS from SDCARD using NFS filesystem '''
 
 
How to test:
 
 
Script:
 
 
setenv distro sandbox
 
setenv machine igep00x0
 
setenv project 0
 
setenv ethaddr ac:de:48:00:00:00
 
setenv ipaddr 192.168.2.245
 
setenv netmask 255.255.255.0
 
setenv gatewayip 192.168.2.1
 
setenv serverip 192.168.2.114
 
setenv addip 'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}::eth0:'
 
setenv nfs-bootargs 'setenv bootargs ${bootargs-base} root=/dev/nfs nfsroot=${serverip}:/srv/nfs/${distro}/${project}/${machine} ; run addip'
 
setenv bootargs-base 'console=ttyS2,115200n8 console=tty0 omapfb.mode=dvi:1024x768MR-16@60'
 
setenv bootcmd 'run nfs-bootargs; nfs 0x80000000 ${serverip}:/srv/nfs/${distro}/${project}/${machine}/boot/uImage; bootm'
 
run bootcmd
 
 
= 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 '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'
 
 
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Boot setup script' -d setup.source setup.ini
 
  
 
[[Category:Boot loaders|Uboot]]
 
[[Category:Boot loaders|Uboot]]

Revision as of 16:48, 28 June 2013

<meta name="description" content="All you need to know about the U-Boot bootloader for IGEP Processor Boards. How to cross compile, get stable versions and get the latest development versions, etc."></meta> <meta name="keywords" content="U-Boot, IGEP, ARM, OMAP3, AM335x, OMAP5"></meta>

U-Boot for IGEP platforms

This page contains information about the customized U-Boot provided by ISEE, as well as the mainline U-Boot. Both can be used on the IGEP platforms.

Environment Settings

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)

Mainline U-Boot, 2012.10 release

See the U-Boot Mainline Series article.

As of the 2012.10 release, mainline U-Boot has got SPL (Secondary Program Loader) integrated, which replaces X-Loader (not IGEP-X-Loader!) in the boot sequence.

Download the source from the git repository:

$ git clone git://git.denx.de/u-boot.git
$ cd u-boot
$ git checkout v2012.10 -b v2012.10-local

Configure for your board with

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

where:

  • <board-config> is igep0020_config for IGEP v2 platform.
  • <board-config> is igep0030_config for OMAP3 IGEP module.

Finally, build with

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

The results will be a MLO and a u-boot.img file in the u-boot directory.

CAVEAT: Wifi is not set up in this version, the pin mux for the MMC2 interface needs to be configured first!

U-Boot 2010.06-y series (stable)

See the U-Boot 2010.06-y series article.


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

Either download the sources from the git repository

$ git clone git://git.isee.biz/pub/scm/u-boot-arm.git
$ cd u-boot-arm
$ git checkout v2010.06-3 -b v2010.06-3-local

Or get the snapshot from the downloads directory

$ wget http://downloads.isee.biz/pub/SW_Releases/sources/u-boot-arm-2010.06-3.tar.gz
$ tar xzf u-boot-arm-2010.06-3.tar.gz
$ cd u-boot-arm-2010.06-3

Configure for your board with,

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

where:

  • <board-config> is igep0020_config for IGEP v2 platform.
  • <board-config> is 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 local directory.

CHANGELOG

KNOWN ISSUES

  • This versions does not work if you use gcc 4.4 or upper.

U-Boot 2009.11-y series (stable)

See the U-Boot 2009.11-y series article.


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

$ git clone git://git.isee.biz/pub/scm/u-boot-arm.git
$ cd u-boot-arm
$ git checkout v2009.11-2 -b v2009.11-2.local

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 local directory.

CHANGELOG