[[bc10]]~
[[bc10-router]]~

#contents

* bc10-router/arago-project(danny)/Ubuntu12.04LTS [#seaed967]
>
This article is a revised version of the article of [[bc10-router/arago-project]].~
~
The two contents are revised from the original article.~
-Host OS: The version of host OS is updated from Ubuntu10.04LTS (Desktop, 64bit version) to Ubuntu12.04LTS (Desktop, 64bit version).~
~
- Arago Project: The version of arago-project is updated to the newer version (from [[outdated>http://arago-project.org/wiki/index.php/Crosscompiling_Outside_of_Arago]] to [[danny>http://arago-project.org/wiki/index.php/Main_Page]]) Arago-project (danny) uses the meta package system.~

>
This explains how to create the building environment and how to install to bc10.~

>
Caution 1: In the article of [[bc10-router/arago-project]], Ubuntu 10.04LTS (Desktop 64bit version) is used as the host OS. However, the support for Ubuntu 10.04LTS (Desktop 64bit version) has been ended in April 2013 as EOL. This is the reason why this article uses Ubuntu 12.04LTS (Desktop 64bit version) as the host OS. Also, Ubuntu 10.04LTS (Server version) and Ubuntu 12.04LTS will become EOL in April, 2014 and April, 2017, respectively.~
~
Caution 2: This article does not guarantee for any updated host OS and arago-project in the future. This article has tested only specific host OS and arago-project.~
~
* Setting Up the build environment [#iebccc8d]
>
This article assumes that the host OS, Ubuntu 12.04LTS (Desktop, 64bit version) has already installed on the PC and that there is 60GB of free space on its hard drive.~
~ These creating process of the build environment and build process of arago-project are referred to  the web page of arago-project, [[Setting Up Build Environment>http://arago-project.org/wiki/index.php/Setting_Up_Build_Environment]]. Then, the image is created.~

** Major changes in this article [#x3c70b4b]
>
Some parts of this article have been changed from the original, [[Setting UP Build Environment>http://arago-project.org/wiki/index.php/Setting_Up_Build_Environment]]. The list of revised parts is shown below.~
- danny branch of Yocto Project is used in stead of dylan branch~
- To specify the machine, bitbake command is modified to '''MACHINE =beagleboard''' from '''MACHINE = am335x-evm'''~

>
Caution 3: danny branch and dylan branch indicate the versions of [[Yocto Project>https://www.yoctoproject.org/]]. The reason why this article uses danny branch is that danny branch is more stable than dylan branch. Fewer source files in danny branch have been updated than in dylan branch, and this contributes the stability of danny branch.

** Updating to Ubuntu 12.04LTS and installing additional packages [#md15ae9e]
>
To build the building environment, update Ubuntu 12.04LTS and install the additional packages.~
 $ sudo apt-get dist-upgrade
 $ sudo apt-get install linux-image-generic-lts-saucy linux-headers-generic-lts-saucy
Installing the packages, which are necessary for building arago-project.~
Change the default shell form dash to bash.~
 $ sudo apt-get install git build-essential diffstat texinfo gawk chrpath
 $ sudo apt-get install ia32-libs
 $ sudo dpkg-reconfigure dash
Please install libc6-dev. This package is not mentioned in [[Setting Up Build Environment>http://arago-project.org/wiki/index.php/Setting_Up_Build_Environment]]. Without libc6-dev-i386, an error occurs during the build process. To prevent this happening, libc6-dev is needed to be installed.
 $ sudo apt-get install libc6-dev libc6-dev-i386
Install the packages shown bellow. These packages are not requirements, depending on your use  environment and preference.~
 $ sudo apt-get install vim lv nautilus-open-terminal
 $ sudo apt-get install ssh

** Setting up the build environment [#y57f9fe8]
>
To build arago-project, obtain Toolchain, Linaro 2013.03 and extract it.~
 $ mkdir ~/src
 $ cd ~/src
 $ wget --no-check-certificate https://launchpad.net/linaro-toolchain-binaries/trunk/2013.03/+download/gcc-linarolinux-gnueabihf-4.7-2013.03-20130313_linux.tar.bz2
 $ tar -jxvf gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux.tar.bz2 -C $HOME
Obtain  the file of arago-project, and configure for danny branch by config.~
After the environment variable is setup, core-image-minimal, which is the minimum image of arago-project, is built.~
 $ cd ~/
 $ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
 $ cd tisdk
 $ ./oe-layertool-setup.sh -f configs/arago-danny-config.txt 
To execute the command line shown above, the files and directories, which are needed for the building process, are created. The details are shown in the log shown below.~
 ...<snip>...
 Resolving deltas: 100% (19437/19437), done.
 Already on 'master'
 Already up-to-date.
 Note: checking out '1.17.0'.
 ...<snip>...
 For example:
     MACHINE=xxxxx bitbake <target>
 
 Common targets are:
     core-image-minimal
     core-image-sato
     meta-toolchain
     meta-toolchain-sdk
     adt-installer
     meta-ide-support

>
 $ cd build/
 $ . conf/setenv 
 $ export PATH=$HOME/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin:$PATH

** Building core-image-minimal [#sb64d694]
>
To execute a bitbake command, the log shown below appears and the build process begins. At the end of the build process, a warring shows up, but there are actually no issues. Please ignore it.~

>
Caution 4: Depending on your using environment, in general, the build process takes quite time.~
 $ MACHINE=beagleboard bitbake core-image-minimal
 ...<snip>...
 Build Configuration:
 BB_VERSION        = "1.17.0"
 TARGET_ARCH       = "arm"
 TARGET_OS         = "linux-gnueabi"
 MACHINE           = "beagleboard"
 DISTRO            = "arago"
 DISTRO_VERSION    = "2013.06"
 TUNE_FEATURES     = "armv7a vfp neon thumb callconvention-hard cortexa8"
 TARGET_FPU        = "vfp-neon"
 meta-arago-distro
 meta-arago-extras = "danny:3a583c7ccb3392b6e14d67a4822a706071485bb2"
 toolchain-layer
 meta-oe           = "danny:f00028caf257e386c0f3ae46bd4b3ba53dd0729d"
 meta-ti           = "danny:72d4c5d37decfc8591981d3c8a859af6e6e68059"
 meta-linaro       = "danny:d0558fa4304592622423582f8b464e1c22cfe6f1"
 meta              = "danny:d6c69df33e5b447eb01ee7fca921b94c3a853203"
 ...<snip>...
 
 NOTE: Tasks Summary: Attempted 1412 tasks of which 216 didn't need to be rerun and all succeeded.
 
 Summary: There were 46 WARNING messages shown.

>
As the build process is completed, the images such as MLO, rootfs, i-boot.img, and umage, are created at the directory, ${HOME}/tisdk/build/arago-tmp-external-linaro-toolchain/deploy/images.~
 $ cd arago-tmp-external-linaro-toolchain/deploy/images/
 $ ls -lh
 Total 25M
 lrwxrwxrwx 1 beat beat   83  1&#26376; 28 19:54 MLO -> MLO-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0
 lrwxrwxrwx 1 beat beat   83  1&#26376; 28 19:54 MLO-beagleboard -> MLO-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0
 -rwxr-xr-x 1 beat beat  44K  1&#26376; 28 19:54 MLO-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0
 -rw-rw-r-- 1 beat beat  294  1&#26376; 28 20:22 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
 -rw-r--r-- 1 beat beat 2.3M  1&#26376; 28 20:23 core-image-minimal-beagleboard-20140128065636.rootfs.tar.gz
 -rw-r--r-- 1 beat beat 4.9M  1&#26376; 28 20:23 core-image-minimal-beagleboard-20140128065636.rootfs.ubi
 -rw-r--r-- 1 beat beat 4.6M  1&#26376; 28 20:23 core-image-minimal-beagleboard-20140128065636.rootfs.ubifs
 lrwxrwxrwx 1 beat beat   59  1&#26376; 28 20:23 core-image-minimal-beagleboard.tar.gz -> core-image-minimal-beagleboard-20140128065636.rootfs.tar.gz
 lrwxrwxrwx 1 beat beat   56  1&#26376; 28 20:23 core-image-minimal-beagleboard.ubi -> core-image-minimal-beagleboard-20140128065636.rootfs.ubi
 -rw-rw-r-- 1 beat beat 9.2M  1&#26376; 28 19:53 modules-3.3.7-r125b+gitrv3.3.7-beagleboard.tgz
 -rwxr-xr-x 1 beat beat 329K  1&#26376; 28 19:54 u-boot-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0.img
 lrwxrwxrwx 1 beat beat   90  1&#26376; 28 19:54 u-boot-beagleboard.img -> u-boot-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0.img
 lrwxrwxrwx 1 beat beat   90  1&#26376; 28 19:54 u-boot.img -> u-boot-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0.img
 lrwxrwxrwx 1 beat beat   60  1&#26376; 28 19:53 uImage -> uImage-3.3.7-r125b+gitrv3.3.7-beagleboard-20140128065636.bin
 -rw-r--r-- 1 beat beat 3.3M  1&#26376; 28 19:53 uImage-3.3.7-r125b+gitrv3.3.7-beagleboard-20140128065636.bin
 lrwxrwxrwx 1 beat beat   60  1&#26376; 28 19:53 uImage-beagleboard.bin -> uImage-3.3.7-r125b+gitrv3.3.7-beagleboard-20140128065636.bin
 -rw-r--r-- 1 beat beat  230  1&#26376; 28 20:23 ubinize.cfg

>
It ends the build process of core-image-minimal.~

*** What is core-image-minimal? [#sde27ef3]
>
core-image-minimal is the minimum package, which contains the least requirements for building arago-project.~
The recipe file PATH of core-image-minimal is shown below.~
 ${HOME}/tisdk/sources/oe-core/meta/recipes-core/images/core-image-minimal.bb
The file, packagegroup-core-boot.bb, shows the list of packages, which forms the image. You can check which packages are used for creating the image before the build process is completed.~
The file, packagegroup-core-boot.bb, is located at the directory shown below.~
 ${HOME}/tisdk/sources/oe-core/meta/recipes-core/packagegroups/

***About other image recipes [#rcebed98]
>
arago-project has other image recipes than core-image-minimal. The recipes are located at the directory shown below.
 ${HOME}/tisdk/sources/meta-arago/meta-arago-distro/recipes-core/images/
There is the list of other recipes than core-image-minimal's.~
 arago-amsdk-image.bb
 arago-base-image.bb
 arago-base-tisdk-image.bb
 arago-console-image.bb
 arago-core-tisdk-image.bb
 arago-core-tisdk-image.inc
 arago-image.inc
 tisdk-rootfs-image.bb
 tisdk-server-rootfs-image.bb
Also, arago-image.inc is shared and included among other image recipes. arago-image.inc is regard as the image, which is commonly used for the configuration of other image recipes.~
packagegroup, which is required for required for other image recipes, is located at PATH shown below.~
 ${HOME}/tisdk/sources/meta-arago/meta-arago-distro/recipes-core/packagegroup/

** Building arago-console-image [#c0da86b2]
>
The image of core-image-minimal has a lot of commands, which are originated from busybox, and these commands are difficult to handle. To make it user-friendly, the image of arago-console-image is additionally built.~
~
Then, to build the image of arago-console-image, the same packages, which are used in [[bc10-router/arago-project]], are needed to be installed. To install these packages, packagegroup-arago-console.bb should be modified. This file is located at the directory shown below.~
 ${HOME}/tisdk/sources/meta-arago/meta-arago-distro/recipes-core/packagegroups
Please edit the contents of this file in the same way as shown below.~
 $ diff -upN __packagegroup-arago-console.bb_orig packagegroup-arago-console.bb
 --- __packagegroup-arago-console.bb_orig        2014-01-29 14:59:28.755799860 +0900--- __packagegroup-arago-console.bb_orig        2014-01-29 14:59:28.755799860 +0900
 +++ packagegroup-arago-console.bb       2014-01-30 12:38:03.058736885 +0900
 @@ -51,6 +51,18 @@ ARAGO_UTILS = "\
      iproute2 \
      strace \
      ltrace \
 +    bridge-utils \
 +    dnsmasq \
 +    grep \
 +    hostap-daemon \
 +    hostap-utils \
 +    iperf \
 +    iptables \
 +    iw \
 +    procps \
 +    openssh \
 +    openssl \
 +    rp-pppoe \
 +    wireless-tools \
      ${@base_contains('MACHINE_FEATURES', 'pci', 'pciutils', '',d)} \
      "
After the contents of the file is edited, the commands listed below are executed.~
Since this build process takes place after the build process of core-image-minal is completed, the duration this build process is not long.~
 $ cd ~/tisdk/build
 $ MACHINE=beagleboard bitbake arago-console-image
After the build process of packagegroup-arago-console is finished, please make sure that arago-console-image-beagleboard-201401300033805.rootfs.tar.gz is built under the directory of ${HOME}/tisdk/build/arago-tmp-external-linaro-toolchain/deploy/images.~
 $ cd ~/tisdk/build/arago-tmp-external-linaro-toolchain/deploy/images
 $ ls -lh
 Total 232M
 lrwxrwxrwx 1 beat beat   83  1&#26376; 28 19:54 MLO -> MLO-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0
 lrwxrwxrwx 1 beat beat   83  1&#26376; 28 19:54 MLO-beagleboard -> MLO-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0
 -rwxr-xr-x 1 beat beat  44K  1&#26376; 28 19:54 MLO-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0
 -rw-rw-r-- 1 beat beat  294  1&#26376; 31 12:48 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
 -rw-r--r-- 1 beat beat  26M  1&#26376; 30 14:17 arago-console-image-beagleboard-20140130033805.rootfs.tar.gz
 -rw-r--r-- 1 beat beat  39M  1&#26376; 30 14:18 arago-console-image-beagleboard-20140130033805.rootfs.ubi
 -rw-r--r-- 1 beat beat  39M  1&#26376; 30 14:18 arago-console-image-beagleboard-20140130033805.rootfs.ubifs
 -rw-r--r-- 1 beat beat  26M  1&#26376; 31 12:54 arago-console-image-beagleboard-20140131034334.rootfs.tar.gz
 -rw-r--r-- 1 beat beat  40M  1&#26376; 31 12:55 arago-console-image-beagleboard-20140131034334.rootfs.ubi
 -rw-r--r-- 1 beat beat  40M  1&#26376; 31 12:55 arago-console-image-beagleboard-20140131034334.rootfs.ubifs
 lrwxrwxrwx 1 beat beat   60  1&#26376; 31 12:54 arago-console-image-beagleboard.tar.gz -> arago-console-image-beagleboard-20140131034334.rootfs.tar.gz
 lrwxrwxrwx 1 beat beat   57  1&#26376; 31 12:55 arago-console-image-beagleboard.ubi -> arago-console-image-beagleboard-20140131034334.rootfs.ubi
 -rw-r--r-- 1 beat beat 2.3M  1&#26376; 28 20:23 core-image-minimal-beagleboard-20140128065636.rootfs.tar.gz
 -rw-r--r-- 1 beat beat 4.9M  1&#26376; 28 20:23 core-image-minimal-beagleboard-20140128065636.rootfs.ubi
 -rw-r--r-- 1 beat beat 4.6M  1&#26376; 28 20:23 core-image-minimal-beagleboard-20140128065636.rootfs.ubifs
 lrwxrwxrwx 1 beat beat   59  1&#26376; 28 20:23 core-image-minimal-beagleboard.tar.gz -> core-image-minimal-beagleboard-20140128065636.rootfs.tar.gz
 lrwxrwxrwx 1 beat beat   56  1&#26376; 28 20:23 core-image-minimal-beagleboard.ubi -> core-image-minimal-beagleboard-20140128065636.rootfs.ubi
 -rw-rw-r-- 1 beat beat 9.2M  1&#26376; 28 19:53 modules-3.3.7-r125b+gitrv3.3.7-beagleboard.tgz
 -rwxr-xr-x 1 beat beat 329K  1&#26376; 28 19:54 u-boot-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0.img
 lrwxrwxrwx 1 beat beat   90  1&#26376; 28 19:54 u-boot-beagleboard.img -> u-boot-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0.img
 lrwxrwxrwx 1 beat beat   90  1&#26376; 28 19:54 u-boot.img -> u-boot-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0.img
 lrwxrwxrwx 1 beat beat   60  1&#26376; 28 19:53 uImage -> uImage-3.3.7-r125b+gitrv3.3.7-beagleboard-20140128065636.bin
 -rw-r--r-- 1 beat beat 3.3M  1&#26376; 28 19:53 uImage-3.3.7-r125b+gitrv3.3.7-beagleboard-20140128065636.bin
 lrwxrwxrwx 1 beat beat   60  1&#26376; 28 19:53 uImage-beagleboard.bin -> uImage-3.3.7-r125b+gitrv3.3.7-beagleboard-20140128065636.bin
 -rw-r--r-- 1 beat beat  231  1&#26376; 31 12:54 ubinize.cfg

* Installing the images to bc10 [#l7ce572f]
>
To install the crated images into a SD card, the SD card is needed to be formatted for bc10. To format a SD card, please look at the section of [[Create bootable SD card at bc10/booting>http://labs.beatcraft.com/en/index.php?bc10%2Fbooting#mef5758b]].~
The names of directories for FAT32 and Ext3 are /media/FAT and /media/EXT3, respectively.~
~
The images such as MLO, uboot, uImage, and rootfs are copied to specified directories and extracted in these directories.~
 $ cp MLO-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0 /media/FAT/MLO
 $ cp u-boot-beagleboard-2012.04.01-r1+gitr1+415d386877df49eb051b85ef74fa59a16dc17c7d-arago0.img /media/FAT/u-boot.img
 $ cp uImage-3.3.7-r125b+gitrv3.3.7-beagleboard-20140128065636.bin /media/FAT/uImage
 $ sudo tar xvfz arago-console-image-beagleboard-20140130033805.rootfs.tar.gz
 -C /media/EXT3
This is the end of how to copy the images to a SD card.~

* Testing the Simple Launch Process on bc10 [#u4bfade6]
>
 Insert the SD card, which the image is already copied into, to bc10. Then, boot bc10.~
Insert the SD card, which the image is already copied into, to bc10. Then, boot bc10.~
Make sure the log shown below appears in the booting process.~
~
The diagram of bc10 and its peripherals is show directly below.~
 bc10 - USB AC Powered Hub---- LUA3-U2-ATX (USB Ether)
                             |
                             -- WLI-UC-AG300N (USB Wifi)

>
 ... <snip> ...
 Stopping Bootlog daemon: bootlogd.
 
  _____                    _____           _         _
 |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
 |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
 |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
               |___|                    |___| 
 
 Arago Project http://arago-project.org beagleboard ttyO2
 
 Arago 2013.06 beagleboard ttyO2 
 
 beagleboard login: root
 root@beagleboard:~# uname -a
 Linux beagleboard 3.3.7 #1 Tue Jan 28 18:39:28 JST 2014 armv7l GNU/Linux
 root@beagleboard:~# lsusb
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
 Bus 001 Device 003: ID 0b95:7720 ASIX Electronics Corp. AX88772
 Bus 001 Device 004: ID 0411:012e BUFFALO INC. (formerly MelCo., Inc.) WLI-UC-AG300N Wireless LAN Adapter
 root@beagleboard:~# ifconfig -a
 eth0      Link encap:Ethernet  HWaddr 4C:E6:76:55:49:C6
           inet addr:192.168.0.152  Bcast:0.0.0.0  Mask:255.255.255.0
           inet6 addr: 2001:268:321:8000:4ee6:76ff:fe55:49c6/64 Scope:Global
           inet6 addr: fe80::4ee6:76ff:fe55:49c6/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:39 errors:0 dropped:9 overruns:0 frame:0
           TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:4162 (4.0 KiB)  TX bytes:1416 (1.3 KiB)
 
 lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B) 
 
 wlan0     Link encap:Ethernet  HWaddr 00:1D:73:A2:97:97
           BROADCAST MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

* Revision History [#c5543682]
>
- 2014/02/17 This article is initially published

Front page   Edit Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes