Fetching contributors…
Cannot retrieve contributors at this time
106 lines (72 sloc) 2.6 KB
A way to use a 32 bit system on 64 bit host
1. install schroot and debootstrap
Note: just cut and paste the commands from this file
after adjusting for your environment
sudo apt-get install schroot debootstrap
2. configure schroot for a 32 bit system
e.g. Ubuntu jaunty i386
this is added to /etc/schroot/schroot.conf
or put into /etc/schroot/schroot.d/jaunty_i386.conf
(depending on your system)
(substitute ${USER} when creating the file, cat will do this)
$ cat <<EOF >jaunty_i386.conf
description=Ubuntu 9.04 Jaunty for i386
e.g to append to /etc/schroot/schroot.conf (if not using schroot.d)
cat jaunty_i386.conf | sudo tee -a /etc/schroot/schroot.conf
3. download and create the initial chroot
sudo debootstrap --variant=buildd --arch i386 jaunty /data/chroot/jaunty_i386
4. configure the schroot by running as root
schroot -c jaunty_i386 -u root
# Now run these commands in the this chroot:
mv /etc/apt/sources.list /etc/apt/sources.list.ORIG
cat >/etc/apt/sources.list <<EOF
deb jaunty main
deb jaunty-updates main
deb jaunty universe
deb jaunty-updates universe
# choose your locale
locale-gen en_GB.UTF-8
# make sure apt database is up-to-date
apt-get update
apt-get install dialog
dpkg-reconfigure locales
# install editor, browser and programs necessary for building
apt-get install --no-install-recommends jove
apt-get install lynx-cur sudo wget
apt-get install python-gd gawk gforth flex bison m4
apt-get install netpbm qt4-qmake libqt4-dev
apt-get install python-serial sqlite3 php5-cli python-dev
# enable bash in the dialog box
# (or find and fix the shell scripts that fail when run under
# dash [some part of one of the Makefiles])
dpkg-reconfigure dash
# done with the chroot
5. create a little script to use schroot
cat <<EOF >m
schroot -c jaunty_i386 -- make "\$@"
chmod +x m
6. build the system
cp samo-lib/include/config.h-default samo-lib/include/config.h
# uncomment the correct hardware version in config.h
${EDITOR} samo-lib/include/config.h