Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Prepare a bootable MicroSD Card

664 bytes added, 12:50, 10 May 2018
no edit summary
 
===<span id="Texas_Instruments_Processors" class="mw-headline">General Processors</span>===
<span class="mw-headline">Inside General processors we can find Texas Instruments</span>
===<span id="Texas_Instruments_Processors" class="mw-headline">Texas Instruments Processors</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.
''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>}}
Therefore, we are going to '''setup a microSD card with these requirements''' and '''install a custom software distribution''' into it.
 
 
 
===Boot from Flash===
* Exist other ways of boot and in this link we can see how to do it with the Flash Memory-> LINK
===<span id="ToolChain" class="mw-headline">ToolChain</span>===
* Read: [index.php/Ubuntu_16.04_LTS_Toolchain [Ubuntu 16.04 LTS Toolchain]]  
=='''<span class="mw-headline">Prepare a SD to boot</span>'''==
<div style="text-align: left;">{{Message/Information Message|title=TITLE|message= <span style="color: #000000;">We are using this version of Ubuntu .........</span>}}</div>
<div style="text-align: left;">We can use two differents methods in order to boot it. One is the '''GPARTED''' and the other is the '''sfdisk'''. Gparted is more visual than sfdisk but sfdisk is faster to do so.</div>
===<span id="Preparing_the_microSD_card" class="mw-headline">Preparing the microSD card</span>===
Open a terminal window and clear your dmesg using:
<pre>$ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=1024
[sudo] password for jdoe:</pre>
='''<span class="mw-headline">Prepare a SD to boot</span>'''=
{{Message/Information Message|title=TITLE|message= <span style="color: #000000;">We are using this version of Ubuntu .........</span>}}
 
===<span id="Install_GParted" class="mw-headline">Downloading GParted</span>===<span style="color: #ff0000;">In order to prepare a micro SD with your already generated u-boot you need to flash the u-boot.imx using the command dd.(?)<br /></span>
It is important to prepare your micro SD card first creating a partition that leave some free space for the u-boot.imx. It can be used GPARTED as it is shown in the image. This method is much more graphic than sfdisk method. 
<pre>sudo apt-get install gparted</pre>
<span style="color: #000000;">Now we will see all When the steps for this partition with GPARTED after another brief  explanation of  sfdisk methodinstall procedure ends you can call the program from your system tools menu or directly using a terminal console.</span>
<span style="color: #000000;"> </span>
<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"></div>
==<span id="GParted_and_Creation_of_Partitions" class="mw-headline">'''Make the partition of the SD'''<br /></span>==
Now we are going to see some steps with the two methods. First creating the partition and then how procedure with each processor.
* <span style="color: #000000;">Using fdisk we create directly two partitions</span>
<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code">
==<span style="color: #000000;">Using sfdisk partition method</span>==
<div id="highlighter_789287">
===='''Defining Partitions'''====
Here we will see how make the partitions in the different methods
<pre>sudo sfdisk /dev/ 16065,128520,0x0C,*<br>144585,,,-<br>EOF</pre>
</div>
</div>
<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"><div class="codeHeader panelHeader pdl">'''Define partitions'''</div>
<div class="codeContent panelContent pdl"><div class="syntaxhighlighter sh-eclipse nogutter bash"></div>
<div class="syntaxhighlighter sh-eclipse nogutter bash">
<pre>$ sudo mkfs.vfat -F 32 /dev/ -n boot</pre>
<pre>$ sudo mkfs.ext3 /dev/ -L rootfs</pre></div>
<div class="syntaxhighlighter sh-eclipse nogutter bash"></div>
</div>
</div>
Then you only have to use dd command in order to copy the u-boot.imx to the SD card.
 
