[USER] Load and run ELF module in userspace

This commit is contained in:
2016-11-29 09:16:04 +01:00
parent aa50bbcd0f
commit 63b3c3f2c0
11 changed files with 163 additions and 21 deletions

View File

@@ -4,14 +4,14 @@ ifeq ($(MITTOS64),)
$(error Build environment is not activated. Please source activate)
endif
.PHONY: all clean kernel libc
.PHONY: all clean kernel libc init
SHELL := bash
CC=$(TARGET)-gcc
FLAGS_TO_PASS:= \
CC=$(CC)
all: kernel libc
all: kernel libc init
# A trick to only build phony target if necessary
kernel:
@@ -26,6 +26,12 @@ ifeq ($(shell make -sqC libc || echo 1), 1)
$(MAKE) -C libc install $(FLAGS_TO_PASS)
endif
init:
ifeq ($(shell make -sqC init || echo 1), 1)
@(. util/helpers.sh; print_info "Building init")
$(MAKE) -C init install $(FLAGS_TO_PASS)
endif
tags:
ctags -R kernel
@@ -34,5 +40,6 @@ clean:
$(MAKE) -C kernel clean
rm -f mittos64.iso
$(MAKE) -C libc clean
$(MAKE) -C init clean
rm -f qemu-error.log
rm -f serial.log