The final commit for the first phase of PowerPC support.

This adds the config stuff needed to build kernels.

Reviewed by:	obrien
This commit is contained in:
Benno Rice 2001-06-17 09:39:44 +00:00
parent 7d6d31cb79
commit c585bae1c2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78388
5 changed files with 145 additions and 44 deletions

View File

@ -1,4 +1,4 @@
# Makefile.i386 -- with config changes.
# Makefile.powerpc -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $FreeBSD$
@ -8,17 +8,20 @@
# This makefile is constructed from a machine description:
# config machineid
# Most changes should be made in the machine description
# /sys/i386/conf/``machineid''
# /sys/powerpc/conf/``machineid''
# after which you should do
# config machineid
# Generic makefile changes should be made in
# /sys/i386/conf/Makefile.i386
# /sys/powerpc/conf/Makefile.powerpc
# after which config should be rerun for all machines.
#
# Which version of config(8) is required.
%VERSREQ= 500006
# Temporary stuff while we're still embryonic
NO_MODULES?= yes
# Can be overridden by makeoptions or /etc/make.conf
KERNEL_KO?= kernel
KERNEL?= kernel

52
sys/conf/files.powerpc Normal file
View File

@ -0,0 +1,52 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
# $FreeBSD$
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
# dependency lines other than the first are silently ignored.
#
#
kern/subr_diskmbr.c standard
powerpc/powerpc/atomic.s standard
powerpc/powerpc/autoconf.c standard
powerpc/powerpc/bcopy.c standard
powerpc/powerpc/clock.c standard
powerpc/powerpc/copyinstr.c standard
powerpc/powerpc/copystr.c standard
powerpc/powerpc/elf_machdep.c standard
powerpc/powerpc/fubyte.c standard
powerpc/powerpc/fuswintr.c standard
powerpc/powerpc/fuword.c standard
powerpc/powerpc/machdep.c standard
powerpc/powerpc/ofwmagic.s standard
powerpc/powerpc/ofw_machdep.c standard
powerpc/powerpc/pmap.c standard
powerpc/powerpc/procfs_machdep.c standard
powerpc/powerpc/subyte.c standard
powerpc/powerpc/suswintr.c standard
powerpc/powerpc/suword.c standard
powerpc/powerpc/syncicache.c standard
powerpc/powerpc/sys_machdep.c standard
powerpc/powerpc/swtch.s standard
powerpc/powerpc/trap.c standard
powerpc/powerpc/vm_machdep.c standard
dev/ofw/openfirm.c standard
dev/ofw/ofw_console.c standard
libkern/ashldi3.c standard
libkern/ashrdi3.c standard
libkern/bcmp.c standard
libkern/divdi3.c standard
libkern/ffs.c standard
libkern/lshrdi3.c standard
libkern/moddi3.c standard
libkern/qdivrem.c standard
libkern/ucmpdi2.c standard
libkern/udivdi3.c standard
libkern/umoddi3.c standard
powerpc/powerpc/mp_machdep.c optional smp

View File

