2004-03-29 Marco Gerards <metgerards@student.han.nl>
Add support for the newworld apple macintosh (PPC). This has been tested on the powerbook 2000 only. It only adds support for generic ieee1275 functions, console and disk support. This should be easy to port to other architectures with support for Open Firmware. * configure.ac: Accept the powerpc as host_cpu. In the case of the powerpc cpu set the host_vendor to ieee1275. Make sure the i386 specific tests are only executed while building for the i386. Inverse test for crosscompile. * genmk.rb (Utility): Allow assembler files. * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno. * conf/powerpc-ieee1275.rmk: New file. * disk/powerpc/ieee1275/ofdisk.c: Likewise. * disk/powerpc/ieee1275/partition.c: Likewise. * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/console.h: Likewise. * include/pupa/powerpc/ieee1275/partition.h: Likewise. * include/pupa/powerpc/ieee1275/time.h: Likewise. * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise. * include/pupa/powerpc/ieee1275/multiboot.h: Likewise. * include/pupa/powerpc/ieee1275/loader.h * include/pupa/powerpc/setjmp.h: Likewise. * include/pupa/powerpc/types.h: Likewise. * kern/powerpc/ieee1275/init.c: Likewise. * kern/powerpc/ieee1275/openfw.c: Likewise. * term/powerpc/ieee1275/ofconsole.c: Likewise. These files were written by Johan Rydberg (jrydberg@night.trouble.net) and I only modified them slightly. * boot/powerpc/ieee1275/cmain.c: New file. * boot/powerpc/ieee1275/crt0.S: Likewise. * boot/powerpc/ieee1275/ieee1275.c: Likewise. * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
This commit is contained in:
parent
8c8cc20511
commit
e56cdf2111
25 changed files with 2768 additions and 22 deletions
30
configure.ac
30
configure.ac
|
@ -1,6 +1,6 @@
|
|||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
# Copyright (C) 2002,2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002,2003,2004 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure.ac is free software; the author
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -22,11 +22,13 @@ AC_CANONICAL_HOST
|
|||
|
||||
case "$host_cpu" in
|
||||
i[[3456]]86) host_cpu=i386 ;;
|
||||
powerpc) ;;
|
||||
*) AC_MSG_ERROR([unsupported CPU type]) ;;
|
||||
esac
|
||||
|
||||
case "$host_cpu"-"$host_vendor" in
|
||||
i386-*) host_vendor=pc ;;
|
||||
powerpc-*) host_vendor=ieee1275 ;;
|
||||
*) AC_MSG_ERROR([unsupported machine type]) ;;
|
||||
esac
|
||||
|
||||
|
@ -80,9 +82,11 @@ AC_SUBST(CFLAGS)
|
|||
|
||||
# Defined in aclocal.m4.
|
||||
pupa_ASM_USCORE
|
||||
pupa_CHECK_START_SYMBOL
|
||||
pupa_CHECK_BSS_START_SYMBOL
|
||||
pupa_CHECK_END_SYMBOL
|
||||
if test "x$host_cpu" = xi386; then
|
||||
pupa_CHECK_START_SYMBOL
|
||||
pupa_CHECK_BSS_START_SYMBOL
|
||||
pupa_CHECK_END_SYMBOL
|
||||
fi
|
||||
|
||||
if test "x$host_cpu" = xi386; then
|
||||
pupa_I386_ASM_PREFIX_REQUIREMENT
|
||||
|
@ -106,11 +110,11 @@ AC_PATH_PROG(RUBY, ruby)
|
|||
|
||||
# For cross-compiling.
|
||||
if test "x$build" = "x$host"; then
|
||||
BUILD_CC="$CC"
|
||||
AC_SUBST(BUILD_CC)
|
||||
else
|
||||
AC_CHECK_PROGS(BUILD_CC, [gcc egcs cc],
|
||||
[AC_MSG_ERROR([none of gcc, egcs and cc is found. set BUILD_CC manually.])])
|
||||
else
|
||||
BUILD_CC="$CC"
|
||||
AC_SUBST(BUILD_CC)
|
||||
fi
|
||||
|
||||
# Test the C compiler for the build environment.
|
||||
|
@ -126,11 +130,13 @@ AC_C_BIGENDIAN
|
|||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
|
||||
# Check LZO.
|
||||
AC_CHECK_LIB(lzo, __lzo_init2, ,
|
||||
AC_MSG_ERROR([LZO library version 1.02 or later is required]))
|
||||
AC_CHECK_FUNC(lzo1x_999_compress, ,
|
||||
[AC_MSG_ERROR([LZO1X-999 must be enabled])])
|
||||
# Check LZO when compiling for the i386.
|
||||
if test "x$host_cpu" = xi386; then
|
||||
AC_CHECK_LIB(lzo, __lzo_init2, ,
|
||||
AC_MSG_ERROR([LZO library version 1.02 or later is required]))
|
||||
AC_CHECK_FUNC(lzo1x_999_compress, ,
|
||||
[AC_MSG_ERROR([LZO1X-999 must be enabled])])
|
||||
fi
|
||||
|
||||
CC="$tmp_CC"
|
||||
CFLAGS="$tmp_CFLAGS"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue