mirror of
https://github.com/drasko/codezero.git
synced 2026-03-20 19:11:52 +01:00
Moved kernel autogeneration function to a meaningful directory
Als updated parse options to save oldconfig file when -r option is used.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# -*- mode: python; coding: utf-8; -*-
|
# -*- mode: python; coding: utf-8; -*-
|
||||||
#
|
#
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import os, sys
|
import os, sys, shutil
|
||||||
|
|
||||||
PROJRELROOT = '../'
|
PROJRELROOT = '../'
|
||||||
|
|
||||||
@@ -45,6 +45,6 @@ def build_parse_options():
|
|||||||
if autogen_true:
|
if autogen_true:
|
||||||
generate_container_cml(options.arch, options.ncont)
|
generate_container_cml(options.arch, options.ncont)
|
||||||
if options.reset_old_config == 1 and os.path.exists(CML2_OLDCONFIG_FILE):
|
if options.reset_old_config == 1 and os.path.exists(CML2_OLDCONFIG_FILE):
|
||||||
print "Deleting %s" % CML2_OLDCONFIG_FILE
|
print "Moving %s to unused file %s" % (CML2_OLDCONFIG_FILE, CML2_OLDCONFIG_FILE + '.saved')
|
||||||
os.remove(CML2_OLDCONFIG_FILE)
|
shutil.move(CML2_OLDCONFIG_FILE, CML2_OLDCONFIG_FILE + '.saved')
|
||||||
|
|
||||||
|
|||||||
0
scripts/kernel/__init__.py
Normal file
0
scripts/kernel/__init__.py
Normal file
@@ -161,8 +161,10 @@ pager_ifdefs_todotext = \
|
|||||||
/*
|
/*
|
||||||
* TODO:
|
* TODO:
|
||||||
* This had to be defined this way because in CML2 there
|
* This had to be defined this way because in CML2 there
|
||||||
* is no straightforward way to derive symbols from expressions
|
* is no straightforward way to derive symbols from expressions, even
|
||||||
* (a ternary expression of (? : ) form complains for type deduction.
|
* it is stated in the manual that it can be done.
|
||||||
|
* As a workaround, a ternary expression of (? : ) was tried but this
|
||||||
|
* complains that type deduction could not be done.
|
||||||
*/'''
|
*/'''
|
||||||
|
|
||||||
pager_ifdefs = \
|
pager_ifdefs = \
|
||||||
@@ -186,6 +188,7 @@ def generate_pager_memory_ifdefs(containers):
|
|||||||
c.id, c.id, \
|
c.id, c.id, \
|
||||||
c.id, c.id, c.id)
|
c.id, c.id, c.id)
|
||||||
return pager_ifdef_string
|
return pager_ifdef_string
|
||||||
|
|
||||||
def generate_kernel_cinfo(containers, cinfo_path):
|
def generate_kernel_cinfo(containers, cinfo_path):
|
||||||
pager_ifdefs = generate_pager_memory_ifdefs(containers)
|
pager_ifdefs = generate_pager_memory_ifdefs(containers)
|
||||||
with open(cinfo_path, 'w+') as cinfo_file:
|
with open(cinfo_path, 'w+') as cinfo_file:
|
||||||
Reference in New Issue
Block a user