<u>'''Please, be sure you have write correctly the following command because in if not, it can corrupt your computer.'''</u>
<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name===<span style="codecolor: #000000;">GPARTED<div class/span>="codeHeader panelHeader pdl">====The next step it's create the '''u-boot.imx copymsdos table partition'''</div><div id=for it you should click in the "Device" menu and then in the "highlighter_550267Create Partition Table"><pre>$ sudo dd if=//u-bootoption.imx of=/dev/ bs=512 seek=2 <br>$ sync</pre>
<div class="center"><div class="thumb tnone"><div class="thumbinner" style="text-align: left;"><div class="thumbcaption"><div class="magnify"></div>
</div>
</div>For example <div classspan style="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="codecolor: #ff0000;">2 FOTOS<div class="codeHeader panelHeader pdl"/span>'''u-boot.imx copy'''</div><div id="highlighter_209438"><pre>$ sudo dd if=/home/user/Project/u-boot/u-boot.imx of=/dev/sdd bs=512 seek=2<br>$ sync</pre> 
</div>
</div>
Check the default option it's create a msdos partition table.
After that you can '''Apply'''.
==<span id="GParted_and_Creation_of_Partitions" class="mw-headline">Using GParted and Creation of Partitions</span>==
When the install procedure ends you can call the program from your system tools menu or directly using a terminal console.
We can see our devices and their size.
 =====<span idstyle="Create_the_MSDOS.C2.A0Partition_Table" class="mw-headlinecolor: #000000;">Create the MSDOS Partition TableSFDISK</span>===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.==<div class="centercode panel pdl conf-macro output-block"><div classdata-hasbody="thumb tnonetrue"><div classdata-macro-name="thumbinnercode"><div classid="thumbcaptionhighlighter_789287"> sudo sfdisk /dev/ <<EOF<br>label: dos<br>16065,128520,0x0C,*<br>144585,,,-<div class="magnify"br>EOF</div>
</div>
====</divspan id="Create_the_BOOT_Partition_-_IGEP_Texas_Instruments_Processor_based" class="mw-headline">'''Create the BOOT Partition -''' '''General IGEP Processor based'''</divspan>====</divspan class="mw-headline">Check the default option it's create a msdos partition table. After that you can '' 'Apply'''.</span>
  =====<span idstyle="Create_the_BOOT_Partition_-_IGEP_Texas_Instruments_Processor_basedcolor: #000000;" ><span class="mw-headline">Create the BOOT Partition - '''IGEP Texas Instruments Processor based'''GPARTED</span></span>=====
<u>This Step it's only for OMAP35xx, DM37xx, AM335x, OMAP5432 processor based IGEP boards.</u>
It is recommended to '''apply changes''' now or you might get an error later.
  =====<span style="color: #000000;">SFDISK</span>=====bla bla bla bla   ===='''<span id="Create_the_BOOT_Partition_-_IGEP_NXP-Freescale_Processor_based" class="mw-headline">Create the BOOT Partition - '''IGEP NXP-Freescale Processor based</span>'''====<span class="mw-headline">''' '''</span> =====<span style="color: #000000;"><span class="mw-headline">GPARTED</span></span>=====
<u>This Step it's only for iMX6 processor based IGEP boards.</u>
* '''Align to: cylinder'''
<br />It is recommended to '''apply changes''' now or you might get an error later. 
 =====<span style="color: #000000;">SFDISK</span>=====<pre>$ sudo mkfs.vfat -F 32 /dev/ -n boot</pre> $ sudo mkfs.ext3 /dev/ -L rootfs  ===='''<span id="Create_the_ROOTFS_Partition" class="mw-headline">Create the ROOTFS Partition</span>'''====<span class="mw-headline">  <br /></span> =====<span style="color: #000000;"><span class="mw-headline">GPARTED</span></span>=====
The Next step it's create the root file system partition.
After all apply all changes
  =====SFDISK=====Then you only have to use dd command in order to copy the u-boot.imx to the SD card. <u>'''Please, be sure you have write correctly the following command because in if not, it can corrupt your computer.'''</u> <div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"><div class="codeHeader panelHeader pdl"></div><div class="codeHeader panelHeader pdl">'''u-boot.imx copy'''</div><div id="highlighter_550267"> $ sudo dd if=//u-boot.imx of=/dev/ bs=512 seek=2<br>$ sync</div></div>For example <div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"><div class="codeHeader panelHeader pdl">'''u-boot.imx copy'''</div><div id="highlighter_209438"> $ sudo dd if=/home/user/Project/u-boot/u-boot.imx of=/dev/sdd bs=512 seek=2<br>$ sync</div></div>  ===='''<span id="Select_.22Boot_flag.22_for_the_boot_partition" class="mw-headline">Select "Boot flag" for the boot partition</span>'''====<span class="mw-headline"> </span> =====<span style="color: #000000;"><span class="mw-headline">GPARTED</span></span>=====
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
</div>
Now we have the microsd prepared for copy the boot files
 
 
==U-Boot==
'''TexasGeneral processors<br />'''
After build or download the MLO and u-boot you should follow the next steps:
'''iMX6Freescale processors<br />'''
* Copy u-boot.imx using dd before primary partition in raw mode as
 {| widthcellspacing="auto1" cellspacingcellpadding="1" cellpaddingborder="10" alignwidth="centerauto" borderalign="0center"
|-
||
| style="text-align: center;"| 
|-
| scope="row"|[[]] 
||Here there are many articles about how to get '''many other [index.php/Category:Software_distributions software distributions]'''.
|}
Notes: IGEPv5 must use Hard floating Rootfs
 
<br /> Now you should see inside your rootfs partition a similar structure like this.
<div class="center"><div class="thumb tnone"><div class="thumbinner" style="width: 302px;">[[]]<div class="thumbcaption"><div class="magnify"></div>
</div>
</div>
560
edits