---- other, instructions (to be verified) ---
-
-To build a kernel module for the PlanetLab distribution you need a build system.
-For an up-to-date and detailed information on how to build a local myplc installation,
-a local mirror, a PlanetLab test system see[1]
-
-To create a build system you need to do the following steps:
-
- 1. install CentOS 5, detailed information[2]
-
- 1.A download the image from the main site[3] for example:
-
- wget http://mi.mirror.garr.it/mirrors/CentOS/5.4/isos/i386/CentOS-5.4-i386-netinstall.iso
-
- 1.B Add the repository
-
- cat >> /etc/yum.repos.d/dhozac-vserver.repo <<EOF
- [dhozac-vserver]
-name=Linux-VServer related packages for CentOS $releasever - $basearch
-baseurl=http://rpm.hozac.com/dhozac/centos/$releasever/vserver/$basearch
-gpgkey=http://rpm.hozac.com/conf/keys/RPM-DHOZAC-GPG-KEY
-EOF
-
- 1.C Update, install and config the system
-
- yum update yum
- yum install kernel
- yum install util-vserver{,-core,-lib,-sysv,-build}
- yum install vim
- yum install subversion
- /etc/init.d/vprocunhide start
- chkconfig vservers-default on
-
- 2. create a vserver
-
- 2.A Checkout the planetlab build
-
- cd
- svn co http://svn.planet-lab.org/svn/build/trunk svn-build
-
- 2.B Search for a working RPM distribution in:
-
- http://build.onelab.eu/onelab/
- # good distribution ends in .ok, bad in .ko
- # in this example we used the following:
- http://build.onelab.eu/onelab/2008.03.02--onelab-f8-linux32/RPMS/
-
- 2.C Creating a vserver
-
- cd ~/svn-build
- ./vtest-init-vserver.sh -f f8 -d onelab -p linux32 mybuild \
- http://build.onelab.eu/onelab/2008.03.02--onelab-f8-linux32/RPMS/ \
- -- --interface eth0:138.96.255.221 --hostname vnode01.inria.fr &> mybuild.log&
-
- 3. create the build
-
- 3.A Enter on the vserver, and create the build
-
- vserver mybuild enter
- cd \
- svn co http://svn.planet-lab.org/svn/build/trunk build
-
- 4. build
-
- 4.A build[4]
- cd /build
-
- # full cleanup
- make distclean
-
- # the compilation is composed by several steps,
- # make help for more information
- # the first for the onelab compilation will download
- # the SPEC file from the repository specified in
- # onelab-tags.mk
- make stage1=true PLDISTRO=onelab
-
- # to download and build a module, for example ipfw:
- make ipfw
-
- # to do local changes
- cd /build/CODEBASE
- rm -rf ipfw
- # download the ipfw sources and extract it into ./ipfw
- # by svn
- svn+ssh://onelab2.iet.unipi.it/home/svn/ports-luigi/dummynet-branches/ipfw_mod ./ipfw
- # from web
- wget http://info.iet.unipi.it/~luigi/dummynet/ipfw_mod-latest.tgz
- tar xvzf ipfw_mod-latest.tgz
-
- # start the compilation
- rm -rf SOURCES/ipfw*
- rm -rf BUILD/ipfw-0.1/
- rm -rf SRPMS/ipfw*
- rm -rf RPMS/i386/ipfw*
- make ipfw
-
- 5. download and install sources into a node
-
- 5.A Copy RPMS into the node and install it:
- # exit from the root context
- exit
- scp /vserver/mybuild/build/RPMS/i386/ipfw-* root@node.iet.unipi.it:
- ssh root@node.iet.unipi.it
- rpm -e ipfw
- rpm -ivh ./ipfw-0-9...TAB
- modprobe ipfw_mod
-
- # the ipfw package should be installed
- ipfw show
-