Re: arm eabi port, patches
- To: debian-arm@lists.debian.org
- Cc: Lennert Buytenhek <buytenh@wantstofly.org>, Joey Hess <joey@kitenet.net>, Yauheni Kaliuta <y.kaliuta@gmail.com>, Martin Michlmayr <tbm@cyrius.com>, Philippe Robin <philippe.robin@arm.com>, Riku Voipio <riku.voipio@iki.fi>, Robert Whaley <rwhaley@applieddata.net>
- Subject: Re: arm eabi port, patches
- From: Wookey <wookey@aleph1.co.uk>
- Date: Wed, 14 Feb 2007 04:00:51 +0000
- Message-id: <[🔎] 20070214040051.GH30274@xios>
- Mail-followup-to: debian-arm@lists.debian.org, Lennert Buytenhek <buytenh@wantstofly.org>, Joey Hess <joey@kitenet.net>, Yauheni Kaliuta <y.kaliuta@gmail.com>, Martin Michlmayr <tbm@cyrius.com>, Philippe Robin <philippe.robin@arm.com>, Riku Voipio <riku.voipio@iki.fi>, Robert Whaley <rwhaley@applieddata.net>
- In-reply-to: <20070110210627.GB31116@zulo.hadrons.org>
- References: <20070110161123.GA29897@xi.wantstofly.org> <20070110210627.GB31116@zulo.hadrons.org>
On 2007-01-10 23:06 +0200, Guillem Jover wrote:
> Hi,
>
> On Wed, 2007-01-10 at 17:11:23 +0100, Lennert Buytenhek wrote:
> > More and more VFP-supporting CPUs are coming out lately, and it would
> > be nice to be able to use VFP on them in a sane way. The existing
> > Debian EABI efforts have been taking a while, so November 24 last year
> > I started working on a from-scratch EABI port, sponsored by Applied
> > Data Systems (http://www.applieddata.net/) Six and a half weeks later,
> > there's about 6000 debs built, and so far it all seems to work pretty
> > well.
>
> Nice!
>
> > I can't share the debs yet (internal and customer use only for now),
> > but I would like to get consensus on armel patches before I start
> > submitting them.
> >
> > The first candidate is dpkg. Guillem Jover's patch available here:
> >
> > http://lists.debian.org/debian-embedded/2006/05/msg00032.html
>
> Now that I've opened dpkg's trunk for 1.14 (targetted for lenny), I'll
> be appliying a cleaner version of the patch, those versions will be
> going to experimental for now.
I've rebased this patch for dpkg 1.13.25 and it seems to work OK. (I'm
currently building an emdebian armel cross-toolchain with it.)
I can't see this filed as a bug/patch for dpkg (but there are an awful
lot, so I may have missed it), so I'll do that unless someone shouts
that there is a better plan imminent, or that this has in fact already
been done.
Wookey
--
Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK Tel +44 (0) 1223 811679
work: http://www.aleph1.co.uk/ play: http://wookware.org/
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
diff -urN dpkg-1.13.25.orig/m4/arch.m4 dpkg-1.13.25/m4/arch.m4
--- dpkg-1.13.25.orig/m4/arch.m4 2006-08-18 03:54:23.000000000 +0100
+++ dpkg-1.13.25/m4/arch.m4 2007-02-14 02:26:31.000000000 +0000
@@ -52,6 +52,25 @@
DPKG_OS_TYPE
AC_MSG_CHECKING([dpkg architecture name])
_DPKG_ARCHITECTURE([DEB_HOST_ARCH], [dpkg_arch])
+case "$os_type-$cpu_type" in
+(gnueabi-linux-arm)
+ dpkg_arch=armel
+ ;;
+(gnu-linux-*)
+ dpkg_arch=$cpu_type
+ ;;
+(gnu-*)
+ t=`echo $os_type | sed -e 's:gnu::'`
+ dpkg_arch="$t-$cpu_type"
+ ;;
+(none-*)
+ t=`echo $os_type | sed -e 's:none::'`
+ dpkg_arch="$t-$cpu_type"
+ ;;
+(*)
+ dpkg_arch="$os_type-$cpu_type"
+ ;;
+esac
AC_MSG_RESULT([$dpkg_arch])
AC_DEFINE_UNQUOTED(ARCHITECTURE, "${dpkg_arch}",
[Set this to the canonical dpkg architecture name.])
diff -urN dpkg-1.13.25.orig/ostable dpkg-1.13.25/ostable
--- dpkg-1.13.25.orig/ostable 2006-06-21 14:33:54.000000000 +0100
+++ dpkg-1.13.25/ostable 2007-02-14 02:27:47.000000000 +0000
@@ -13,11 +13,12 @@
# system part of the output of the GNU config.guess script.
#
# <Debian name> <GNU name> <config.guess regex>
-linux linux-gnu linux[^-]*(-gnu.*)?
-darwin darwin darwin[^-]*
-freebsd freebsd freebsd[^-]*
-kfreebsd kfreebsd-gnu kfreebsd[^-]*(-gnu.*)?
-knetbsd knetbsd-gnu knetbsd[^-]*(-gnu.*)?
-netbsd netbsd netbsd[^-]*
-openbsd openbsd openbsd[^-]*
-hurd gnu gnu[^-]*
+gnueabi-linux linux-gnueabi linux[^-]*-gnueabi
+gnu-linux linux-gnu linux[^-]*(-gnu)?
+gnu-hurd gnu gnu[^-]*
+gnu-kfreebsd kfreebsd-gnu kfreebsd[^-]*(-gnu)?
+gnu-knetbsd knetbsd-gnu knetbsd[^-]*(-gnu)?
+bsd-darwin darwin darwin[^-]*
+bsd-freebsd freebsd freebsd[^-]*
+bsd-netbsd netbsd netbsd[^-]*
+bsd-openbsd openbsd openbsd[^-]*
diff -urN dpkg-1.13.25.orig/scripts/controllib.pl dpkg-1.13.25/scripts/controllib.pl
--- dpkg-1.13.25.orig/scripts/controllib.pl 2006-11-24 04:05:39.000000000 +0000
+++ dpkg-1.13.25/scripts/controllib.pl 2007-02-14 02:30:42.000000000 +0000
@@ -88,8 +88,12 @@
{
local ($os, $cpu) = @_;
- if ($os eq "linux") {
+ if ($os eq "gnu-linux") {
return $cpu;
+ } elsif ($os =~ /^(none|gnu)-(.*)/) {
+ return "$2-$cpu";
+ } elsif ("$os-$cpu" eq "gnueabi-linux-arm") {
+ return "armel";
} else {
return "$os-$cpu";
}
@@ -102,8 +106,10 @@
return ($1, $2);
} elsif (/any/ || /all/) {
return ($_, $_);
+ } elsif (/^armel$/) {
+ return ("gnueabi-linux", "arm");
} else {
- return ("linux", $_);
+ return ("gnu-linux", $_);
}
}
diff -urN dpkg-1.13.25.orig/scripts/dpkg-architecture.pl dpkg-1.13.25/scripts/dpkg-architecture.pl
--- dpkg-1.13.25.orig/scripts/dpkg-architecture.pl 2006-08-18 03:54:24.000000000 +0100
+++ dpkg-1.13.25/scripts/dpkg-architecture.pl 2007-02-14 02:41:28.000000000 +0000
@@ -95,19 +95,23 @@
sub split_debian {
local ($_) = @_;
- if (/^([^-]*)-(.*)/) {
- return ($1, $2);
+ if (/^([^-]*)-([^-]*)-(.*)/) {
+ return ($1, $2, $3);
+ } elsif (/^([^-]*)-(.*)/) {
+ return ("gnu", $1, $2);
+ } elsif (/^armel/) {
+ return ("gnueabi", "linux", "arm");
} else {
- return ("linux", $_);
+ return ("gnu", "linux", $_);
}
}
sub debian_to_gnu {
local ($arch) = @_;
- local ($os, $cpu) = &split_debian($arch);
+ local ($abi, $os, $cpu) = &split_debian($arch);
- return undef unless exists($cputable{$cpu}) && exists($ostable{$os});
- return join("-", $cputable{$cpu}, $ostable{$os});
+ return undef unless exists($cputable{$cpu}) && exists($ostable{"$abi-$os"});
+ return join("-", $cputable{$cpu}, $ostable{"$abi-$os"});
}
sub split_gnu {
@@ -252,20 +256,22 @@
&warn(sprintf(_g("Specified GNU system type %s does not match gcc system type %s."), $deb_host_gnu_type, $gcc)) if !($req_is_arch or $req_eq_arch) && ($gcc ne '') && ($gcc ne $deb_host_gnu_type);
# Split the Debian and GNU names
-($deb_host_arch_os, $deb_host_arch_cpu) = &split_debian($deb_host_arch);
-($deb_build_arch_os, $deb_build_arch_cpu) = &split_debian($deb_build_arch);
+($deb_host_arch_abi, $deb_host_arch_os, $deb_host_arch_cpu) = &split_debian($deb_host_arch);
+($deb_build_arch_abi, $deb_build_arch_os, $deb_build_arch_cpu) = &split_debian($deb_build_arch);
($deb_host_gnu_cpu, $deb_host_gnu_system) = &split_gnu($deb_host_gnu_type);
($deb_build_gnu_cpu, $deb_build_gnu_system) = &split_gnu($deb_build_gnu_type);
%env = ();
if (!$force) {
$deb_build_arch = $ENV{DEB_BUILD_ARCH} if (exists $ENV{DEB_BUILD_ARCH});
+ $deb_build_arch_abi = $ENV{DEB_BUILD_ARCH_ABI} if (exists $ENV{DEB_BUILD_ARCH_ABI});
$deb_build_arch_os = $ENV{DEB_BUILD_ARCH_OS} if (exists $ENV{DEB_BUILD_ARCH_OS});
$deb_build_arch_cpu = $ENV{DEB_BUILD_ARCH_CPU} if (exists $ENV{DEB_BUILD_ARCH_CPU});
$deb_build_gnu_cpu = $ENV{DEB_BUILD_GNU_CPU} if (exists $ENV{DEB_BUILD_GNU_CPU});
$deb_build_gnu_system = $ENV{DEB_BUILD_GNU_SYSTEM} if (exists $ENV{DEB_BUILD_GNU_SYSTEM});
$deb_build_gnu_type = $ENV{DEB_BUILD_GNU_TYPE} if (exists $ENV{DEB_BUILD_GNU_TYPE});
$deb_host_arch = $ENV{DEB_HOST_ARCH} if (exists $ENV{DEB_HOST_ARCH});
+ $deb_host_arch_abi = $ENV{DEB_HOST_ARCH_ABI} if (exists $ENV{DEB_HOST_ARCH_ABI});
$deb_host_arch_os = $ENV{DEB_HOST_ARCH_OS} if (exists $ENV{DEB_HOST_ARCH_OS});
$deb_host_arch_cpu = $ENV{DEB_HOST_ARCH_CPU} if (exists $ENV{DEB_HOST_ARCH_CPU});
$deb_host_gnu_cpu = $ENV{DEB_HOST_GNU_CPU} if (exists $ENV{DEB_HOST_GNU_CPU});
@@ -273,18 +279,20 @@
$deb_host_gnu_type = $ENV{DEB_HOST_GNU_TYPE} if (exists $ENV{DEB_HOST_GNU_TYPE});
}
-@ordered = qw(DEB_BUILD_ARCH DEB_BUILD_ARCH_OS DEB_BUILD_ARCH_CPU
+@ordered = qw(DEB_BUILD_ARCH DEB_BUILD_ARCH_ABI DEB_BUILD_ARCH_OS DEB_BUILD_ARCH_CPU
DEB_BUILD_GNU_CPU DEB_BUILD_GNU_SYSTEM DEB_BUILD_GNU_TYPE
- DEB_HOST_ARCH DEB_HOST_ARCH_OS DEB_HOST_ARCH_CPU
+ DEB_HOST_ARCH DEB_HOST_ARCH_ABI DEB_HOST_ARCH_OS DEB_HOST_ARCH_CPU
DEB_HOST_GNU_CPU DEB_HOST_GNU_SYSTEM DEB_HOST_GNU_TYPE);
$env{'DEB_BUILD_ARCH'}=$deb_build_arch;
+$env{'DEB_BUILD_ARCH_ABI'}=$deb_build_arch_abi;
$env{'DEB_BUILD_ARCH_OS'}=$deb_build_arch_os;
$env{'DEB_BUILD_ARCH_CPU'}=$deb_build_arch_cpu;
$env{'DEB_BUILD_GNU_CPU'}=$deb_build_gnu_cpu;
$env{'DEB_BUILD_GNU_SYSTEM'}=$deb_build_gnu_system;
$env{'DEB_BUILD_GNU_TYPE'}=$deb_build_gnu_type;
$env{'DEB_HOST_ARCH'}=$deb_host_arch;
+$env{'DEB_HOST_ARCH_ABI'}=$deb_host_arch_abi;
$env{'DEB_HOST_ARCH_OS'}=$deb_host_arch_os;
$env{'DEB_HOST_ARCH_CPU'}=$deb_host_arch_cpu;
$env{'DEB_HOST_GNU_CPU'}=$deb_host_gnu_cpu;
Reply to: