1,381
edits
Changes
From IGEP - ISEE Wiki
→Install the Rootfs (Using Ubi filesystem)
How to get the Ubuntu 12.04.4 LTS in the Nand Flash Memory <br> The Ubuntu project is excited to be working with the ARM ecosystem to port Ubuntu for ARM-based devices. This work fits with our goals of making Ubuntu available as an open platform to as many people as possible.
== Prerequisites ==
First you need follow the[[IGEPv2 Ubuntu Distro|IGEPv2 Ubuntu Distribution]] howto and boot the IGEPv2 / IGEP COM Module / IGEP COM Proton using the Ubuntu distributiondescribed in the howto.
== Where are the Nand Flash partitions? ==
We need to check where the Nand flash partitions are located we will use the command lsblk command for check it:<pre>root@igep00x0:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mtdblock0 31:0 0 512K 0 disk
|-mmcblk0p1 179:1 0 70.6M 0 part /boot
`-mmcblk0p2 179:2 0 3.7G 0 part /
</pre>
Where:
mdtblock0: Bootloader partition<br> mtdblock1: Boot partition<br> mtdblock2: rootfs partition
== Erase the partitions ==
It's very important erase the partitions before try to write anything into the flash memory. We will erase all NAND partitions using these commands:
<pre>$ flash_eraseall /dev/mtd0
$ flash_eraseall /dev/mtd1
$ flash_eraseall /dev/mtd2
</pre>
==Install the Bootloader==
Download the writeloader binary package from [http://downloads.isee.biz/pub/isee-releases/ubuntu/ubuntu-12.04.04-lts-armel-armhf/isee-writeloader-bin-armel_0.01_armel.deb here]ARMEL version or from [http://downloads.isee.biz/pub/isee-releases/ubuntu/ubuntu-12.04.04-lts-armel-armhf/isee-writeloader-bin-armhf_0.01_armhf.deb here]if you are using hard float version.
After download the appropriate package we're ready for install the bootloader in the internal flash
ARMEL version
<pre>$ writeloader-armel -i /boot/MLO -o /dev/mtd0</pre>
ARM Hard float version
<pre>$ writeloader-armhf -i /boot/MLO -o /dev/mtd0</pre>
== Install the kernel (first boot) ==
We must create a jffs2 partition for the boot device, we will use this command:
<pre>$ mount -t jffs2 /dev/mtdblock1 /mnt</pre>
Now we can copy the boot content inside as
<pre>$ cd /mnt
$ cp /boot/igep.ini .
$ cp /boot/zImage .
</pre>
Now we will edit the file /boot/igep.ini (using nano) due we must specify the root boot partition.<br> Find inside the file any line similar to this one and comment it:
;--- Configure MMC boot ---
Change:
<pre>root=/dev/mmcblk0p2 rw rootwait</pre>
to
<pre>;root=/dev/mmcblk0p2 rw rootwait</pre>
And now we will activate the rootfs as ubi, you should locate these commented lines:
;--- Configure UBI FS boot ---
<pre>;ubi.mtd=2
;root=ubi0:igep0020-rootfs
;rootfstype=ubifs</pre>
And uncomment the three lines as:
<pre>ubi.mtd=2
root=ubi0:igep0020-rootfs
rootfstype=ubifs</pre>
At leatest save the file.
and after that we can unmount the device as
<pre>$ cd ..
$ umount /mnt</pre>
==Install the Rootfs (Using Ubi filesystem)==
a) Format the partition with ubi
<pre>$ ubiformat /dev/mtd2</pre>
b) Attach the device
<pre>$ ubiattach -p /dev/mtd2</pre>
c) Create the ubi volume
<pre>$ ubimkvol /dev/ubi0 -N rootfs -s 486MiB</pre>
d) Download the [http://downloads.isee.biz/pub/isee-releases/ubuntu/ubuntu-12.04.04-lts-armel-armhf/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img ubi ubuntu 12.04.4 LTS armel image] or [http://downloads.isee.biz/pub/isee-releases/ubuntu/ubuntu-12.04.04-lts-armel-armhf/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armhf.ubi.img ubi ubuntu 12.04.4 LTS armhf image][http://downloads.isee.biz/pub/distros/ubuntu/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armhf.ubi.img ]
'''NOTE''': This image is generated using this command:
<pre>$ mkfs.ubifs -r ubuntu-12.04.04-lts-isee-igep00x0-armel/ -m 2048 -e 129024 -c 4044 -o ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img
</pre>
Where: