This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| uboot [2011/07/17 23:15] – simon | uboot [2012/12/06 18:05] (current) – 78.122.157.53 | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| Sources are available in the [[http:// | Sources are available in the [[http:// | ||
| - | * **stable** is used to build the images distributed via a [[ftp:// | + | * **stable** is used to build the images distributed via the [[ftp:// |
| - | * **master** is a 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 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, |
| * 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 / | + | * 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 / |
| * Install the new u-boot image into the TFTP root directory (could be / | * Install the new u-boot image into the TFTP root directory (could be / | ||
| Line 67: | Line 65: | ||
| $ wget ftp:// | $ wget ftp:// | ||
| | | ||
| - | === 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, | + | Startup |
| $ cd / | $ cd / | ||
| Line 75: | Line 73: | ||
| Marvell>> | Marvell>> | ||
| U-Boot 1.1.4 (Jan 17 2011 - 21:48:29) Marvell version: 3.4.16 | U-Boot 1.1.4 (Jan 17 2011 - 21:48:29) Marvell version: 3.4.16 | ||
| + | |||
| + | < | ||
| + | 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. | ||
| + | </ | ||
| | | ||
| - | === Flash the new U-Boot image === | + | ==== Flash the new U-Boot image ==== |
| Marvell>> | Marvell>> | ||
| Line 97: | Line 99: | ||
| Protect Flash Monitor space | Protect Flash Monitor space | ||
| | | ||
| - | === Restart === | + | ==== Restart |
| Marvell>> | Marvell>> | ||
| | | ||
| - | === 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, | The netconsole configuration rely on some environment variables: **ipaddr**, **ncip**, **stdin**, **stdout** and **stderr** (for more information, | ||
| 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 < | ||
| + | ns2> sav | ||
| + | Saving Environment to SPI Flash... | ||
| + | ns2> run update_uboot | ||
| + | Using egiga0 device | ||
| + | TFTP from server 192.168.1.19; | ||
| + | Filename ' | ||
| + | Load address: 0x800000 | ||
| + | Loading: ################# | ||
| + | done | ||
| + | Bytes transferred = 239836 (3a8dc hex) | ||
| + | SF: Detected MX25L4005 with page size 64 KiB, total 512 KiB | ||
| + | |||
| ===== Links ===== | ===== Links ===== | ||
| * [[http:// | * [[http:// | ||