User Tools

Site Tools


uboot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
uboot [2011/07/15 16:54] – rename U-Boot main page simonuboot [2012/12/06 18:05] (current) 78.122.157.53
Line 1: Line 1:
 ====== U-Boot ====== ====== U-Boot ======
  
-This page group together all the common [[http://www.denx.de/wiki/U-Boot|U-Boot]] informations (ie: not related with a specific board)+This page group together all the common LaCie [[http://www.denx.de/wiki/U-Boot|U-Boot]] informations (ie: not related with a specific board)
  
 ===== Repository ===== ===== Repository =====
Line 7: Line 7:
 Sources are available in the [[http://git-scm.com|Git]] repository: [[http://git.lacie-nas.org/?p=u-boot-lacie.git;a=summary|u-boot-lacie.git]]. At least, the following branches should be availables: Sources are available in the [[http://git-scm.com|Git]] repository: [[http://git.lacie-nas.org/?p=u-boot-lacie.git;a=summary|u-boot-lacie.git]]. At least, the following branches should be availables:
  
-  * **stable** is used to build the images distributed via [[ftp://lacie-nas.org/u-boot|FTP repository]]. +  * **stable** is used to build the images distributed via the [[ftp://lacie-nas.org/u-boot|FTP repository]]. 
-  * **master** is development branch, holding the patches waiting to be merged mainline.+  * **master** is the main development branch, holding the patches waiting to be merged mainline.
  
 Checkout command: Checkout command:
Line 28: Line 28:
  
 ===== Install from a LaCie stock U-Boot ===== ===== Install from a LaCie stock U-Boot =====
 +
 +This section present step by step how to update the stock U-Boot with a mainline version. A Network Space v2 board is used but the process should work with all the other LaCie boards supported by U-Boot mainline.
  
 ==== Why ? ==== ==== Why ? ====
  
-  * The LaCie stock U-Boot comes with a huge limitation. At reset, U-Boot reinitialize the boot environment variables (stored in Flash) with some built-in values. This includes the boot commands sequence. As a consequence, the LaCie system layout (or partition map) can't be changed. By default, U-Boot will load the Linux kernel from partition 10 (update) or from partition 6 as a fallback (default).+  * The LaCie stock U-Boot comes with a huge limitation: at reset, U-Boot reinitialize the boot environment variables (stored in Flash) with some built-in values. This includes the boot commands sequence. As a consequence, the LaCie system layout (or partition map) can't be changed. By default, U-Boot will load the Linux kernel from partition 10 (update) or from partition 6 as a fallback (default).
  
   * Save flash size (a LaCie U-Boot image size is ~450KB against ~230KB for a mainline one).   * Save flash size (a LaCie U-Boot image size is ~450KB against ~230KB for a mainline one).
Line 41: Line 43:
   * Be able to add a new feature.   * Be able to add a new feature.
  
-==== Update step by step ==== +==== Preparations ====
- +
-This section present step by step how to update the stock U-Boot with a mainline version. A Network Space v2 board is used but the process should work with all the other LaCie boards supported by U-Boot mainline. +
- +
-=== Preparations ===+
  
   * Create a work directory   * Create a work directory
Line 61: Line 59:
   $ tar xf u-boot-netconsole.tar.gz   $ tar xf u-boot-netconsole.tar.gz
  
-  * Setup and enable a TFTP server. The configuration really depends on your OS. For example, a Linux distribution could be use **inetd** (the configuration file is /etc/inetd.conf).+  * Setup and enable a TFTP server. The configuration really depends on your OS. For example, a Linux distribution could use **inetd** (the configuration file is /etc/inetd.conf).
  
   * Install the new u-boot image into the TFTP root directory (could be /var/tftpboot).   * Install the new u-boot image into the TFTP root directory (could be /var/tftpboot).
Line 67: Line 65:
   $ wget ftp://ftp.lacie-nas.org/u-boot/u-boot-netspace_v2.kwb -O /var/tftpboot/u-boot-netspace_v2.kwb   $ wget ftp://ftp.lacie-nas.org/u-boot/u-boot-netspace_v2.kwb -O /var/tftpboot/u-boot-netspace_v2.kwb
      
-=== Run CLUNC and connect to the LaCie U-Boot console ===+==== Run CLUNC and connect to the LaCie U-Boot console ====
  
-Both a serial or a network console can be used to connect to U-Boot. For this how-to, the netconsole way is preferred because it is cheaper. The user don't have to build/buy a serial cable.+Startup the NS2 and run the following commands:
  
   $ cd /tmp/tools/clunc-1.1   $ cd /tmp/tools/clunc-1.1
Line 75: Line 73:
   Marvell>> version   Marvell>> version
   U-Boot 1.1.4 (Jan 17 2011 - 21:48:29) Marvell version: 3.4.16  LaCie 1.5.9 256MB   U-Boot 1.1.4 (Jan 17 2011 - 21:48:29) Marvell version: 3.4.16  LaCie 1.5.9 256MB
 +
 +<note>
 +A **serial** link can also be used to connect to U-Boot. For this how-to, the **netconsole** way (the cheaper) is preferred. Mostly, the following steps should be relevant for the **serial** way too.
 +</note>
      
-=== Flash the new U-Boot image ===+==== Flash the new U-Boot image ====
  
   Marvell>> bubt u-boot-netspace_v2.kwb   Marvell>> bubt u-boot-netspace_v2.kwb
Line 97: Line 99:
   Protect Flash Monitor space   Protect Flash Monitor space
      
-=== Restart ===+==== Restart ====
  
   Marvell>> reset   Marvell>> reset
      
-=== Retrieve the NAS IP address ===+==== Retrieve the NAS IP address ====
  
 U-Boot mainline don't provide a magic packet mechanism to configure the IP address. Instead DHCP is used. It means that [[CLUNC|CLUNC]] becomes useless from this point. Ensure that the NAS is connected to your local network and that a DHCP server is running. U-Boot mainline don't provide a magic packet mechanism to configure the IP address. Instead DHCP is used. It means that [[CLUNC|CLUNC]] becomes useless from this point. Ensure that the NAS is connected to your local network and that a DHCP server is running.
Line 141: Line 143:
 The IP address is **192.168.0.15** The IP address is **192.168.0.15**
  
-=== Connect to U-Boot via netconsole ===+==== Connect to U-Boot via netconsole ====
  
 The netconsole configuration rely on some environment variables: **ipaddr**, **ncip**, **stdin**, **stdout** and **stderr** (for more information,  please refer to the file README.NetConsole included in U-Boot sources). After the update, this variables will be initialized with the default (or built-in) values and the netconsole is configured to broadcast UDP messages. The netconsole configuration rely on some environment variables: **ipaddr**, **ncip**, **stdin**, **stdout** and **stderr** (for more information,  please refer to the file README.NetConsole included in U-Boot sources). After the update, this variables will be initialized with the default (or built-in) values and the netconsole is configured to broadcast UDP messages.
Line 158: Line 160:
   GNU ld (Sourcery G++ Lite 2010q1-188) 2.19.51.20090709   GNU ld (Sourcery G++ Lite 2010q1-188) 2.19.51.20090709
  
-=== Default configuration ===+==== Default configuration ====
  
   * Here is a default environment sample:   * Here is a default environment sample:
Line 184: Line 186:
   Environment size: 604/4092 bytes   Environment size: 604/4092 bytes
  
-=== Configure U-Boot to suit your own needs ===+==== Configure U-Boot to suit your own needs ====
  
   * Modify the U-Boot environment.   * Modify the U-Boot environment.
Line 216: Line 218:
   ns2> reset   ns2> reset
   resetting ...   resetting ...
 +
 +
 +You can automatize these steps with an u-boot script :
 +  ns2> setenv update_uboot 'tftp 0x800000 $UBOOTFILE && sf probe 0 && sf erase 0 0x50000 && sf write 0x800000 0 0x50000'
 +  ns2> setenv UBOOTFILE u-boot-netspace_v2.kwb
 +  ns2> sav
 +  Saving Environment to SPI Flash...
 +
 +And then update the UBOOTFILE variable and launch the script :
 +  ns2> setenv UBOOTFILE <my-new-u-boot.kwb>
 +  ns2> sav
 +  Saving Environment to SPI Flash...
 +  ns2> run update_uboot
 +  Using egiga0 device
 +  TFTP from server 192.168.1.19; our IP address is 192.168.1.65
 +  Filename 'uboot'.
 +  Load address: 0x800000
 +  Loading: #################
 +  done 
 +  Bytes transferred = 239836 (3a8dc hex)
 +  SF: Detected MX25L4005 with page size 64 KiB, total 512 KiB
 +
  
 ===== Links ===== ===== Links =====
  
   * [[http://www.denx.de/wiki/U-Boot|U-Boot project]]   * [[http://www.denx.de/wiki/U-Boot|U-Boot project]]
uboot.1310741688.txt.gz · Last modified: 2011/07/15 16:54 by simon