Archived/XCI Building Instructions: Difference between revisions

From Xen
Jump to navigationJump to search
mNo edit summary
m (Removed superfluous <nowiki></nowiki> tag pairs.)
 
Line 17: Line 17:




<pre><nowiki>
<pre>
apt-get install git-core libdbus-1-3 gcc bcc flex bison bzip2 iasl bin86 autoconf automake1.9 libtool make libncurses5-dev asciidoc cpp g++ libglib2.0-dev texinfo pciutils-dev gawk gettext libdbus-glib-1-dev
apt-get install git-core libdbus-1-3 gcc bcc flex bison bzip2 iasl bin86 autoconf automake1.9 libtool make libncurses5-dev asciidoc cpp g++ libglib2.0-dev texinfo pciutils-dev gawk gettext libdbus-glib-1-dev
</nowiki></pre>
</pre>


2. Locale configuring. either manually overwriting everything:
2. Locale configuring. either manually overwriting everything:




<pre><nowiki>
<pre>
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen
locale-gen
</nowiki></pre>
</pre>


or using debian tools and making sure en_US.UTF-8 is selected.
or using debian tools and making sure en_US.UTF-8 is selected.




<pre><nowiki>
<pre>
dpkg-reconfigure locales
dpkg-reconfigure locales
</nowiki></pre>
</pre>


3. Installing build environment (others) that are not available through the package manager
3. Installing build environment (others) that are not available through the package manager




<pre><nowiki>
<pre>
cd /usr/src
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/guilt-0.32.1.tar.gz
wget http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/guilt-0.32.1.tar.gz
Line 45: Line 45:
cd /usr/src/guilt-0.32.1
cd /usr/src/guilt-0.32.1
make && make install
make && make install
</nowiki></pre>
</pre>


4. Cloning the build repository
4. Cloning the build repository




<pre><nowiki>
<pre>
cd /usr/src
cd /usr/src
git clone http://xenbits.xen.org/git-http/xenclient/build.git /usr/src/build
git clone http://xenbits.xen.org/git-http/xenclient/build.git /usr/src/build
</nowiki></pre>
</pre>


= ... or on any linux distribution through a chroot =
= ... or on any linux distribution through a chroot =
Line 61: Line 61:




<pre><nowiki>
<pre>
apt-get install debootstrap
apt-get install debootstrap
</nowiki></pre>
</pre>


if you're running on other distribution, you need to have debootstrap one way or another. following is one way to do that:
if you're running on other distribution, you need to have debootstrap one way or another. following is one way to do that:




<pre><nowiki>
<pre>
wget http://ftp.de.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.15_all.deb
wget http://ftp.de.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.15_all.deb
ar x debootstrap_1.0.15_all.deb
ar x debootstrap_1.0.15_all.deb
tar xvzf data.tar.gz -C /
tar xvzf data.tar.gz -C /
</nowiki></pre>
</pre>


then you can run the following script (as root) with the destination wanted for the chroot as 1st argument:
then you can run the following script (as root) with the destination wanted for the chroot as 1st argument:




<pre><nowiki>
<pre>
#!/bin/sh
#!/bin/sh
DEBOOTSTRAP=/usr/sbin/debootstrap
DEBOOTSTRAP=/usr/sbin/debootstrap
Line 112: Line 112:
linux32 ${CHROOT} ${DST} bash -c "echo \"en_US.UTF-8 UTF-8\" > /etc/locale.gen; locale-gen"
linux32 ${CHROOT} ${DST} bash -c "echo \"en_US.UTF-8 UTF-8\" > /etc/locale.gen; locale-gen"
linux32 ${CHROOT} ${DST} bash -c "cd /usr/src; git clone http://xenbits.xen.org/git-http/xenclient/build.git"
linux32 ${CHROOT} ${DST} bash -c "cd /usr/src; git clone http://xenbits.xen.org/git-http/xenclient/build.git"
</nowiki></pre>
</pre>


You can enter the building chroot with
You can enter the building chroot with




<pre><nowiki>
<pre>
linux32 chroot <destination/used/>
linux32 chroot <destination/used/>
</nowiki></pre>
</pre>


= Building =
= Building =
Line 125: Line 125:




<pre><nowiki>
<pre>
cd /usr/src/build
cd /usr/src/build
</nowiki></pre>
</pre>


Then the following steps need to be completed:
Then the following steps need to be completed:
Line 134: Line 134:




<pre><nowiki>
<pre>
cp configs/xenclient_config ./.config
cp configs/xenclient_config ./.config
</nowiki></pre>
</pre>


