Accueil > Devel > Utilisation du NGBox-Devel-Kit

Utilisation du NGBox-Devel-Kit

Mise en place de l’environement de développement avec une NGBox déja fonctionelle en console (bash) :

[root@NGBox /usr/src]$ mkdir -p /usr/src/NGBox/Devel-kit/bin
[root@NGBox /usr/src]$ cp /bin/bash NGBox/Devel-kit/bin/
[root@NGBox /usr/src]$ # Test du chroot
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
chroot: cannot run command `/bin/bash': No such file or directory
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ mkdir -p /usr/src/NGBox/Devel-kit/usr/bin/
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ cp /usr/bin/env /usr/src/NGBox/Devel-kit/usr/bin/
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ ldd NGBox/Devel-kit/usr/bin/env
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0xb7e3f000)
/lib/ld-linux.so.2 (0xb7f62000)
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ mkdir NGBox/Devel-kit/lib
[root@NGBox /usr/src]$ cp /lib/libc.so.6 /lib/ld-linux.so.2 NGBox/Devel-kit/lib/
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
/bin/bash: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ find / -name libreadline.so.5
/lib/libreadline.so.5
[root@NGBox /usr/src]$ cp /lib/libreadline.so.5 NGBox/Devel-kit/lib/
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
/bin/bash: error while loading shared libraries: libhistory.so.5: cannot open shared object file: No such file or directory
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ cp /lib/libhistory.so.5 NGBox/Devel-kit/lib/
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
/bin/bash: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ find / -name libncursesw.so.5
/lib/libncursesw.so.5
[root@NGBox /usr/src]$ cp /lib/libncursesw.so.5 NGBox/Devel-kit/lib/
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ find / -name libdl.so.2
/lib/libdl.so.2
[root@NGBox /usr/src]$ cp /lib/libdl.so.2 NGBox/Devel-kit/lib/
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
[I have no name!@NGBox /]$

Ca y est on a le début de notre espace de développement !

Les problèmes commencent :

[I have no name!@NGBox /]$ ls
bash: ls: command not found
[I have no name!@NGBox /]$
[I have no name!@NGBox /]$ exit
[root@NGBox /usr/src]$ find / -name ls
/bin/ls
[root@NGBox /usr/src]$ cp /bin/ls NGBox/Devel-kit/bin/
[root@NGBox /usr/src]$
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
[I have no name!@NGBox /]$ ls
ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
[I have no name!@NGBox /]$ exit
[root@NGBox /usr/src]$ find / -name librt.so.1
/lib/librt.so.1
[root@NGBox /usr/src]$ cp /lib/librt.so.1 NGBox/Devel-kit/lib/
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
[I have no name!@NGBox /]$ ls
ls: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
[I have no name!@NGBox /]$ exit
[root@NGBox /usr/src]$ cp /lib/libpthread.so.0 NGBox/Devel-kit/lib/
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
[I have no name!@NGBox /]$ ls
bin lib usr
[I have no name!@NGBox /]$
[I have no name!@NGBox /]$ pwd
/
[I have no name!@NGBox /]$ env
HZ=100
TERM=xterm
SHELL=/bin/bash
USER=root
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAIL=/var/mail/root
PWD=/
INPUTRC=/etc/inputrc
LANG=fr_FR.ISO-8859-15@euro
PS1=[\[\033[01;31m\]\u\[\033[m\]@\h \w]$
HOME=/root
SHLVL=2
LOGNAME=root
_=/usr/bin/env
[I have no name!@NGBox /]$
[root@NGBox /usr/src]$ find / -name make
/usr/bin/make
[root@NGBox /usr/src]$ cp /usr/bin/make NGBox/Devel-kit/bin/
[root@NGBox /usr/src]$ chroot NGBox/Devel-kit/
[I have no name!@NGBox /]$ make
make: *** No targets specified and no makefile found. Stop.
[I have no name!@NGBox /]$

La c’est bon pour make
[I have no name!@NGBox /]$ cd /usr/src/
[I have no name!@NGBox /usr/src]$ tar jxvf linux-2.6.21.5.tar.bz2
bash: tar: command not found
[I have no name!@NGBox /usr/src]$ exit
[root@NGBox /usr/src/NGBox/Devel-kit]$ ldd /usr/bin/ta
tac tack tail tailf talk
[root@NGBox /usr/src/NGBox/Devel-kit]$ ldd /bin/tar
linux-gate.so.1 => (0xffffe000)
librt.so.1 => /lib/librt.so.1 (0xb7f14000)
libc.so.6 => /lib/libc.so.6 (0xb7df2000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7ddf000)
/lib/ld-linux.so.2 (0xb7f1f000)
[root@NGBox /usr/src/NGBox/Devel-kit]$ cp /bin/tar bin/
[root@NGBox /usr/src/NGBox/Devel-kit]$ chroot .
[I have no name!@NGBox /]$ cd /usr/src/
[I have no name!@NGBox /usr/src]$ tar jxvf linux-2.6.21.5.tar.bz2
tar: bzip2: Cannot exec: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
[I have no name!@NGBox /usr/src]$ exit
[root@NGBox /usr/src/NGBox/Devel-kit]$
[I have no name!@NGBox /]$ cd usr/src/
[I have no name!@NGBox /usr/src]$ ls
linux-2.6.21.5 linux-2.6.21.5.tar.bz2
[I have no name!@NGBox /usr/src]$ rm linux-2.6.21.5 -rf
bash: rm: command not found
[I have no name!@NGBox /usr/src]$ exit
[root@NGBox /usr/src/NGBox/Devel-kit]$ cp /bin/rm
rm rmdir
[root@NGBox /usr/src/NGBox/Devel-kit]$ cp /bin/rm bin/
[root@NGBox /usr/src/NGBox/Devel-kit]$ chroot .
[I have no name!@NGBox /]$ cd /usr/src
[I have no name!@NGBox /usr/src]$ rm linux-2.6.21.5 -rf
[I have no name!@NGBox /usr/src]$ tar jxf linux-2.6.21.5.tar.bz2
[I have no name!@NGBox /usr/src]$ cd linux-2.6.21.5
[I have no name!@NGBox /usr/src/linux-2.6.21.5]$
[I have no name!@NGBox /usr/src/linux-2.6.21.5]$ make menuconfig
make: /bin/sh: Command not found
make: /bin/sh: Command not found
Makefile:412: /usr/src/linux-2.6.21.5/arch//Makefile: No such file or directory
make: *** No rule to make target `/usr/src/linux-2.6.21.5/arch//Makefile’. Stop.
[I have no name!@NGBox /usr/src/linux-2.6.21.5]$
[root@NGBox /usr/src/NGBox/Devel-kit]$ cp /bin/sh bin/
[root@NGBox /usr/src/NGBox/Devel-kit]$ chroot .
[I have no name!@NGBox /]$ cd /usr/src/linux-2.6.21.5
[I have no name!@NGBox /usr/src/linux-2.6.21.5]$ make menuconfig
/bin/sh: uname: command not found
/bin/sh: sed: command not found
Makefile:412: /usr/src/linux-2.6.21.5/arch//Makefile: No such file or directory
make: *** No rule to make target `/usr/src/linux-2.6.21.5/arch//Makefile’. Stop.
[I have no name!@NGBox /usr/src/linux-2.6.21.5]$
[root@NGBox /usr/src/NGBox/Devel-kit]$ cp -a –preserve=all /dev/null dev/
[root@NGBox /usr/src/NGBox/Devel-kit]$ ls -als dev/
total 8
4 drwxr-xr-x 2 root root 4096 2007-09-15 09:37 .
4 drwxr-xr-x 6 root root 4096 2007-09-15 09:34 ..
0 crw-rw-rw- 1 root root 1, 3 2007-06-18 03:46 null
[root@NGBox /usr/src/NGBox/Devel-kit]$
[root@NGBox /usr/src/NGBox/Devel-kit]$ mkdir -p usr/lib/gcc/i686-pc-linux-gnu/4.0.3/
[root@NGBox /usr/src/NGBox/Devel-kit]$ cp /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/cc1 usr/lib/gcc/i686-pc-linux-gnu/4.0.3/
[root@NGBox /usr/src/NGBox/Devel-kit]$

Categories: Devel Tags:
  1. Pas encore de commentaire
  1. Pas encore de trackbacks
Vous devez être identifié pour poster un commentaire