Tuesday, May 24, 2011

Ubuntu --- install LTIB

[1] http://imxcommunity.org/group/ubuntutipsandtricks/forum/topics/building-ltib-in-ubuntu-1004
[2] http://www.imxdev.org/wiki/index.php?title=ALL_Boards_ltib_config_ubuntu


quentin@ubuntu:~/lpc3250$ wget http://www.bitshrine.org/netinstall

--2011-05-23 21:47:51-- http://www.bitshrine.org/netinstall
Resolving www.bitshrine.org... 66.96.145.106
Connecting to www.bitshrine.org|66.96.145.106|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2327 (2.3K) [text/html]
Saving to: `netinstall'

100%[======================================>] 2,327 --.-K/s in 0s

2011-05-23 21:47:53 (6.94 MB/s) - `netinstall' saved [2327/2327]

quentin@ubuntu:~/lpc3250$ ll
total 12
drwxr-xr-x 2 quentin quentin 4096 2011-05-23 21:47 ./
drwxr-xr-x 24 quentin quentin 4096 2011-05-23 21:42 ../
-rw-r--r-- 1 quentin quentin 2327 2008-10-23 01:43 netinstall
quentin@ubuntu:~/lpc3250$ perl netinstall

You are about to install the LTIB (GNU/Linux Target Image Builder)

Do you want to continue ? Y|n
y
Where do you want to install LTIB ? (/home/quentin/lpc3250/ltib)
/home/quentin/lpc3250/ltib-qs
Installing LTIB to /home/quentin/lpc3250/ltib-qs
+ cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/ltib co -d ltib-qs -P ltib
sh: cvs: not found
Died at netinstall line 69, line 2.
quentin@ubuntu:~/lpc3250$ cvs
The program 'cvs' can be found in the following packages:
* cvs
* cvsnt
Try: sudo apt-get install
quentin@ubuntu:~/lpc3250$ sudo apt-get install cvs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
cvs
0 upgraded, 1 newly installed, 0 to remove and 326 not upgraded.
Need to get 1,685kB of archives.
After this operation, 3,703kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick/main cvs i386 1:1.12.13-12ubuntu1 [1,685kB]
Fetched 1,685kB in 10s (161kB/s)
Preconfiguring packages ...
Selecting previously deselected package cvs.
(Reading database ... 118286 files and directories currently installed.)
Unpacking cvs (from .../cvs_1%3a1.12.13-12ubuntu1_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Processing triggers for doc-base ...
Processing 31 changed 2 added doc-base file(s)...
Registering documents with scrollkeeper...
Setting up cvs (1:1.12.13-12ubuntu1) ...
Ignoring install-info called from maintainer script
The package cvs should be rebuilt with new debhelper to get trigger support
Ignoring install-info called from maintainer script
The package cvs should be rebuilt with new debhelper to get trigger support
quentin@ubuntu:~/lpc3250$ ll
total 12
drwxr-xr-x 2 quentin quentin 4096 2011-05-23 21:47 ./
drwxr-xr-x 24 quentin quentin 4096 2011-05-23 21:42 ../
-rw-r--r-- 1 quentin quentin 2327 2008-10-23 01:43 netinstall
quentin@ubuntu:~/lpc3250$ perl netinstall

You are about to install the LTIB (GNU/Linux Target Image Builder)

Do you want to continue ? Y|n
y
Where do you want to install LTIB ? (/home/quentin/lpc3250/ltib)
/home/quentin/lpc3250/ltib-qs/



===============================Ref [1] below ================================
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo rm /bin/sh
[sudo] password for quentin:
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo ln -s /bin/bash /bin/sh
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo chmod 777 /opt
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install gcc build-essential

quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install zlib1g-dev
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install libncurses-dev
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install m4
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install bison
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install rpm
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install ccache
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install flex

------------------------------------------------
In order to apply patch file, set up Samba server for file exchange between Windows
and Ubuntu box.

quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install samba-common-bin (has to be done to get samba work)
quentin@ubuntu:~/lpc3250/ltib-qs$ sudo apt-get install system-config-samba

-------------------------------
quentin@ubuntu:~/lpc3250/ltib-qs$ cp -p /home/quentin/Downloads/2869_ltib.patch ./
quentin@ubuntu:~/lpc3250/ltib-qs$ patch -i 2869_ltib.patch
patching file ltib
Hunk #1 succeeded at 964 (offset 38 lines).

quentin@ubuntu:~/lpc3250/ltib-qs$ sudo /usr/sbin/visudo

# User privilege specification
root ALL=(ALL) ALL
quentin ALL = NOPASSWD: /usr/bin/rpm, /opt/ltib/usr/bin/rpm, /opt/freescale/lti$

---------------------------------------------------------
uentin@ubuntu:~/lpc3250/ltib-qs$ ./ltib -m config

Installing host support packages.

This only needs to be done once per host, but may take up to
an hour to complete ...

If an error occurs, a log file with the full output may be found in:
/home/quentin/lpc3250/ltib-qs/host_config.log

If you would like to see the log messages as the host packages are built and
installed:

* Open another terminal in the same directory
* Run the command: tail -f host_config.log
* When you're done with the tail, use CTRL+C to exit

------------------------------------------------
$ sudo rm -rf ~/.ccache

No comments: