mirror of
https://github.com/drasko/codezero.git
synced 2026-02-27 01:03:14 +01:00
Independent compilation of libl4 and libmem working fine.
This commit is contained in:
@@ -54,8 +54,6 @@ def create_symlinks(arch):
|
|||||||
print cmd
|
print cmd
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
# TODO: There are errors in this code that -Werror gives problems with.
|
|
||||||
|
|
||||||
#create_symlinks(arch)
|
#create_symlinks(arch)
|
||||||
objects = env.StaticObject(Glob('src/*.c') + Glob('src/' + arch + '/*.[cS]'))
|
objects = env.StaticObject(Glob('src/*.c') + Glob('src/' + arch + '/*.[cS]'))
|
||||||
library = env.StaticLibrary('l4', objects)
|
library = env.StaticLibrary('l4', objects)
|
||||||
|
|||||||
@@ -16,13 +16,17 @@ from config.configuration import *
|
|||||||
config = configuration_retrieve()
|
config = configuration_retrieve()
|
||||||
arch = config.arch
|
arch = config.arch
|
||||||
|
|
||||||
|
LIBMEM_RELDIR = 'conts/libmem'
|
||||||
|
LIBMEM_DIR = join(PROJROOT, LIBMEM_RELDIR)
|
||||||
|
|
||||||
env = Environment(CC = config.user_toolchain + 'gcc',
|
env = Environment(CC = config.user_toolchain + 'gcc',
|
||||||
CCFLAGS = ['-std=gnu99', '-g', '-nostdlib', '-ffreestanding'],
|
CCFLAGS = ['-std=gnu99', '-g', '-nostdlib', '-ffreestanding', '-Werror'],
|
||||||
LINKFLAGS = ['-nostdlib'],
|
LINKFLAGS = ['-nostdlib'],
|
||||||
ASFLAGS = ['-D__ASSEMBLY__'],
|
ASFLAGS = ['-D__ASSEMBLY__'],
|
||||||
ENV = {'PATH' : os.environ['PATH']},
|
ENV = {'PATH' : os.environ['PATH']},
|
||||||
LIBS = 'gcc',
|
LIBS = 'gcc',
|
||||||
CPPPATH = ['#include', '#include/l4lib/arch', join(PROJROOT,'include')])
|
CPPPATH = ['#include', '#include/l4lib/arch', join(PROJROOT,'include'), \
|
||||||
|
LIBMEM_DIR])
|
||||||
|
|
||||||
# TODO: There are errors in this code that -Werror gives problems with.
|
# TODO: There are errors in this code that -Werror gives problems with.
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ extern unsigned long lib_utcb_range_size;
|
|||||||
/* Static variable definitions */
|
/* Static variable definitions */
|
||||||
struct l4_mutex lib_mutex;
|
struct l4_mutex lib_mutex;
|
||||||
|
|
||||||
|
extern void global_add_task(struct l4lib_tcb *task);
|
||||||
|
|
||||||
/* Function definitions */
|
/* Function definitions */
|
||||||
int l4_thread_create(struct task_ids *ids, unsigned int flags,
|
int l4_thread_create(struct task_ids *ids, unsigned int flags,
|
||||||
int (*func)(void *), void *arg)
|
int (*func)(void *), void *arg)
|
||||||
|
|||||||
@@ -2,23 +2,19 @@
|
|||||||
# Copyright (C) 2007 Bahadir Balban
|
# Copyright (C) 2007 Bahadir Balban
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
import os, glob, sys
|
||||||
import glob
|
|
||||||
import sys
|
|
||||||
from os.path import join
|
from os.path import join
|
||||||
from string import split
|
from string import split
|
||||||
from configure import *
|
|
||||||
|
|
||||||
|
PROJRELROOT = '../..'
|
||||||
|
sys.path.append(PROJRELROOT)
|
||||||
|
|
||||||
|
from configure import *
|
||||||
config = configuration_retrieve()
|
config = configuration_retrieve()
|
||||||
|
|
||||||
project_root = "../.."
|
headers_root = join(PROJRELROOT, "include/l4")
|
||||||
headers_root = join(project_root, "include/l4")
|
|
||||||
config_h = join(headers_root, "config.h")
|
config_h = join(headers_root, "config.h")
|
||||||
|
|
||||||
#libl4 paths
|
|
||||||
libl4_headers = join(project_root, "tasks/libl4/include")
|
|
||||||
libl4_libpath = join(project_root, "tasks/libl4")
|
|
||||||
|
|
||||||
mm = "mm"
|
mm = "mm"
|
||||||
kmalloc = "kmalloc"
|
kmalloc = "kmalloc"
|
||||||
memcache = "memcache"
|
memcache = "memcache"
|
||||||
@@ -29,19 +25,24 @@ kmalloc_dir = kmalloc
|
|||||||
memcache_dir = memcache
|
memcache_dir = memcache
|
||||||
tests_dir = tests
|
tests_dir = tests
|
||||||
|
|
||||||
|
LIBL4_RELDIR = 'conts/libl4'
|
||||||
|
LIBL4_DIR = join(PROJROOT, LIBL4_RELDIR)
|
||||||
|
LIBL4_INCLUDE = join(LIBL4_DIR, 'include')
|
||||||
|
LIBL4_LIBPATH = join(BUILDDIR, LIBL4_RELDIR)
|
||||||
|
|
||||||
test_env = Environment(CC = 'gcc -m32',
|
test_env = Environment(CC = 'gcc -m32',
|
||||||
CCFLAGS = ['-g', '-std=gnu99', '-Wall', '-Werror'],
|
CCFLAGS = ['-g', '-std=gnu99', '-Wall', '-Werror'],
|
||||||
ENV = {'PATH' : os.environ['PATH']},
|
ENV = {'PATH' : os.environ['PATH']},
|
||||||
LIBS = ['gcc', 'mm', 'km', 'mc'],
|
LIBS = ['gcc', 'mm', 'km', 'mc'],
|
||||||
LIBPATH = ['#'],
|
LIBPATH = ['#'],
|
||||||
CPPPATH = ['#include', join(project_root, "include"), "#", libl4_headers])
|
CPPPATH = ['#include', join(PROJRELROOT, "include"), "#", LIBL4_INCLUDE])
|
||||||
|
|
||||||
env = Environment(CC = config.user_toolchain + 'gcc',
|
env = Environment(CC = config.user_toolchain + 'gcc',
|
||||||
CCFLAGS = ['-g', '-nostdlib', '-Wall', '-Werror', '-ffreestanding', '-std=gnu99'],
|
CCFLAGS = ['-g', '-nostdlib', '-Wall', '-Werror', '-ffreestanding', '-std=gnu99'],
|
||||||
LINKFLAGS = ['-nostdlib'],
|
LINKFLAGS = ['-nostdlib'],
|
||||||
ENV = {'PATH' : os.environ['PATH']},
|
ENV = {'PATH' : os.environ['PATH']},
|
||||||
LIBS = 'gcc',
|
LIBS = 'gcc',
|
||||||
CPPPATH = [join(project_root, "include"), "#", libl4_headers])
|
CPPPATH = [join(PROJRELROOT, "include"), "#", LIBL4_INCLUDE])
|
||||||
|
|
||||||
if os.path.exists(config_h) is False:
|
if os.path.exists(config_h) is False:
|
||||||
print "\nThis build requires a valid kernel configuration header."
|
print "\nThis build requires a valid kernel configuration header."
|
||||||
|
|||||||
Reference in New Issue
Block a user