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:
marco_g 2004-03-28 21:52:02 +00:00
parent 8c8cc20511
commit e56cdf2111
25 changed files with 2768 additions and 22 deletions

16
configure vendored
View file

@ -1363,6 +1363,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
case "$host_cpu" in
i[3456]86) host_cpu=i386 ;;
powerpc) ;;
*) { { echo "$as_me:$LINENO: error: unsupported CPU type" >&5
echo "$as_me: error: unsupported CPU type" >&2;}
{ (exit 1); exit 1; }; } ;;
@ -1370,6 +1371,7 @@ esac
case "$host_cpu"-"$host_vendor" in
i386-*) host_vendor=pc ;;
powerpc-*) host_vendor=ieee1275 ;;
*) { { echo "$as_me:$LINENO: error: unsupported machine type" >&5
echo "$as_me: error: unsupported machine type" >&2;}
{ (exit 1); exit 1; }; } ;;
@ -2737,6 +2739,7 @@ fi
echo "$as_me:$LINENO: result: $pupa_cv_asm_uscore" >&5
echo "${ECHO_T}$pupa_cv_asm_uscore" >&6
if test "x$host_cpu" = xi386; then
echo "$as_me:$LINENO: checking if start is defined by the compiler" >&5
echo $ECHO_N "checking if start is defined by the compiler... $ECHO_C" >&6
@ -3131,6 +3134,7 @@ echo "$as_me: error: neither end nor _end is defined" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
if test "x$host_cpu" = xi386; then
@ -3877,9 +3881,6 @@ fi
# For cross-compiling.
if test "x$build" = "x$host"; then
BUILD_CC="$CC"
else
for ac_prog in gcc egcs cc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@ -3923,6 +3924,9 @@ test -n "$BUILD_CC" || BUILD_CC="{ { echo "$as_me:$LINENO: error: none of gcc, e
echo "$as_me: error: none of gcc, egcs and cc is found. set BUILD_CC manually." >&2;}
{ (exit 1); exit 1; }; }"
else
BUILD_CC="$CC"
fi
# Test the C compiler for the build environment.
@ -5334,7 +5338,8 @@ _ACEOF
# Check LZO.
# Check LZO when compiling for the i386.
if test "x$host_cpu" = xi386; then
echo "$as_me:$LINENO: checking for __lzo_init2 in -llzo" >&5
echo $ECHO_N "checking for __lzo_init2 in -llzo... $ECHO_C" >&6
@ -5403,7 +5408,7 @@ echo "$as_me: error: LZO library version 1.02 or later is required" >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: checking for lzo1x_999_compress" >&5
echo "$as_me:$LINENO: checking for lzo1x_999_compress" >&5
echo $ECHO_N "checking for lzo1x_999_compress... $ECHO_C" >&6
if test "${ac_cv_func_lzo1x_999_compress+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@ -5483,6 +5488,7 @@ echo "$as_me: error: LZO1X-999 must be enabled" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
CC="$tmp_CC"
CFLAGS="$tmp_CFLAGS"