Convert kernel over to bsdmake
This commit is contained in:
@@ -1,68 +0,0 @@
|
||||
# Makefile for kernel
|
||||
|
||||
include /etc/make.conf
|
||||
|
||||
ARCHAR=$(ARCH).a
|
||||
|
||||
# objects, excluding first-stage code, which is $(HEAD).
|
||||
# the HEAD variable is passed as an argument to this Makefile
|
||||
# by an upper level Makefile.
|
||||
|
||||
OBJS= arch_do_vmctl.o \
|
||||
breakpoints.o \
|
||||
clock.o \
|
||||
debugreg.o \
|
||||
do_int86.o \
|
||||
do_iopenable.o \
|
||||
do_readbios.o \
|
||||
do_sdevio.o \
|
||||
exception.o \
|
||||
i8259.o \
|
||||
klib386.o \
|
||||
memory.o \
|
||||
mpx386.o \
|
||||
protect.o \
|
||||
system.o \
|
||||
apic.o \
|
||||
apic_asm.o \
|
||||
watchdog.o
|
||||
|
||||
CPPFLAGS=-Iinclude
|
||||
CFLAGS=-Iinclude -Wall $(CPROFILE)
|
||||
|
||||
build: $(HEAD) $(ARCHAR)
|
||||
|
||||
$(ARCHAR): $(ARCHAR)($(OBJS))
|
||||
aal cr $@ $(OBJS)
|
||||
# ar cru $(.TARGET) $(.OODATE)
|
||||
|
||||
depend:
|
||||
mkdep "$(CC) -E $(CPPFLAGS)" *.c *.S > .depend
|
||||
|
||||
clean:
|
||||
rm -f *.a *.o *~ *.tmp *.s
|
||||
|
||||
# How to build it
|
||||
klib386.o: klib386.S
|
||||
$(CC) $(CFLAGS) -E -D__ASSEMBLY__ -o $@.tmp $<
|
||||
gas2ack -u $@.tmp $@.s
|
||||
$(CC) $(CFLAGS) -c -o $@ $@.s
|
||||
|
||||
mpx386.o: mpx386.S
|
||||
$(CC) $(CFLAGS) -E -D__ASSEMBLY__ -o $@.tmp $<
|
||||
gas2ack -u $@.tmp $@.s
|
||||
$(CC) $(CFLAGS) -c -o $@ $@.s
|
||||
|
||||
apic_asm.o: apic_asm.S
|
||||
$(CC) $(CFLAGS) -E -D__ASSEMBLY__ -o $@.tmp $<
|
||||
gas2ack -u $@.tmp $@.s
|
||||
$(CC) $(CFLAGS) -c -o $@ $@.s
|
||||
|
||||
debugreg.o: debugreg.S
|
||||
$(CC) $(CFLAGS) -E -D__ASSEMBLY__ -o $@.tmp $<
|
||||
gas2ack -u $@.tmp $@.s
|
||||
$(CC) $(CFLAGS) -c -o $@ $@.s
|
||||
|
||||
$(HEAD): mpx386.o
|
||||
cp $< $@
|
||||
|
||||
21
kernel/arch/i386/Makefile.inc
Normal file
21
kernel/arch/i386/Makefile.inc
Normal file
@@ -0,0 +1,21 @@
|
||||
# Makefile for arch-dependent kernel code
|
||||
.include <minix.own.mk>
|
||||
|
||||
.PATH: ${.CURDIR}/arch/${ARCH}
|
||||
SRCS+= arch_do_vmctl.c \
|
||||
breakpoints.c \
|
||||
arch_clock.c \
|
||||
debugreg.S \
|
||||
do_int86.c \
|
||||
do_iopenable.c \
|
||||
do_readbios.c \
|
||||
do_sdevio.c \
|
||||
exception.c \
|
||||
i8259.c \
|
||||
klib.S \
|
||||
memory.c \
|
||||
protect.c \
|
||||
arch_system.c \
|
||||
apic.c \
|
||||
apic_asm.S \
|
||||
arch_watchdog.c
|
||||
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
* APIC handling routines. APIC is a requirement for SMP
|
||||
*/
|
||||
#include "../../kernel.h"
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <minix/portio.h>
|
||||
|
||||
#include <minix/syslib.h>
|
||||
|
||||
#include "../../proc.h"
|
||||
#include "../..//glo.h"
|
||||
#include "kernel/proc.h"
|
||||
#include "kernel/glo.h"
|
||||
#include "proto.h"
|
||||
|
||||
#include <minix/u64.h>
|
||||
|
||||
#include "apic.h"
|
||||
#include "apic_asm.h"
|
||||
#include "../../clock.h"
|
||||
#include "kernel/clock.h"
|
||||
#include "glo.h"
|
||||
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
#include "../../watchdog.h"
|
||||
#include "kernel/watchdog.h"
|
||||
#endif
|
||||
|
||||
#define IA32_APIC_BASE 0x1b
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include "../../kernel.h"
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
EXTERN int ioapic_enabled;
|
||||
EXTERN vir_bytes lapic_addr;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include "../../kernel.h"
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
_PROTOTYPE( void apic_hwint00, (void) );
|
||||
_PROTOTYPE( void apic_hwint01, (void) );
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#include <machine/ports.h>
|
||||
#include <minix/portio.h>
|
||||
|
||||
#include "../../kernel.h"
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
#include "../../clock.h"
|
||||
#include "../../proc.h"
|
||||
#include "kernel/clock.h"
|
||||
#include "kernel/proc.h"
|
||||
#include <minix/u64.h>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* SVMCTL_VALUE to this value
|
||||
*/
|
||||
|
||||
#include "../../system.h"
|
||||
#include "kernel/system.h"
|
||||
#include <minix/type.h>
|
||||
|
||||
#include "proto.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* system dependent functions for use inside the whole kernel. */
|
||||
|
||||
#include "../../kernel.h"
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
#include "archconst.h"
|
||||
#include "proto.h"
|
||||
#include "../../proc.h"
|
||||
#include "../../debug.h"
|
||||
#include "kernel/proc.h"
|
||||
#include "kernel/debug.h"
|
||||
|
||||
#ifdef CONFIG_APIC
|
||||
#include "apic.h"
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../../kernel.h"
|
||||
#include "../../watchdog.h"
|
||||
#include "kernel/kernel.h"
|
||||
#include "kernel/watchdog.h"
|
||||
#include "proto.h"
|
||||
#include <minix/minlib.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../../kernel.h"
|
||||
#include "kernel/kernel.h"
|
||||
#include "proto.h"
|
||||
|
||||
#include "debugreg.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* m1_p1: INT86_REG86
|
||||
*/
|
||||
|
||||
#include "../../system.h"
|
||||
#include "kernel/system.h"
|
||||
#include <minix/type.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <machine/int86.h>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
* Jorrit N. Herder <jnherder@cs.vu.nl>
|
||||
*/
|
||||
|
||||
#include "../../system.h"
|
||||
#include "../../kernel.h"
|
||||
#include "kernel/system.h"
|
||||
#include "kernel/kernel.h"
|
||||
#include <minix/endpoint.h>
|
||||
|
||||
#include "proto.h"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* m2_p1: RDB_BUF buffer address in requesting process
|
||||
*/
|
||||
|
||||
#include "../../system.h"
|
||||
#include "kernel/system.h"
|
||||
#include <minix/type.h>
|
||||
|
||||
/*===========================================================================*
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* m2_i1: DIO_OFFSET (offset into the grant)
|
||||
*/
|
||||
|
||||
#include "../../system.h"
|
||||
#include "kernel/system.h"
|
||||
#include <minix/devio.h>
|
||||
#include <minix/endpoint.h>
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* a panic.
|
||||
*/
|
||||
|
||||
#include "../../kernel.h"
|
||||
#include "kernel/kernel.h"
|
||||
#include "proto.h"
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "../../proc.h"
|
||||
#include "../../proto.h"
|
||||
#include "kernel/proc.h"
|
||||
#include "kernel/proto.h"
|
||||
|
||||
extern int catch_pagefaults;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* intr_init: initialize the interrupt controller(s)
|
||||
*/
|
||||
|
||||
#include "../../kernel.h"
|
||||
#include "../../proc.h"
|
||||
#include "kernel/kernel.h"
|
||||
#include "kernel/proc.h"
|
||||
#include "proto.h"
|
||||
#include <minix/portio.h>
|
||||
#include <machine/cpu.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __I386_WATCHDOG_H__
|
||||
#define __I386_WATCHDOG_H__
|
||||
|
||||
#include "../../kernel.h"
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
struct nmi_frame {
|
||||
reg_t eax;
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __HW_INTR_X86_H__
|
||||
#define __HW_INTR_X86_H__
|
||||
|
||||
#include "../..//kernel.h"
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
/* legacy PIC */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <minix/const.h>
|
||||
#include <machine/interrupt.h>
|
||||
#include "archconst.h"
|
||||
#include "../../const.h"
|
||||
#include "kernel/const.h"
|
||||
#include "sconst.h"
|
||||
|
||||
/*
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
|
||||
#include "../../kernel.h"
|
||||
#include "../../proc.h"
|
||||
#include "../../vm.h"
|
||||
#include "kernel/kernel.h"
|
||||
#include "kernel/proc.h"
|
||||
#include "kernel/vm.h"
|
||||
|
||||
#include <machine/vm.h>
|
||||
|
||||
@@ -16,14 +16,13 @@
|
||||
#include <machine/vm.h>
|
||||
|
||||
#include "proto.h"
|
||||
#include "../../proto.h"
|
||||
#include "../../proto.h"
|
||||
#include "../../debug.h"
|
||||
#include "kernel/proto.h"
|
||||
#include "kernel/debug.h"
|
||||
|
||||
#ifdef CONFIG_APIC
|
||||
#include "apic.h"
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
#include "../../watchdog.h"
|
||||
#include "kernel/watchdog.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
/*
|
||||
* This file, mpx386.s, is included by mpx.s when Minix is compiled for
|
||||
* 32-bit Intel CPUs. The alternative mpx88.s is compiled for 16-bit CPUs.
|
||||
*
|
||||
* This file is part of the lowest layer of the MINIX kernel. (The other part
|
||||
* is "proc.c".) The lowest layer does process switching and message handling.
|
||||
* Furthermore it contains the assembler startup code for Minix and the 32-bit
|
||||
@@ -42,7 +39,7 @@
|
||||
* and modified by the boot monitor before the kernel starts.
|
||||
*/
|
||||
|
||||
#include "../../kernel.h" /* configures the kernel */
|
||||
#include "kernel/kernel.h" /* configures the kernel */
|
||||
|
||||
/* sections */
|
||||
|
||||
@@ -69,8 +66,8 @@ begbss:
|
||||
#include <minix/com.h>
|
||||
#include <machine/interrupt.h>
|
||||
#include "archconst.h"
|
||||
#include "../../const.h"
|
||||
#include "../../proc.h"
|
||||
#include "kernel/const.h"
|
||||
#include "kernel/proc.h"
|
||||
#include "sconst.h"
|
||||
|
||||
/* Selected 386 tss offsets. */
|
||||
@@ -3,8 +3,8 @@
|
||||
* for local descriptors in the process table.
|
||||
*/
|
||||
|
||||
#include "../../kernel.h"
|
||||
#include "../../proc.h"
|
||||
#include "kernel/kernel.h"
|
||||
#include "kernel/proc.h"
|
||||
#include "archconst.h"
|
||||
|
||||
#include "proto.h"
|
||||
|
||||
@@ -174,6 +174,6 @@ _PROTOTYPE(void __user_copy_msg_pointer_failure, (void));
|
||||
_PROTOTYPE(int breakpoint_set, (phys_bytes linaddr, int index, int flags));
|
||||
|
||||
/* functions defined in architecture-independent kernel source. */
|
||||
#include "../../proto.h"
|
||||
#include "kernel/proto.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __SCONST_H__
|
||||
#define __SCONST_H__
|
||||
|
||||
#include "../../const.h"
|
||||
#include "kernel/const.h"
|
||||
|
||||
/* Miscellaneous constants used in assembler code. */
|
||||
W = _WORD_SIZE /* Machine word size. */
|
||||
|
||||
Reference in New Issue
Block a user