2116
Comment: initial version
|
6095
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
== Installing with the Debian Installer == It's now possible to install armel directly with d-i, using one of [[http://people.debian.org/~joeyh/d-i/armel/images/daily/|the daily snapshots]]. Oystein Viggen describes his success and what he had to do differently in [[http://lists.debian.org/debian-arm/2008/02/msg00041.html|a message to the debian-arm list]]. 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. Thecus N2100/Allnet ALL6500 and IO-Data Glantank users should follow the installation guides under http://www.cyrius.com/debian/iop/ using the installer images from the top-most link above. The options below are for installing without d-i. == Debian repositories == armel port is available directly from normal Debian mirror network. Check from [[http://www.debian.org/mirror/list-full|mirrorlist]] a mirror near you that carries armel. In {{{/etc/apt/sources.list}}} put something like: {{{ deb http://ftp.de.debian.org/debian lenny main deb http://ftp.de.debian.org/debian unstable main }}} == 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: {{{ wget http://d-i.debian.org/daily-images/armel/daily/iop32x/netboot/ss4000e/initrd.gz wget http://ftp.XX.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.32-5-versatile_2.6.32-47_armel.deb wget http://people.debian.org/~aurel32/qemu/armel/vmlinuz-2.6.26-1-versatile wget http://people.debian.org/~aurel32/qemu/armel/initrd.img-2.6.26-1-versatile ln -s initrd.img-2.6.26-1-versatile initrd.gz ln -s vmlinuz-2.6.26-1-versatile vmlinuz-versatile }}} Get it from [[http://people.debian.org/~aurel32/qemu/armel/]] "NOTE: Take a lot of care, that _only this old linux kernel version works_. If you use another, you will get errors while trying to mount files (disks) as: No filesystem could mount root Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) SOLVED on this document now (not before) and got solution from: [[http://lists.openmoko.org/pipermail/devel/2008-December/003846.html]]." "NOTE2 (alternative solving method): After installation procedure you need to get a boot dir from hda.img. For this: {{{ 1. mounting image modprobe nbd max_part=63 qemu-nbd -c /dev/nbd0 hda.img mount /dev/nbd0p1 /mnt 2. copy boot dir cp -r /mnt/boot . 3. umounting image umount /mnt qemu-nbd -d /dev/nbd0 }}} After this run qemu: {{{ qemu-system-arm -M versatilepb -kernel boot/vmlinuz-2.6.32-5-versatile -initrd boot/initrd.img-2.6.32-5-versatile -hda hda.img -append "root=/dev/sda1" }}} " Create a hard disk image and boot d-i; {{{ qemu-img create -f qcow2 hda.img 10G qemu-system-arm -M versatilepb -redir tcp:2222::22 -kernel vmlinuz-versatile -initrd initrd.gz -m 256 -hda hda.img -append 'root=/dev/ram mem=256M' }}} Install as usual. After install boot with the following command line: {{{ qemu-system-arm -M versatilepb -kernel vmlinuz-versatile -hda hda.img -append "root=/dev/sda1" }}} |
|
Line 2: | Line 74: |
Line 10: | Line 81: |
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. | |
Line 11: | Line 83: |
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: |
Line 14: | Line 86: |
== Creating a EABI chroot == | {{{ debootstrap --verbose --arch armel --foreign lenny /armel-chroot http://ftp.de.debian.org/debian chroot /armel-chroot /debootstrap/debootstrap --second-stage }}} to put an armel chroot into the directory /armel-chroot. For the "--second-stage" part one needs a kernel compiled with options listed in previous section. |
Line 16: | Line 92: |
Creating a chroot is the easiest way, if you just want to test building and running EABI applications. | If you have a non-debian EABI system, you need to download and debootstrap manually (perl required): |
Line 18: | Line 94: |
The easiest way is to download http://armel.applieddata.net/developers/linux/eabi/armel-root-fs.tar.bz2 prebuilt rootfs]. And extract it somewhere. Then just chroot there. | {{{ # replace 1.0.9 with latest debootstrap version: wget http://ftp.nl.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.9_all.deb ar -x debootstrap_1.0.9_all.deb cd / tar xvzf /full-path-to-work/work/data.tar.gz debootstrap --arch armel lenny /data/debian/armel http://ftp.nl.debian.org/debian }}} |
Line 20: | Line 103: |
* TODO: creating chroot using debootstrap --foreign == Migrating arm installation to arm eabi installation == There is no proper way yet. The following instructions worked for me, but no guarantees at all. |
== Migrating arm installation to arm EABI installation == There is no proper way yet. The following instructions worked for me, but no guarantees at all. |
Line 28: | Line 108: |
1. enter your chroot and set the selections to match: "dpkg --get-selections < file" | 1. enter your chroot and set the selections to match: "dpkg --set-selections < file" |
Line 33: | Line 113: |
Line 39: | Line 118: |
# 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 |
# mv bin sbin lib usr var old # relocate the old binary directores # cp -a /bin /sbin /lib /usr /var . # copy the armel binaryes and library directories to root # mv /sbin/start-stop-daemon.REAL /sbin/start-stop-daemon |
Line 43: | Line 122: |
At this point, make *sure* you have everything you need to boot and access your system under /mnt. | |
Line 44: | Line 124: |
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. |
Exit the armel chroot and *REBOOT*. If it breaks, you get to keep the pieces. |
Line 50: | Line 128: |
{{{apt-get -dselect-upgrade}}} | {{{apt-get dselect-upgrade}}} |
Line 54: | Line 132: |
== Links == | == Links == * http://lists.debian.org/debian-arm/2007/01/msg00034.html |
Line 56: | Line 135: |
* http://lists.debian.org/debian-arm/2007/01/msg00034.html | * http://lists.debian.org/debian-arm/2010/11/msg00102.html - experience report of an arm to armel conversion |
Installing with the Debian Installer
It's now possible to install armel directly with d-i, using one of the daily snapshots. Oystein Viggen describes his success and what he had to do differently in a message to the debian-arm list.
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.
Thecus N2100/Allnet ALL6500 and IO-Data Glantank users should follow the installation guides under http://www.cyrius.com/debian/iop/ using the installer images from the top-most link above.
The options below are for installing without d-i.
Debian repositories
armel port is available directly from normal Debian mirror network. Check from mirrorlist a mirror near you that carries armel.
In /etc/apt/sources.list put something like:
deb http://ftp.de.debian.org/debian lenny main deb http://ftp.de.debian.org/debian unstable main
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:
wget http://d-i.debian.org/daily-images/armel/daily/iop32x/netboot/ss4000e/initrd.gz wget http://ftp.XX.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.32-5-versatile_2.6.32-47_armel.deb wget http://people.debian.org/~aurel32/qemu/armel/vmlinuz-2.6.26-1-versatile wget http://people.debian.org/~aurel32/qemu/armel/initrd.img-2.6.26-1-versatile ln -s initrd.img-2.6.26-1-versatile initrd.gz ln -s vmlinuz-2.6.26-1-versatile vmlinuz-versatile
Get it from http://people.debian.org/~aurel32/qemu/armel/ "NOTE: Take a lot of care, that _only this old linux kernel version works_. If you use another, you will get errors while trying to mount files (disks) as: No filesystem could mount root Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) SOLVED on this document now (not before) and got solution from: http://lists.openmoko.org/pipermail/devel/2008-December/003846.html."
"NOTE2 (alternative solving method): After installation procedure you need to get a boot dir from hda.img. For this:
1. mounting image modprobe nbd max_part=63 qemu-nbd -c /dev/nbd0 hda.img mount /dev/nbd0p1 /mnt 2. copy boot dir cp -r /mnt/boot . 3. umounting image umount /mnt qemu-nbd -d /dev/nbd0
After this run qemu:
qemu-system-arm -M versatilepb -kernel boot/vmlinuz-2.6.32-5-versatile -initrd boot/initrd.img-2.6.32-5-versatile -hda hda.img -append "root=/dev/sda1"
"
Create a hard disk image and boot d-i;
qemu-img create -f qcow2 hda.img 10G qemu-system-arm -M versatilepb -redir tcp:2222::22 -kernel vmlinuz-versatile -initrd initrd.gz -m 256 -hda hda.img -append 'root=/dev/ram mem=256M'
Install as usual. After install boot with the following command line:
qemu-system-arm -M versatilepb -kernel vmlinuz-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 lenny /armel-chroot http://ftp.de.debian.org/debian chroot /armel-chroot /debootstrap/debootstrap --second-stage
to put an armel chroot into the directory /armel-chroot. For the "--second-stage" part one needs a kernel compiled with options listed in previous section.
If you have a non-debian EABI system, you need to download and debootstrap manually (perl required):
# replace 1.0.9 with latest debootstrap version: wget http://ftp.nl.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.9_all.deb ar -x debootstrap_1.0.9_all.deb cd / tar xvzf /full-path-to-work/work/data.tar.gz debootstrap --arch armel lenny /data/debian/armel http://ftp.nl.debian.org/debian
Migrating arm installation to arm EABI installation
There is no proper way yet. The following instructions worked for me, but no guarantees at all.
- Create a chroot like above.
store your current package selections with "dpkg --get-selections > file"
enter your chroot and set the selections to match: "dpkg --set-selections < file"
- test install all the same applications to your chroot: "apt-get --no-act dselect-upgrade"
- backup
- boot into single user mode and make sure there is no processess running
- 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 sbin lib usr var old # relocate the old binary directores # cp -a /bin /sbin /lib /usr /var . # copy the armel binaryes and library directories to root # mv /sbin/start-stop-daemon.REAL /sbin/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.
Links
* http://lists.debian.org/debian-arm/2007/01/msg00034.html
* http://lists.debian.org/debian-arm/2010/11/msg00102.html - experience report of an arm to armel conversion