2. Configuring the build
2. Configuring the build
Line 143: Line 143:




<pre><nowiki>
<pre>
make oldconfig
make oldconfig
</nowiki></pre>
</pre>


3. Starting the build
3. Starting the build




<pre><nowiki>
<pre>
make
make
</nowiki></pre>
</pre>


4. If something goes wrong
4. If something goes wrong

Latest revision as of 20:59, 28 November 2011

On a clean new debian lenny i386 installation...

The following instructions covers the case when building on a brand new debian lenny x86 (32 bit). For other distributions, the package manager and the name of package needed need to be tweaked.

1. Installing build environment (compiler, DVCS, ..) through the package manager


apt-get install git-core libdbus-1-3 gcc bcc flex bison bzip2 iasl bin86 autoconf automake1.9 libtool make libncurses5-dev asciidoc cpp g++ libglib2.0-dev texinfo pciutils-dev gawk gettext libdbus-glib-1-dev

2. Locale configuring. either manually overwriting everything:


echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen

or using debian tools and making sure en_US.UTF-8 is selected.


dpkg-reconfigure locales

3. Installing build environment (others) that are not available through the package manager


cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/guilt-0.32.1.tar.gz
tar zxvf guilt-0.32.1.tar.gz
cd /usr/src/guilt-0.32.1
make && make install

4. Cloning the build repository


cd /usr/src
git clone http://xenbits.xen.org/git-http/xenclient/build.git /usr/src/build

... or on any linux distribution through a chroot

You need debootstrap to create a chroot for the debian lenny x86.

if you're running on ubuntu or debian:


apt-get install debootstrap

if you're running on other distribution, you need to have debootstrap one way or another. following is one way to do that:


wget http://ftp.de.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.15_all.deb
ar x debootstrap_1.0.15_all.deb
tar xvzf data.tar.gz -C /

then you can run the following script (as root) with the destination wanted for the chroot as 1st argument:


#!/bin/sh
DEBOOTSTRAP=/usr/sbin/debootstrap
CHROOT=chroot
PKGS="git-core libdbus-1-3 gcc bcc flex bison bzip2 iasl bin86 autoconf automake1.9 libtool make libncurses5-dev asciidoc cpp g++ libglib2.0-dev texinfo pciutils-dev gawk wget gettext libdbus-glib-1-dev"
if [ $# -lt 1 ]; then
        echo "usage: $0 <destination chroot> [debian mirror]"
        exit 1
fi
DST=$1
MIRROR=$2
if [ $# -lt 2 ]; then
        USE_MIRROR=0
else
        USE_MIRROR=1
fi
if [ -e "${DST}" ]; then
       echo "destination already exists"
       exit 2
fi
mkdir -p ${DST}
if [ "${USE_MIRROR}" -eq 1 ]; then
       ${DEBOOTSTRAP} --arch=i386 lenny ${DST} ${MIRROR}
else
       ${DEBOOTSTRAP} --arch=i386 lenny ${DST} ${MIRROR}
fi
linux32 ${CHROOT} ${DST} apt-get update
linux32 ${CHROOT} ${DST} apt-get install -y --force-yes ${PKGS}
linux32 ${CHROOT} ${DST} bash -c "cd /usr/src; \
        wget http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/guilt-0.32.1.tar.gz; \
        tar zxvf guilt-0.32.1.tar.gz; \
        cd /usr/src/guilt-0.32.1; \
        make && make install"
linux32 ${CHROOT} ${DST} bash -c "echo \"en_US.UTF-8 UTF-8\" > /etc/locale.gen; locale-gen"
linux32 ${CHROOT} ${DST} bash -c "cd /usr/src; git clone http://xenbits.xen.org/git-http/xenclient/build.git"

You can enter the building chroot with


linux32 chroot <destination/used/>

Building

If you have followed the previous methods, you should have the build repository available in /usr/src/build otherwise adjust the following instructions. change directory into it with:


cd /usr/src/build

Then the following steps need to be completed:

1. Preconfiguring the build


cp configs/xenclient_config ./.config

2. Configuring the build

Run the following command and press return if you're asked for new options.


make oldconfig

3. Starting the build


make

4. If something goes wrong

There are several common problems that can occur:

  • Compiling dbus-glib fails
  • http://lists.xensource.com/archives/html/xci-devel/2009-10/msg00008.html
  • Download of a package fails
  • This can happen if the package (or the specific version) was removed from the web, or the server is not responding. The download link is usually in the *.mk files in package/<name_of_package>. You can change it manually to a mirror and then restart the make process.