Differences between revisions 10 and 11
Revision 10 as of 2007-09-06 15:29:37
Size: 4071
Editor: nchip
Comment: add qemu instructions
Revision 11 as of 2007-09-19 21:55:55
Size: 3941
Editor: nchip
Comment: Update tarball, let armel-debs rest, clarify debootstrap instructions
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:
The original armel port repository, which is frozen few months before etch is at :

{{{
deb http://armel-debs.applieddata.net/debian/ sid main
}}}
Line 35: Line 29:
wget http://ftp.gnuab.org/pub/debian/pool-armel/main/l/linux-2.6/linux-image-2.6.22-1-versatile_2.6.22-3_armel.deb
dpkg-deb -x linux-image-2.6.22-1-versatile_2.6.22-3_armel.deb .
cp boot/vmlinuz-2.6.22-1-versatile .
wget http://ftp.gnuab.org/pub/debian/pool-armel/main/l/linux-2.6/linux-image-2.6.22-2-versatile_2.6.22-4_armel.deb
dpkg-deb -x linux-image-2.6.22-2-versatile_2.6.22-4_armel.deb .
cp boot/vmlinuz-2.6.22-2-versatile .
Line 44: Line 38:
qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.22-1-versatile -initrd initrd.gz -hda hda.img -append "root=/dev/ram" qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.22-2-versatile -initrd initrd.gz -hda hda.img -append "root=/dev/ram"
Line 50: Line 44:
qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.22-1-versatile -initrd initrd.gz -hda hda.img -append "root=/dev/sda1 qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.22-2-versatile -hda hda.img -append "root=/dev/sda1"
Line 71: Line 65:
# debootstrap --verbose --arch armel --foreign sid /armel-chroot http://ftp.gnuab.org/debian # debootstrap --verbose --arch armel --foreign sid /armel-chroot http://ftp.gnuab.org/debian
#
chroot /armel-chroot /debootstrap/debootstrap --second-stage
Line 74: Line 69:
to put an armel chroot into the directory /armel-chroot. to put an armel chroot into the directory /armel-chroot. 
Line 76: Line 71:
There is also a outdated http://armel.applieddata.net/developers/linux/eabi/armel-root-fs.tar.bz2 prebuilt rootfs]. There is also a [http://people.debian.org/~riku/armel/armel-rootfs.tar.bz2 prebuilt rootfs].

installing with d-i

It's now possible to install armel directly with d-i, using one of the images from here: http://people.debian.org/~joeyh/d-i/armel/images/daily/

nslu2 users should instead get an image from http://slug-firmware.net/ , if you need to use the onboard ethernet. See http://www.cyrius.com/debian/nslu2/ for instructions on using d-i with a slug.

The options below are for installing without d-i.

debian repositories

A repository tracking debian/ sid is available at gnuab.org:

deb http://ftp.gnuab.org/debian unstable main
deb http://ftp.gnuab.org/debian unreleased main

gnuab now carries arch-all packages, so you do not need any other sources.list lines.

Installing armel to qemu with d-i

Generally, you need to follow Aurelian Jarno's instructions http://www.aurel32.net/info/debian_arm_qemu.php with some small changes we'll document here.

You need a recent (sid?) qemu for this to work. Download kernel and d-i initrd:

http://people.debian.org/~joeyh/d-i/armel/images/daily/iop32x/netboot/initrd.gz
wget http://ftp.gnuab.org/pub/debian/pool-armel/main/l/linux-2.6/linux-image-2.6.22-2-versatile_2.6.22-4_armel.deb
dpkg-deb -x linux-image-2.6.22-2-versatile_2.6.22-4_armel.deb .
cp boot/vmlinuz-2.6.22-2-versatile .

Create a hard disk image and boot d-i;

qemu-img create -f qcow hda.img 10G
qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.22-2-versatile -initrd initrd.gz -hda hda.img -append "root=/dev/ram"

Install as usual. After install boot with the following command line:

qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.22-2-versatile -hda hda.img -append "root=/dev/sda1"

Building EABI ready Kernel

You need to enable the following options to enable both EABI and OLDABI

CONFIG_ARM_THUMB=y
CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y

To simplify things, make sure you have all essential kernel modules built-in, since oldabi modprobe can't load EABI modules nor the other way around.

Creating a EABI chroot using debootstrap

If you have a machine running oldabi arm port, you can ?CrossDebootstrap to create a armel chroot:

# debootstrap --verbose --arch armel --foreign sid /armel-chroot http://ftp.gnuab.org/debian
# chroot /armel-chroot /debootstrap/debootstrap --second-stage

to put an armel chroot into the directory /armel-chroot.

There is also a [http://people.debian.org/~riku/armel/armel-rootfs.tar.bz2 prebuilt rootfs].

Migrating arm installation to arm eabi installation

There is no proper way yet. The following instructions worked for me, but no guarantees at all.

  1. Create a chroot like above.
  2. store your current package selections with "dpkg --get-selections > file"

  3. enter your chroot and set the selections to match: "dpkg --set-selections < file"

  4. test install all the same applications to your chroot: "apt-get --no-act dselect-upgrade"
  5. backup
  6. boot into single user mode and make sure there is no processess running
  7. bind-mount / somewhere under the armel chroot, and move the directories (this is the scary part)

# mount -o bind / /chroot/armel/mnt/
# chroot /chroot/armel/
# cd /mnt
# mkdir old
# mv bin lib usr var old # relocate the old binary directores
# cp -a /bin /lib /usr /var . # copy the armel binaryes and library directories to root
# mv start-stop-daemon.REAL start-stop-daemon

At this point, make *sure* you have everything you need to boot and access your system under /mnt.

Exit the armel chroot and *REBOOT*. If it breaks, you get to keep the pieces.

If you are lucky, you have now a armel system. Finish the installation by pulling in the rest of packages you had installed:

apt-get -dselect-upgrade

TODO: recover old /var selectively.

* http://lists.debian.org/debian-arm/2007/01/msg00034.html