[FE training-materials-updates] Update instructions to use U-Boot only

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed May 29 15:24:25 CEST 2013


Repository : git://git.free-electrons.com/training-materials.git

On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=bf8fd0def3a51bf6b7fb93b45ec6860ad2572d81

>---------------------------------------------------------------

commit bf8fd0def3a51bf6b7fb93b45ec6860ad2572d81
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Wed May 29 15:22:40 2013 +0200

    Update instructions to use U-Boot only
    
    It also adds a small diagram that shows the layout of the beginning of
    the NAND flash (with U-Boot MLO, U-Boot and U-Boot environment).
    
    Beware:
    
     * The file to flash is u-boot.img, not u-boot.bin.
    
     * The u-boot.img should be flashed with the hardware ECC (previously
       it had to be flashed with software ECC).
    
     * The offset of the environment has changed: 0x260000 instead of
       0x200000.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


>---------------------------------------------------------------

bf8fd0def3a51bf6b7fb93b45ec6860ad2572d81
 .../sysdev-u-boot/flash-map.dia                    |  316 ++++++++++----------
 labs/sysdev-u-boot/sysdev-u-boot.tex               |  176 ++++-------
 2 files changed, 223 insertions(+), 269 deletions(-)

diff --git a/slides/sysdev-block-filesystems/mixing-filesystems.dia b/labs/sysdev-u-boot/flash-map.dia
similarity index 66%
copy from slides/sysdev-block-filesystems/mixing-filesystems.dia
copy to labs/sysdev-u-boot/flash-map.dia
index de3390e..dfa1f2d 100644
--- a/slides/sysdev-block-filesystems/mixing-filesystems.dia
+++ b/labs/sysdev-u-boot/flash-map.dia
@@ -65,111 +65,71 @@
   <dia:layer name="Arrière-plan" visible="true" active="true">
     <dia:object type="Standard - Box" version="0" id="O0">
       <dia:attribute name="obj_pos">
-        <dia:point val="22,4"/>
+        <dia:point val="18,8.20993"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="21.95,3.95;28.05,12.05"/>
+        <dia:rectangle val="17.95,8.15993;36.05,12.05"/>
       </dia:attribute>
       <dia:attribute name="elem_corner">
-        <dia:point val="22,4"/>
+        <dia:point val="18,8.20993"/>
       </dia:attribute>
       <dia:attribute name="elem_width">
-        <dia:real val="6"/>
+        <dia:real val="18"/>
       </dia:attribute>
       <dia:attribute name="elem_height">
-        <dia:real val="8"/>
+        <dia:real val="3.7900735359673838"/>
       </dia:attribute>
       <dia:attribute name="border_width">
         <dia:real val="0.10000000149011612"/>
       </dia:attribute>
       <dia:attribute name="border_color">
-        <dia:color val="#5cacff"/>
+        <dia:color val="#868686"/>
       </dia:attribute>
       <dia:attribute name="inner_color">
-        <dia:color val="#d8e5e5"/>
+        <dia:color val="#e5e5e5"/>
       </dia:attribute>
       <dia:attribute name="show_background">
         <dia:boolean val="true"/>
       </dia:attribute>
     </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O1">
+    <dia:object type="Standard - Line" version="0" id="O1">
       <dia:attribute name="obj_pos">
-        <dia:point val="22,12"/>
+        <dia:point val="25,8.2"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="21.95,11.95;28.05,18.05"/>
+        <dia:rectangle val="24.95,8.15;25.05,12.05"/>
       </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="22,12"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="6"/>
-      </dia:attribute>
-      <dia:attribute name="border_width">
-        <dia:real val="0.10000000149011612"/>
-      </dia:attribute>
-      <dia:attribute name="border_color">
-        <dia:color val="#d9cb2f"/>
-      </dia:attribute>
-      <dia:attribute name="inner_color">
-        <dia:color val="#fff8a8"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="22.05,19.75"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="22,19.7;28.1,23.8"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="22.05,19.75"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="4"/>
-      </dia:attribute>
-      <dia:attribute name="border_width">
-        <dia:real val="0.10000000149011612"/>
-      </dia:attribute>
-      <dia:attribute name="border_color">
-        <dia:color val="#cc1f1a"/>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="25,8.2"/>
+        <dia:point val="25,12"/>
       </dia:attribute>
