1,381
edits
Changes
→u-boot.imx IGEP Boards based on NXP-Freescale Processors
= Introduction Overview=This how to explains how to '''create a microSD card''' to boot IGEP boards with '''software distributions ( yocto, Ubuntu, Debian ...)'''.
== Theory ==OMAP35xx, DM37xx, AM335x, OMAP5, iMX6 processors can boot from a microSD. All IGEP boards use the microSD card as highest boot priority, it means that the processor try to boot from the microsd card before try to boot from other devices such the OneNand, Nand, SSD or eMMC.
==Prerequisites==* PC with Linux (We use for this how to Ubuntu 16.04 LTS)* MicroSD Card (4 Gbytes - class 4) or bigger ...* Tools such, fdisk, mkfs.ext3, mkfs.vfat, gparted ...* Cross Toolchain included in Ubuntu 16.04 LTS gcc version 4.9.3 (Ubuntu/Linaro 4.9.3-13ubuntu2). ==ToolChain==* Read: [[Ubuntu 16.04 LTS Toolchain]] == Preparing the microSD card ==Open a terminal window and clear your dmesg using: <pre>sudo dmesg -c</pre>Now insert a new microsd card in your PC and then check your dmesg: <pre>dmesg</pre>You should see something like this:
<pre>mmc0: new high speed SDHC card at address 0001
mmcblk0: mmc0:0001 00000 3.79 GiB
mmcblk0: unknown partition table
</pre> Ensure all in your microsd card it's erased:<br>
<pre>$ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=1024
[sudo] password for jdoe:
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.43556 s, 2.4 MB/s</pre> == Install GParted ==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: <pre>sudo apt-get install gparted</pre> ==GParted and Creation of Partitions==When the install procedure ends you can call the program from your system tools menu or directly using a terminal console. [[Image:Gparted initial.png|thumb|center]] ===Create the MSDOS Partition Table===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. [[Image:Gparted create msdos table partition.png|thumb|center]]Check the default option it's create a msdos partition table. After that you can '''Apply'''.
=== Create the BOOT Partition - IGEP NXP-Freescale Processor based===<u>This Step it's only for iMX6 processor based IGEP boards.</u>
The Next step it's create the partitions for it you should go to the partition menu and select the "New" option then the application show a window like this:
[[ImageFile:Gparted create first partitionimx6-primary-part.png|thumb|center]]We will configure the partition as:<br>
===Create the ROOTFS Partition===The Next step it's create the root filesystem file system partition.
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:<br/> [[Image:Gparted create first partition.png|thumb|center]] We will configure the rootfs partition as:<br>
*Primary Partition<br>*Format: EXT4<br>*Size: All the Rest<br>*Label: Rootfs'''<br/>'''
At end we will click on "Add" button.
[[Image:Gparted_all_configuredGparted all configured.png|thumb|center]] or [[File:imx6_str.png|thumb|center]] After all apply all changes ===Select "Boot flag" for the boot partition===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 [[Image:Gparted boot flag.png|thumb|center]]Now we have the microsd prepared for copy the boot files ==MLO + u-boot IGEP Boards Texas Instruments based boards==After build or download the MLO and u-boot you should follow the next steps: * Copy MLO and u-boot.img to primary boot partition $ cp MLO u-boot.img /media/user/bootYou can follow this [[U-Boot Texas Instruments Series|HowTo]] if you want build the MLO and u-boot ==u-boot.imx IGEP Boards based on NXP-Freescale Processors==* Copy u-boot.imx using dd before primary partition in raw mode as sudo dd if=/home/user/u-boot-imx/u-boot.imx of=/dev/sde bs=512 seek=2Where /dev/sde is your microsd card You can follow this [[U-boot Freescale-NXP iMX6 Series|HowTo ]]if you want build the u-boot.imx ==Kernel==You can follow this other howto about [[The Linux kernel|how compile and install the Linux Kernel]]. ==Root File System==In this tutorial we will use the [http://downloads.isee.biz/pub/files/linaro/releases/linaro-m-headless-tar-20101108-2.tar.gz linaro headless] (soft floating) image as rootfs but you can use your favorite rootfs also. <br /> {{Message/Information Message|message=Here there are many articles about how to get '''many other [[:Category:Software distributions|software distributions]]'''.}} <br /> Here you've the [http://downloads.isee.biz/pub/files/linaro/releases/linaro-11.09-nano-n-tar-20110929-0.tar.gz linaro nano 11.09] (soft floating) available for download from the ISEE server. Notes: You must build your programs with the hard floating if your rootfs is build with it. Notes: IGEPv5 must use Hard floating Rootfs ===Create the Rootfs mount point===Go to /media directory and create one sub-folder called "binary" <pre>$ cd /media $ sudo mkdir binary</pre> ===Mount the RootFS partition===Mount the rootfs partition using the 'binary' directory <pre>$ media > sudo mount /dev/mmcblkp2 /media/binary</pre> ===Untar the rootfs package===Copy "linaro-m-headless-tar-20101108-2.tar.gz" file inside the /media directory and untar the file <pre>$ media > sudo tar xvfz linaro-m-headless-tar-20101108-2.tar.gz</pre><br /> Now you should see inside your rootfs partition a similar structure like this. ===[[Image:Linaro RootFS.png|thumb|center]]Install the kernel modules===Now you should install your kernel modules inside your root file system. <pre>$ media > cd /home/jdoe/linux-omap-2.6 $ /home/jdoe/linux-omap-2.6> sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install INSTALL_MOD_PATH=/media/binary</pre>Alternatively if you downloaded the binary package uncompress it inside the directory /media/binary ===Install the kernel Image===Just copy the zImage inside your boot partition, remember before that you must mount your mmc boot partition. <pre>$ /home/jdoe/linux-omap-2.6> sudo cp arch/arm/boot/zImage /media/boot/if you're using dtb kernel as 3.8.y you must copy the dtb too.$ /home/jdoe/linuz-omap-2.6> sudo cp arch/arm/boot/dtbs/omap5-igep0050.dtb /media/boot </pre>After that you can unmount the boot & rootfs partitions. Now we're ready for test our new microsd card =Test your new MicroSD=You can test your new microSD card with a Serial client such as PuTTy. [[Using serial debug port to communicate|Here]] is an explanation about how to configure it. (Note that speed should be configured to 115200 bauds). If you already have configured it or you are using another Serial client and you have connected the Serial cable to the IGEPv2 board, then you are ready to test your microSD. Insert the microSD in your IGEPv2 board and power up the board.