@ -1,13 +1,16 @@
/* $FreeBSD$ */
OUTPUT_FORMAT("elf64-alpha", "elf64-alpha", "elf64-alpha")
OUTPUT_ARCH(alpha)
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
OUTPUT_ARCH(powerpc)
ENTRY(__start)
SEARCH_DIR(/usr/lib);
kernel_text = 0xfffffc0000300000;
/* Do we need any of these for elf?
__DYNAMIC = 0; */
PROVIDE (__stack = 0);
SECTIONS
{
/* Read-only sections, merged into text segment: */
. = 0xfffffc0000300000 + SIZEOF_HEADERS;
. = 0x00100000 + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
@ -15,47 +18,40 @@ SECTIONS
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.text :
{ *(.rel.text) *(.rel.gnu.linkonce.t*) }
.rela.text :
{ *(.rela.text) *(.rela.gnu.linkonce.t*) }
.rel.data :
{ *(.rel.data) *(.rel.gnu.linkonce.d*) }
.rela.data :
{ *(.rela.data) *(.rela.gnu.linkonce.d*) }
.rel.rodata :
{ *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
.rela.rodata :
{ *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.ctors : { *(.rel.ctors) }
.rela.got1 : { *(.rela.got1) }
.rela.got2 : { *(.rela.got2) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
.init : { *(.init) } =0x47ff041f
.rela.sdata : { *(.rela.sdata) }
.rela.sbss : { *(.rela.sbss) }
.rela.sdata2 : { *(.rela.sdata2) }
.rela.sbss2 : { *(.rela.sbss2) }
.text :
{
*(.text)
*(.stub)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
} =0x47ff041f
} =0
_etext = .;
PROVIDE (etext = .);
.fini : { *(.fini) } =0x47ff041f
.init : { *(.init) } =0
.fini : { *(.fini) } =0
.rodata : { *(.rodata) *(.gnu.linkonce.r*) }
.rodata1 : { *(.rodata1) }
.reginfo : { *(.reginfo) }
.sdata2 : { *(.sdata2) }
.sbss2 : { *(.sbss2) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
. = .;
@ -66,42 +62,54 @@ SECTIONS
CONSTRUCTORS
}
.data1 : { *(.data1) }
.ctors :
{
*(.ctors)
}
.dtors :
{
*(.dtors)
}
.plt : { *(.plt) }
.got : { *(.got.plt) *(.got) }
.dynamic : { *(.dynamic) }
.got1 : { *(.got1) }
.dynamic : { *(.dynamic) }
/* Put .ctors and .dtors next to the .got2 section, so that the pointers
get relocated with -mrelocatable. Also put in the .fixup pointers.
The current compiler no longer needs this, but keep it around for 2.7.2 */
PROVIDE (_GOT2_START_ = .);
.got2 : { *(.got2) }
PROVIDE (__CTOR_LIST__ = .);
.ctors : { *(.ctors) }
PROVIDE (__CTOR_END__ = .);
PROVIDE (__DTOR_LIST__ = .);
.dtors : { *(.dtors) }
PROVIDE (__DTOR_END__ = .);
PROVIDE (_FIXUP_START_ = .);
.fixup : { *(.fixup) }
PROVIDE (_FIXUP_END_ = .);
PROVIDE (_GOT2_END_ = .);
PROVIDE (_GOT_START_ = .);
.got : { *(.got) }
.got.plt : { *(.got.plt) }
PROVIDE (_GOT_END_ = .);
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata : { *(.sdata) }
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.sbss : { *(.sbss) *(.scommon) }
.sbss :
{
PROVIDE (__sbss_start = .);
*(.sbss)
*(.scommon)
*(.dynsbss)
PROVIDE (__sbss_end = .);
}
.plt : { *(.plt) }
.bss :
{
PROVIDE (__bss_start = .);
*(.dynbss)
*(.bss)
*(COMMON)
}
. = ALIGN(64 / 8);
_end = . ;
PROVIDE (end = .);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */

7
sys/conf/options.powerpc Normal file
View File

@ -0,0 +1,7 @@
# $FreeBSD$
MPC750 opt_global.h
IPKDB opt_ipkdb.h
SHOW_BUSYBUFS
PANIC_REBOOT_WAIT_TIME opt_panic.h

31
sys/powerpc/conf/GENERIC Normal file
View File

@ -0,0 +1,31 @@
#
# GENERIC -- Generic kernel configuration file for FreeBSD/powerpc
#
# For more information on this file, please read the handbook section on
# Kernel Configuration Files:
#
# http://www.FreeBSD.org/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the NOTES configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in NOTES.
#
# $FreeBSD$
machine powerpc
cpu MPC750
ident GENERIC
maxusers 32
#To statically compile in device wiring instead of /boot/device.hints
#hints "GENERIC.hints"
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
options FFS
options COMPAT_43