From f3885c4b23b0e13d7fe9ef4674a07e746acca320 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 19 Jul 2015 17:17:06 -0500 Subject: build bootloaders from code This adds the infrastructure for building from source the bootloaders which will go into the application initial program, in the boot sector. As a simple test case, it includes a simple bootloader which merely jumpts to the code address specified in the AIP, with the stack address specified there. --- boot/simple.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 boot/simple.c (limited to 'boot/simple.c') diff --git a/boot/simple.c b/boot/simple.c new file mode 100644 index 0000000..ca3e796 --- /dev/null +++ b/boot/simple.c @@ -0,0 +1,10 @@ +#include "bootloader.h" + +_Noreturn void bootloader(struct systemid *boot) +{ + if (!boot->load_addr) fail(); + + long *stack = (long*) (boot->stack_master ? boot->stack_master : 0x06002000); + jump((void*) boot->load_addr, stack); +} + -- cgit v1.2.3