Creating an EABI Lenny system

From Nuclear Physics Group Documentation Pages
Revision as of 15:44, 16 January 2010 by Maurik (talk | contribs)
Jump to navigationJump to search

The "Lenny" Debian EABI system

Details about EABI, and why you want it, are http://wiki.debian.org/ArmEabiPort

The new debian "Lenny" release (5) comes with an eabi version, called "armel" versus the standard, oabi "arm" version. Getting there is not so trivial.

Kernel: 2.6.21-ts

First create a new kernel (see ). Make sure you use the eabi cross compiler and have

CONFIG_ARM_THUMB=y
CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y

set for the kernel.

This should boot with the old "etch" (release 4) version.

Changing the system

Not so simple, and I am not there yet.

First attempt using "apt-get dist-upgrade" failed, in that it upgrades to the "arm" and not the "armel" version.

Next attempt: follow these http://wiki.debian.org/ArmEabiHowto, but then different.

Try using debootstrap, info is here: http://www.debian-administration.org/articles/426

First get it, then run it

apt-get install debootstrap
debootstrap --verbose --arch armel --foreign lenny /armel-chroot http://ftp.de.debian.org/debian

Next, get some coffee and grade your homework, since this takes a while. Oh, and the card you do this on needs to be big enough. I used an 8GB microSD with an adapter.

Strangely, this got a whole bunch of stuff, but it did NOT seem to include "apt-get", an essential part to continue? Also /etc/apt/sources.list had an invalid entry.

To fix this, unpack and install stuff from /var/cache/apt/archives, some require the --force-depends flag to resolve linked dependencies. (libgcc1 depends on libc6 which depends on libgcc1). There are a lot of dependencies to get apt-get going, but they are all in the archives. When this is done edit the /etc/apt/sources.list to have

deb http://ftp.us.debian.org/debian lenny main

and run

apt-get update

This should now get all the available stuff, but not install anything.

At this point, go to "init 1", and complete the switchover:

I have no name!@solo:/mnt# mkdir old_arm
I have no name!@solo:/mnt# mv bin sbin lib usr var old_arm/
I have no name!@solo:/mnt# ls old_arm/ 
bin  lib  sbin  usr  var
I have no name!@solo:/mnt# cp -a /bin /sbin /lib /usr /var .
I have no name!@solo:/mnt# cat /etc/apt/sources.list 
deb http://ftp.us.debian.org/debian lenny main
I have no name!@solo:/mnt# cat etc/apt/sources.list
deb http://ftp.us.debian.org/debian etch main
I have no name!@solo:/mnt# cp /etc/apt/sources.list etc/apt/
I have no name!@solo:/mnt#

Send a quick prayer to the silicon gods and reboot: "exit" first! Then "/sbin/shutdown -r now". You get some errors. Finish with

apt-get dselect-upgrade

and reboot again.

This did not work. NO NETWORK. FFFF.

dpkg --install /var/cache/apt/archive/net-tools*    # gives ifconfig
.... ncurses-bin*
.... sed*
...  lsb-base*
... modules*   # to get modprobe
... mawk
Now a trick, link mawk to awk
 ... ifupdown
 ifup eth0
apt-get --yes dselect-upgrade
....

In the end, I got a working system, but there was more "apt-get" needed than I thought should be required. Well, at least it works.