Difference between revisions of "Boot from MMC"

From Gumstix User Wiki
Jump to: navigation, search
m (Link to Overo instructions)
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://uwujojedeh.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 +
----
 +
=[http://uwujojedeh.co.cc CLICK HERE]=
 +
----
 +
</div>
 
The following instructions are for Gumstix Verdex boards. The procedure for an Overo can be found [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html here.]
 
The following instructions are for Gumstix Verdex boards. The procedure for an Overo can be found [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html here.]
 
   
 
   
Line 13: Line 21:
 
Delete any partitions on the disk, in this case there were two:
 
Delete any partitions on the disk, in this case there were two:
  
<pre>
+
&lt;pre&gt;
 
Command (m for help): d
 
Command (m for help): d
 
Partition number (1-4): 1
 
Partition number (1-4): 1
Line 19: Line 27:
 
Command (m for help): d
 
Command (m for help): d
 
Selected partition 2
 
Selected partition 2
</pre>
+
&lt;/pre&gt;
  
 
Create the kernel partition:
 
Create the kernel partition:
  
<pre>
+
&lt;pre&gt;
 
Command (m for help): n
 
Command (m for help): n
 
Partition number (1-4): 1
 
Partition number (1-4): 1
Line 29: Line 37:
 
Command (m for help): n
 
Command (m for help): n
 
Selected partition 2
 
Selected partition 2
</pre>
+
&lt;/pre&gt;
  
 
Set it to FAT16 file system:
 
Set it to FAT16 file system:
  
<pre>
+
&lt;pre&gt;
 
Command (m for help): t
 
Command (m for help): t
 
Selected partition 1
 
Selected partition 1
 
Hex code (type L to list codes): 6
 
Hex code (type L to list codes): 6
 
Changed system type of partition 1 to 6 (FAT16)
 
Changed system type of partition 1 to 6 (FAT16)
</pre>
+
&lt;/pre&gt;
  
 
Create the root fs partition:
 
Create the root fs partition:
  
<pre>
+
&lt;pre&gt;
 
Command (m for help): n
 
Command (m for help): n
 
Command action
 
Command action
Line 51: Line 59:
 
First cylinder (22-984, default 22): 22
 
First cylinder (22-984, default 22): 22
 
Last cylinder, +cylinders or +size{K,M,G} (22-984, default 984): 984
 
Last cylinder, +cylinders or +size{K,M,G} (22-984, default 984): 984
</pre>
+
&lt;/pre&gt;
  
 
Save the partition table:
 
Save the partition table:
  
<pre>
+
&lt;pre&gt;
 
Command (m for help): w
 
Command (m for help): w
 
The partition table has been altered!
 
The partition table has been altered!
Line 65: Line 73:
 
information.
 
information.
 
Syncing disks.
 
Syncing disks.
</pre>
+
&lt;/pre&gt;
  
 
== Format the card ==
 
== Format the card ==
Line 92: Line 100:
 
Uncomment the line:
 
Uncomment the line:
  
  MACHINE_FEATURES  += "mmcroot"
+
  MACHINE_FEATURES  += &quot;mmcroot&quot;
  
 
The kernel will now build with the necessary drivers
 
The kernel will now build with the necessary drivers
Line 108: Line 116:
 
  cp $GUMSTIXTOP/tmp/deploy/glibc/images/gumstix-custom-verdex/uImage-2.6.21-r1-gumstix-custom-verdex.bin /media/gum-uimage/uimage
 
  cp $GUMSTIXTOP/tmp/deploy/glibc/images/gumstix-custom-verdex/uImage-2.6.21-r1-gumstix-custom-verdex.bin /media/gum-uimage/uimage
  
Make sure the file on the card is named <code>uimage</code>
+
Make sure the file on the card is named &lt;code&gt;uimage&lt;/code&gt;
  
 
Copy the gumstix-factory.script to the uimage partition as well:
 
Copy the gumstix-factory.script to the uimage partition as well:
Line 126: Line 134:
 
You should see comething similar to:
 
You should see comething similar to:
  
<pre>
+
&lt;pre&gt;
 
U-Boot 1.2.0 (May 10 2008 - 21:22:03) - PXA270@600 MHz - 1604
 
U-Boot 1.2.0 (May 10 2008 - 21:22:03) - PXA270@600 MHz - 1604
  
Line 141: Line 149:
 
Booting from mmc/microSD...
 
Booting from mmc/microSD...
 
Detected: 1985024 blocks of 1024 bytes (1938MB) SD card.
 
Detected: 1985024 blocks of 1024 bytes (1938MB) SD card.
Vendor: Man 03 OEM SD "SU02G" Date 06/2008
+
Vendor: Man 03 OEM SD &quot;SU02G&quot; Date 06/2008
 
Product: 1091675832
 
Product: 1091675832
 
Revision: 8.0
 
Revision: 8.0
 
reading uimage
 
reading uimage
</pre>
+
&lt;/pre&gt;
  
 
followed by the rest of the boot process.
 
followed by the rest of the boot process.
  
 
[[Category:How_to_-_general]]
 
[[Category:How_to_-_general]]

Revision as of 14:38, 23 November 2010


The following instructions are for Gumstix Verdex boards. The procedure for an Overo can be found here.

This section describes how to boot off an MMC/microSD memory card. At the moment it is not possible to boot from microSDHC cards, usually the ones with more than 2GB capacity. This is because the high-speed drivers are not supported. See this thread

Partition the card

Place the card into your reader, and unmount it if it is mounted.

Assuming it is the only mmc card, run fdisk:

sudo fdisk /dev/mmcblk0

Delete any partitions on the disk, in this case there were two:

<pre> Command (m for help): d Partition number (1-4): 1

Command (m for help): d Selected partition 2 </pre>

Create the kernel partition:

<pre> Command (m for help): n Partition number (1-4): 1

Command (m for help): n Selected partition 2 </pre>

Set it to FAT16 file system:

<pre> Command (m for help): t Selected partition 1 Hex code (type L to list codes): 6 Changed system type of partition 1 to 6 (FAT16) </pre>

Create the root fs partition:

<pre> Command (m for help): n Command action

  e   extended
  p   primary partition (1-4)

p Partition number (1-4): 2 First cylinder (22-984, default 22): 22 Last cylinder, +cylinders or +size{K,M,G} (22-984, default 984): 984 </pre>

Save the partition table:

<pre> Command (m for help): w The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks. </pre>

Format the card

Format the kernel partition

mkfs.vfat -F 16 /dev/mmcblk0p1 -n gum-uimage

Format the rootfs partition

mkfs.ext2 /dev/mmcblk0p2 -L gum-rootfs

Remove and reinsert the card, you should have two mmc drives, one called gum-uimage and one called gum-rootfs

Enable booting from MMC in kernel

If you don't have the user.collection directory setup to change the appropriate conf file, do so like:

mkdir -p $USERBRANCH
cp -r $GUMSTIXBRANCH/conf $USERBRANCH

Edit the conf file for your gumstix, eg for the verdex the file is:

$GUMSTIXTOP/user.collection/conf/machine/gumstix-custom-verdex.conf

Uncomment the line:

MACHINE_FEATURES  += "mmcroot"

The kernel will now build with the necessary drivers

Save the file and rebuild the image:

bitbake -c rebuild task-base-gumstix
bitbake -c rebuild gumstix-kernel
bitbake -c rebuild gumstix-basic-image

Put the images on the card

Copy the uimage file from the working directory to the uimage partition on the card, eg:

cp $GUMSTIXTOP/tmp/deploy/glibc/images/gumstix-custom-verdex/uImage-2.6.21-r1-gumstix-custom-verdex.bin /media/gum-uimage/uimage

Make sure the file on the card is named <code>uimage</code>

Copy the gumstix-factory.script to the uimage partition as well:

cp $GUMSTIXTOP/extras/mmc-root/gumstix-factory.script /media/gum-uimage

Unpack the root file system to the rootfs partition on the card, eg:

sudo tar -xvpzf $GUMSTIXTOP/tmp/deploy/glibc/images/gumstix-custom-verdex/Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20090212-gumstix-custom-verdex.rootfs.tar.gz -C /media/gum-rootfs/ 

Unmount BOTH partitions.

Boot!

Place the card in the gumstix and power up.

You should see comething similar to:

<pre> U-Boot 1.2.0 (May 10 2008 - 21:22:03) - PXA270@600 MHz - 1604

      • Welcome to Gumstix ***

DRAM: 128 MB Flash: 32 MB Using default environment

Hit any key to stop autoboot: 0 Instruction Cache is ON Found gumstix-factory.script on MMC...

    1. Executing script at a2000000

Booting from mmc/microSD... Detected: 1985024 blocks of 1024 bytes (1938MB) SD card. Vendor: Man 03 OEM SD "SU02G" Date 06/2008 Product: 1091675832 Revision: 8.0 reading uimage </pre>

followed by the rest of the boot process.