-      <dia:attribute name="inner_color">
-        <dia:color val="#ffacac"/>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
       </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
+      <dia:attribute name="line_color">
+        <dia:color val="#868686"/>
       </dia:attribute>
     </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O3">
+    <dia:object type="Standard - Text" version="1" id="O2">
       <dia:attribute name="obj_pos">
-        <dia:point val="29.25,11.35"/>
+        <dia:point val="17.6594,12.9731"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="29.25,10.5625;35.0225,11.55"/>
+        <dia:rectangle val="17.6594,12.6056;18.3719,13.0681"/>
       </dia:attribute>
       <dia:attribute name="text">
         <dia:composite type="text">
           <dia:attribute name="string">
-            <dia:string>#Block storage#</dia:string>
+            <dia:string>#0x0#</dia:string>
           </dia:attribute>
           <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
+            <dia:font family="monospace" style="0" name="Courier"/>
           </dia:attribute>
           <dia:attribute name="height">
-            <dia:real val="1.0583332926034927"/>
+            <dia:real val="0.49388886988162994"/>
           </dia:attribute>
           <dia:attribute name="pos">
-            <dia:point val="29.25,11.35"/>
+            <dia:point val="17.6594,12.9731"/>
           </dia:attribute>
           <dia:attribute name="color">
             <dia:color val="#000000"/>
@@ -183,26 +143,26 @@
         <dia:enum val="3"/>
       </dia:attribute>
     </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O4">
+    <dia:object type="Standard - Text" version="1" id="O3">
       <dia:attribute name="obj_pos">
-        <dia:point val="29.4,21.8"/>
+        <dia:point val="19.0863,13.8055"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="29.4,21.0125;31.2625,22"/>
+        <dia:rectangle val="19.0863,13.438;20.7488,13.9005"/>
       </dia:attribute>
       <dia:attribute name="text">
         <dia:composite type="text">
           <dia:attribute name="string">
-            <dia:string>#RAM#</dia:string>
+            <dia:string>#0x80000#</dia:string>
           </dia:attribute>
           <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
+            <dia:font family="monospace" style="0" name="Courier"/>
           </dia:attribute>
           <dia:attribute name="height">
-            <dia:real val="1.0583332926034927"/>
+            <dia:real val="0.49388886988162994"/>
           </dia:attribute>
           <dia:attribute name="pos">
-            <dia:point val="29.4,21.8"/>
+            <dia:point val="19.0863,13.8055"/>
           </dia:attribute>
           <dia:attribute name="color">
             <dia:color val="#000000"/>
@@ -216,26 +176,26 @@
         <dia:enum val="3"/>
       </dia:attribute>
     </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O5">
+    <dia:object type="Standard - Text" version="1" id="O4">
       <dia:attribute name="obj_pos">
-        <dia:point val="22.905,5.2775"/>
+        <dia:point val="23.9512,13.0379"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="22.905,4.49;27.17,5.4775"/>
+        <dia:rectangle val="23.9512,12.6704;25.8512,13.1329"/>
       </dia:attribute>
       <dia:attribute name="text">
         <dia:composite type="text">
           <dia:attribute name="string">
-            <dia:string>#squashfs#</dia:string>
+            <dia:string>#0x260000#</dia:string>
           </dia:attribute>
           <dia:attribute name="font">
-            <dia:font family="sans" style="80" name="Helvetica-Bold"/>
+            <dia:font family="monospace" style="0" name="Courier"/>
           </dia:attribute>
           <dia:attribute name="height">
-            <dia:real val="1.0583332926034927"/>
+            <dia:real val="0.49388886988162994"/>
           </dia:attribute>
           <dia:attribute name="pos">
-            <dia:point val="22.905,5.2775"/>
+            <dia:point val="23.9512,13.0379"/>
           </dia:attribute>
           <dia:attribute name="color">
             <dia:color val="#000000"/>
@@ -249,92 +209,83 @@
         <dia:enum val="3"/>
       </dia:attribute>
     </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O6">
