OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [build.py] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
#! /usr/bin/env python2.6
2
# -*- mode: python; coding: utf-8; -*-
3
#
4
# Top-level build script for Codezero
5
#
6
# Configures the Codezero environment, builds the kernel and userspace
7
# libraries, builds and packs all containers and builds the final loader
8
# image that contains all images.
9
#
10
import os, sys, shelve, shutil
11
from os.path import join
12
from config.projpaths import *
13
from config.configuration import *
14
from config.config_check import *
15
from scripts.qemu import qemu_cmdline
16
from scripts.conts import containers
17
from configure import *
18
 
19
def main():
20
    opts, args = build_parse_options()
21
    #
22
    # Configure
23
    #
24
    configure_system(opts, args)
25
 
26
    #
27
    # Check for sanity of containers
28
    #
29
    sanity_check_conts()
30
 
31
    #
32
    # Build userspace libraries
33
    #
34
    print "\nBuilding userspace libraries..."
35
    ret = os.system('scons -f SConstruct.userlibs')
36
    if(ret):
37
        print "Build failed \n"
38
        sys.exit(1)
39
 
40
    #
41
    # Build containers
42
    #
43
    print "\nBuilding containers..."
44
    containers.build_all_containers()
45
 
46
    #
47
    # Generate cinfo
48
    #
49
    generate_cinfo()
50
 
51
    #
52
    # Build the kernel
53
    #
54
    print "\nBuilding the kernel..."
55
    os.chdir(PROJROOT)
56
    ret = os.system("scons")
57
    if(ret):
58
        print "Build failed \n"
59
        sys.exit(1)
60
 
61
    #
62
    # Build libs and loader
63
    #
64
    os.chdir(PROJROOT)
65
    print "\nBuilding the loader and packing..."
66
    ret = os.system("scons -f SConstruct.loader")
67
    if(ret):
68
        print "Build failed \n"
69
        sys.exit(1)
70
 
71
    #
72
    # Build qemu-insight-script
73
    #
74
    print "\nBuilding qemu-insight-script.."
75
    qemu_cmdline.build_qemu_cmdline_script()
76
    #build_qemu_cmdline_script()
77
 
78
    print "\nBuild complete."
79
 
80
    print "\nRun qemu with following command: ./tools/run-qemu-insight\n"
81
 
82
if __name__ == "__main__":
83
    main()

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.