Ответ: Building i386 as target on amd64
2007/12/31, Neil Williams <firstname.lastname@example.org>:
> On Thu, 2007-12-27 at 12:25 +0300, Max Dmitrichenko wrote:
> > Hi!
> > I use amd64 as host and want to build rootfs for i386 target.
> Use debootstrap to create an i386 chroot on your amd64 box. You do not
> need a cross compiler or toolchain.
debootstrap from what mirror? Is there any mirror hosting Emdebian
packages for i386? I think no and I should compile them first to
create my own repository for i386. Correct me if I'm wrong.
> > I know
> > that i386 can hardly be considered as embedded platform, but at my
> > work we have such embedded systems based on i386 platform.
> > Two questions:
> > 1) Is it the same as simply install Debian on i386? I guess
> > not, because Emdebian tries to avoid unnecessary packages
> > and other stuff, so I think this is what I want.
> > 2) Is such configuration supported?
> Not explicitly because it doesn't involve cross building the packages so
> most of the code in the scripts is simply not used. I have no idea if
> the rootfs packages will build for i386 when using the current Emdebian
> patches. emdebian-tools was improved during the Linz conference to have
> better support for native building (which is what amd64<->i386 actually
> is) but I've no idea if the built packages would work.
I guess not. I see you've patched the emsetup and now it says that I
don't need a cross toolchain. But when I tried to build glibc for i386
with the help of emsource, I failed to do it. It requieres
i486-linux-gnu-gcc which I lack on my amd64 box. At least in etch.
> > Because when I ran emsetup
> > it told me, that I need a toolchain for i386 but it can't be
> > build.
> I'll see if the emsetup script can be made more intelligent and detect
> when a toolchain is a waste of time.
Why do we need such exception cases like biarchs? Why not to do
everything in a generic way? Why not to imagine that amd64 and i386
have nothing in common?
I've manually built an i386 toolchain on my amd64 box according to the
instructions at the www.emdebian.org and then (with a couple of
patches) successfuly managed to build glibc-2.7-4em1 for i386. I don't
even imagine the expense of doing it with my host compiler even it is
possible in theory.
I am at the point when I have built only one package (glibc) with the
help of emdebian-tools/dpkg-cross/apt-cross bundle. So, that's
basically all of my experience and I appologise if my questions
concern the true sense.
So, another question that is closely related to the topic. Is it
really needed to build amd64 and xen flavors of glibc on i386 when we
are talking about embedded target? Does the Emdebian pursue more
fine-graned control of target packages? If so, how can it be controled
with emdebuild tool? I think, that I'm ready to develop such patches
for the packages that I'll built, but I don't really know whether the
emdebian-toolchain can use such features at the current stage of