+    <dia:object type="Standard - Line" version="0" id="O5">
       <dia:attribute name="obj_pos">
-        <dia:point val="28.55,4.1"/>
+        <dia:point val="18,12"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="28.1882,4.05;28.9118,18.15"/>
+        <dia:rectangle val="17.975,11.975;18.025,12.625"/>
       </dia:attribute>
       <dia:attribute name="conn_endpoints">
-        <dia:point val="28.55,4.1"/>
-        <dia:point val="28.55,18.1"/>
+        <dia:point val="18,12"/>
+        <dia:point val="18,12.6"/>
       </dia:attribute>
       <dia:attribute name="numcp">
         <dia:int val="1"/>
       </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
+      <dia:attribute name="line_width">
+        <dia:real val="0.05000000074505806"/>
       </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O6">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20,12"/>
       </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="19.975,11.975;20.025,13.425"/>
       </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20,12"/>
+        <dia:point val="20,13.4"/>
       </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
       </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
+      <dia:attribute name="line_width">
+        <dia:real val="0.05000000074505806"/>
       </dia:attribute>
     </dia:object>
     <dia:object type="Standard - Line" version="0" id="O7">
       <dia:attribute name="obj_pos">
-        <dia:point val="28.6168,19.79"/>
+        <dia:point val="25,12"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="28.2003,19.7392;28.9665,23.8508"/>
+        <dia:rectangle val="24.975,11.975;25.025,12.625"/>
       </dia:attribute>
       <dia:attribute name="conn_endpoints">
-        <dia:point val="28.6168,19.79"/>
-        <dia:point val="28.55,23.8"/>
+        <dia:point val="25,12"/>
+        <dia:point val="25,12.6"/>
       </dia:attribute>
       <dia:attribute name="numcp">
         <dia:int val="1"/>
       </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
+      <dia:attribute name="line_width">
+        <dia:real val="0.05000000074505806"/>
       </dia:attribute>
     </dia:object>
     <dia:object type="Standard - Text" version="1" id="O8">
       <dia:attribute name="obj_pos">
-        <dia:point val="24.055,13.3275"/>
+        <dia:point val="25.9998,13.8217"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="24.055,12.54;26.17,13.5275"/>
+        <dia:rectangle val="25.9998,13.4542;27.8998,13.9167"/>
       </dia:attribute>
       <dia:attribute name="text">
         <dia:composite type="text">
           <dia:attribute name="string">
-            <dia:string>#ext3#</dia:string>
+            <dia:string>#0x2e0000#</dia:string>
           </dia:attribute>
           <dia:attribute name="font">
-            <dia:font family="sans" style="80" name="Helvetica-Bold"/>
+            <dia:font family="monospace" style="0" name="Courier"/>
           </dia:attribute>
           <dia:attribute name="height">
-            <dia:real val="1.0583332926034927"/>
+            <dia:real val="0.49388886988162994"/>
           </dia:attribute>
           <dia:attribute name="pos">
-            <dia:point val="24.055,13.3275"/>
+            <dia:point val="25.9998,13.8217"/>
           </dia:attribute>
           <dia:attribute name="color">
             <dia:color val="#000000"/>
@@ -348,26 +299,44 @@
         <dia:enum val="3"/>
       </dia:attribute>
     </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O9">
+    <dia:object type="Standard - Line" version="0" id="O9">
       <dia:attribute name="obj_pos">
-        <dia:point val="23.71,20.9175"/>
+        <dia:point val="27,12"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="23.71,20.13;26.475,21.1175"/>
+        <dia:rectangle val="26.975,11.975;27.025,13.425"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="27,12"/>
+        <dia:point val="27,13.4"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.05000000074505806"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="18.4,10.4"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="18.4,9.9275;19.5025,10.52"/>
       </dia:attribute>
       <dia:attribute name="text">
         <dia:composite type="text">
           <dia:attribute name="string">
-            <dia:string>#tmpfs#</dia:string>
+            <dia:string>#MLO#</dia:string>
           </dia:attribute>
           <dia:attribute name="font">
-            <dia:font family="sans" style="80" name="Helvetica-Bold"/>
+            <dia:font family="sans" style="0" name="Helvetica"/>
           </dia:attribute>
           <dia:attribute name="height">
-            <dia:real val="1.0583332926034927"/>
+            <dia:real val="0.63499997556209564"/>
           </dia:attribute>
           <dia:attribute name="pos">
-            <dia:point val="23.71,20.9175"/>
+            <dia:point val="18.4,10.4"/>
           </dia:attribute>
           <dia:attribute name="color">
             <dia:color val="#000000"/>
@@ -381,34 +350,32 @@
         <dia:enum val="3"/>
       </dia:attribute>
     </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O10">
+    <dia:object type="Standard - Text" version="1" id="O11">
       <dia:attribute name="obj_pos">
-        <dia:point val="25.05,7.5"/>
+        <dia:point val="21.6,10.4"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="22.415,6.845;27.685,9.43139"/>
+        <dia:rectangle val="21.6,9.9275;23.305,10.52"/>
       </dia:attribute>
       <dia:attribute name="text">
         <dia:composite type="text">
           <dia:attribute name="string">
-            <dia:string>#read-only
-compressed
-root filesystem#</dia:string>
+            <dia:string>#U-Boot#</dia:string>
           </dia:attribute>
           <dia:attribute name="font">
             <dia:font family="sans" style="0" name="Helvetica"/>
           </dia:attribute>
           <dia:attribute name="height">
-            <dia:real val="0.88194441050291061"/>
+            <dia:real val="0.63499997556209564"/>
           </dia:attribute>
           <dia:attribute name="pos">
-            <dia:point val="25.05,7.5"/>
+            <dia:point val="21.6,10.4"/>
           </dia:attribute>
           <dia:attribute name="color">
             <dia:color val="#000000"/>
           </dia:attribute>
           <dia:attribute name="alignment">
-            <dia:enum val="1"/>
+            <dia:enum val="0"/>
           </dia:attribute>
         </dia:composite>
       </dia:attribute>
@@ -416,29 +383,27 @@ root filesystem#</dia:string>
         <dia:enum val="3"/>
       </dia:attribute>
     </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O11">
+    <dia:object type="Standard - Text" version="1" id="O12">
       <dia:attribute name="obj_pos">
-        <dia:point val="25.14,14.595"/>
+        <dia:point val="26,10.2"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="22.7988,13.94;27.4813,17.4083"/>
+        <dia:rectangle val="25.1475,9.58625;26.8525,10.8137"/>
       </dia:attribute>
       <dia:attribute name="text">
         <dia:composite type="text">
           <dia:attribute name="string">
-            <dia:string>#read-write
-user and
-configuration
-data#</dia:string>
+            <dia:string>#U-Boot
+env#</dia:string>
           </dia:attribute>
           <dia:attribute name="font">
             <dia:font family="sans" style="0" name="Helvetica"/>
           </dia:attribute>
           <dia:attribute name="height">
-            <dia:real val="0.88194441050291061"/>
+            <dia:real val="0.63499997556209564"/>
           </dia:attribute>
           <dia:attribute name="pos">
-            <dia:point val="25.14,14.595"/>
+            <dia:point val="26,10.0588"/>
           </dia:attribute>
           <dia:attribute name="color">
             <dia:color val="#000000"/>
@@ -449,36 +414,35 @@ data#</dia:string>
         </dia:composite>
       </dia:attribute>
       <dia:attribute name="valign">
-        <dia:enum val="3"/>
+        <dia:enum val="2"/>
       </dia:attribute>
     </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O12">
+    <dia:object type="Standard - Text" version="1" id="O13">
       <dia:attribute name="obj_pos">
-        <dia:point val="25.045,22.135"/>
+        <dia:point val="31.2,10.2"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="22.8475,21.48;27.2425,23.1844"/>
+        <dia:rectangle val="31.2,9.7275;31.6875,10.32"/>
       </dia:attribute>
       <dia:attribute name="text">
         <dia:composite type="text">
           <dia:attribute name="string">
-            <dia:string>#read write
-volatile data#</dia:string>
+            <dia:string>#...#</dia:string>
           </dia:attribute>
           <dia:attribute name="font">
             <dia:font family="sans" style="0" name="Helvetica"/>
           </dia:attribute>
           <dia:attribute name="height">
-            <dia:real val="0.88194441050291061"/>
+            <dia:real val="0.63499997556209564"/>
           </dia:attribute>
           <dia:attribute name="pos">
-            <dia:point val="25.045,22.135"/>
+            <dia:point val="31.2,10.2"/>
           </dia:attribute>
           <dia:attribute name="color">
             <dia:color val="#000000"/>
           </dia:attribute>
           <dia:attribute name="alignment">
-            <dia:enum val="1"/>
+            <dia:enum val="0"/>
           </dia:attribute>
         </dia:composite>
       </dia:attribute>
@@ -486,5 +450,45 @@ volatile data#</dia:string>
         <dia:enum val="3"/>
       </dia:attribute>
     </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O14">
+      <dia:attribute name="obj_pos">
+        <dia:point val="27,8.20993"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="26.95,8.15993;27.05,12.05"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="27,8.20993"/>
+        <dia:point val="27,12"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#868686"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="1"/>
+        <dia:connection handle="1" to="O0" connection="6"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O15">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20,8.2"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="19.95,8.15;20.05,12.05"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20,8.2"/>
+        <dia:point val="20,12"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#868686"/>
+      </dia:attribute>
+    </dia:object>
   </dia:layer>
 </dia:diagram>
diff --git a/labs/sysdev-u-boot/sysdev-u-boot.tex b/labs/sysdev-u-boot/sysdev-u-boot.tex
index af91b81..843969a 100644
--- a/labs/sysdev-u-boot/sysdev-u-boot.tex
+++ b/labs/sysdev-u-boot/sysdev-u-boot.tex
@@ -1,7 +1,7 @@
 \subchapter{Bootloader - U-Boot}{Objectives: Set up serial
-  communication, compile and install the X-Loader and U-Boot
-  bootloaders, use basic U-Boot commands, set up TFTP communication
-  with the development workstation.}
+  communication, compile and install the U-Boot bootloader, use basic
+  U-Boot commands, set up TFTP communication with the development
+  workstation.}
 
 As the bootloader is the first piece of software executed by a
 hardware platform, the installation procedure of the bootloader is
@@ -104,79 +104,14 @@ Then, remove and insert your card again.
 
 Your MMC/SD card is ready to use.
 
-\section{X-loader setup}
-
-Download the X-loader source code from the IGEP support Git
-repository:\footnote{We are using an old version of X-Loader, because
-  the most recent versions provided by ISEE have been modified to use
-  a completely non-standard boot procedure, that we don't think is
-  interesting to present in a training session. The new ISEE boot
-  procedure places the kernel image inside a JFFS2 filesystem, and
-  completely bypasses U-Boot. This is not standard, and the procedure
-  with two bootloaders presented below is much more common at the
-  moment on most embedded platforms.}
-
-\begin{verbatim}
-sudo apt-get install git
-git clone git://git.igep.es/pub/scm/x-loader.git
-cd x-loader
-git checkout v1.4.4-3
-\end{verbatim}
-
-Then, we need to apply a {\em patch} that adds NAND support to
-X-Loader:
-
-\begin{verbatim}
-cat ../x-loader-1.4.4-3-igep-nand-support.patch | patch -p1
-\end{verbatim}
-
-In order to compile the X-loader, you need to:
-\begin{itemize}
-
-\item set the \code{CROSS_COMPILE} environment variable:\\
-\code{export CROSS_COMPILE=arm-linux-}
-
-\item specify the \code{PATH} to the toolchain that you made:\\
-\code{export PATH=/usr/local/xtools/arm-unknown-linux-uclibcgnueabi/bin:$PATH}
-
-\item run \code{make igep0020-sdcard_config} to set the configuration
-  for the target board.
-
-\item run \code{make} to build the image
-
-\end{itemize}
-
-The resulting file is stored in the \code{x-loader} main directory as
-\code{x-load.bin}. This file must be {\em signed}\footnote{In fact,
-  for a General Purpose (GP) device, the signature only consists of
-  adding a “Table of Contents” at the beginning of the image,
-  explaining which program to execute. Signatures are using in variants
-  of the OMAP CPUs that implement some security features, which will refuse
-  to load an X-loader image that wasn't signed with an authorized key.}
-  in order to be executed by the processor. Using the \code{signGP} tool in the \code{contrib/}
-subdirectory, sign the \code{x-load.bin} file:
-
-\begin{verbatim}
-./contrib/signGP x-load.bin
-\end{verbatim}
-
-This produces an \code{x-load.bin.ift} file. You can copy it to the
-MMC card, renaming it as \code{MLO}.
-
 \section{U-Boot setup}
 
 Download U-Boot from the mainline igep download site:
 
 \begin{verbatim}
-wget ftp://ftp.denx.de/pub/u-boot/u-boot-2011.12.tar.bz2
-tar xvf u-boot-2011.12.tar.bz2
-cd u-boot-2011.12
-\end{verbatim}
-
-Now we need to apply a patch to add NAND support for the IGEP board:
-
-\begin{verbatim}
-cat ../u-boot-2011.12-igep-nand-support.patch | patch -p1
+wget ftp://ftp.denx.de/pub/u-boot/u-boot-2013.04.tar.bz2
+tar xvf u-boot-2013.04.tar.bz2
+cd u-boot-2013.04
 \end{verbatim}
 
 Get an understanding of its configuration and compilation steps by
@@ -187,12 +122,11 @@ Basically, you need to:
 
 \begin{itemize}
 
-\item set the \code{CROSS_COMPILE} environment variable (you should
-  have already done it when you compiled X-loader);
+\item set the \code{CROSS_COMPILE} environment variable;
 
 \item run \code{make <NAME>_config}, where \code{<NAME>} is the name
-  of a configuration file in \code{include/configs/}. For our
-  platform, the configuration file is
+  of your board as declared in the \code{boards.cfg} file. Note that
+  for our platform, the configuration file is
   \code{include/configs/igep0020.h}. Read this file to get an idea of
   how a U-Boot configuration file is written;
 
@@ -203,7 +137,9 @@ Basically, you need to:
 
 \end{itemize}
 
-You can now copy the generated \code{u-boot.bin} file to the MMC card.
+You can now copy the generated \code{MLO} and \code{u-boot.img} files
+to the MMC card. \code{MLO} is the first stage bootloader,
+\code{u-boot.img} is the second stage bootloader.
 
 Unmount the MMC card partition.
 
@@ -244,31 +180,30 @@ that it boots your new bootloaders. You can verify this by checking
 the build dates:
 
 \begin{verbatim}
-Texas Instruments X-Loader 1.4.4-3 (May  4 2012 - 10:26:41)
-CPU Release: 0x2b89102f - 0x2
-XLoader: CPU status = 0xe00
-XLoader: Processor DM3730 - ES1.2
-XLoader: Memory Manufacturer: Micron (2c)
-Loading u-boot.bin from mmc
+U-Boot SPL 2013.04 (May 29 2013 - 10:30:21)
+OMAP SD/MMC: 0
+reading u-boot.img
+reading u-boot.img
 
 
-U-Boot 2011.12 (May 04 2012 - 10:31:05)
+U-Boot 2013.04 (May 29 2013 - 10:30:21)
 
 OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
-IGEP v2 board + LPDDR/ONENAND
+IGEPv2 + LPDDR/NAND
 I2C:   ready
 DRAM:  512 MiB
 NAND:  512 MiB
 MMC:   OMAP SD/MMC: 0
+*** Warning - bad CRC, using default environment
+
 In:    serial
 Out:   serial
 Err:   serial
-Die ID #1bd600029ff80000016842c80f03400d
+Die ID #255000029ff800000168580212029011
 Net:   smc911x-0
-Hit any key to stop autoboot:  3
 \end{verbatim}
 
-By the message {\em Loading u-boot.bin from mmc} you also get the
+By the message {\em Loading u-boot.img from mmc} you also get the
 confirmation that your U-Boot has correctly been loaded from the MMC
 device.
 
@@ -281,43 +216,65 @@ In U-Boot, type the \code{help} command, and explore the few commands available.
 
 \section{Reflashing from U-boot}
 
-We will flash X-loader, U-boot and later the kernel and filesystem in
-NAND flash. Let's first erase the whole NAND storage to remove its
-existing contents. This way, we are sure that what we find in NAND comes
-from our own manipulations:
+We will flash U-boot and later the kernel and filesystem in NAND
+flash. As far as bootloaders are concerned, the layout of the NAND
+flash will look like:
+
+\begin{center}
+  \includegraphics[width=\textwidth]{labs/sysdev-u-boot/flash-map.pdf}
+\end{center}
+
+\begin{itemize}
+\item Offset \code{0x0} for the first stage bootloader is dictated by
+  the hardware: the ROM code of the OMAP looks for a bootloader at
+  offset \code{0x0} in the NAND flash.
+\item Offset \code{0x80000} for the second stage bootloader is decided
+  by the first stage bootloader. This can be changed by changing the
+  U-Boot configuration.
+\item Offset \code{0x260000} of the U-Boot environment is also decided
+  by the U-Boot configuration.
+\end{itemize}
+
+Let's first erase the whole NAND storage to remove its existing
+contents. This way, we are sure that what we find in NAND comes from
+our own manipulations:
 
 \begin{verbatim}
 nand erase.chip
 \end{verbatim}
 
-We are going to reflash X-Loader in NAND. To do so, type the following commands:
+We are going to flash the first stage bootloader in NAND. To do so,
+type the following commands:
 
 \begin{verbatim}
 mmc rescan
 \end{verbatim}
 
-This initializes the MMC interface
+This initializes the MMC interface.
 
 \begin{verbatim}
 fatload mmc 0 80000000 MLO
 \end{verbatim}
-This loads the file from MMC 0 partition 0 to memory at address 0x80000000
+This loads the file from MMC 0 partition 0 to memory at address
+0x80000000.
 
 \begin{verbatim}
 nandecc hw
 \end{verbatim}
 
 This tells U-Boot to write data to NAND using the hardware ECC
-algorithm, which the ROM code of the OMAP uses to load X-Loader.
+algorithm, which the ROM code of the OMAP uses to load the first stage
+bootloader.
 
 \begin{verbatim}
 nand erase 0 80000
 \end{verbatim}
 
-This command erases a 0x80000 byte long space of NAND flash from offset 0
-\footnote{Of course, this is not needed here if you erased the whole NAND contents
-as instructed earlier. However, we prefer to write it here so that you
-don't forget next time you write anything to NAND.}
+This command erases a 0x80000 byte long space of NAND flash from
+offset 0\footnote{Of course, this is not needed here if you erased the
+  whole NAND contents as instructed earlier. However, we prefer to
+  write it here so that you don't forget next time you write anything
+  to NAND.}.
 
 \begin{verbatim}
 nand write 80000000 0 80000
@@ -330,30 +287,23 @@ destination is offset 0 of NAND flash. The length of the copy is
 before. It is important to erase the flash space before trying to
 write on it.
 
-Now that X-Loader has been transfered to NAND flash, you can now do the same
-with U-Boot. 
-
-You will have to flash U-Boot to NAND with the software ECC algorithm, which
-X-Loader uses to load U-Boot from NAND. This can be achieved by
-running the below command:
-
-\begin{verbatim}
-nandecc sw
-\end{verbatim}
+Now that the first stage has been transfered to NAND flash, you can
+now do the same with U-Boot.
 
-The storage offset in NAND is 0x80000 (just after
-the space reserved for X-Loader) and the length is 0x180000.
+The storage offset of U-Boot in the NAND is 0x80000 (just after the
+space reserved for the first stage bootloader) and the length is
+0x1e0000.
 
 After flashing the U-Boot image, also erase the U-boot environment
 variables defined by the manufacturer or by previous users of your
 board:
 
 \begin{verbatim}
-nand erase 200000 80000
+nand erase 260000 80000
 \end{verbatim}
 
 You can remove MMC card, then reset the IGEP board. You should see the
-freshly flashed X-Loader and U-Boot starting.
+freshly flashed U-Boot starting.
 
 You should now see the U-Boot prompt:
 



More information about the training-materials-updates mailing list