[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

23
init/Makefile Normal file
View File

@@ -0,0 +1,23 @@
ifeq ($(MITTOS64),)
$(error Build environment is not activated. Please source activate)
endif
installdir := $(SYSROOT)/boot
CFLAGS ?= -Wall -Wextra -ggdb -O0
all: init
$(installdir)/init: init
mkdir -p $(dir $@)
cp $< $@
install: $(installdir)/init
clean:
rm -rf init
.PHONY: all clean install

8
init/init.c Normal file
View File

@@ -0,0 +1,8 @@
int main(int argc, char **argv)
{
(void) argc;
(void) argv;
int i=0;
for(;;)i++;
return 0;
}