Asking user for type of toolchain to be used

This commit is contained in:
Amit Mahajan
2009-11-03 03:02:27 +05:30
parent 2b1adb059d
commit 03b2751377
3 changed files with 30 additions and 13 deletions

View File

@@ -29,6 +29,10 @@ main_menu 'Codezero Microkernel Configurator'
arm_menu 'ARM Architecture Configuration'
arm_cpu_menu 'ARM CPU type'
arm_platform_menu 'ARM Platform Type'
tools 'Tools to be used'
toolchains 'Toolchains to be used for compilation'
TOOLCHAIN_KERNEL 'Toolchain for kernel space compilation'
TOOLCHAIN_USER 'Toolchain for user space compilation'
containers_menu 'Container Setup'
arch_type 'Main architecture'
@@ -79,11 +83,19 @@ menu arm_menu
arm_cpu_menu
arm_platform_menu
menu tools
toolchains
menu toolchains
TOOLCHAIN_KERNEL$
TOOLCHAIN_USER$
menu main_menu
arch_type
arm_menu
CONTAINERS%
containers_menu
tools
#############`
# RULES #
@@ -116,6 +128,10 @@ derive DRIVER_TIMER_SP804 from SUBARCH_V5 or SUBARCH_V6 or SUBARCH_V7
derive DRIVER_IRQ_PL190 from SUBARCH_V5
derive DRIVER_IRQ_GIC from SUBARCH_V6 or SUBARCH_V7
# Toolchains:
default TOOLCHAIN_KERNEL from 'arm-none-eabi-'
default TOOLCHAIN_USER from 'arm-none-linux-gnueabi-'
prefix CONFIG_
# Checklist for correct CML2

View File

@@ -56,11 +56,6 @@ class configuration:
['PB11MPCORE', 'mpcore'],
['PB1136', 'arm1136jf-s'],
['PB1176', 'arm1176jz-s'],)
# Mapping between the processor architecture and toolchain
self.toolchain_kernel = (['ARM', 'arm-none-eabi-'],)
self.toolchain_user = (['ARM', 'arm-none-linux-gnueabi-'],)
self.arch = None
self.subarch = None
self.platform = None
@@ -85,17 +80,10 @@ class configuration:
return None
# Extract architecture from a name value pair
# And based on this define the toolchains to be used
def get_arch(self, name, val):
if name[:len("CONFIG_ARCH_")] == "CONFIG_ARCH_":
parts = name.split("_", 3)
self.arch = parts[2].lower()
for i in self.toolchain_kernel:
if i[0] == parts[2]:
self.kernel_toolchain = i[1]
for i in self.toolchain_user:
if i[0] == parts[2]:
self.user_toolchain = i[1]
# Extract subarch from a name value pair
def get_subarch(self, name, val):
@@ -118,6 +106,18 @@ class configuration:
parts = name.split("_", 3)
self.cpu = parts[2].lower()
# Extract kernel space toolchain from a name value pair
def get_toolchain_kernel(self, name, val):
if name[:len("CONFIG_TOOLCHAIN_KERNEL")] == "CONFIG_TOOLCHAIN_KERNEL":
parts = val.split("\"", 3)
self.kernel_toolchain = parts[1]
# Extract user space toolchain from a name value pair
def get_toolchain_user(self, name, val):
if name[:len("CONFIG_TOOLCHAIN_USER")] == "CONFIG_TOOLCHAIN_USER":
parts = val.split("\"", 3)
self.user_toolchain = parts[1]
# Extract number of containers
def get_ncontainers(self, name, val):
if name[:len("CONFIG_CONTAINERS")] == "CONFIG_CONTAINERS":

View File

@@ -42,7 +42,8 @@ def cml2_header_to_symbols(cml2_header, config):
config.get_cpu(name, value)
config.get_ncontainers(name, value)
config.get_container_parameters(name, value)
config.get_toolchain_kernel(name, value)
config.get_toolchain_user(name, value)
def cml2_update_config_h(config_h_path, config):
with open(config_h_path, "a") as config_h: