aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--global.h1
-rw-r--r--kernel.c3
-rw-r--r--uart.h1
4 files changed, 2 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index b1b15c4..c296d1c 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ boot.o : boot.S
arm-none-eabi-as -mcpu=cortex-a7 $^ -o $@
kernel.elf : boot.o kernel.o uart.o
- arm-none-eabi-gcc -T linker.ld -o $@ -ffreestanding -O2 -nostdlib boot.o kernel.o uart.o -lgcc -I.
+ arm-none-eabi-gcc -T linker.ld -o $@ -ffreestanding -O2 -nostdlib $^ -lgcc -I.
kernel7.img : kernel.elf
arm-none-eabi-objcopy $^ -O binary $@
diff --git a/global.h b/global.h
index 6dd2e48..02fdedc 100644
--- a/global.h
+++ b/global.h
@@ -1,5 +1,6 @@
// board type, raspi2
#define RASPI 2
+
#if RASPI == 4
#define GPIO_BASE 0xFE200000
#else
diff --git a/kernel.c b/kernel.c
index 2fd5d71..9a9d989 100644
--- a/kernel.c
+++ b/kernel.c
@@ -1,7 +1,4 @@
-#include <stddef.h>
-#include <stdint.h>
#include <uart.h>
-#include <global.h>
void kernel_main(uint32_t r0, uint32_t r1, uint32_t atags)
{
diff --git a/uart.h b/uart.h
index 5872484..6430cb1 100644
--- a/uart.h
+++ b/uart.h
@@ -1,7 +1,6 @@
#include <stddef.h>
#include <stdint.h>
#include <global.h>
-// board type, raspi2
enum
{
// The offsets for reach register.