Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Prepare a bootable MicroSD Card

2,882 bytes removed, 14:27, 11 May 2018
No summary
==='''<span class="mw-headline">General case process:</span>'''===
 
{| class="contenttable sortable"
|-
||[[File:im_3.png|438x301px]]
|}
 
'''<span class="mw-headline">By doing that we will have ready the microSD Card in order to copy our files.</span>'''
 
==='''<span class="mw-headline">NXP case process:</span>'''===
===='''<span class="mw-headline">Finding your device</span>'''====
<span class="mw-headline">[[File:1.png|721x313px]]</span>
 
 
 
===='''<span class="mw-headline">Create the MSDOS Partition Table </span>'''====
<span class="mw-headline">The next step it's create the msdos table partition for it you should click in the "Device" menu and then in the "Create Partition Table" option. </span>
 
 
<span class="mw-headline">[[File:2.png|731x344px]]</span>
 
 
 
===='''<span class="mw-headline">Erasing all data</span>'''====
<span class="mw-headline">Check the default option it's create a msdos partition table.</span>'''<span class="mw-headline"><br /></span>'''
 
After that you can '''Apply'''.
 
 
<span class="mw-headline">[[File:SD4.png|724x499px]]</span>
 
 
 
===='''<span class="mw-headline">Creating the boot partition</span>'''====
<span class="mw-headline">This Step it's only for iMX6 processor based IGEP boards.</span>
 
The Next step it's create the partitions for it you should go to the partition menu and select the "New" option.
 
We will configure the partition as:
 
* Primary Partition
* Format: FAT32
* Free Space Preceding: 8 MiB
* Size: 100 MegaBytes
* Label: Boot
* Align to: cylinder
 
It is recommended to apply changes now or you might get an error later.
 
 
'''<span class="mw-headline">[[File:SD_IMX_1.png|728x338px]]</span>'''
 
 
 
===='''<span class="mw-headline">Creating the new partition</span>'''====
<span class="mw-headline">The Next step it's create the root file system partition.<br />First you should select the unallocated partition area and then you should go to the partition menu and select the "New" option then the application show a window like this:</span>
 
 
[[File:SD_IMX_2.png|708x333px]]
 
 
 
===='''<span class="mw-headline"><span id="result_box" class="short_text" tabindex="-1" lang="en"><span class="">Characterizing</span></span> the Rootfs</span>'''====
<span class="mw-headline">We will configure the rootfs partition as:<br /></span>
 
* Primary Partition
* File system/Format: EXT4
* Size: All the Rest
* Label: Rootfs'''<br />'''
* Other spaces such as the defaults ones
 
At end we will click on "Add" button.
 
 
[[File:SD_IMX_3.png|706x333px]]
 
 
 
===='''<span class="mw-headline">Applying changes</span>'''====
<span class="mw-headline">Click on apply button in the main menu after that gparted show a window like this for confirm all operations </span>
 
 
[[File:SD_IMX_4.png|712x333px]]
 
 
 
* <span class="mw-headline">We should click on apply button to confirm</span>
 
<span class="mw-headline">[[File:SD_IMX_5.png|718x338px]]</span>
 
 
 
===='''Loading'''====
When the process finish we can see all changes applied 
 
 
[[File:SD_IMX_7.png|728x342px]]
 
 
 
===='''<span class="mw-headline">Selecting boot flag</span>'''====
<span class="mw-headline">Now we must select the boot flag for the first partition for it we use the right mouse button over the boot partition and select "Manage Flags" option</span>
 
 
[[File:SD_IMX_8.png|727x340px]]
==='''SFDISK'''===
===='''IMX6'''==== sudo sfdisk /dev/ <<EOF<br>label: dos<br>16065,128520,0x0C,*<br>144585,,,-<br>EOF<br><br><strong>Example</strong><br><br>sudo sfdisk /dev/sdc <<EOF<br>label: dos<br>16065,128520,0x0C,*<br>144585,,,-<br>EOF[[File:SFDISK_NORMAL1Another method is to use the following commands in order to prepare the microSD card.png]] '''Explanation'''  sudo mkfs.vfat -F32 /dev/ -n boot<br data-attributes="%20/"><br data-attributes="%20/"><strong>Example</strong><br data-attributes="%20/"><br data-attributes="%20/">sudo mkfs.vfat -F32 /dev/sdc1 -n boot [[File:SFDISK_IMX2.png]]  '''Explanation'''  sudo mkfs.ext4 /dev/ -L rootfs<br data-attributes="%20/"><br data-attributes="%20/"><strong>Example</strong><br data-attributes="%20/"><br data-attributes="%20/">sudo mkfs.ext4 /dev/sdc2 -L rootfs[[File:SFDISK_IMX3.png]] ==== ===='''Here These commands will perform the same operations that in the result''' [[File:SFDISK_NORMAL4.png]]     ===='''NORMAL'''===='''Explanation'''  sudo sfdisk /dev/ <<EOF<br>label: dos<br>63,144522,0x0C,*<br>160650,,,-<br>EOF<br><br data-attributes="%20/"><strong>Example</strong><br><br data-attributes="%20/">sudo sfdisk /dev/sdc <<EOF<br>label: dos<br>63,144522,0x0C,*<br>160650,,,-<br>EOF [[File:SFDISK_NORMAL1.png]]  '''Explanation'''  sudo mkfs.vfat -F32 /dev/ -n boot<br data-attributes="%20/"><br data-attributes="%20/"><strong>Example</strong> <br><br data-attributes="%20/">sudo mkfs.vfat -F32 /dev/sdc1 -n boot[[File:SFDISK_IMX2.png]]  '''Explanation'''  sudo mkfs.ext4 /dev/ -L rootfs<br><br><strong>Example</strong><br><br data-attributes="%20/">sudo mkfs.ext4 /dev/sdc2 -L rootfs'''<br />[[File:SFDISK_NORMAL3.png]]<br />'''   '''The result''' '''[[File:SFDISK_NORMAL5.png|638x70px]]'''  '''<br /><br /><span style="color: #ff0000;">sudo dd if=./u-bootprevious part.imx of=/dev/sdc bs=512 seek=2; sync ?????</span><br />'''  
{| class="contenttable sortable" style="width: 890px;"
|-
! style="width: 431.367px;"|GENERAL CASE
! style="width: 436.633px;"|NXP PROCESSORS
|-
| style="width: 431.367px;"|
sudo sfdisk /dev/<strong><your_microsd></strong> <<EOF<br>label: dos<br>63,144522,0x0C,*<br>160650,,,-<br>EOF
| style="width: 436.633px;"|
sudo sfdisk /dev/<strong><your_microsd></strong> <<EOF<br>label: dos<br>16065,128520,0x0C,*<br>144585,,,-<br>EOF
|-
| style="width: 431.367px;"|
sudo mkfs.vfat -F32 /dev/<strong><your_microsd></strong> -n boot
| style="width: 436.633px;"|
sudo mkfs.vfat -F32 /dev/<strong><your_microsd></strong> -n boot
|-
| style="width: 431.367px;"|
sudo mkfs.ext4 /dev/<strong><your_microsd></strong> -L rootfs
| style="width: 436.633px;"|
sudo mkfs.ext4 /dev/<strong><your_microsd></strong> -L rootfs
|-
| style="width: 431.367px;"|'''For example:'''
| style="width: 436.633px;"|'''For example:'''
|-
| style="width: 431.367px;"|
sudo sfdisk /dev/<strong>sdc</strong> <<EOF<br data-attributes="%20/">label: dos<br data-attributes="%20/">63,144522,0x0C,*<br data-attributes="%20/">160650,,,-<br data-attributes="%20/">EOF<br><br>sudo mkfs.vfat -F32 /dev/<strong>sdc</strong> -n boot<br data-attributes="%20/"><br data-attributes="%20/">sudo mkfs.ext4 /dev/<strong>sdc</strong> -L rootfs<br><br>
| style="width: 436.633px;"|
sudo sfdisk /dev/<strong>sdc</strong> <<EOF<br data-attributes="%20/">label: dos<br data-attributes="%20/">16065,128520,0x0C,*<br data-attributes="%20/">144585,,,-<br data-attributes="%20/">EOF<br><br>sudo mkfs.vfat -F32 /dev/<strong>sdc</strong> -n boot<br><br>sudo mkfs.ext4 /dev/<strong>sdc</strong> -L rootfs<br><br>
|}
='''How to boot each partcopy everything into the MicroSD Card<br />'''=Now we will see where Once the MicroSD is completely prepared, it is time to put each part copy the u-boot, kernel and how root dile system tothe MicroSD Card.
==U-Boot==
560
edits