mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 10:46:25 +00:00
parent
54ef87c979
commit
f9269f5cb1
@ -4,51 +4,22 @@
|
||||
# \date 2011-08-05
|
||||
#
|
||||
|
||||
VERBOSE ?= @
|
||||
ECHO = @echo
|
||||
GIT_URL = https://github.com/nfeske/codezero.git
|
||||
GIT_REV = 6fa4884a5a1cf6207372f69ae01e5faa6d5a39c8
|
||||
CONTRIB_DIR = contrib
|
||||
PATCHES = $(shell find patches -name *.patch)
|
||||
|
||||
#
|
||||
# Utility to check if a tool is installed
|
||||
#
|
||||
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
|
||||
|
||||
$(call check_tool,git)
|
||||
$(call check_tool,patch)
|
||||
$(call check_tool,python2.6)
|
||||
$(call check_tool,scons)
|
||||
VERBOSE ?= @
|
||||
ECHO := @echo
|
||||
|
||||
#
|
||||
# Print help information by default
|
||||
#
|
||||
help::
|
||||
|
||||
prepare: $(CONTRIB_DIR)
|
||||
prepare:
|
||||
$(VERBOSE)../../tool/ports/prepare_port codezero
|
||||
|
||||
help::
|
||||
$(ECHO)
|
||||
$(ECHO) "Check out upstream source code of the Codezero kernel"
|
||||
$(ECHO)
|
||||
$(ECHO) "The source code will be located at the '$(CONTRIB_DIR)/' directory."
|
||||
$(ECHO) "Prepare the codezero base repository"
|
||||
$(ECHO)
|
||||
$(ECHO) "--- available commands ---"
|
||||
$(ECHO) "prepare - checkout upstream source codes"
|
||||
$(ECHO) "clean - remove upstream source codes"
|
||||
$(ECHO)
|
||||
|
||||
$(CONTRIB_DIR)/.git:
|
||||
$(VERBOSE)git clone $(GIT_URL) $(CONTRIB_DIR)
|
||||
|
||||
$(CONTRIB_DIR): $(CONTRIB_DIR)/.git
|
||||
$(VERBOSE)cd $(CONTRIB_DIR); git reset --hard $(GIT_REV)
|
||||
$(ECHO) "applying patches to '$(CONTRIB_DIR)/'"
|
||||
$(VERBOSE)for i in $(PATCHES); do patch -d $@ -p1 < $$i; done
|
||||
|
||||
.PHONY: $(CONTRIB_DIR)
|
||||
|
||||
clean::
|
||||
$(VERBOSE)rm -rf $(CONTRIB_DIR)
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
CODEZERO_DIR := $(call select_from_ports,codezero)/src/kernel/codezero
|
||||
|
||||
LIBL4_DIR = $(CODEZERO_DIR)/conts/userlibs/libl4
|
||||
|
||||
INC_DIR += $(CODEZERO_DIR)/conts/userlibs/libc/include
|
||||
|
@ -1,3 +1,5 @@
|
||||
CODEZERO_DIR := $(call select_from_ports,codezero)/src/kernel/codezero
|
||||
|
||||
LIBL4_DIR = $(CODEZERO_DIR)/conts/userlibs/libl4
|
||||
|
||||
SRC_C += init.c irq.c mutex.c
|
||||
|
@ -2,17 +2,7 @@
|
||||
# Specifics for the Codezero kernel API
|
||||
#
|
||||
|
||||
#
|
||||
# Read default and builddir-specific config files
|
||||
#
|
||||
# In these config files, we expect to find the definition of CODEZERO_DIR
|
||||
#
|
||||
-include $(call select_from_repositories,etc/codezero.conf)
|
||||
-include $(BUILD_BASE_DIR)/etc/codezero.conf
|
||||
|
||||
ifeq ($(CODEZERO_DIR),)
|
||||
$(error Could not find the definition of CODEZERO_DIR in etc/codezero.conf)
|
||||
endif
|
||||
CODEZERO_DIR := $(call select_from_ports,codezero)/src/kernel/codezero
|
||||
|
||||
#
|
||||
# Convert path to absolute directory
|
||||
@ -28,11 +18,9 @@ INC_DIR += $(BUILD_BASE_DIR)/include
|
||||
#
|
||||
# Codezero headers
|
||||
#
|
||||
CODEZERO_ABS_DIR = $(call absdir,$(CODEZERO_DIR))
|
||||
|
||||
INC_DIR += $(CODEZERO_ABS_DIR)/include
|
||||
INC_DIR += $(CODEZERO_ABS_DIR)/conts/userlibs/libl4/include
|
||||
INC_DIR += $(CODEZERO_ABS_DIR)/conts/userlibs/libdev/uart/include
|
||||
INC_DIR += $(CODEZERO_DIR)/include
|
||||
INC_DIR += $(CODEZERO_DIR)/conts/userlibs/libl4/include
|
||||
INC_DIR += $(CODEZERO_DIR)/conts/userlibs/libdev/uart/include
|
||||
|
||||
#
|
||||
# Allow programs to test for the Codezero kernel
|
||||
|
@ -1,7 +1,5 @@
|
||||
diff --git a/src/arch/arm/vectors.S b/src/arch/arm/vectors.S
|
||||
index 0475389..62f3c38 100644
|
||||
--- a/src/arch/arm/vectors.S
|
||||
+++ b/src/arch/arm/vectors.S
|
||||
--- src/kernel/codezero/src/arch/arm/vectors.S
|
||||
+++ src/kernel/codezero/src/arch/arm/vectors.S
|
||||
@@ -503,7 +503,7 @@ BEGIN_PROC(arm_irq_exception_basic)
|
||||
mov lr, pc
|
||||
ldr pc, =do_irq
|
||||
@ -11,20 +9,16 @@ index 0475389..62f3c38 100644
|
||||
|
||||
/* Minimal IRQ state saved on irq stack right after irq vector enters: */
|
||||
#define IRQ_R0 0
|
||||
diff --git a/conts/userlibs/libc/src/arch-arm/memcpy.S b/conts/userlibs/libc/src/arch-arm/memcpy.S
|
||||
index 383f5d2..b4df27f 100644
|
||||
--- a/conts/userlibs/libc/src/arch-arm/memcpy.S
|
||||
+++ b/conts/userlibs/libc/src/arch-arm/memcpy.S
|
||||
--- src/kernel/codezero/conts/userlibs/libc/src/arch-arm/memcpy.S
|
||||
+++ src/kernel/codezero/conts/userlibs/libc/src/arch-arm/memcpy.S
|
||||
@@ -57,4 +57,4 @@ BEGIN_PROC(memcpy)
|
||||
bne last
|
||||
1:
|
||||
pop {r0, r4 - r11, pc}
|
||||
-END_PROC(_memcpy)
|
||||
+END_PROC(memcpy)
|
||||
diff --git a/conts/userlibs/libc/src/arch-arm/memset.S b/conts/userlibs/libc/src/arch-arm/memset.S
|
||||
index ce9b06c..3746955 100644
|
||||
--- a/conts/userlibs/libc/src/arch-arm/memset.S
|
||||
+++ b/conts/userlibs/libc/src/arch-arm/memset.S
|
||||
--- src/kernel/codezero/conts/userlibs/libc/src/arch-arm/memset.S
|
||||
+++ src/kernel/codezero/conts/userlibs/libc/src/arch-arm/memset.S
|
||||
@@ -65,4 +65,4 @@ BEGIN_PROC(memset)
|
||||
bne end
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
diff --git a/src/api/map.c b/src/api/map.c
|
||||
index 1d15086..6139b4c 100644
|
||||
--- a/src/api/map.c
|
||||
+++ b/src/api/map.c
|
||||
--- src/kernel/codezero/src/api/map.c
|
||||
+++ src/kernel/codezero/src/api/map.c
|
||||
@@ -78,6 +78,6 @@ int sys_unmap(unsigned long virtual, unsigned long npages, unsigned int tid)
|
||||
retval = ret;
|
||||
}
|
||||
@ -10,10 +8,8 @@ index 1d15086..6139b4c 100644
|
||||
+ return retval;
|
||||
}
|
||||
|
||||
diff --git a/src/api/thread.c b/src/api/thread.c
|
||||
index 985c425..579e4fb 100644
|
||||
--- a/src/api/thread.c
|
||||
+++ b/src/api/thread.c
|
||||
--- src/kernel/codezero/src/api/thread.c
|
||||
+++ src/kernel/codezero/src/api/thread.c
|
||||
@@ -497,7 +497,7 @@ out_err:
|
||||
*/
|
||||
int sys_thread_control(unsigned int flags, struct task_ids *ids)
|
||||
@ -32,10 +28,8 @@ index 985c425..579e4fb 100644
|
||||
/*
|
||||
* Caller may operate on a thread if it shares
|
||||
* the same address space with that thread's pager
|
||||
diff --git a/src/arch/arm/mapping-common.c b/src/arch/arm/mapping-common.c
|
||||
index 385f7c2..55b4bea 100644
|
||||
--- a/src/arch/arm/mapping-common.c
|
||||
+++ b/src/arch/arm/mapping-common.c
|
||||
--- src/kernel/codezero/src/arch/arm/mapping-common.c
|
||||
+++ src/kernel/codezero/src/arch/arm/mapping-common.c
|
||||
@@ -313,12 +313,11 @@ int check_mapping(unsigned long vaddr, unsigned long size,
|
||||
int remove_mapping_space(struct address_space *space, unsigned long vaddr)
|
||||
{
|
||||
@ -50,10 +44,8 @@ index 385f7c2..55b4bea 100644
|
||||
pmd_i = PMD_INDEX(vaddr);
|
||||
|
||||
/*
|
||||
diff --git a/src/glue/arm/init.c b/src/glue/arm/init.c
|
||||
index 2373c66..43c6fda 100644
|
||||
--- a/src/glue/arm/init.c
|
||||
+++ b/src/glue/arm/init.c
|
||||
--- src/kernel/codezero/src/glue/arm/init.c
|
||||
+++ src/kernel/codezero/src/glue/arm/init.c
|
||||
@@ -68,8 +68,6 @@ void print_sections(void)
|
||||
/* The kip is non-standard, using 0xBB to indicate mine for now ;-) */
|
||||
void kip_init()
|
||||
@ -73,10 +65,8 @@ index 2373c66..43c6fda 100644
|
||||
add_boot_mapping(virt_to_phys(&kip), USER_KIP_PAGE, PAGE_SIZE,
|
||||
MAP_USR_RO);
|
||||
printk("%s: Kernel built on %s, %s\n", __KERNELNAME__,
|
||||
diff --git a/loader/libs/elf/src/elf.c b/loader/libs/elf/src/elf.c
|
||||
index 4a1b5e0..f97273b 100644
|
||||
--- a/loader/libs/elf/src/elf.c
|
||||
+++ b/loader/libs/elf/src/elf.c
|
||||
--- src/kernel/codezero/loader/libs/elf/src/elf.c
|
||||
+++ src/kernel/codezero/loader/libs/elf/src/elf.c
|
||||
@@ -339,16 +339,12 @@ elf_loadFile(void *elfFile, bool phys)
|
||||
{
|
||||
int i;
|
||||
@ -103,10 +93,8 @@ index 4a1b5e0..f97273b 100644
|
||||
// Comment
|
||||
printf("Copying to range from 0x%x to 0x%x of size: 0x%x\n", (unsigned int)dest, (unsigned int)dest + (unsigned int)len, (unsigned int)len);
|
||||
memcpy((void*) (uintptr_t) dest, (void*) (uintptr_t) src, len);
|
||||
diff --git a/loader/libs/elf/src/elf32.c b/loader/libs/elf/src/elf32.c
|
||||
index 2d13798..78bbf33 100644
|
||||
--- a/loader/libs/elf/src/elf32.c
|
||||
+++ b/loader/libs/elf/src/elf32.c
|
||||
--- src/kernel/codezero/loader/libs/elf/src/elf32.c
|
||||
+++ src/kernel/codezero/loader/libs/elf/src/elf32.c
|
||||
@@ -248,7 +248,6 @@ elf32_fprintf(FILE *f, struct Elf32_Header *file, int size, const char *name, in
|
||||
struct Elf32_Shdr *sections;
|
||||
unsigned numSections;
|
||||
@ -123,10 +111,8 @@ index 2d13798..78bbf33 100644
|
||||
|
||||
printf("Section Headers:\n");
|
||||
printf(" [Nr] Name Type Addr Off\n");
|
||||
diff --git a/src/generic/capability.c b/src/generic/capability.c
|
||||
index 0860ea5..ef44445 100644
|
||||
--- a/src/generic/capability.c
|
||||
+++ b/src/generic/capability.c
|
||||
--- src/kernel/codezero/src/generic/capability.c
|
||||
+++ src/kernel/codezero/src/generic/capability.c
|
||||
@@ -403,7 +403,7 @@ struct capability *cap_match_mem(struct capability *cap,
|
||||
{
|
||||
struct sys_map_args *args = args_ptr;
|
||||
@ -144,10 +130,8 @@ index 0860ea5..ef44445 100644
|
||||
pfn_point = pfn;
|
||||
if (start > pfn_point || cap->end < pfn_point + args->npages)
|
||||
return 0;
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index 7d21a4c..8d7d6db 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
--- src/kernel/codezero/loader/main.c
|
||||
+++ src/kernel/codezero/loader/main.c
|
||||
@@ -26,7 +26,6 @@ int load_elf_image(unsigned long **entry, void *filebuf);
|
||||
int load_container_image(void *cont_section)
|
||||
{
|
||||
|
@ -1,7 +1,5 @@
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index 7d21a4c..ee03918 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
--- src/kernel/codezero/loader/main.c
|
||||
+++ src/kernel/codezero/loader/main.c
|
||||
@@ -135,3 +135,5 @@ int main(void)
|
||||
return -1;
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
diff --git a/conts/userlibs/SConstruct b/conts/userlibs/SConstruct
|
||||
index 41c7913..421b563 100644
|
||||
--- a/conts/userlibs/SConstruct
|
||||
+++ b/conts/userlibs/SConstruct
|
||||
--- src/kernel/codezero/conts/userlibs/SConstruct
|
||||
+++ src/kernel/codezero/conts/userlibs/SConstruct
|
||||
@@ -11,6 +11,7 @@ PROJRELROOT = '../..'
|
||||
sys.path.append(PROJRELROOT)
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
diff --git a/src/drivers/SConscript b/src/drivers/SConscript
|
||||
index eedb59f..8f5cd5d 100644
|
||||
--- a/src/drivers/SConscript
|
||||
+++ b/src/drivers/SConscript
|
||||
--- src/kernel/codezero/src/drivers/SConscript
|
||||
+++ src/kernel/codezero/src/drivers/SConscript
|
||||
@@ -8,24 +8,24 @@ src_local = []
|
||||
objs = []
|
||||
|
||||
@ -34,10 +32,8 @@ index eedb59f..8f5cd5d 100644
|
||||
+ duplicate=0, variant_dir = join(bdir, 'omap/timer'))
|
||||
|
||||
Return('objs')
|
||||
diff --git a/conts/baremetal/empty/SConstruct b/conts/baremetal/empty/SConstruct
|
||||
index b70d69a..4889d8e 100644
|
||||
--- a/conts/baremetal/empty/SConstruct
|
||||
+++ b/conts/baremetal/empty/SConstruct
|
||||
--- src/kernel/codezero/conts/baremetal/empty/SConstruct
|
||||
+++ src/kernel/codezero/conts/baremetal/empty/SConstruct
|
||||
@@ -48,7 +48,7 @@ env = Environment(CC = config.toolchain_userspace + 'gcc',
|
||||
CPPFLAGS = '-include l4/config.h -include l4/macros.h -include l4/types.h')
|
||||
|
||||
@ -47,10 +43,8 @@ index b70d69a..4889d8e 100644
|
||||
|
||||
Depends(objs, join(PROJROOT, CONFIG_H))
|
||||
prog = env.Program(join(builddir, 'main.elf'), objs)
|
||||
diff --git a/SConstruct b/SConstruct
|
||||
index 2abc190..58c983d 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
--- src/kernel/codezero/SConstruct
|
||||
+++ src/kernel/codezero/SConstruct
|
||||
@@ -71,35 +71,35 @@ env = Environment(CC = config.toolchain_kernel + 'gcc',
|
||||
objects = []
|
||||
objects += SConscript('src/generic/SConscript',
|
||||
|
@ -1,7 +1,5 @@
|
||||
diff --git a/include/l4/generic/tcb.h b/include/l4/generic/tcb.h
|
||||
index 7b315b8..ace38d8 100644
|
||||
--- a/include/l4/generic/tcb.h
|
||||
+++ b/include/l4/generic/tcb.h
|
||||
--- src/kernel/codezero/include/l4/generic/tcb.h
|
||||
+++ src/kernel/codezero/include/l4/generic/tcb.h
|
||||
@@ -70,7 +70,7 @@ struct task_ids {
|
||||
|
||||
struct container;
|
||||
|
1
repos/base-codezero/ports/codezero.hash
Normal file
1
repos/base-codezero/ports/codezero.hash
Normal file
@ -0,0 +1 @@
|
||||
fb29b6a49c1e6ee759e034da8a59cf66b7ed74ef
|
9
repos/base-codezero/ports/codezero.port
Normal file
9
repos/base-codezero/ports/codezero.port
Normal file
@ -0,0 +1,9 @@
|
||||
LICENSE := GPLv3
|
||||
VERSION := git
|
||||
DOWNLOADS := codezero.git
|
||||
|
||||
URL(codezero) := https://github.com/nfeske/codezero.git
|
||||
REV(codezero) := 6fa4884a5a1cf6207372f69ae01e5faa6d5a39c8
|
||||
DIR(codezero) := src/kernel/codezero
|
||||
|
||||
PATCHES := $(wildcard $(REP_DIR)/patches/*.patch)
|
@ -1,9 +1,6 @@
|
||||
TARGET = codezero
|
||||
|
||||
-include $(BUILD_BASE_DIR)/etc/codezero.conf
|
||||
ifeq ($(wildcard $(CODEZERO_DIR)),)
|
||||
$(error No valid kernel configured in 'etc/codezero.conf')
|
||||
endif
|
||||
CODEZERO_DIR := $(call select_from_ports,codezero)/src/kernel/codezero
|
||||
|
||||
include $(REP_DIR)/lib/mk/codezero_cml.inc
|
||||
|
||||
|
@ -206,9 +206,6 @@ foc_imx53::
|
||||
foc_arndale::
|
||||
@echo "SPECS = genode foc_arndale" > $(BUILD_DIR)/etc/specs.conf
|
||||
|
||||
codezero_vpb926::
|
||||
@echo "CODEZERO_DIR = $(GENODE_DIR)/repos/base-codezero/contrib" > $(BUILD_DIR)/etc/codezero.conf
|
||||
|
||||
#
|
||||
# On all other platforms, the performance counter is assumed to be active by
|
||||
# default. On HW, its activation is done by an optional core lib. To be
|
||||
|
Loading…
Reference in New Issue
Block a user