User Tools

Site Tools


ubootfororionsocs

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
ubootfororionsocs [2011/07/13 09:01]
89.234.168.65 Add build section (moved from ns2 page)
ubootfororionsocs [2011/07/15 21:06]
simon
Line 1: Line 1:
-====== ​Extending ​U-Boot support for Orion SoC  ​======+====== U-Boot support for Orion SoCs  ​======
  
 ===== Overview ===== ===== Overview =====
Line 20: Line 20:
   * Technologic Systems TS-78xx   * Technologic Systems TS-78xx
  
-===== The u-boot-lacie git repo =====+===== U-Boot =====
  
-[[http://​git.lacie-nas.org/?​p=u-boot-lacie.git;​a=summary|This repo]] provides two branches:+See out [[uboot|U-Boot main page]].
  
-  * **master** is kept up-to-date by merging the master branches of custodian repo that have orion5x-related commits. +===== To-do list =====
-  * **testing** is master plus patches that have not yet made it into  any custodian'​s u-boot repo.+
  
-WARNING: testing is **//​volatile//​**:​ it may roll back on a patch that eventually proved bad, or move sideways from one version of a patch to another. Its history will be shaky. Hey, this is a //testing// branch. On the other hand, master will only be a merge of custodian trees, so you can reasonably expect it to contain commits that //will// end up in mainline u-boot. +   adapt orion5x ​edminiv2 ​or relocation (wip in -next
- +   * add initial support for net5big ​(based upon reloc adaptation
-===== Update from LaCie to mainline ===== +   ​* ​add initial support for net2big ​(based upon reloc adaptation
- +   ​* ​add I2C support to net5big 
- +   ​* ​add PCI support ​to net5big 
-             ​_ ​          ____ _ +   ​add SATA over PCI support ​to net5big
-            | |    __ _ / ___(____ +
-            | |   ​/ _` | |   | |/ _ \ +
-            | |___ (_| | |___| |  __/ +
-            |_____\__,​_|\____|_|\___| +
-   ​_ ​  ​_ ​    ​____ ​             _ +
-  | | | |   | __ )  ___   ___ | |_ +
-  | | | |___|  _ \ / _ \ / _ \| __| +
-  | |_| |___| |_) | (_) | (_| |_ +
-   \___/    |____/ \___/ \___/ \__|  ​** LOADER ** +
-   ** MARVELL BOARD: ASTON_NS REV: 222 LE +
-  Hold rear button - long :  FAIL +
-   +
-   +
-  U-Boot 1.1.4 (Jan 17 2011 - 21:48:29Marvell version: 3.4.16 ​ LaCie 1.5.9 256MB +
-   +
-  U-Boot code: 06000000 -> 060701D0 ​ BSS: -> 060BDAA0 +
-   +
-  Soc: 88F6281 A0 (DDR2) +
-  CPU running @ 800Mhz L2 running @ 400Mhz +
-  SysClock = 200Mhz , TClock = 166Mhz +
-   +
-  DRAM CAS Latency = 3 tRP = 3 tRAS = 9 tRCD=3 +
-  DRAM CS[0] base 0x00000000 ​  ​size 256MB +
-  DRAM Total size 256MB  16bit width +
-  [512kB@f8000000] Flash: 512 kB +
-  Addresses 98M - 0M are saved for the U-Boot usage. +
-  Mem malloc Initialization (98M - 97M): Done +
-  ​*** Warning - bad CRC, using default environment +
-   +
-   +
-  CPU : Marvell Feroceon (Rev 1) +
-   +
-  Streaming disabled +
-  Write allocate disabled +
-   +
-   +
-  USB 0: host mode +
-  PEX 0: interface detected no Link. +
-  Net:   ​egiga0 [PRIME] +
-  Waiting for LUMP (3) +
-   +
-  Abort +
-  no lump receive; continuing +
-The LaCie stock U-Boot comes with a huge limitation. The boot sequence is hardcoded within the U-Boot binary. At reset, U-Boot reinitialize the boot environment variables with the built-in ones. 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). +
- +
-This section present step by step how to update the stock U-Boot with a mainline version. 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 the user don't have to build/buy a serial cable. +
- +
-  ​Run [[CLUNC|clunc]] and connect ​to the LaCie U-Boot console. +
- +
-  $ ./clunc -i <​NAS_IP>​ +
- +
-  ​Setup a tftp server and install the new u-boot image in the tftp directory (could be /​var/​tftpboot). +
- +
-  $ wget ftp://​ftp.lacie-nas.org/​u-boot/​u-boot-netspace_v2.kwb -O /​var/​tftpboot/​u-boot-netspace_v2.kwb +
- +
-  * Configure some U-Boot network environment variables. In the following example, replace ''​${serverip}''​ with the tftp server IP address and replace ''​${ipaddr}''​ with a valid and free IP address. +
- +
-  Marvell>>​ setenv ipaddr ${ipaddr}; setenv serverip ${serverip} +
- +
-  * Flash the new U-Boot image. +
- +
-  Marvell>>​ bubt u-boot-netspace_v2.kwb +
-  Using egiga0 device +
-  TFTP from server 192.168.0.13;​ our IP address is 192.168.0.17 +
-  Filename '​u-boot-new.kwb'​. +
-  Load address: 0x2000000 +
-  Loading: ##########################################​ +
-  done +
-  Bytes transferred = 214220 (344cc hex) +
-  Un-Protect Flash Monitor space +
-   +
-  **Warning** +
-  If U-Boot Endiannes is going to change (LE->BE or BE->LE), Then Env parameters should be overriden.. +
-  Override Env parameters? (y/n) n +
-  Erase 0 - 125 sectors... +
-  ................................................................. +
-  ............................................................. +
-  Copy to Flash... done +
-  Protect Flash Monitor space +
- +
-  * Restart. +
- +
-  Marvell>>​ reset +
- +
-  * Install the U-Boot **netconsole** tool.+
    
-Note that U-Boot mainline don't provide a magic packet mechanism to configure the IP address. It means that [[CLUNC|clunc]] becomes useless from this point. 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: the IP address is 192.168.1.111 and the netconsole is configured to broadcast messages. As a consequence,​ the server IP **must belong** to the subnetwork 192.168.1.0. Moreover **netcat** don't handle the broadcast messages. Instead, the U-Boot tools **netconsole** and **ncb** must be used. 
- 
-  * Connect to U-Boot via netconsole and interrupt boot process (Ctrl-C). 
- 
-  $ ./​tools/​netconsole 192.168.1.111 
-  ​ 
-  U-Boot 2010.12-00216-g5bbbf69 (Jan 24 2011 - 21:38:00) LaCie Network Space v2 
-  ​ 
-  SoC:   ​Kirkwood 88F6281_A0 
-  DRAM:  256 MiB 
-  SF: Detected MX25L4005A with page size 256, total 512 KiB 
-  SF: disable write protection 
-  *** Warning - bad CRC, using default environment 
-  ​ 
-  In:    serial 
-  Out:   ​serial 
-  Err:   ​serial 
-  Net:   ​egiga0 
-  88E1116 Initialized on egiga0 
-  Hit any key to stop autoboot: ​ 3 
-  ns2> 
- 
-===== Some usage examples ===== 
- 
-==== Save environment on SPI flash ==== 
- 
-  Marvell>>​ set bootargs console=ttyS0,​115200 
-  Marvell>>​ saveenv 
-  Saving Environment to SPI Flash... 
-  SF: Detected MX25L4005A with page size 256, total 512 KiB 
-  Erasing SPI flash...Writing to SPI flash...done 
- 
-==== USB boot ==== 
- 
-  Marvell>>​ usb start 
-  Marvell>>​ usb storage 
-    Device 0: Vendor: UFD      Rev: 7.77 Prod: 
-              Type: Hard Disk 
-              Capacity: 125.0 MB = 0.1 GB (256000 x 512) 
-  Marvell>>​ fatls usb 0:1 
-              boot/ 
-  ​ 
-  0 file(s), 1 dir(s) 
-  ​ 
-  Marvell>>​ fatls usb 0:1 /boot 
-              ./ 
-              ../ 
-    4902372 ​  ​uimage-kw-2.6.37-rc3-miniroot ​ 
-  ​ 
-  1 file(s), 2 dir(s) 
-  ​ 
-  Marvell>>​ fatload usb 0:1 0x800000 /​boot/​uimage-kw-2.6.37-rc3-miniroot 4902372 
-  reading /​boot/​uimage-kw-2.6.37-rc3-miniroot 
-  ​ 
-  4902372 bytes read 
-  Marvell>>​ setenv bootargs console=ttyS0,​115200 
-  Marvell>>​ bootm 0x800000 
-  ## Booting kernel from Legacy Image at 00800000 ... 
-     Image Name:   ​Linux-2.6.37-rc3-00799-g2dd0ff5- 
-     Image Type:   ARM Linux Kernel Image (uncompressed) 
-     Data Size:    4902308 Bytes = 4.7 MiB 
-     Load Address: 00008000 
-     Entry Point: ​ 00008000 
-     ​Verifying Checksum ... OK 
-     ​Loading Kernel Image ... OK 
-  OK 
-  ​ 
-  Starting kernel ... 
- 
-==== Disk boot ==== 
- 
-  SoC:   ​Kirkwood 88F6281_A0 
-  DRAM:  256 MiB 
-  SF: Detected MX25L4005A with page size 256, total 512 KiB 
-  *** Warning - bad CRC, using default environment 
-  ​ 
-  In:    serial 
-  Out:   ​serial 
-  Err:   ​serial 
-  Net:   ​egiga0 
-  88E1116 Initialized on egiga0 
-  Marvell>>​ ide reset 
-  ​ 
-  Reset IDE: Bus 0: ........OK 
-    Device 0: Model: SAMSUNG HD103SI ​ Firm: 1AG01118 Ser#: S1Y5J1KS504652 
-              Type: Hard Disk 
-              Supports 48-bit addressing 
-              Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512) 
-  ​ 
-  Marvell>>​ ide part 0 
-  ​ 
-  Partition Map for IDE device 0  --   ​Partition Type: DOS 
-  ​ 
-  Partition ​    Start Sector ​    Num Sectors ​    Type 
-      1                 ​63 ​        ​1975932 ​     83 
-      2          195334335 ​      ​195334335 ​     83 
-  Marvell>>​ ext2ls ide 0:1 /boot 
-  Failed to mount ext2 filesystem... 
-  <​DIR> ​      4096 . 
-  <​DIR> ​      4096 .. 
-           ​4507632 uImage-kw-2.6.36-rc2-pm-miniroot 
-  ​ 
-  Marvell>>​ ext2load ide 0:1 0x800000 /​boot/​uImage-kw-2.6.36-rc2-pm-miniroot 
-  Loading file "/​boot/​uImage-kw-2.6.36-rc2-pm-miniroot"​ from ide device 0:1 (hda1) 
-  4507632 bytes read 
-  Marvell>>​ bootm 0x800000 
-  ## Booting kernel from Legacy Image at 00800000 ... 
-     Image Name:   ​Linux-2.6.36-rc2-00011-g63a3f43- 
-     Image Type:   ARM Linux Kernel Image (uncompressed) 
-     Data Size:    4507568 Bytes = 4.3 MiB 
-     Load Address: 00008000 
-     Entry Point: ​ 00008000 
-     ​Verifying Checksum ... OK 
-     ​Loading Kernel Image ... OK 
-  OK 
-  ​ 
-  Starting kernel ... 
- 
-==== Update U-Boot ==== 
- 
-  ns2> setenv ipaddr 192.168.0.17;​ setenv serverip 192.168.0.13;​ 
-  ns2> tftpboot 0x800000 u-boot-netspace_v2.kwb 
-  Using egiga0 device 
-  TFTP from server 192.168.0.13;​ our IP address is 192.168.0.17 
-  Filename '​u-boot-netspace_v2.kwb'​. 
-  Load address: 0x800000 
-  Loading: ##########################################​ 
-  done 
-  Bytes transferred = 214220 (344cc hex) 
-  ns2> fl probe 0:0 
-  SF: Detected MX25L4005A with page size 256, total 512 KiB 
-  512 KiB MX25L4005A at 0:0 is now current device 
-  ns2> sf erase 0 0x40000 
-  Usage: sf erase offset len 
-  ns2> sf erase 0 0x40000 
-  ns2> sf write 0x800000 0 0x40000 
-  ns2> reset 
-  resetting ... 
-  ​ 
-  ​ 
-  U-Boot 2010.12-00216-g5bbbf69 (Jan 24 2011 - 21:38:00) LaCie Network Space v2 
-  ​ 
-  SoC:   ​Kirkwood 88F6281_A0 
-  DRAM:  256 MiB 
-  SF: Detected MX25L4005A with page size 256, total 512 KiB 
-  *** Warning - bad CRC, using default environment 
-  ​ 
-  In:    serial 
-  Out:   ​serial 
-  Err:   ​serial 
-  Net:   ​egiga0 
-  88E1116 Initialized on egiga0 
-  Hit any key to stop autoboot: ​ 3 
-  ns2> 
- 
-===== Build ===== 
- 
-Sources are available in the repository: [[http://​git.lacie-nas.org/?​p=u-boot-lacie.git;​a=shortlog;​h=refs/​heads/​netspace_v2|u-boot-lacie.git]] (branch netspace_v2) 
- 
-  git clone git://​lacie-nas.org/​u-boot-lacie.git 
-  git checkout -b netspace_v2 origin/​netspace_v2 
- 
-To compile, use the following commands (toolchain path and cross-compiler name to be replaced): 
- 
-  PATH=/​usr/​local/​x-tools/​arm-2010q1/​bin/:​$PATH CROSS_COMPILE=arm-none-eabi- make netspace_v2_config 
-  PATH=/​usr/​local/​x-tools/​arm-2010q1/​bin/:​$PATH CROSS_COMPILE=arm-none-eabi- make u-boot.kwb 
-  ​ 
-Some pre-compiled images are available [[ftp://​lacie-nas.org/​u-boot|here]] 
- 
 ===== Links ===== ===== Links =====
  
ubootfororionsocs.txt · Last modified: 2011/07/17 13:04 by 82.234.233.9