Re: i386-uclibc debian
Em Qua, 2005-10-26 às 11:31 +0400, Wartan Hachaturow escreveu:
> On 10/26/05, Nikita V. Youshchenko <yoush@cs.msu.su> wrote:
> > Making support for such additional 'archs', targeting mainly uclibc archs,
> > is *the* direction where I was going to move with dpkg-cross and debian
> > cross-toolchain (I'm the current maintainer of those).
> This is also a way we're currently moving in our version of embedded Debian.
> We used to use a regular-dpkg-arch-depending-on-uclibc approach, but met lots
> of problems with it, and got away to new dpkg architectures.
Well,
This is exactly what i386-uclibc is all about...
I had a hard time building a toolchain inside debian for i386-uclibc, so
I gave up and now I'm using gentoo-embedded as a seed to this new arch.
Enerv is working on a move from gentoo stage1 to 3 again because they
choosed to make the architecture i386-gentoo-linux-uclibc instead of
i386-pc-linux-uclibc. But besides that problem, I made dpkg understands
the i386-uclibc architecture, in a not-so-good way... but it seems to
work (only with dpkg 1.13).
BTW, this is what I have now inside my gentoo-embedded chroot...
kariri:~# dpkg --print-architecture
i386-uclibc
kariri:~# dpkg --print-installation-architecture
i386-uclibc
kariri:~# dpkg-architecture
DEB_BUILD_ARCH=i386-uclibc
DEB_BUILD_ARCH_OS=linux-uclibc
DEB_BUILD_ARCH_CPU=i386
DEB_BUILD_GNU_CPU=i486
DEB_BUILD_GNU_SYSTEM=linux-uclibc
DEB_BUILD_GNU_TYPE=i486-linux-uclibc
DEB_HOST_ARCH=i386-uclibc
DEB_HOST_ARCH_OS=linux-uclibc
DEB_HOST_ARCH_CPU=i386
DEB_HOST_GNU_CPU=i486
DEB_HOST_GNU_SYSTEM=linux-uclibc
DEB_HOST_GNU_TYPE=i486-linux-uclibc
I needed to patch dpkg in some ways (including configure) to support
sub-arches. It's working, but I really would like to see a better
solution.
What I made was... If it's a linux-uclibc os, sticks to $cpu-uclibc...
I'm now working on discovering the best order to build the 87 needed
source packages to get a base+buildessential set for debootstrap.
Follows the patches I made on dpkg...
--- configure.ori 2005-10-26 01:10:45 +0000
+++ configure 2005-10-26 01:11:13 +0000
@@ -1550,8 +1550,10 @@
echo $ECHO_N "checking dpkg architecture name... $ECHO_C" >&6
if test "x$os_type" = "xlinux"; then
dpkg_arch=$cpu_type
+elif test "x$os_type" = "xlinux-uclibc"; then
+ dpkg_arch="$cpu_type-uclibc"
else
- dpkg_arch="$os_type-$cpu_type"
+ dpkg_arch="$os_type-$cpu_type"
fi
echo "$as_me:$LINENO: result: $dpkg_arch" >&5
echo "${ECHO_T}$dpkg_arch" >&6
--- cputable.ori 2005-10-26 01:10:54 +0000
+++ cputable 2005-10-26 01:11:20 +0000
@@ -13,6 +13,7 @@
# CPU part of the output of the GNU config.guess script.
#
# <Debian name> <GNU name> <config.guess regex>
+i386-uclibc i386 (i[3456]86|pentium)-.*linux-uclibc
i386 i486 (i[3456]86|pentium)
ia64 ia64 ia64
alpha alpha alpha.*
--- ostable.ori 2005-10-26 01:10:50 +0000
+++ ostable 2005-10-26 01:11:17 +0000
@@ -13,6 +13,7 @@
# system part of the output of the GNU config.guess script.
#
# <Debian name> <GNU name> <config.guess regex>
+linux-uclibc linux-uclibc linux-uclibc
linux linux-gnu linux[^-]*(-gnu.*)?
darwin darwin darwin[^-]*
freebsd freebsd freebsd[^-]*
@@ -81,7 +81,9 @@
sub split_debian {
local ($_) = @_;
- if (/^([^-]*)-(.*)/) {
+ if (/^(.*)-uclibc$/) {
+ return ("linux-uclibc", $1)
+ } elsif (/^([^-]*)-(.*)/) {
return ($1, $2);
} else {
return ("linux", $_);
@@ -126,6 +128,8 @@
return undef if !defined($cpu) || !defined($os);
if ($os eq "linux") {
return $cpu;
+ } elsif ($os eq "linux-uclibc") {
+ return "$cpu-uclibc";
} else {
return "$os-$cpu";
}
@@ -140,6 +144,8 @@
foreach $cpu (@cpu) {
if ($os eq "linux") {
print "$cpu\n"
+ } elsif ($os eq "linux-uclibc") {
+ print "$cpu-uclibc\n"
} else {
print "$os-$cpu\n";
}
Reply to: