1,381
edits
Changes
From IGEP - ISEE Wiki
no edit summary
= Overview =This how to explains how to '''create a microSD card''' to boot Texas Instruments Processors (OMAP35xx, DM37xx, AM335x, OMAP5432) with other '''software distributions (Including yocto, Ubuntu, Debian ...)'''.
<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.
=== Create the BOOT Partition ===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:
=== Create the ROOTFS Partition ===The Next step it's create the root file system partition.
=== Apply all Changes ===Click on apply button in the main menu after that gparted show a window like this for confirm all operations
[[Image:Gparted apply changesinformation.png|thumb|center]]We should click on apply button. When the process finish we can see all changes applied
[[Image:Gparted apply informationoperations complete.png|thumb|center]]When the process finish we can see all changes applied
===[[Image:Gparted partitions done.png|thumb|center]]Select "Boot flag" for the boot partition===Now we can see all partitions must select the boot flag for the first partition for it we use the right mouse button over the boot partition and configurations done in the main gparted window select "Manage Flags" option
== Boot Partition Structure ==We commented in the theory point the OMAP needs only the MLO (x-loader) file for boot, we will start checking this point.
== X-Loader (MLO) - IGEPv2 - IGEP COM Module - IGEP COM Proton<br> ==You can follow this other howto about the [[The IGEP X-loader|IGEP-X-loader]].
<pre>We will compile the sources and get it from our git repository:
$/home/jdoe/igep-x-loader> contrib/signGP
</pre> Alternatively you can download the binary package from [http://downloads.isee.biz/pub/releases/IGEP_xloader/igep-x-loader-2.5.0-2.tar.bz2 here]
If you're using 2.5.0.x x-loader copy directly the MLO to your boot partion or if you use older version then follow the next instructions:
Copy the x-loader.bin.ift into the boot partition.
[[Image:Copy Xloader.png|thumb|center]]
Rename the x-loader.bin.ift to MLO<br>
[[Image:Rename Xloader to MLO.png|thumb|center]]Now we're ready for test the board boot from the microsd card.
=== X-Loader Boot ===We will eject the boot and rootfs partitions from our Host PC, this step it's a lot important due the Linux must sync all changes before eject the microsd card.
We will eject insert our microSD card into the boot and rootfs partitions from our Host PCIGEP board, this step it's a lot important due connect the Linux must sync all changes before eject serial debug cable and open the microsd card. serial terminal
[[Image:Putty Serial ConfigurationIGEP-X-Loader Boot.png|thumb|center]]Power UP the board.
<pre>[kernel]
; Kernel load address, NOT Modify
;init=/bin/bash
</pre> Create a new file into the boot partition named igep.ini with these content and save the file.
igep.ini is included in the package software inside scripts directory or you can access to it directly in the git with this [http://git.isee.biz/?p=pub/scm/igep-x-loader.git;a=blob;f=scripts/igep.ini;h=ce093fe80c81d8888bf79464f847059b312bba83;hb=HEAD link]
== MLO + uboot - IGEP COM AQUILA, IGEPv5 ==You can find more detailed information about the build procedure on this other [[U-Boot 2014.01.y|howto]]
<pre>git clone git://git.isee.biz/pub/scm/u-boot-arm.git
cd u-boot-arm/
</pre> <span style="line-height: 1.5em;">If you're using IGEPv5 board you should checkout this one:</span>
<pre>git checkout origin/u-boot-2014.01.y-omap5 -b u-boot-2014.01.y-omap5
make omap5_igep0050_config CROSS_COMPILE=arm-linux-gnueabihf-
</pre> Or if you're using IGEP COM Aquila:<br>
<pre>git checkout origin/u-boot-2013.07.y -b u-boot-2013.07.y.local
make igep0033_config CROSS_COMPILE=arm-linux-gnueabi-</pre> After configuration you can build it with: <pre>make CROSS_COMPILE=<set here your cross compiler></pre> After build it generate two files:
<pre>make CROSS_COMPILE=<set here your cross compiler></pre>After build it generate two files: MLO and u-boot.img, you must copy both file into your boot partition.
U-boot use self script (enviroment) configuration can be added to boot partition too.
== Kernel ==You can follow this other howto about [[The Linux kernel|how compile and install the Linux Kernel]].
<pre>a) Clone the Kernel git repository
$/home/jdoe/linux-omap-2.6> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs
</pre> Notes: The kernel binary resides inside the directory: $/home/jdoe/linux-omap-2.6/arch/arm/boot/'''zImage''' <br/>Notes: Alternatively you can download the kernel binary from this [http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-7/zImage-2.6.37-7.bin link] and modules from [http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-7/modules-2.6.37-7.tar.gz this].<br/>Notes: You can download directly all releases using this [http://downloads.isee.biz/pub/releases/linux_kernel link]<br/>
Notes: Kernel 3.8.y use dtb file for describe the board configuration, these files resides inside the directory: $/home/jdoe/linux-omap-2.6/arch/arm/boot/dtbs/ and you must copy the right dtb for your board.
== 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.<br>
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> <br>
=== Mount the RootFS partition ===Mount the rootfs partition using the 'binary' directory
<pre>$ media > sudo mount /dev/mmcblkp2 /media/binary
</pre> <br>
=== Untar the rootfs package ===Copy "linaro-m-headless-tar-20101108-2.tar.gz" file inside the /media directory and untar the file
=== [[Image:Linaro RootFS.png|thumb|center]]Install the kernel modules<br> ===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<br> ===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<br>
=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.
[[Image:Linaro Boot1.png|thumb|center]][[Image:Linaro Boot2.png|thumb|center]]
=Related articles=*[[Boot up sequence]]*[[Update the PRE-INSTALLED software image to a current release]]*[[The Linux kernel]]
{{Message/Forum}}