aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--loader_stage1.c5
-rw-r--r--loader_stage2.c2
3 files changed, 2 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 2fbb0aa..7632283 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ loader_stage2_embeddable.o : loader_stage2.img
loader_stage1.o : loader_stage1.c
arm-none-eabi-gcc $(CFLAGS) -c $^ -o $@
-loader.elf : boot.o loader_stage1.o uart.o loader_stage2_embeddable.o
+loader.elf : boot.o loader_stage1.o loader_stage2_embeddable.o
arm-none-eabi-gcc -T loader_stage1.ld -o $@ -ffreestanding -O2 -nostdlib $^ -lgcc
loader.img : loader.elf
diff --git a/loader_stage1.c b/loader_stage1.c
index 9492747..d209c15 100644
--- a/loader_stage1.c
+++ b/loader_stage1.c
@@ -1,6 +1,5 @@
#include <stddef.h>
#include <stdint.h>
-#include <uart.h>
#include <global.h>
char *const stage2_addr = ((void*) 0x4000);
@@ -15,10 +14,6 @@ extern char
void kernel_main(uint32_t r0, uint32_t r1, uint32_t atags)
{
- // uart_init() call to be moved to stage2...
- uart_init();
- uart_puts("Hello, bootloader World!\r\n");
-
// stage2 of the bootloader is a blob embedded in executable;
// copy it over to it's destination place
// TODO implement a memcpy() somewhere and use it instead of loops
diff --git a/loader_stage2.c b/loader_stage2.c
index 98ce571..e221dda 100644
--- a/loader_stage2.c
+++ b/loader_stage2.c
@@ -13,7 +13,7 @@ stage2(uint32_t r0, uint32_t r1, uint32_t atags)
(void) r1;
(void) atags;
- uart_puts("hello stage2!\n\r");
+ uart_init();
// get kernel size via uart (little endian)
uint32_t b0, b1, b2, b3;