mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
# -*- mode: python; coding: utf-8; -*-
|
|
#
|
|
# Codezero -- a microkernel for embedded systems.
|
|
#
|
|
# Copyright © 2009 B Labs Ltd
|
|
|
|
import os, sys, shelve
|
|
from os.path import join
|
|
|
|
Import('env')
|
|
|
|
###
|
|
### FIXME: We are missing the dependency on containers.elf
|
|
###
|
|
PROJRELROOT = '../../'
|
|
|
|
from config.projpaths import *
|
|
from scripts.loader.generate_loader_asm import *
|
|
|
|
def ksym_to_loader(target, source, env):
|
|
generate_ksym_to_loader(target[0].path, source[0].path)
|
|
|
|
def gen_loader_images_S(target, source, env):
|
|
generate_image_S(target[0].path, source)
|
|
|
|
loader_ksyms = Command(join(PROJROOT, 'loader/ksyms.S'), join(BUILDDIR, 'kernel.elf'), ksym_to_loader)
|
|
loader_image_S = Command(join(PROJROOT, 'loader/images.S'), [join(BUILDDIR, 'kernel.elf'), join(BUILDDIR, 'conts/containers.elf')], \
|
|
gen_loader_images_S)
|
|
|
|
src = Glob('*.[cS]')
|
|
objs = env.Object(src)
|
|
|
|
Depends(src, loader_ksyms)
|
|
Depends(src, loader_image_S)
|
|
Depends(objs, join(BUILDDIR, 'conts/containers.elf'))
|
|
Depends(objs, join(BUILDDIR, 'kernel.elf'))
|
|
Return('objs', 'loader_image_S')
|