Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

IGEPv5 Ubuntu Distro

14,889 bytes added, 12:12, 10 July 2015
no edit summary
Ubuntu 12.04.4 LTS (Hard Float) is the default IGEPv5 base distribution (it's included in IGEPv5 Full and Lite).  We will learn about install, use, generate packages, upgrade ...
= Overview =
What we learn in this chapter? Install, play and fun with Ubuntu distro ...
__TOC__
 
<br>
= Host Enviroment =
== Install Development packages ==
Now is time to install some packagesif you want to build your own distribution.
=== GCC, G++, libc Cross Compiler ===
You can install the cross compiler if you want to build u-boot, linux kernel or applications using your host PC and compile for IGEPv5 as target.
<pre>sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-armel-cross libc6-armel-armhf-cross
</pre> === Build Ubuntu packages === if you're idea is build ubuntu packages then you need install other packages <pre>sudo apt-get install build-essential devscripts dh-make quilt autogen autoconf dh-autoreconf dh-buildinfo dh-make pkg-config</pre>
=== Pbuilder ===
<span style="color: rgb(85, 85, 85); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 22px;">A [https://wiki.ubuntu.com/PbuilderHowto pbuilder] environment is a chrooted environment which can have a different distroseries or architecture than your host system.</span>
<pre>sudo apt-get install pbuilder pbuilder-scripts</pre>
'''What can I do?'''
pbuilder is used for create your own ubuntu/debian based distributionor build your own debian/ubuntu packages.
Setup, the basic setup is create in your home base directory a new file called .pbuilderrc inside you should copy this content:
<pre>BINDMOUNTS="${BINDMOUNTS} /home/&lt;your_user&gt;/Projects"
EXTRAPACKAGES="${EXTRAPACKAGES} pbuilder devscripts gnupg patchutils vim-tiny openssh-client"</pre><div>And just remember create the directory Projects before start.</div><div>Now if you want to create a new rootfs, you can try to build with</div><pre>cd ~/Projectspcreate -a armhf -d precise precise-armhf</pre><div>The first time the program will ask you about install some depedences</div><div>dependencies <pre>Installing qemu-user-static for armhf-on-x86 support (natty or later)Reading package lists... DoneBuilding dependency treeReading state information... DoneThe following extra packages will be installed:binfmt-supportThe following NEW packages will be installed:binfmt-support qemu-user-static0 upgraded, 2 newly installed, 0 to remove and 23 not upgraded.Need to get 12.9 MB of archives.After this operation, 33.9 MB of additional disk space will be used.Do you want to continue [Y/n]? </pre> You should say, Y (yes) After build (it can take some time) you will get your rootfs (ARM Hard float) in /var/cache/pbuilder/ directory  Now it time to test your new rootfs  First create a new directory in your home: <pre>$ mkdir -p rootfs/armhf_12.04.4</pre> Now untar the generated file: <pre>$ cd ~/rootfs/armhf_12.04.4 $ sudo tar xvfz /var/cache/pbuilder/precise-armhf.tgz</pre> Now copy the qemu-arm-static file into usr/bin directory <pre>$ sudo cp /usr/bin/qemu-arm-static usr/bin</pre> And now chroot it as <pre>$ cd .. $ sudo chroot armhf_12.04.4</pre> Check if all is ok with: <pre>$ arch armv7l</pre> Now you've in a chroot armhf emulation your rootfs ... &nbsp; = Install Ubuntu Core 12.04.4 LTS (HF) in the IGEPv5 = Ubuntu 12.04.4 LTS can be installed in MicroSD Card, the internal eMMC Flash or in a SSD Flash card, the minimum suggested capacity is 8 GiB available.  This tutorial will show you install step by step and customize the distribution base.<br>  === Download Ubuntu 12.04.4 LTS (HF) === Ubuntu 12.04.4 LTS can be downloaded from our server at this [http://downloads.isee.biz/pub/igepv5_ce/arm-ubuntu/images/ubuntu-12.04.4-LTS-hf location] this is a unmodified ubuntu 12.04.4 image without any package. This distribution is based on [https://wiki.ubuntu.com/Core Ubuntu Core]<br> Ubuntu 12.04.4 LTS (with ISEE modifications) can be downloaded from our server at this [http://downloads.isee.biz/pub/igepv5_ce/releases/ location]&nbsp; all support is based on this distribution.<br> '''The changelog is located inside the /root directory<br> '''User '''root '''password''': letmein<br> '''User '''igep '''password''': igep'''  === Initial Setup === As we explain before we will create a chroot environment using the downloaded image: <pre>mkdir -p ~/rootfs/armhf-ubuntu-core-12.04.4cd ~/rootwget http://downloads.isee.biz/pub/igepv5_ce/arm-ubuntu/images/ubuntu-12.04.4-LTS-hf/ubuntu-core-12.04.4-core-armhf.tar.gz cd armhf-ubuntu-core-12.04.4 sudo tar xvfz ../ubuntu-core-12.04.4-core-armhf.tar.gzsudo cp /usr/bin/qemu-arm-static usr/binfor m in `echo 'sys dev proc'`; do sudo mount /$m ./$m -o bind; donesudo LC_ALL=C chroot . </pre> <span style="color: rgb(255, 0, 0);">Note: remember remove the qemu-arm-static file after all.&nbsp;</span> Note: remember unmount (outside chroot) the sys proc and dev with: for m in `echo 'sys dev proc'`; do sudo umount ./$m; done  Now if you execute the command ls -al you should see a similar directory listing like this: <pre>drwxr-xr-x 2 root root 4096 Feb 3 16:42 bindrwxr-xr-x 2 root root 4096 Apr 19 2012 bootdrwxr-xr-x 3 root root 4096 Feb 3 16:41 devdrwxr-xr-x 41 root root 4096 Feb 3 16:42 etcdrwxr-xr-x 2 root root 4096 Apr 19 2012 homedrwxr-xr-x 11 root root 4096 Feb 3 16:41 libdrwxr-xr-x 2 root root 4096 Feb 3 16:39 mediadrwxr-xr-x 2 root root 4096 Apr 19 2012 mntdrwxr-xr-x 2 root root 4096 Feb 3 16:39 optdrwxr-xr-x 2 root root 4096 Apr 19 2012 procdrwx------ 2 root root 4096 Feb 3 16:42 rootdrwxr-xr-x 5 root root 4096 Feb 3 16:41 rundrwxr-xr-x 2 root root 4096 Feb 3 16:42 sbindrwxr-xr-x 2 root root 4096 Mar 5 2012 selinuxdrwxr-xr-x 2 root root 4096 Feb 3 16:39 srvdrwxr-xr-x 2 root root 4096 Apr 14 2012 sysdrwxrwxrwt 2 root root 4096 Feb 3 16:41 tmpdrwxr-xr-x 10 root root 4096 Feb 3 16:39 usrdrwxr-xr-x 11 root root 4096 Feb 3 16:39 var</pre> Ubuntu core not have any user created and we need to create one: <pre>$ adduser igep Adding user `igep' ... Adding new group `igep' (1000) ... Adding new user `igep' (1000) with group `igep' ...
Reading Creating home directory `/home/igep' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully</pre> Now it's necessary to add this user into the groups adm and sudo. <pre>addgroup igep adm addgroup igep sudo</pre> it's a good idea to install any necessary package on your rootfs for do that you should do <pre>apt-get update</pre> and install the package (ex: nano editor) <pre>apt-get install nano</pre> Now we can edit the files and tunning the setup  === Tunning your rootfs === We will share some interesting tricks that can be useful for your new rootfs.  ==== Login in "root" without need of a password ==== You can edit the file /etc/shadow it should have a similar content like this <pre>root:*:16104:0:99999:7:::</pre> if you want eliminate the need of a password you must remove the * as <pre>root::16104:0:99999:7:::</pre> ==== Add password for root user<br> ==== Enter as root user and set the password with: <pre>$ passwd</pre> ==== Network configuration files for 'DHCP' client ==== A few files on your target filesystem need to be taken care of. <br> Steps are as follow:  *Edit your /etc/network/interfaces file and add the bottom 2 lines:  auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp *If you are behind a firewall inside a 'Corporate Network', the following 2 files may need to be edited to according to your Coporate settings: *Edit your /etc/resolv.conf file and have something similar to this: Remove the "&lt;&gt;" symbols and replace by your own corporate DHCP and DNS servers adresses.   domain &lt;something.dhcp.mycompany.com&gt; search &lt;something.dhcp.mycompany.com&gt; nameserver &lt;IP address of your DNS server 1&gt; nameserver &lt;IP address of your DNS server 2&gt; *Add the proxy settings: In your /etc/environment file, add something similar to this using your own corporate proxy server address and port number:   http_proxy="http://myproxy.ext.mycompany.com:80" https_proxy="http://myproxy.ext.mycompany.com:80" ftp_proxy="http://myproxy.ext.mycompany.com:80" no_proxy="localhost,.mycompany.com" In your /etc/apt/apt.conf.d/proxy, add similar to this using your own corporate proxy server address and port number:   Acquire { http { Proxy &lt;corporate apps address&gt;:&lt;port number&gt;; Proxy::&lt;ubuntu corporate address&gt; "DIRECT"; } } == Packages == The IGEPv5 debian repository is located here: http://downloads.isee.biz/repo/apt<br> Edit: /etc/apt/sources.list and add this line:<br> <pre>deb http://downloads.isee.biz/repo/apt/ precise main non-free contrib</pre> after that save the file and execute <pre>apt-get update</pre> == Prepare your disk (microsd, eMMC or SSD disk) == First we need to prepare the disk (microsd, eMMC, or SSD disk), download this [http://downloads.isee.biz/pub/igepv5_ce/scripts/prepare-disk.sh script]<br>  Prerequisites: you must install these two packages before execute the script:<br> <pre>sudo apt-get install bc dosfstools</pre> This script will create in your disk (microsd, eMMC, SSD disk) two new partitions, first one named boot and the second one named rootfs.<br>  Check your disk:<br>  Insert the disk in your PC or IGEPv5 and after that execute lsblk as:<br> mmcblock is for microsd card or eMMC sda is for your ssd disk <pre>lsblksdb 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</pre> or is possible to look like this:<br> <pre>root@localhost:~# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 29.8G 0 disk|-sda1 8:1 0 100M 0 part`-sda2 8:2 0 29.7G 0 part /mmcblk0boot0 179:8 0 2M 1 diskmmcblk0boot1 179:16 0 2M 1 diskmmcblk0 179:0 0 7.3G 0 disk|-mmcblk0p1 179:1 0 70.6M 0 part`-mmcblk0p2 179:2 0 7.2G 0 part</pre> Execute the script as root:<br> <pre>sudo ./prepare_disk.sh root@localhost:~# ./prepare-disk.shsda 8:0 0 29.8G 0 diskmmcblk0boot0 179:8 0 2M 1 diskmmcblk0boot1 179:16 0 2M 1 diskmmcblk0 179:0 0 7.3G 0 diskSelect the disk: [sdx or mmcblkx]</pre> In the first case you should use sdb and in the second case you should use mmcblk0, write the appropiate disk name ...  After that it will ask you if you are sure&nbsp;!!!  After the script execution you will found two new partitions <pre>mmcblk0 179:0 0 7.3G 0 disk|-mmcblk0p1 179:1 0 70.6M 0 part`-mmcblk0p2 179:2 0 7.2G 0 part</pre> In this case p1 (boot)&nbsp;and p2 (rootfs).  == Install your image in a MicroSD Card == First you need prepare your disk, check previous point.  Ubuntu 12.04.4 LTS (with ISEE modifications) can be downloaded from our server at this [http://downloads.isee.biz/pub/igepv5_ce/releases/ location]&nbsp; all support is based on this distribution.<br> '''The changelog is located inside the /root directory<br> '''User '''root '''password''': letmein<br> '''User '''igep '''password''': igep'''  Mount your microsd in your host PC or IGEPv5 after mount the disk it should show you two partitions, the first one boot when we will copy the MLO and u-boot.img and the second one where we uncompress the downloaded file.  === Mount the microsd card partitions === Use the command mount if automount is not enabled as <pre>mount /dev/mmcblk0p1 /mnt/p1 mount /dev/mmcblk0p2 /mnt/p2</pre> Copy MLO and u-boot.img (both files can be downloaded reside inside the package listsu-boot-xxxxxxx-omap5-isee.tar.bz2) inside /mnt/p1 <pre>cp MLO u-boot.img /mnt/p1</pre> go to /mnt/p2  Now uncompress the rootfs (downloaded file) <span style="color: rgb(255, 0, 0);">as root</span> <pre>cd /mnt/p2 sudo tar xvfj ubuntu-core-12.04.4-isee-XXXXXXXXXXX-armhf.tar.bz2 (where xxxxxxx is the release name)</pre> Sync disk <pre>$ sync</pre> Unmount the disks <pre>umount /mnt/p1 umount /mnt/p2</pre> And finally eject the disk.  If automount is enabled the partitions will be accessed on:  /media/&lt;your user&gt;/boot  and  /media/&lt;your user/rootfs  use both directories for copy the files in this case you don't need create the directories, you directly can copy and uncompress the file there.  == Install your image in a SATA SSD Disk == First you need prepare your disk, check previous point.  Ubuntu 12.04.4 LTS (with ISEE modifications) can be downloaded from our server at this [http://downloads.isee.biz/pub/igepv5_ce/releases/ location]&nbsp; all support is based on this distribution.<br> '''The changelog is located inside the /root directory<br> '''User '''root '''password''': letmein<br> '''User '''igep '''password''': igep'''  Mount your SSD disk in your IGEPv5 after mount the disk it should show you two partitions, the first one boot when we will copy the MLO and u-boot.img and the second one where we uncompress the downloaded file.  === Mount the SSD disk partitions === Use the command mount: <pre>mount /dev/sda1 /mnt/p1mount /dev/sda2 /mnt/p2</pre> Copy MLO and u-boot.img (both files can be downloaded reside inside the package u-boot-xxxxxxx-omap5-isee.tar.bz2) inside /mnt/p1 <pre>cp MLO u-boot.img /mnt/p1</pre> go to /mnt/p2  Now uncompress the rootfs (downloaded file) <span style="color: rgb(255, 0, 0);">as root</span> <pre>cd /mnt/p2sudo tar xvfj ubuntu-core-12.04.4-isee-XXXXXXXXXXX-armhf.tar.bz2 (where xxxxxxx is the release name)</pre> Sync disk <pre>$ sync</pre> Unmount the disks <pre>umount /mnt/p1 umount /mnt/p2</pre> Reboot the board (remember set the board dips in the right boot setup, dip 8 ON)  == Install your image in the eMMC flash == First you need prepare your disk, check previous point.  Ubuntu 12.04.4 LTS (with ISEE modifications) can be downloaded from our server at this [http://downloads.isee.biz/pub/igepv5_ce/releases/ location]&nbsp; all support is based on this distribution.<br> '''The changelog is located inside the /root directory<br> '''User '''root '''password''': letmein<br> '''User '''igep '''password''': igep'''  Mount your eMMC in your IGEPv5 after mount the disk it should show you two partitions, the first one boot when we will copy the MLO and u-boot.img and the second one where we uncompress the downloaded file.  You can see the eMMC disk as MMC disk, take a look with the names just if you've the microsd plugged ...  === Mount the eMMC partitions === Use the command mount if automount is not enabled as <pre>mount /dev/mmcblk0p1 /mnt/p1 mount /dev/mmcblk0p2 /mnt/p2</pre> Copy MLO and u-boot.img (both files can be downloaded reside inside the package u-boot-xxxxxxx-omap5-isee.tar.bz2) inside /mnt/p1 <pre>cp MLO u-boot.img /mnt/p1</pre> go to /mnt/p2  Now uncompress the rootfs (downloaded file) <span style="color: rgb(255, 0, 0);">as root</span> <pre>cd /mnt/p2 sudo tar xvfj ubuntu-core-12.04.4-isee-XXXXXXXXXXX-armhf.tar. Donebz2 (where xxxxxxx is the release name)</pre> Sync disk <pre>$ sync</pre> Unmount the disks <pre>umount /mnt/p1
umount /mnt/p2
</pre>
Reboot the board (remember set the board dips in the right boot setup)
Building dependency tree == Special Warning about MicroSD Card and eMMc ==
The microsd card uses the interface mmc as the eMMC in some cases as when you boot from your microsd card the lsblk command can show you two mmc devices:
Reading state information... Done/dev/mmcblk0 <br> /dev/mmcblk1 <br>
Normally the 0 is the boot device (from where you boot), if you use the microsd card for boot&nbsp;: /dev/mmcblk0 and the eMMC is the /dev/mmcblk1 but if you boot from the eMMC and insert the microsd card then the eMMC is /dev/mmcblk0 and the microsd card be /dev/mmcblk1 <br> If you use the script for prepare the disk first be sure about which is your desired target due you can easily erase other disk.
The following extra packages will be installed:= WORK WITH PACKAGES =
binfmtMaybe if you used ubuntu before you are familiar with the apt use, this is only an a introduction to apt use:<br> If you wish install a new package you should use: <pre>$ apt-supportget install &lt;package name&gt;$ apt-get install openssh-server</pre> If you wish locate any package you can use: <pre>$ apt-cache search &lt;name&gt;</pre> it list the concordances with name, maybe it's useful use an alternative command: <pre>$ apt-cache search &lt;name&gt; | grep "any string"</pre> If you wish remove any package you can use: <pre>$ apt-get remove &lt;package name&gt;</pre> If you wish list the package content you can use: <pre>dpkg -L &lt;package name&gt;</pre> If you wish list the packages installed in your system you can use: <pre>dpkg -l</pre> or if you wish locate one: <pre>dpkg -l &lt;name&gt;</pre> = BUGS =
The following NEW packages will be installedBug tracking server is located [http://bug.isee.biz here], the bug tracking is open to all customers and there you can put your found bugs, requesting features or changes ...<br>
binfmt-support qemu-user-static= CONTRIBUTE =
0 upgraded, 2 newly installed, 0 to remove Please login in this wiki page with the same username and 23 not upgradedlogin that you use in the www.isee.biz page and put here your comments or improvements. You can write your comments or ask any question using our [http://www.isee.biz/support support forum]
= References =
Need to get 12http://www.9 MB of archivesomappedia.com/wiki/OMAP_Ubuntu_Core#Chroot.27ing_into_the_Ubuntu_Core_Filesystem
https://wiki.ubuntu.com/Core
After this operation, 33http://cdimage.9 MB of additional disk space will be usedubuntu.com/ubuntu-core/
https://github.com/DavidBercovitz/ubuntu-core
Do you want to continue [Yhttps:/n]? </pre><div>You should say, Y (yes)<wiki.ubuntu.com/div><div><Core/div><div></div><div></div></div>InstallationExample
= Install Ubuntu 12http://www.04mattfischer.4 LTS (HF) in the IGEPv5 com/blog/?p=514
Ubuntu 12https://wiki.04.4 LTS can be installed in MicroSD Card, the internal eMMC Flash or in a SSD Flash card, the minimum suggested capacity will be 8 GiB availableubuntu. com/PbuilderHowto
This tutorial will show you install step by step and customize the distribution basehttp://manpages. ubuntu.com/manpages/lucid/man8/pbuilder.8.html
<br>
=== Download [[Category:Ubuntu 12.04.4 LTS (HF) ===]][[Category:Software distributions]]
Ubuntu 12.04.4 LTS can be downloaded from our server in this [http://downloads.isee.biz/pub/igepv5_ce/arm-ubuntu/images/ubuntu-12.04.4-LTS-hf location].<br>