560
edits
Changes
From IGEP - ISEE Wiki
no edit summary
==Introduction==
* Now we can see an image of which are the steps to boot any module.
With a general processor all start with MLO file and U-Boot.img. Also it is the same procedure for Freescale- NXP. If you want to see how to create these files follow this [[The bootloader U-Boot|link]].
Next step is that once the processor is initialized,call the linux kernel making the execution of your operative system available. Finally your OS runs and you can initialize the board correctly [[File:How_to_SD.PNG|center|772x332px]] ===<span id="Texas_Instruments_Processors" class="mw-headline">General Processors</span>===<span class="mw-headline">Inside General processors we can find Texas Instruments</span> * The microsd card must be content at latest 2 partitions.* The first one must be primary partition with the boot flag mark and formated using FAT(16 or 32) file system.* All names used in this partition must be msdos names (applies to OLD OMAP35xx processor).* The processor must load a first program called '''MLO''', this program must reside in the first partition, this program it's also called '''x-loader or uboot-spl.''' ''The processor when boot ONLY load and execute the MLO program and ignore all the rest it's the X-loader(MLO) the program responsible to load the next programs such kernel or uboot if you use this last one approach.'' {{Message/Information Message|title=TITLE|message= <span style="color: #000000;">Freescale has a different structure</span>}} ===<span id="Freescale-NXP_Processors" class="mw-headline">Freescale-NXP Processors</span>===* The microsd card must be content at latest 1 partitions.* The primary partition can be formatted with any filesystem that u-boot can mount.* The Processor will load the '''u-boot.imx''' it include the SPL and u-boot. ''After load this u-boot.imx, u-boot will be ready for boot the kernel.'' Therefore, we are going to '''setup a microSD card with these requirements''' and '''install a custom software distribution''' into it. ===<span id="Prerequisites" class="mw-headline">Prerequisites</span>===
* PC with Linux (We use for this how to Ubuntu 16.04 LTS)
* MicroSD Card (4 Gbytes - class 4) or bigger ...
* Cross Toolchain included in Ubuntu 16.04 LTS gcc version 4.9.3 (Ubuntu/Linaro 4.9.3-13ubuntu2).
===<prespan id="ToolChain" class="mw-headline">sudo dmesg -cToolChain</prespan>===Now insert a new microsd card in your PC and then check your dmesg* Read:[[Ubuntu 16.04 LTS Toolchain]]
<prespan class="mw-headline">dmesgIn order to start developing with an IGEP PROCESSOR BOARD we can use a microSD Card to flash our system and boot from it. Most of the cases is the easiest way to boot a board.<br /pre>You should see something like this:</span>
<prespan class="mw-headline">mmc0: new high speed SDHC card at address 0001mmcblk0: mmc0:0001 00000 3.79 GiBmmcblk0: unknown partition tableThe following steps details how to prepare a booteable MicroSD Card</prespan>Ensure all in your microsd card it's erased:
==<span class="mw-headline">Prepare a SD to boot</span>==
<div style="text-align: left;">{{Message/Information Message|message=The following steps has been tested using an Ubuntu 16.04}}</div>
<div style="text-align: left;">First of all it is important to detect which device is our microSD Card. In order to do that we can follow this instructions in a Linux terminal:</div>
<div style="text-align: left; padding-left: 30px;">'''1-''' Clean the ''dmesg'' information:</div>
sudo dmesg -c
'''2-''' Insert the microSD Card and show the ''dmesg'' information:
dmesg
The result have to be similar to this:
[[File:dev.png]]
<div style="text-align: left;">We can see the name of our device in the system: '''/dev/sdX''' where X is the character assigned by our system, in this case /dev/sdc'''.'''</div>
<div style="text-align: left;">Now we have to ensure that the MicroSD Card is completely clean. We can use the following command to do that:</div>
sudo dd if=/dev/zero of=/dev/sdX bs=1024 count=1024
Where '''X''' is the character returned previously by your system, for example, in the previous situation:
sudo dd if=/dev/zero of=/dev/sdc bs=<span id="Install_GParted" class1024 count="mw1024Before use anyway of partition one good practise is unmount the dev where is inserted the SD. -headline">Install GParted<code>umount /spandev/sdx</code>===We will use the gparted program for create the partitions, if you don't have this program installed then you must install it with this command:
<span class="mw-headline">It is important to difference between a MicroSD Card for a NXP processor and the other cases. The process of partition is similar but, in the case of NXP chips, there exists some differences. </span>
==='''<div span class="line number2 index1 alt1mw-headline">Using Gparted:</span style>'''==={| class="color: #ff0000;contenttable sortable">|-!|====='''GENERAL CASE'''=====!|====='''NXP PROCESSORS'''=====|-||'''1- '''Select the corresponding device||'''1- '''Select the corresponding device|-||<code span class="bash plainmw-headline">label[[File: dos</code>1.png|429x186px]]</span></div>||<div span class="line number3 index2 alt2mw-headline"><span style="color[[File: #ff0000;"><code class="bash plain">16065,128520,0x0C,*</code>1.png|413x179px]]</span></div>|-||'''2- '''Create a partition table||'''2- '''Create a partition table|-||<div span class="line number4 index3 alt1mw-headline">[[File:2.png|430x202px]]</span style="color: #ff0000;"><code span class="bash plainmw-headline">144585,,,-</code>[[File:SD4.png|433x298px]]</span></div>||<div span class="line number5 index4 alt2mw-headline">[[File:2.png|418x197px]]</span style="color: #ff0000;"><code span class="bash plainmw-headline">EOF</code>[[File:SD4.png|431x297px]]</span></div></div></div>|-|}|'''</div></div></div><div span class="code panel pdl confmw-macro output-blockheadline" data>3-hasbody="true" data-macro-name="code"</span>'''<div span class="codeHeader panelHeader pdlmw-headline">Create a FAT32 '''Define partitionsboot '''partition</divspan>||<div span class="codeContent panelContent pdlmw-headline">'''3- '''Create a FAT32 '''boot '''partition '''leaving 8MB before'''<div id="highlighter_144340" class="syntaxhighlighter sh-eclipse nogutter bash"/span>{| class=" contenttable" border="0" cellspacing="0" cellpadding="0"
|-
| class="code"|<div span class="container" title="Hint: doublemw-click to select code"><div class="line number1 index0 alt2headline"><code class="bash plain">$ [[File:2.png|432x203px]]</codespan><code class="bash functions">sudo</code> <code class="bash plain">mkfs[[File:fat32_c121.vfat -F 32 </code><code class="bash plain">/dev/</code><code class="bash plain"><your_sd_partition1> -n boot</code>png|429x293px]]
We will configure the partition as:
||<uspan class="mw-headline">'''Please, be sure you have write correctly the following command because in if not, it can corrupt your computer[[File:2.'''png|432x203px]]</uspan>[[File:im_1.png|425x290px]]
We will configure the partition as:
* Free Space Preceding: '''8MB'''
* Primary Partition
* File system/ Format: FAT32
* Size: 100 MB
* Label: '''Boot'''
* '''Align to: cylinder'''
|-
| |'''<span class="codemw-headline"|>4- </span>'''<div span class="container" title="Hint: doublemw-click to select codeheadline">Create a ext4 '''rootfs '''partition<div /span>||'''<span class="line number1 index0 alt2mw-headline">4- </span>'''<code span class="bash plainmw-headline">$ Create a ext4 '''rootfs '''partition</codespan>|-||[[File:fat32_c2.png|407x279px]]'''7-''' Check the results are similar to the followings:||[[File:fat32_c2.png|407x279px]]|-||'''<code span class="bash functionsmw-headline">sudo5- </codespan> '''<code span class="bash functionsmw-headline">ddApply changes<br /></codespan> ||'''<code span class="bash keywordmw-headline">if5- </codespan>'''<code span class="bash plainmw-headline">=Apply changes</span>|-||'''<your_uspan class="mw-boot_directoryheadline">[[File:fat32_c3.png|411x279px]]</codespan>'''||[[File:im_2.png|403x275px]]|-||'''<code span class="bash plainmw-headline">/u6-boot</codespan>'''<code span class="bash plainmw-headline">.imx of=Set boot flag to boot partition</codespan>||'''<code span class="bash plainmw-headline">/dev/6- </codespan>'''<code span class="bash plainmw-headline"><your_sd> bs=512 seek=2Set boot flag to boot partition</codespan>|-||[[File:fat32_c4.png|411x278px]] [[File:fat32_c5.png|432x291px]]
||
[[File:IM_25.png|414x281px]]
|-
| class="code"|<div class="container" title="Hint'''7-''' Check the results are similar to the followings: double||'''7-click ''' Check the results are similar to select code"><div class="line number1 index0 alt2"><code class="bash plain">$ </code><code class="bash functions">sudo</code> <code class="bash functions">dd</code> <code class="bash keyword">if</code><code class="bash plain">=</code><code class="bash plain">/home/user/Project/uthe followings:|-boot/u-boot</code><code class="bash plain">||[[File:fat32_c6.png|434x294px]]||[[File:im_3.imx of=</code><code class="bash plain">/dev/sdd</code> <code class="bash plain">bs=512 seek=2</code>png|438x301px]]|}
'''<span class="mw-headline">By doing that we will have ready the microSD Card in order to copy our files.</span>'''
==<span id="GParted_and_Creation_of_Partitions" class="mw-headline">GParted and Creation of Partitions'''Using SFDISK & MKFS<br /span>'''===When Another method is to use the following commands in order to prepare the microSD card. These commands will perform the install procedure ends you can call same operations that in the program from your system tools menu or directly using a terminal consoleprevious part.
After build or download the MLO and u-boot you should follow the next steps:
<pre>sudo dd if=/[your_u-boot_directory]/u-boot.imx of=/dev/[your_sd] bs=512 seek=2</pre>You can follow this post [[The Next step it's create the partitions for it bootloader U-Boot|U-boot Bootloader]] you should go to want build the partition menu and select the "New" option then the application show a window like this:u-boot.imx
===<span id="Select_.22Boot_flag.22_for_the_boot_partition" class="mw-headline">Select "Boot flag" for the boot partition</span>=Root file System==Now we must select The root file system have to be extracted into the boot flag for '' root folder'' of the first '''rootfs''' '''partition for it we use the right mouse button over the boot partition and select "Manage Flags" option'''. Where can be [http://labs.isee.biz/index.php/IGEP_Firmware_set-up downloaded here.]