Expose the kernel driver definitions
This commit is contained in:
parent
24ba28ce24
commit
1b44719632
1
include/kernel/drivers/project.conf
Normal file
1
include/kernel/drivers/project.conf
Normal file
|
@ -0,0 +1 @@
|
|||
dist=Makefile,bus.h,clock.h,console.h,display.h,pic.h
|
|
@ -1 +1,2 @@
|
|||
subdirs=drivers
|
||||
dist=Makefile,intr.h,platform.h
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "bus.h"
|
||||
#include <kernel/drivers/bus.h>
|
||||
|
||||
|
||||
/* public */
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "kernel/intr.h"
|
||||
#include "drivers/bus/cmos.h"
|
||||
#include <kernel/intr.h>
|
||||
#include "cmos.h"
|
||||
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef UKERNEL_DRIVERS_BUS_CMOS_H
|
||||
# define UKERNEL_DRIVERS_BUS_CMOS_H
|
||||
|
||||
# include "drivers/bus.h"
|
||||
# include <kernel/drivers/bus.h>
|
||||
|
||||
|
||||
/* types */
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <kernel/drivers/bus.h>
|
||||
#include "arch/arch.h"
|
||||
#include "../bus.h"
|
||||
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
|
|
|
@ -26,10 +26,10 @@ sources=vga.c
|
|||
|
||||
#sources
|
||||
[cmos.c]
|
||||
depends=../bus.h,cmos.h
|
||||
depends=../../../include/kernel/drivers/bus.h,cmos.h
|
||||
|
||||
[ioport.c]
|
||||
depends=../bus.h
|
||||
depends=../../../include/kernel/drivers/bus.h
|
||||
|
||||
[tty.c]
|
||||
depends=../bus.h
|
||||
depends=../../../include/kernel/drivers/bus.h
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include "../bus.h"
|
||||
#include <kernel/drivers/bus.h>
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "kernel/intr.h"
|
||||
#include "drivers/bus.h"
|
||||
#include <kernel/intr.h>
|
||||
#include <kernel/drivers/bus.h>
|
||||
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "clock.h"
|
||||
#include <kernel/drivers/clock.h>
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "drivers/clock.h"
|
||||
#include "drivers/clock/cmos.h"
|
||||
#include <kernel/drivers/clock.h>
|
||||
#include "cmos.h"
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#include <stddef.h>
|
||||
#include "drivers/clock.h"
|
||||
#include <kernel/drivers/clock.h>
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "console.h"
|
||||
#include <kernel/drivers/console.h>
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#include <string.h>
|
||||
#include "drivers/console.h"
|
||||
#include <kernel/drivers/console.h>
|
||||
#include "stdio.h"
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include "drivers/console.h"
|
||||
#include <kernel/drivers/console.h>
|
||||
#include "uart.h"
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "display.h"
|
||||
#include <kernel/drivers/display.h>
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include "drivers/display.h"
|
||||
#include <kernel/drivers/display.h>
|
||||
#include "vesa.h"
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "drivers/display.h"
|
||||
#include <kernel/drivers/display.h>
|
||||
#include "vga.h"
|
||||
|
||||
/* macros */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "pic.h"
|
||||
#include <kernel/drivers/pic.h>
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "drivers/pic.h"
|
||||
#include "drivers/pic/i8259a.h"
|
||||
#include <kernel/drivers/pic.h>
|
||||
#include "i8259a.h"
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -6,7 +6,7 @@ asflags_force=$(CFLAGSF) $(CFLAGS) -c
|
|||
cflags_force=`../../tools/platform.sh -V UKERNEL_CFLAGS -C "$$ARCH"`
|
||||
cflags=-W -Wall -g -O2
|
||||
ldflags_force=`../../tools/platform.sh -V UKERNEL_LDFLAGS -C "$$ARCH"`
|
||||
dist=Makefile,bus.h,clock.h,console.h,display.h,pic.h
|
||||
dist=Makefile
|
||||
|
||||
#targets
|
||||
[bus.o]
|
||||
|
@ -31,16 +31,16 @@ sources=pic.c
|
|||
|
||||
#sources
|
||||
[bus.c]
|
||||
depends=bus.h,bus/ioport.c
|
||||
depends=../../include/kernel/drivers/bus.h,bus/ioport.c
|
||||
|
||||
[clock.c]
|
||||
depends=bus.h,clock.h
|
||||
depends=../../include/kernel/drivers/bus.h,../../include/kernel/drivers/clock.h
|
||||
|
||||
[console.c]
|
||||
depends=bus.h,console.h
|
||||
depends=../../include/kernel/drivers/bus.h,../../include/kernel/drivers/console.h
|
||||
|
||||
[display.c]
|
||||
depends=bus.h,display.h
|
||||
depends=../../include/kernel/drivers/bus.h,../../include/kernel/drivers/display.h
|
||||
|
||||
[pic.c]
|
||||
depends=bus.h,pic.h
|
||||
depends=../../include/kernel/drivers/bus.h,../../include/kernel/drivers/pic.h
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
# include <stdio.h>
|
||||
# include <kernel/drivers/bus.h>
|
||||
# include <kernel/drivers/clock.h>
|
||||
# include <kernel/drivers/console.h>
|
||||
# include <kernel/drivers/display.h>
|
||||
# include <kernel/drivers/pic.h>
|
||||
# include "arch/amd64/gdt.h"
|
||||
# include "arch/i386/gdt.h"
|
||||
# include "arch/i386/idt.h"
|
||||
# include "drivers/boot/multiboot.h"
|
||||
# include "drivers/bus.h"
|
||||
# include "drivers/clock.h"
|
||||
# include "drivers/console.h"
|
||||
# include "drivers/display.h"
|
||||
# include "drivers/pic.h"
|
||||
|
||||
# ifndef KERNEL_CONSOLE
|
||||
# define KERNEL_CONSOLE "uart"
|
||||
|
|
|
@ -102,7 +102,7 @@ $name $type $busname $args"
|
|||
echo "#include <stddef.h>"
|
||||
echo "$devices" | while read name type busname args; do
|
||||
[ -n "$name" ] || continue
|
||||
echo "#include \"drivers/${type}.h\""
|
||||
echo "#include <kernel/drivers/${type}.h>"
|
||||
done
|
||||
|
||||
#begin the function
|
||||
|
|
|
@ -16,7 +16,7 @@ depends=../../include/ctype.h
|
|||
depends=../../include/errno.h
|
||||
|
||||
[ssp.c]
|
||||
depends=../../include/stdlib.h,../drivers/console.h,ssp.h
|
||||
depends=../../include/stdlib.h,../../include/kernel/drivers/console.h,ssp.h
|
||||
|
||||
[stdio.c]
|
||||
depends=../../include/stdio.h,../../include/string.h
|
||||
|
@ -31,4 +31,4 @@ depends=../../include/string.h
|
|||
depends=../../include/sys/mman.h
|
||||
|
||||
[time.c]
|
||||
depends=../../include/time.h,../drivers/clock.h
|
||||
depends=../../include/time.h,../../include/kernel/drivers/clock.h
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "drivers/console.h"
|
||||
#include <kernel/drivers/console.h>
|
||||
|
||||
|
||||
#if defined(__SSP__)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include "drivers/clock.h"
|
||||
#include <kernel/drivers/clock.h>
|
||||
|
||||
|
||||
/* functions */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include "drivers/console.h"
|
||||
#include <kernel/drivers/console.h>
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
# include <stdint.h>
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <kernel/drivers/bus.h>
|
||||
# include <kernel/drivers/console.h>
|
||||
# include <kernel/drivers/display.h>
|
||||
# include "arch/amd64/gdt.h"
|
||||
# include "arch/i386/gdt.h"
|
||||
# include "drivers/boot/multiboot.h"
|
||||
# include "drivers/bus.h"
|
||||
# include "drivers/console.h"
|
||||
# include "drivers/display.h"
|
||||
|
||||
# ifndef LOADER_CONSOLE
|
||||
# define LOADER_CONSOLE "uart"
|
||||
|
|
|
@ -75,7 +75,7 @@ depends=../drivers/display/vga.c
|
|||
depends=$(OBJDIR)../lib/libuKernel.a
|
||||
|
||||
[multiboot.c]
|
||||
depends=../drivers/boot/multiboot.h,../drivers/bus.h,../drivers/console.h
|
||||
depends=../drivers/boot/multiboot.h,../../include/kernel/drivers/bus.h,../../include/kernel/drivers/console.h
|
||||
|
||||
[start.S]
|
||||
depends=../arch/i386/intr.S,../arch/i386/loader.S
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "drivers/bus.h"
|
||||
|
||||
#include "drivers/bus/tty.c"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "drivers/clock.h"
|
||||
#include <kernel/drivers/clock.h>
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "drivers/console.h"
|
||||
#include <kernel/drivers/console.h>
|
||||
|
||||
|
||||
/* private */
|
||||
|
|
|
@ -45,7 +45,7 @@ depends=$(OBJDIR)crtbegin.o,$(OBJDIR)crtend.o,$(OBJDIR)start.o,$(OBJDIR)../src/l
|
|||
depends=../src/drivers/bus.c,../src/drivers/bus/tty.c
|
||||
|
||||
[console.c]
|
||||
depends=../src/drivers/console.h
|
||||
depends=../include/kernel/drivers/console.h
|
||||
|
||||
[crti.S]
|
||||
depends=../src/common/crti.S,../src/arch/amd64/crti.S,../src/arch/i386/crti.S
|
||||
|
|
Loading…
Reference in New Issue
Block a user