diff options
author | benno <benno@FreeBSD.org> | 2001-06-17 09:39:44 +0000 |
---|---|---|
committer | benno <benno@FreeBSD.org> | 2001-06-17 09:39:44 +0000 |
commit | b8d88b43ffd37997280f181f6a3e7d5b99912610 (patch) | |
tree | b4ef959ad6dea022189b42d67e192ae589e572bf /sys | |
parent | 9e143295490a248326f97c1aaa2edaf4634b07c2 (diff) | |
download | FreeBSD-src-b8d88b43ffd37997280f181f6a3e7d5b99912610.zip FreeBSD-src-b8d88b43ffd37997280f181f6a3e7d5b99912610.tar.gz |
The final commit for the first phase of PowerPC support.
This adds the config stuff needed to build kernels.
Reviewed by: obrien
Diffstat (limited to 'sys')
-rw-r--r-- | sys/conf/Makefile.powerpc | 9 | ||||
-rw-r--r-- | sys/conf/files.powerpc | 52 | ||||
-rw-r--r-- | sys/conf/ldscript.powerpc | 90 | ||||
-rw-r--r-- | sys/conf/options.powerpc | 7 | ||||
-rw-r--r-- | sys/powerpc/conf/GENERIC | 31 |
5 files changed, 145 insertions, 44 deletions
diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 7e70fd1..a9ff126 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -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 diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc new file mode 100644 index 0000000..8422147 --- /dev/null +++ b/sys/conf/files.powerpc @@ -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 diff --git a/sys/conf/ldscript.powerpc b/sys/conf/ldscript.powerpc index a0e0547..fda2f2e 100644 --- a/sys/conf/ldscript.powerpc +++ b/sys/conf/ldscript.powerpc @@ -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. */ diff --git a/sys/conf/options.powerpc b/sys/conf/options.powerpc new file mode 100644 index 0000000..8dba32a --- /dev/null +++ b/sys/conf/options.powerpc @@ -0,0 +1,7 @@ +# $FreeBSD$ + +MPC750 opt_global.h +IPKDB opt_ipkdb.h + +SHOW_BUSYBUFS +PANIC_REBOOT_WAIT_TIME opt_panic.h diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC new file mode 100644 index 0000000..eebcbad --- /dev/null +++ b/sys/powerpc/conf/GENERIC @@ -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 |