User talk:Jluis

From Openmoko

Revision as of 14:10, 16 September 2009 by Jluis (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

toolchain + distcc + shr = "Developer Workstation"

Tested with 20080808 shr-lite after opkg-cl update opkg-cl upgrade

On the PC:

Install the openmoko toolchain [Toolchain]

If we are going to use mascareded distcc we need to create simbolic links for the short nanes of the /usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-* executables.


Install distcc server and run it on a shell that has the toolchain on the path and if using mascaraded distcc the directory with the links , with: distccd -a 192.168.0.202 --verbose --no-detach --daemon --log-stderr


On Neo:

Create a suitable hello.c to test compiler. cat > hello.c <EOF #include int main(void) { printf("Hello world\n"); return 0; } EOF

Create a suitable swapfile: dd if=/dev/zero of=/swapfile bs=4k count=128k mkswap /swapfile swapon /swapfile

Install what is needed to compile distcc in a loop to lower the opkg's memory footprint.

for i in libc6-dev binutils-symlinks gcov gcc-symlinks cpp make python-distutils python-doctest python-dev;do opkg install $i;done

test the setup so far : root@om-gta02:~# gcc -o hello hello.c root@om-gta02:~# hello ;rm hello Hello world root@om-gta02:~#

We create a new user to no compile as root: root@om-gta02 ~ $ adduser developer Changing password for developer Enter the new password (minimum of 5, maximum of 8 characters) Please use a combination of upper and lower case letters and numbers. Enter new password: Re-enter new password: Password changed. root@om-gta02 ~ $ su - developer developer@om-gta02 ~ $

Download distcc souce with wget from http://distcc.googlecode.com/files/distcc-3.1.tar.gz and uncompress them and install distcc. zdeveloper@om-gta02 ~ $ cat distcc-3.1.tar.gz |tar -vx;cd distcc-3.1;./configure;make ;make install

Completamos la configuración del neo: Si ejecutamos distcc --show-hosts vemos que nos ha instalado en neo en primer lugar root@om-gta02:~# distcc --show-hosts 192.168.0.202:3632/4 192.168.0.200:3632/8

editamos /etc/default/distcc para que no arranque distccd matamos el proceso y comprobamos que funciona: root@om-gta02:~# sed -i s/^STARTDISTCC=\"true/STARTDISTCC=\"false/ /etc/default/distcc root@om-gta02:~# killall distccd root@om-gta02:~# distcc --show-hosts 192.168.0.200:3632/8c root@om-gta02:~# /etc/init.d/distcc start STARTDISTCC is set to false in /etc/default/distcc /usr/bin/distccd not starting

Creamos los enlaces simbólicos para gcc y cc llamen a distcc: root@om-gta02:~# mkdir /usr/local root@om-gta02:~# mkdir /usr/local/bin root@om-gta02:~# ln -s /usr/bin/distcc /usr/local/bin/gcc root@om-gta02:~# ln -s /usr/bin/distcc /usr/local/bin/cc

Y probamos : root@om-gta02:~# rm hello root@om-gta02:~# DISTCC_VERBOSE=1 gcc -c hello.c -o hello #si no usamos -c compila en local distcc[8252] (dcc_trace_version) distcc 2.18.3 arm-angstrom-linux-gnueabi; built Aug 5 2008 03:45:13 distcc[8252] (dcc_recursion_safeguard) safeguard level=0 distcc[8252] (main) compiler name is "cc" .... distcc[8252] (dcc_parse_hosts) found tcp token "192.168.0.200:3632/8" distcc[8252] (dcc_lock_host) got cpu lock on 192.168.0.200:3632/8 slot 0 as fd3 .... distcc[8252] (dcc_connect_by_addr) started connecting to 192.168.0.200:3632 ..... distcc[8252] (dcc_compile_remote) client finished sending request to server distcc[8252] (dcc_note_state) note state 5, file "(NULL)", host "192.168.0.200" distcc[8252] 18057 bytes from hello.c compiled on 192.168.0.200 in 0.5536s, rate 32kB/s ...

Personal tools

toolchain + distcc + shr = "Developer Workstation"

Tested with 20080808 shr-lite after opkg-cl update opkg-cl upgrade

On the PC:

Install the openmoko toolchain [Toolchain]

If we are going to use mascareded distcc we need to create simbolic links for the short nanes of the /usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-* executables.


Install distcc server and run it on a shell that has the toolchain on the path and if using mascaraded distcc the directory with the links , with: distccd -a 192.168.0.202 --verbose --no-detach --daemon --log-stderr


On Neo:

Create a suitable hello.c to test compiler. cat > hello.c <EOF #include int main(void) { printf("Hello world\n"); return 0; } EOF

Create a suitable swapfile: dd if=/dev/zero of=/swapfile bs=4k count=128k mkswap /swapfile swapon /swapfile

Install what is needed to compile distcc in a loop to lower the opkg's memory footprint.

for i in libc6-dev binutils-symlinks gcov gcc-symlinks cpp make python-distutils python-doctest python-dev;do opkg install $i;done

test the setup so far : root@om-gta02:~# gcc -o hello hello.c root@om-gta02:~# hello ;rm hello Hello world root@om-gta02:~#

We create a new user to no compile as root: root@om-gta02 ~ $ adduser developer Changing password for developer Enter the new password (minimum of 5, maximum of 8 characters) Please use a combination of upper and lower case letters and numbers. Enter new password: Re-enter new password: Password changed. root@om-gta02 ~ $ su - developer developer@om-gta02 ~ $

Download distcc souce with wget from http://distcc.googlecode.com/files/distcc-3.1.tar.gz and uncompress them and install distcc. zdeveloper@om-gta02 ~ $ cat distcc-3.1.tar.gz |tar -vx;cd distcc-3.1;./configure;make ;make install

Completamos la configuración del neo: Si ejecutamos distcc --show-hosts vemos que nos ha instalado en neo en primer lugar root@om-gta02:~# distcc --show-hosts 192.168.0.202:3632/4 192.168.0.200:3632/8

editamos /etc/default/distcc para que no arranque distccd matamos el proceso y comprobamos que funciona: root@om-gta02:~# sed -i s/^STARTDISTCC=\"true/STARTDISTCC=\"false/ /etc/default/distcc root@om-gta02:~# killall distccd root@om-gta02:~# distcc --show-hosts 192.168.0.200:3632/8c root@om-gta02:~# /etc/init.d/distcc start STARTDISTCC is set to false in /etc/default/distcc /usr/bin/distccd not starting

Creamos los enlaces simbólicos para gcc y cc llamen a distcc: root@om-gta02:~# mkdir /usr/local root@om-gta02:~# mkdir /usr/local/bin root@om-gta02:~# ln -s /usr/bin/distcc /usr/local/bin/gcc root@om-gta02:~# ln -s /usr/bin/distcc /usr/local/bin/cc

Y probamos : root@om-gta02:~# rm hello root@om-gta02:~# DISTCC_VERBOSE=1 gcc -c hello.c -o hello #si no usamos -c compila en local distcc[8252] (dcc_trace_version) distcc 2.18.3 arm-angstrom-linux-gnueabi; built Aug 5 2008 03:45:13 distcc[8252] (dcc_recursion_safeguard) safeguard level=0 distcc[8252] (main) compiler name is "cc" .... distcc[8252] (dcc_parse_hosts) found tcp token "192.168.0.200:3632/8" distcc[8252] (dcc_lock_host) got cpu lock on 192.168.0.200:3632/8 slot 0 as fd3 .... distcc[8252] (dcc_connect_by_addr) started connecting to 192.168.0.200:3632 ..... distcc[8252] (dcc_compile_remote) client finished sending request to server distcc[8252] (dcc_note_state) note state 5, file "(NULL)", host "192.168.0.200" distcc[8252] 18057 bytes from hello.c compiled on 192.168.0.200 in 0.5536s, rate 32kB/s ...