IGEPv2 Ubuntu Distro

From IGEP - ISEE Wiki

Revision as of 10:14, 9 June 2014 by Manel Caro (talk | contribs)

Jump to: navigation, search

WORK IN PROGRESS

How to get the Ubuntu 12.04.4 LTS
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. if you are looking Ubuntu for IGEPv5 go to this other Howto.

Host Enviroment

We suggest use Ubuntu 12.04.4 LTS (32 bits) in your host, you can download it from our server using this link or directly from Ubuntu (Canonical) website. You can install it in a Virtual Machine enviroment using any Virtualization software or directly in your PC.

Material

  • IGEPv2, IGEP COM Module or IGEP COM Proton.
  • 1 MicroSD Card with 512 MiB minimum space.
  • Serial Cable and conversor for attach the serial debug console.
  • Ethernet cable (optional)
  • Hub (optional)
  • Keyboard and mouse (optional)
  • HDMI/DVI Monitor (optional)

Download the Ubuntu 12.04.4 LTS Distribution and tools

The Ubuntu 12.04.4 LTS distribution can be downloaded from here or if you want to use the hard float version you should use this other link.

The first boot must be done using the first boot package, inside you've the bootloader, igep.ini and temporary kernel.

You can download this script for create the right partitions in the microsd card (Only is valid for microsd card, it cannot be used for prepare the raw Nand flash)

Prepare the Enviroment

Check if you've the packages bc and dosfstools

Install both packages as:

apt-get install bc dosfstools

Prepare the MicroSD card

Insert the microsd card in your host, after that you should see any similar to this output:

mcaro@mcaro-vm-u12:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
fd0      2:0    1     4K  0 disk
sda      8:0    0   100G  0 disk
├─sda1   8:1    0    98G  0 part /
├─sda2   8:2    0     1K  0 part
└─sda5   8:5    0     2G  0 part
sdb      8:16   1   3.8G  0 disk
├─sdb1   8:17   1  70.6M  0 part /media/boot
└─sdb2   8:18   1   3.7G  0 part /media/rootfs
sr0     11:0    1  1024M  0 rom  

here you can see the device sdb (it's the 4 GiB microsd card) be careful due in your host can be other device like sdc if you doubt check the dmesg output it should show you the device as:

[258974.855508] sd 33:0:0:0: [sdb] 7882752 512-byte logical blocks: (4.03 GB/3.75 GiB)
[258974.862052] sd 33:0:0:0: [sdb] No Caching mode page found
[258974.862057] sd 33:0:0:0: [sdb] Assuming drive cache: write through
[258974.869338] sd 33:0:0:0: [sdb] No Caching mode page found
[258974.869341] sd 33:0:0:0: [sdb] Assuming drive cache: write through
[258974.871258]  sdb: sdb1 sdb2
[258975.642423] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)

Now you should execute the script prepare-disk.sh

mcaro@mcaro-vm-u12:~$ ./prepare-disk.sh
fd0      2:0    1     4K  0 disk
sda      8:0    0   100G  0 disk
sdb      8:16   1   3.8G  0 disk
Select the disk: [sdx or mmcblkx]

Here you should write the device name in our case sdb

sdb
sdb
Erase disk: /dev/sdb
Are your sure? Y/n
y

Verify the disk selected is correct if this is the situation then set Y

1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.749578 s, 1.4 MB/s
Disk /dev/sdb doesn't contain a valid partition table
DISK SIZE - 4035969024 bytes
CYLINDERS - 490
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdb: 490 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/sdb: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      0+      8       9-     72261    c  W95 FAT32 (LBA)
/dev/sdb2          9     489     481    3863632+  83  Linux
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
/dev/sdb1
/dev/sdb2
mkfs.vfat 3.0.12 (29 Oct 2011)
mke2fs 1.42 (29-Nov-2011)
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
241920 inodes, 965908 blocks
48295 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=989855744
30 block groups
32768 blocks per group, 32768 fragments per group
8064 inodes per group
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                           
Writing inode tables: done                           
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

After finish the microsd card will be ready for install the Ubuntu the microsd card will show you two partitions, the first one formated with FAT32 and the second one formated with EXT4.

TIP: you can prepare the microsd card manually using this other howto.

TIP: If the microsd card is not mounted eject the microsd card and insert it in the microsd reader again and the system will mount it automatically or mount the card manually.

Copy the Content into the MicroSD Card

Uncompress the boot package into the boot partition (normally mounted on /media/boot)

$ cd /media/boot

$ tar xvfj ubuntu-12.04.4-isee-igeo00x0-boot.tar.bz2

After incompress the content you should see inside the /media/boot these content:

$ zImage MLO igep.ini 

The default configuration is set for boot IGEPv2 board if you wish boot the IGEP COM Module or IGEP COM Proton then you must edit the file igep.ini and modify the variable:

MachineID=<board id> 

Where board id:

IGEP Module => 2717
IGEPv2 => 2344
IGEP COM PROTON => 3203

Save the file

Now enter into the rootfs partiton (normally mounted on /media/rootfs) and uncompress the ubuntu 12.04.4 package on it as:

$ tar xvfj ubuntu-12.04.04-lts-isee-igep00x0-20140606-armel.tar.bz2 

After that sync and eject the microsd card.

Boot the board

Insert the microsd card in the IGEPv2 board (or IGEP COM Module / IGEP COM Proton)

Plug the power cord and you should see a similar boot like this:


After first boot

After the first boot you should install some packages included into the /root/packages directory like wifi/bt firmware, the kernel and other packages ...

The command for install these packages is the debian/ubuntu install tool dpkg:

$ dpkg -i <package name>

Notes about install the kernel

The kernel 2.6.37 is provided in a debian/ubuntu package but some steps must be done before and after install the package:

Before Install the package:

  1. Check the boot partition (verify that you've the boot partition mounted in the boot directory)

$ mount


What is included ...

This package is based on Ubuntu 12.04.4 Core with some extra packages.

You can check the complete log reading the Changelog included into the root directory.



The basic packages for IGEPv2 / IGEP COM Module / IGEP COM Proton be included inside the rootfs.

Using the serial console enter into the /root directory and you will find there the packages directory if you want install the packages execute this command:

dpkg -i <package name>

The packages included are:

  • Wifi & BT firmware packages (Marvell or TI Wilink)
  • Kernel package (include kernel + modules)

This distribution is based on Ubuntu Core distribution addding some packages, you can check the complete change log reading the changelong included inside /root directory

The root password is: letmein

The distribution include a normal user also:

Username: igep

Password: igep