Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

IGEPv2 Ubuntu Distro flash

1,559 bytes added, 10:50, 25 June 2018
Install the Rootfs (Using Ubi filesystem)
= <span style="color: rgb(255, 0, 0);">WORKING PROGRESS</span> =
 
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 distribution described in the howto.
== Where are the Nand Flash partitions? ==
== 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/mdt0 mtd0
$ flash_eraseall /dev/mtd1
$ flash_eraseall /dev/mtd2
</pre> == Install the Bootloader == Download the writeloader binary package from [http://downloads.isee.biz/pub/distrosisee-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/distrosisee-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 appropiate 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>and after that we can unmount the device as<pre>$ cd ..$ umount /mnt</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
At leatest save <pre>$ ubiattach -p /dev/mtd2</pre>c) Create the file.ubi volume
== Install <pre>$ ubimkvol /dev/ubi0 -N rootfs -s 486MiB</pre>d) Download the Rootfs (Using Ubi filesystem) ==[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 ]
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'''NOTE'''://downloads.isee.biz/pub/distros/ubuntu/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img ubi ubuntu This image]is generated using this command:
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:
ubuntu-12.04.04-lts-isee-igep00x0-armel: Is the rootfs uncompressed directory<br>
ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img &nbsp;: Is the ubi generated image<br>
e) Copy the ubi ubuntu image inside your boardYou can use ssh (the image has a openssh server installed) or you can install wget tool and download the image directly. f) Install the ubi ubuntu image if you want to use the armel image do:
f) Install the ubi ubuntu image
<pre>$ ubiupdatevol /dev/ubi0_0 /root/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img</pre>
or the hard float alternative
<pre>$ ubiupdatevol /dev/ubi0_0 /root/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armhf.ubi.img</pre>
g) Mount the ubi partition and verify the content
 
<pre>$ mount -t ubifs ubi0:rootfs /mnt/
$ls -al
</pre>
== Boot from Flash (first timeh) ==Edit fstab for "boot" partitionUnplug After login edit the power cord file: /mnt/etc/fstab and eject the microsd card then plug the power cord again.During the reboot process the console will show you change this messageline:
<pre>LABEL="boot" /boot vfat defaults 0 0
</pre>
to
 
<pre>/dev/mtdblock1 /boot jffs2 defaults 0 0
</pre>
Save the file.
 
i) Umount the ubi partition
 
<pre>$ umount /mnt</pre>
 
[[Category:Ubuntu]]
[[Category:Software distributions]]
 
== Boot from Flash (first time) ==
 
Unplug the power cord and eject the microsd card then plug the power cord again.
<pre>
* Loading cpufreq kernel modules... [ OK ]
* CPU0... [ OK ] * CPUFreq Utilities: Setting ondemand CPUFreq governor...
 
Ubuntu 12.04.4 LTS igep00x0 ttyO2
 
igep00x0 login:
</pre>
Use the same root password ("letmein" - is the default)
 
Mount manually the boot partition with this command:
<pre>$ mount -t jffs2 /dev/mtdblock1 /boot </pre>
After mount the boot partition go to /root/packages and install the kernel with:
<pre>$ dpkg -i linux-image-2.6.37_0009.isee_armel.deb</pre>
and after that install the wifi firmware with
<pre>$ dpkg -i igep-fw-wifi-marvell-8686_0.1_all.deb</pre>
At leatest go to /boot directory and copy the file vmlinuz-2.6.37 as zImage
<pre>$ cd /boot
$ cp vmlinuz-2.6.37 zImage </pre>
 
Now you can reboot the board ... after that you've the ubuntu installed into the Nand Flash memory
 
== Known issues ==
=== ISSUE - Booting device shows: The disk drive for /boot is not ready yet or not present. ===
During the reboot process the console will show you this message:
<pre>The disk drive for /boot is not ready yet or not present.
Continue to wait, or Press S to skip mounting or M for manual recovery</pre>We will skip the /boot mount at this time (press 's') and the boot process will continue showing:<pre>Skipping /boot at user request
modprobe: FATAL: Could not load /lib/modules/2.6.37/modules.dep: No such file or directory
igep00x0 login:
</pre>Use After login edit the same root password (file: /etc/fstab and change this line: <pre>LABEL="letmeinboot" - is /boot vfat defaults 0 0</pre> to <pre>/dev/mtdblock1 /boot jffs2 defaults 0 0</pre> Save the default)file.
After login edit the file:
/etc/fstab and change this line:
<pre>
LABEL="boot" /boot vfat defaults 0 0
</pre>
to
<pre>
/dev/mtdblock1 /boot jffs2 defaults 0 0
</pre>
Save the file.
Mount manually the boot partition with this command[[Category:<pre>$ mount -t jffs2 /dev/mtdblock1 /boot </pre>After mount the boot partition go to /root/packages and install the kernel withUbuntu]][[Category:<pre>$ dpkg -i linux-image-2.6.37_0009.isee_armel.deb</pre>and after that install the wifi firmware with<pre>$ dpkg -i igep-fw-wifi-marvell-8686_0.1_all.deb</pre>IGEPv2]]