[LinuxBIOS] Complete and generic 32bit/64bit support

Ward Vandewege ward at gnu.org
Wed Nov 21 17:42:33 CET 2007


Hi Myles,

On 16/11/07 16:09 -0700, Myles Watson wrote:
> This is the same patch as the one Jordan sent before, but
>
> 1. Making UCLIBC_VER work
>
> 2. Adding a few forgotten files
>
> 3. Adding a few more devices in devices.txt so that the hard drives
> and CD can be used once you're in linux
>
> I tested it with 64-bit serengeti cheetah and 32-bit tyan s2891.
>
> Some things still don't work, but not because of this patch:
>
> 1. Building 32-bit kexec-boot-loader is broken on 64-bit machines
> (cross-compile flags issue)
> 2. The ROM ends up being too large for tyan s2891 LAB
>
> Signed-off-by: Myles Watson <myles at pel.cs.byu.edu>

This patch does not set the UCLIBC_ARCH variable correctly on 32 bit; it
needs to be forced to i386 there instead of $(TARGET_ARCH), which is i686 on
my box.

For 64 bit it's fine, because there the UCLIBC_ARCH variable needs to be
x86_64 which happens to match $(TARGET_ARCH).

Here's a simple fix for the m57sli board:

--- config/platforms/m57sli.conf        (revision 57)
+++ config/platforms/m57sli.conf        (working copy)
@@ -6,8 +6,15 @@
 STRIP=strip
 AS=as
 
+ifeq ($(CONFIG_TARGET_64BIT),y)
+TARGET_ARCH=x86_64
+UCLIBC_ARCH=x86_64
+CFLAGS_platform =
+else
 TARGET_ARCH=i686
-CFLAGS_platform = -m32
+UCLIBC_ARCH=i386
+CFLAGS_platform =
+endif

Can you fix that for all boards?

The other thing I was wondering about is why the exit -1 is dropped in
buildrom-devel/bin/checkrom.sh when the image won't fit? It's nice for the
build to fail explicitly if the image is too big instead of producing obscure
linker errors further down the line.

For the rest this looks good to me; your patch passed a build test here on 32
bit. We may want to add some warnings bout the LAB size issues when building
on 64 bit. And I'm actually also a little curious why we are having problems
there.

If the above get fixed, 

Acked-by: Ward Vandewege <ward at gnu.org>

Thanks,
Ward.

-- 
Ward Vandewege <ward at fsf.org>
Free Software Foundation - Senior System Administrator




More information about the coreboot mailing list