Difference between revisions of "UDOO creating a bootable Micro SD card from precompiled binaries"

From eLinux.org
Jump to: navigation, search
m
m (Install the U-Boot: Having the stars makes it more confusing)
 
(7 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
If you don’t feel confident about using binaries you should use the image file method to create your Micro SD card.
 
If you don’t feel confident about using binaries you should use the image file method to create your Micro SD card.
  
Note: The following step by step guide is referred to a Linux System.
+
Note: The following step by step guide is for a Linux System.
  
 
== Step by step guide ==
 
== Step by step guide ==
 
=== Download the binaries ===
 
=== Download the binaries ===
 
A bootable SD card has 4 different elements:  
 
A bootable SD card has 4 different elements:  
* U-Boot (it's a .imx file)  
+
* U-Boot (<tt>.imx</tt> file, should be <tt>u-boot-<q|d>.imx</tt>)  
* Kernel (it's an uimage file)
+
* Kernel (Should be <tt>uImage</tt>)
* kernel's modules
+
* kernel's modules (Usually a compressed file, e.g. <tt>modules.tar.gz</tt>)
* File System (it's a compressed file, e.g. .tar.gz)
+
* File System (Usually a compressed file, e.g. <tt>.tar.gz</tt> - or you can use an existing install, but don't try to copy from the one you're running on.)
 
Create a new folder "udoo-dev" under your Home directory, then browse the UDOO's web site to the [http://www.udoo.org/downloads/#tab2 Download page] and download the binaries you need.
 
Create a new folder "udoo-dev" under your Home directory, then browse the UDOO's web site to the [http://www.udoo.org/downloads/#tab2 Download page] and download the binaries you need.
  
Line 34: Line 34:
 
=== Copy the files to the Micro SD card ===
 
=== Copy the files to the Micro SD card ===
 
==== File System ====
 
==== File System ====
Mount the just-created partition and then extract the tar.gz file containing the filesystem inside the microSD card with the following command (this operation could take up to 30 minutes):  
+
* Mount the just-created partition (Use your File Manager)
 +
* Then extract the tar.gz file containing the filesystem to the microSD card with the following command:
 
     sudo tar -xzvpf <NAME_OF_TAR_FS> -C /media/<UDOO_MICROSD_LABEL>/
 
     sudo tar -xzvpf <NAME_OF_TAR_FS> -C /media/<UDOO_MICROSD_LABEL>/
Note: Always remember to replace the strings inside the brackets with the right filenames.  
+
* Or, if you are copying from an existing install, use:
 +
    cp -rf /media/<NAME_OF_EXISTING_FILESYSTEM>/* /media/<UDOO_MICROSD_LABEL>/
 +
This operation could take up to 30 minutes.
 +
 
 +
Note: Always remember to replace the strings inside the brackets with the right filenames.
 +
 
 
==== Kernel Image ====
 
==== Kernel Image ====
 
Copy the binary inside the Micro SD card /boot folder by using the following command:  
 
Copy the binary inside the Micro SD card /boot folder by using the following command:  
Line 43: Line 49:
 
Remove the existing modules from the file system:  
 
Remove the existing modules from the file system:  
 
     sudo rm -rv /media/<UDOO_MICROSD_LABEL>/lib/modules/*  
 
     sudo rm -rv /media/<UDOO_MICROSD_LABEL>/lib/modules/*  
Copy the new modules:  
+
Copy the new modules:
     sudo cp -av lib /media/<UDOO_MICROSD_LABEL>/  
+
    sudo tar -xzvpf modules.tar.gz
 +
     sudo cp -av lib /media/<UDOO_MICROSD_LABEL>/
 +
 
 
==== Install the U-Boot ====
 
==== Install the U-Boot ====
 
Unmount all the microSD partitions:  
 
Unmount all the microSD partitions:  
 
     sudo umount /dev/<MICROSD_DEVICE_NAME>*
 
     sudo umount /dev/<MICROSD_DEVICE_NAME>*
e.g. <MICROSD_DEVICE_NAME>* is /dev/sdc*
+
e.g. <MICROSD_DEVICE_NAME> is /dev/sdc
 
<br /><br />Copy the u-boot binary file inside the Micro SD.
 
<br /><br />Copy the u-boot binary file inside the Micro SD.
 
<br />For UDOO Quad:
 
<br />For UDOO Quad:
Line 56: Line 64:
 
e.g. <MICROSD_DEVICE_NAME> is /dev/sdc
 
e.g. <MICROSD_DEVICE_NAME> is /dev/sdc
 
<br />NOTE: Be sure you’ re using the correct device filename; use of the wrong device identifier could result in the loss of all data on the Hard Drive of the host PC used.
 
<br />NOTE: Be sure you’ re using the correct device filename; use of the wrong device identifier could result in the loss of all data on the Hard Drive of the host PC used.
Before remove the Micro SD card run the command to write any data buffered in memory out to disk:     
+
Before removing the Micro SD card run this command to write any data buffered in memory out to disk:     
 
     sync  
 
     sync  
 
The microSD card is now ready.
 
The microSD card is now ready.

Latest revision as of 14:18, 30 April 2015

Overview

The following paragraphs will guide to in the creation of a bootable micro SD card for UDOO board, starting from precompiled binaries. This method offers more flexibility and customization opportunities for the average users.

If you don’t feel confident about using binaries you should use the image file method to create your Micro SD card.

Note: The following step by step guide is for a Linux System.

Step by step guide

Download the binaries

A bootable SD card has 4 different elements:

  • U-Boot (.imx file, should be u-boot-<q|d>.imx)
  • Kernel (Should be uImage)
  • kernel's modules (Usually a compressed file, e.g. modules.tar.gz)
  • File System (Usually a compressed file, e.g. .tar.gz - or you can use an existing install, but don't try to copy from the one you're running on.)

Create a new folder "udoo-dev" under your Home directory, then browse the UDOO's web site to the Download page and download the binaries you need.

GParted the Micro SD card

Insert the Micro SD card in the card reader and launch GParted from command line:

   sudo gparted 

Select the Micro SD from the drop down menu, e.g. /dev/sdc.
NOTE: Be sure you’ re using the correct label; using of the wrong device identifier could result in the loss of all data on the Hard Drive of the host PC used.

Create a partition table from the top menu: Device → Create Partition Table... → Apply.

Create a new partition with the following parameters:

  • Free space preceding (MiB): 10
  • New size (MiB): based to the SD size
  • Free space following (MiB): 10
  • Create as: Primary partition
  • File system: ext3 (ext4 is not supported yet)
  • Label: <UDOO_MICROSD_LABEL>

Click on Apply and wait for the partition to be done, then exit GParted.

Copy the files to the Micro SD card

File System

  • Mount the just-created partition (Use your File Manager)
  • Then extract the tar.gz file containing the filesystem to the microSD card with the following command:
   sudo tar -xzvpf <NAME_OF_TAR_FS> -C /media/<UDOO_MICROSD_LABEL>/
  • Or, if you are copying from an existing install, use:
   cp -rf /media/<NAME_OF_EXISTING_FILESYSTEM>/* /media/<UDOO_MICROSD_LABEL>/

This operation could take up to 30 minutes.

Note: Always remember to replace the strings inside the brackets with the right filenames.

Kernel Image

Copy the binary inside the Micro SD card /boot folder by using the following command:

   sudo cp uImage /media/<UDOO_MICROSD_LABEL>/boot 

Kernel's modules

Remove the existing modules from the file system:

   sudo rm -rv /media/<UDOO_MICROSD_LABEL>/lib/modules/* 

Copy the new modules:

   sudo tar -xzvpf modules.tar.gz
   sudo cp -av lib /media/<UDOO_MICROSD_LABEL>/

Install the U-Boot

Unmount all the microSD partitions:

   sudo umount /dev/<MICROSD_DEVICE_NAME>*

e.g. <MICROSD_DEVICE_NAME> is /dev/sdc

Copy the u-boot binary file inside the Micro SD.
For UDOO Quad:

   sudo dd if=u-boot-q.imx of=/dev/<MICROSD_DEVICE_NAME> bs=512 seek=2

For UDOO Dual:

   sudo dd if=u-boot-d.imx of=/dev/<MICROSD_DEVICE_NAME> bs=512 seek=2

e.g. <MICROSD_DEVICE_NAME> is /dev/sdc
NOTE: Be sure you’ re using the correct device filename; use of the wrong device identifier could result in the loss of all data on the Hard Drive of the host PC used. Before removing the Micro SD card run this command to write any data buffered in memory out to disk:

   sync 

The microSD card is now ready.