Difference between revisions of "IGEPv2 Ubuntu Distro flash"
From IGEP - ISEE Wiki
Manel Caro (talk | contribs) (→Boot from Flash (first time)) |
Manel Caro (talk | contribs) |
||
Line 1: | Line 1: | ||
− | = <span style="color: rgb(255, 0, 0);">WORKING PROGRESS</span> = | + | = <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. | 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. | ||
Line 13: | Line 13: | ||
== Prerequisites == | == 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. | + | 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? == | == Where are the Nand Flash partitions? == | ||
Line 32: | Line 32: | ||
== Erase the 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: | + | 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> | + | <pre>$ flash_eraseall /dev/mdt0 |
− | $ flash_eraseall /dev/mdt0 | ||
$ flash_eraseall /dev/mtd1 | $ flash_eraseall /dev/mtd1 | ||
$ flash_eraseall /dev/mtd2 | $ flash_eraseall /dev/mtd2 | ||
− | </pre> | + | </pre> |
− | |||
== Install the Bootloader == | == Install the Bootloader == | ||
Download the writeloader binary package from [http://downloads.isee.biz/pub/distros/ubuntu/isee-writeloader-bin-armel_0.01_armel.deb here] ARMEL version or from [http://downloads.isee.biz/pub/distros/ubuntu/isee-writeloader-bin-armhf_0.01_armhf.deb here] if you are using hard float version. | Download the writeloader binary package from [http://downloads.isee.biz/pub/distros/ubuntu/isee-writeloader-bin-armel_0.01_armel.deb here] ARMEL version or from [http://downloads.isee.biz/pub/distros/ubuntu/isee-writeloader-bin-armhf_0.01_armhf.deb here] if you are using hard float version. | ||
− | After download the appropiate package we're ready for install the bootloader in the internal flash | + | After download the appropiate package we're ready for install the bootloader in the internal flash |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <pre>$ writeloader-armhf -i /boot/MLO -o /dev/mtd0</pre> | + | 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: | |
− | We must create a jffs2 partition for the boot device, we will use this command: | + | <pre>$ mount -t jffs2 /dev/mtdblock1 /mnt</pre> |
− | <pre>$ mount -t jffs2 /dev/mtdblock1 /mnt</pre> | + | Now we can copy the boot content inside as |
− | Now we can copy the boot content inside as | ||
<pre>$ cd /mnt | <pre>$ cd /mnt | ||
$ cp /boot/igep.ini . | $ cp /boot/igep.ini . | ||
$ cp /boot/zImage . | $ cp /boot/zImage . | ||
− | </pre> | + | </pre> |
− | and after that we can unmount the device as | + | and after that we can unmount the device as |
<pre>$ cd .. | <pre>$ cd .. | ||
− | $ umount /mnt</pre> | + | $ umount /mnt</pre> |
− | Now we will edit the file igep.ini (using nano) due we must specify the root boot partition.<br> | + | Now we will edit the file 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: |
− | Find inside the file any line similar to this one and comment it | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ; | + | ;--- Configure MMC boot --- |
− | <pre> | + | |
− | ;ubi.mtd=2 | + | 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 | ;root=ubi0:igep0020-rootfs | ||
− | ;rootfstype=ubifs</pre> | + | ;rootfstype=ubifs</pre> |
− | And uncomment the three lines as: | + | And uncomment the three lines as: |
− | <pre> | + | <pre>ubi.mtd=2 |
− | ubi.mtd=2 | ||
root=ubi0:igep0020-rootfs | root=ubi0:igep0020-rootfs | ||
− | rootfstype=ubifs</pre> | + | rootfstype=ubifs</pre> |
− | + | At leatest save the file. | |
− | At leatest save the file. | ||
== Install the Rootfs (Using Ubi filesystem) == | == Install the Rootfs (Using Ubi filesystem) == | ||
Line 95: | Line 88: | ||
c) Create the ubi volume | c) Create the ubi volume | ||
<pre>$ ubimkvol /dev/ubi0 -N rootfs -s 486MiB</pre> | <pre>$ ubimkvol /dev/ubi0 -N rootfs -s 486MiB</pre> | ||
− | d) Download the [http://downloads.isee.biz/pub/distros/ubuntu/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img ubi ubuntu image] | + | d) Download the [http://downloads.isee.biz/pub/distros/ubuntu/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img ubi ubuntu image] |
− | This image is generated using this command: | + | This image is generated using this command: |
− | <pre> | + | <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 |
− | $ 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> |
− | </pre> | + | Where: |
− | Where: | ||
− | ubuntu-12.04.04-lts-isee-igep00x0-armel: Is the rootfs uncompressed directory<br> | + | 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 : Is the ubi generated image<br> | + | ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img : Is the ubi generated image<br> |
− | e) Copy the ubi ubuntu image inside your board | + | e) Copy the ubi ubuntu image inside your board You can use ssh (the image has a openssh server installed) or you can install wget tool and download the image directly. |
− | You 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 | + | f) Install the ubi ubuntu image |
− | <pre>$ ubiupdatevol /dev/ubi0_0 /root/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img</pre> | + | <pre>$ ubiupdatevol /dev/ubi0_0 /root/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img</pre> |
− | + | g) Mount the ubi partition and verify the content | |
− | g) Mount the ubi partition and verify the content | ||
<pre>$ mount -t ubifs ubi0:rootfs /mnt/ | <pre>$ mount -t ubifs ubi0:rootfs /mnt/ | ||
$ls -al | $ls -al | ||
Line 137: | Line 127: | ||
drwxr-xr-x 10 root root 672 Jun 3 15:02 usr | drwxr-xr-x 10 root root 672 Jun 3 15:02 usr | ||
drwxr-xr-x 11 root root 864 Jun 3 15:02 var | drwxr-xr-x 11 root root 864 Jun 3 15:02 var | ||
− | </pre> | + | </pre> |
− | + | == Boot from Flash (first time) == | |
− | == Boot from Flash (first time) == | ||
− | |||
− | |||
+ | Unplug the power cord and eject the microsd card then plug the power cord again. During the reboot process the console will show you this message: | ||
<pre>The disk drive for /boot is not ready yet or not present. | <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> | + | 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: | + | We will skip the /boot mount at this time (press 's') and the boot process will continue showing: |
− | <pre> | + | <pre>Skipping /boot at user request |
− | Skipping /boot at user request | ||
modprobe: FATAL: Could not load /lib/modules/2.6.37/modules.dep: No such file or directory | modprobe: FATAL: Could not load /lib/modules/2.6.37/modules.dep: No such file or directory | ||
Line 158: | Line 145: | ||
igep00x0 login: | igep00x0 login: | ||
− | </pre> | + | </pre> |
− | Use the same root password ("letmein" - is the default) | + | Use the same root password ("letmein" - is the default) |
+ | |||
+ | 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: | ||
+ | <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 $ cd /boot $ cp vmlinuz-2.6.37 zImage | ||
− | + | And Reboot the board. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | [[Category:Ubuntu]][[Category:IGEPv2]] |
Revision as of 16:54, 9 June 2014
WORKING PROGRESS
How to get the Ubuntu 12.04.4 LTS in the Nand Flash Memory
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.
Overview of How-To
This How-To is meant to be a starting point for people to learn install an Ubuntu image for OMAP3-based IGEP platforms as quickly and easily as possible.
This How-To covers IGEPv2, IGEP COM Module and IGEP COM Proton boards Nand Flash Install. if you are looking Ubuntu for IGEPv5 go to this other Howto.
Contents
[hide]Prerequisites
First you need follow theIGEPv2 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?
We need to check where the Nand flash partitions are located we will use the command lsblk command for check it:
root@igep00x0:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mtdblock0 31:0 0 512K 0 disk mtdblock1 31:1 0 12M 0 disk mtdblock2 31:2 0 499.5M 0 disk mmcblk0 179:0 0 3.8G 0 disk |-mmcblk0p1 179:1 0 70.6M 0 part /boot `-mmcblk0p2 179:2 0 3.7G 0 part /
Where:
mdtblock0: Bootloader partition
mtdblock1: Boot partition
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:
$ flash_eraseall /dev/mdt0 $ flash_eraseall /dev/mtd1 $ flash_eraseall /dev/mtd2
Install the Bootloader
Download the writeloader binary package from here ARMEL version or from here if you are using hard float version.
After download the appropiate package we're ready for install the bootloader in the internal flash
ARMEL version
$ writeloader-armel -i /boot/MLO -o /dev/mtd0
ARM Hard float version
$ writeloader-armhf -i /boot/MLO -o /dev/mtd0
Install the kernel (first boot)
We must create a jffs2 partition for the boot device, we will use this command:
$ mount -t jffs2 /dev/mtdblock1 /mnt
Now we can copy the boot content inside as
$ cd /mnt $ cp /boot/igep.ini . $ cp /boot/zImage .
and after that we can unmount the device as
$ cd .. $ umount /mnt
Now we will edit the file igep.ini (using nano) due we must specify the root boot partition.
Find inside the file any line similar to this one and comment it:
- --- Configure MMC boot ---
Change:
root=/dev/mmcblk0p2 rw rootwait
to
;root=/dev/mmcblk0p2 rw rootwait
And now we will activate the rootfs as ubi, you should locate these commented lines:
- --- Configure UBI FS boot ---
;ubi.mtd=2 ;root=ubi0:igep0020-rootfs ;rootfstype=ubifs
And uncomment the three lines as:
ubi.mtd=2 root=ubi0:igep0020-rootfs rootfstype=ubifs
At leatest save the file.
Install the Rootfs (Using Ubi filesystem)
a) Format the partition with ubi
$ ubiformat /dev/mtd2
b) Attach the device
$ ubiattach -p /dev/mtd2
c) Create the ubi volume
$ ubimkvol /dev/ubi0 -N rootfs -s 486MiB
d) Download the ubi ubuntu image
This image is generated using this command:
$ 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
Where:
ubuntu-12.04.04-lts-isee-igep00x0-armel: Is the rootfs uncompressed directory
ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img : Is the ubi generated image
e) Copy the ubi ubuntu image inside your board You 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
$ ubiupdatevol /dev/ubi0_0 /root/ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.ubi.img
g) Mount the ubi partition and verify the content
$ mount -t ubifs ubi0:rootfs /mnt/ $ls -al drwxrwxr-x 21 igep igep 1376 Jun 5 15:06 . drwxrwxr-x 22 igep igep 4096 Jun 9 11:11 .. drwxr-xr-x 2 root root 6848 Jun 5 15:29 bin drwxr-xr-x 2 root root 160 Apr 19 2012 boot drwxr-xr-x 4 root root 5824 Jun 3 15:04 dev drwxr-xr-x 50 root root 7624 Jun 5 16:06 etc drwxr-xr-x 4 root root 288 Jun 5 15:23 home drwxr-xr-x 11 root root 2056 Jun 5 15:21 lib drwxr-xr-x 2 root root 160 Jun 3 15:02 media drwxr-xr-x 2 root root 160 Apr 19 2012 mnt drwxr-xr-x 2 root root 160 Jun 3 15:02 opt drwxr-xr-x 2 root root 160 Apr 19 2012 proc drwx------ 3 root root 440 Jun 5 15:54 root drwxr-xr-x 6 root root 616 Jun 5 15:14 run drwxr-xr-x 2 root root 8256 Jun 5 15:21 sbin drwxr-xr-x 2 root root 160 Mar 5 2012 selinux drwxr-xr-x 2 root root 160 Jun 3 15:02 srv drwxr-xr-x 2 root root 160 Apr 14 2012 sys drwxrwxrwt 3 root root 224 Jun 5 16:06 tmp drwxr-xr-x 10 root root 672 Jun 3 15:02 usr drwxr-xr-x 11 root root 864 Jun 3 15:02 var
Boot from Flash (first time)
Unplug the power cord and eject the microsd card then plug the power cord again. During the reboot process the console will show you this message:
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
We will skip the /boot mount at this time (press 's') and the boot process will continue showing:
Skipping /boot at user request modprobe: FATAL: Could not load /lib/modules/2.6.37/modules.dep: No such file or directory modprobe: FATAL: Could not load /lib/modules/2.6.37/modules.dep: No such file or directory * Loading cpufreq kernel modules... [ OK ] * CPU0... [ OK ] * CPUFreq Utilities: Setting ondemand CPUFreq governor... Ubuntu 12.04.4 LTS igep00x0 ttyO2 igep00x0 login:
Use the same root password ("letmein" - is the default)
After login edit the file: /etc/fstab and change this line:
LABEL="boot" /boot vfat defaults 0 0
to
/dev/mtdblock1 /boot jffs2 defaults 0 0
Save the file.
Mount manually the boot partition with this command:
$ mount -t jffs2 /dev/mtdblock1 /boot
After mount the boot partition go to /root/packages and install the kernel with:
$ dpkg -i linux-image-2.6.37_0009.isee_armel.deb
and after that install the wifi firmware with
$ dpkg -i igep-fw-wifi-marvell-8686_0.1_all.deb
At leatest go to /boot directory and copy the file vmlinuz-2.6.37 as zImage $ cd /boot $ cp vmlinuz-2.6.37 zImage
And Reboot the board.