mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Significant cleanup to how configuration files are generated.
Default autogenerated version works. Need to sort out config options
This commit is contained in:
3
build.py
3
build.py
@@ -21,8 +21,7 @@ def main():
|
||||
#
|
||||
# Configure
|
||||
#
|
||||
if options.config or not os.path.exists(CML2_OLDCONFIG_FILE):
|
||||
configure_kernel(CML2_CML_FILE)
|
||||
configure_system(options, args)
|
||||
|
||||
#
|
||||
# Build the kernel
|
||||
|
||||
@@ -1,475 +0,0 @@
|
||||
#
|
||||
# Automatically generated, don't edit
|
||||
#
|
||||
# Generated on: bahadir-laptop
|
||||
# At: Sun, 18 Oct 2009 13:02:07 +0000
|
||||
# Linux version 2.6.24-22-generic (buildd@vernadsky) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Mon Nov 24 18:32:42 UTC 2008
|
||||
|
||||
#
|
||||
# Codezero Microkernel Configurator
|
||||
#
|
||||
|
||||
#
|
||||
# Main architecture
|
||||
#
|
||||
CONFIG_ARCH_ARM=y
|
||||
|
||||
|
||||
#
|
||||
# ARM Architecture Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Architecture Family
|
||||
#
|
||||
CONFIG_SUBARCH_V5=y
|
||||
CONFIG_SUBARCH_V6=n
|
||||
CONFIG_SUBARCH_V7=n
|
||||
|
||||
|
||||
#
|
||||
# ARM CPU type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Processor Type
|
||||
#
|
||||
CONFIG_CPU_ARM926=y
|
||||
|
||||
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
|
||||
#
|
||||
# ARM Platform Type
|
||||
#
|
||||
CONFIG_PLATFORM_EB=n
|
||||
CONFIG_PLATFORM_AB926=n
|
||||
CONFIG_PLATFORM_PB926=y
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Platform Drivers
|
||||
#
|
||||
CONFIG_DRIVER_UART_PL011=y
|
||||
CONFIG_DRIVER_TIMER_SP804=y
|
||||
CONFIG_DRIVER_IRQ_PL190=y
|
||||
|
||||
|
||||
CONFIG_CONTAINERS=2
|
||||
|
||||
#
|
||||
# Container Setup
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 0 Type
|
||||
#
|
||||
CONFIG_CONT0_TYPE_LINUX=n
|
||||
CONFIG_CONT0_TYPE_BARE=n
|
||||
CONFIG_CONT0_TYPE_POSIX=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Options
|
||||
#
|
||||
CONFIG_CONT0_OPT_NAME="posix"
|
||||
|
||||
#
|
||||
# Container 0 Default Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_LMA=0x40000
|
||||
CONFIG_CONT0_PAGER_VMA=0xa0000000
|
||||
CONFIG_CONT0_PAGER_SIZE=0xa5000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 POSIX Pager Parameters
|
||||
#
|
||||
CONFIG_CONT0_PAGER_SHM_START=0x40000000
|
||||
CONFIG_CONT0_PAGER_SHM_END=0x50000000
|
||||
CONFIG_CONT0_PAGER_TASK_START=0x30000000
|
||||
CONFIG_CONT0_PAGER_TASK_END=0x40000000
|
||||
CONFIG_CONT0_PAGER_UTCB_START=0xf8100000
|
||||
CONFIG_CONT0_PAGER_UTCB_END=0xf8200000
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Physical Memory Regions
|
||||
#
|
||||
CONFIG_CONT0_PHYSMEM_REGIONS=1
|
||||
|
||||
#
|
||||
# Container 0 Physical Region 0 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT0_PHYS0_START=0x40000
|
||||
CONFIG_CONT0_PHYS0_END=0x1000000
|
||||
CONFIG_CONT0_PHYS0_CAP_MAP_READ=y
|
||||
CONFIG_CONT0_PHYS0_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT0_PHYS0_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT0_PHYS0_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Memory Regions
|
||||
#
|
||||
CONFIG_CONT0_VIRTMEM_REGIONS=4
|
||||
|
||||
#
|
||||
# Container 0 Virtual Region 0 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT0_VIRT0_START=0xa0000000
|
||||
CONFIG_CONT0_VIRT0_END=0xb0000000
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_UTCB=n
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_READ=y
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Region 1 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT0_VIRT1_START=0x40000000
|
||||
CONFIG_CONT0_VIRT1_END=0x50000000
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_UTCB=n
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_READ=y
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Region 2 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT0_VIRT2_START=0xf8100000
|
||||
CONFIG_CONT0_VIRT2_END=0xf8200000
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_UTCB=y
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_READ=y
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
#
|
||||
# Container 0 Virtual Region 3 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT0_VIRT3_START=0x30000000
|
||||
CONFIG_CONT0_VIRT3_END=0x40000000
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_UTCB=n
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_READ=y
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Parameters
|
||||
#
|
||||
|
||||
#
|
||||
# Container 1 Type
|
||||
#
|
||||
CONFIG_CONT1_TYPE_LINUX=n
|
||||
CONFIG_CONT1_TYPE_BARE=n
|
||||
CONFIG_CONT1_TYPE_POSIX=y
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Options
|
||||
#
|
||||
CONFIG_CONT1_OPT_NAME="posix1"
|
||||
|
||||
#
|
||||
# Container 1 Default Pager Parameters
|
||||
#
|
||||
CONFIG_CONT1_PAGER_LMA=0x1000000
|
||||
CONFIG_CONT1_PAGER_VMA=0xb0000000
|
||||
CONFIG_CONT1_PAGER_SIZE=0xa5000
|
||||
|
||||
|
||||
#
|
||||
# Container 1 POSIX Pager Parameters
|
||||
#
|
||||
CONFIG_CONT1_PAGER_SHM_START=0x20000000
|
||||
CONFIG_CONT1_PAGER_SHM_END=0x30000000
|
||||
CONFIG_CONT1_PAGER_TASK_START=0x10000000
|
||||
CONFIG_CONT1_PAGER_TASK_END=0x20000000
|
||||
CONFIG_CONT1_PAGER_UTCB_START=0xf8200000
|
||||
CONFIG_CONT1_PAGER_UTCB_END=0xf8300000
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Physical Memory Regions
|
||||
#
|
||||
CONFIG_CONT1_PHYSMEM_REGIONS=1
|
||||
|
||||
#
|
||||
# Container 1 Physical Region 0 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT1_PHYS0_START=0x1000000
|
||||
CONFIG_CONT1_PHYS0_END=0x2000000
|
||||
CONFIG_CONT1_PHYS0_CAP_MAP_READ=y
|
||||
CONFIG_CONT1_PHYS0_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT1_PHYS0_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT1_PHYS0_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Virtual Memory Regions
|
||||
#
|
||||
CONFIG_CONT1_VIRTMEM_REGIONS=4
|
||||
|
||||
#
|
||||
# Container 1 Virtual Region 0 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT1_VIRT0_START=0x10000000
|
||||
CONFIG_CONT1_VIRT0_END=0x20000000
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_UTCB=n
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_READ=y
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Virtual Region 1 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT1_VIRT1_START=0x20000000
|
||||
CONFIG_CONT1_VIRT1_END=0x30000000
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_UTCB=n
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_READ=y
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Virtual Region 2 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT1_VIRT2_START=0xb0000000
|
||||
CONFIG_CONT1_VIRT2_END=0xc0000000
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_UTCB=n
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_READ=y
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
#
|
||||
# Container 1 Virtual Region 3 Memory Capabilities
|
||||
#
|
||||
CONFIG_CONT1_VIRT3_START=0xf8200000
|
||||
CONFIG_CONT1_VIRT3_END=0xf8300000
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_UTCB=y
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_READ=y
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_WRITE=y
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_EXEC=y
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_UNMAP=y
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Derived symbols
|
||||
#
|
||||
CONFIG_CONT1_PHYS1_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_VIRT1_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT2_VIRT2_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT0_PHYS2_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_VIRT4_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_VIRT2_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT0_PHYS1_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT3_VIRT3_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT2_VIRT5_CAP_MAP_READ_=1
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT0_VIRT4_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT1_PHYS0_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT3_VIRT1_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_VIRT2_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_PHYS3_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT3_PHYS0_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_VIRT0_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_UTCB_=1
|
||||
CONFIG_CONT3_VIRT1_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_PHYS1_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_PHYS0_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT3_VIRT2_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT1_PHYS0_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_PHYS1_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_PHYS1_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_PHYS3_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT2_VIRT3_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT1_VIRT5_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT3_VIRT4_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_VIRT4_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT3_VIRT3_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_PHYS1_CAP_MAP_READ_=1
|
||||
CONFIG_CONT1_VIRT5_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_PHYS2_CAP_MAP_READ_=1
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_VIRT4_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT0_PHYS0_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_VIRT0_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT1_VIRT5_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_VIRT0_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT0_VIRT5_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT1_VIRT5_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_PHYS0_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT3_PHYS3_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_VIRT5_CAP_MAP_READ_=1
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_PHYS2_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_PHYS2_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT3_VIRT5_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_PHYS0_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_PHYS1_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_VIRT3_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_PHYS3_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT3_VIRT5_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT1_PHYS1_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_VIRT3_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_VIRT2_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT2_PHYS1_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_VIRT4_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_VIRT1_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT3_PHYS0_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_PHYS2_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT3_VIRT4_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT3_PHYS3_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_VIRT0_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT0_PHYS2_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT1_PHYS1_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_PHYS3_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_VIRT5_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_VIRT4_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT2_PHYS0_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_VIRT4_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_VIRT0_CAP_MAP_READ_=1
|
||||
CONFIG_CONT1_PHYS2_CAP_MAP_READ_=1
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_VIRT3_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_VIRT4_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_VIRT1_CAP_MAP_READ_=1
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_VIRT2_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_PHYS3_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_PHYS2_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_VIRT5_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT1_PHYS2_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_VIRT2_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT3_PHYS2_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_VIRT3_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_PHYS0_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT3_VIRT5_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_VIRT4_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT2_VIRT3_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_PHYS0_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_PHYS2_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_PHYS0_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT1_PHYS3_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_PHYS2_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_VIRT1_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT0_PHYS3_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_VIRT5_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT1_VIRT5_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT2_PHYS2_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT0_VIRT5_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT1_VIRT4_CAP_MAP_READ_=1
|
||||
CONFIG_CONT1_VIRT1_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT0_PHYS0_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_VIRT3_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_VIRT4_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT3_VIRT4_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_VIRT2_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_PHYS0_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT3_PHYS1_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_VIRT3_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_PHYS3_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT2_PHYS2_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_VIRT0_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT0_VIRT4_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_PHYS2_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_VIRT0_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_VIRT4_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_VIRT5_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_VIRT1_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT3_PHYS1_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT2_PHYS1_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_VIRT0_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_VIRT2_CAP_MAP_READ_=1
|
||||
CONFIG_CONT2_VIRT1_CAP_MAP_READ_=1
|
||||
CONFIG_CONT1_PHYS3_CAP_MAP_READ_=1
|
||||
CONFIG_CONT0_VIRT5_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_VIRT4_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_PHYS3_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT0_VIRT3_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_VIRT5_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT1_PHYS1_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT1_VIRT4_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT2_PHYS3_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT3_PHYS3_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_VIRT1_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT3_VIRT5_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_PHYS0_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT3_VIRT4_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_VIRT0_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT3_VIRT0_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT2_VIRT1_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT3_VIRT2_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_VIRT3_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT1_PHYS0_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT2_VIRT0_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT1_VIRT4_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT3_VIRT5_CAP_MAP_UTCB_=0
|
||||
CONFIG_CONT0_VIRT1_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_PHYS2_CAP_MAP_UNMAP_=1
|
||||
CONFIG_CONT0_VIRT2_CAP_MAP_UTCB_=1
|
||||
CONFIG_CONT1_PHYS3_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT2_PHYS3_CAP_MAP_READ_=1
|
||||
CONFIG_CONT3_VIRT2_CAP_MAP_WRITE_=1
|
||||
CONFIG_CONT2_PHYS1_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT3_PHYS1_CAP_MAP_EXEC_=1
|
||||
CONFIG_CONT1_VIRT0_CAP_MAP_EXEC_=1
|
||||
#
|
||||
# That's all, folks!
|
||||
@@ -6,65 +6,4 @@ import os, sys, shutil
|
||||
|
||||
PROJRELROOT = '../'
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
|
||||
|
||||
from scripts.cml.generate_container_cml import *
|
||||
|
||||
# Parse options + autogenerate cml rule file if necessary.
|
||||
def build_parse_options():
|
||||
autogen_true = 0
|
||||
usage = "usage: %prog [options] arg"
|
||||
parser = OptionParser(usage)
|
||||
|
||||
parser.add_option("-a", "--arch", type = "string", dest = "arch",
|
||||
help = "Use configuration file for architecture")
|
||||
parser.add_option("-n", "--num-containers", type = "int", dest = "ncont",
|
||||
help = "Maximum number of containers that will be "
|
||||
"made available in configuration")
|
||||
parser.add_option("-c", "--configure-first", action = "store_true", dest = "config",
|
||||
help = "Tells the build script to run configurator first")
|
||||
parser.add_option("-f", "--use-file", dest = "cml_file",
|
||||
help = "Supply user-defined cml file "
|
||||
"(Use only if you want to override default)")
|
||||
parser.add_option("-r", "--reset-old-config", action = "store_true",
|
||||
default = False, dest = "reset_old_config",
|
||||
help = "Reset configuration file settings "
|
||||
"(If you had configured before and changing the "
|
||||
"rule file, this will reset existing values to default)")
|
||||
parser.add_option("-s", "--save-old-config", action = "store_true",
|
||||
default = False, dest = "backup_config",
|
||||
help = "Backs up old configuration file settings to a .saved file"
|
||||
"(Subsequent calls would overwrite. Only meaningful with -r)")
|
||||
parser.add_option("-p", "--print-config", action = "store_true",
|
||||
default = False, dest = "print_config",
|
||||
help = "Prints out configuration settings"
|
||||
"(Symbol values and container parameters are printed)")
|
||||
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
autogen_true = options.backup_config or options.reset_old_config \
|
||||
or options.cml_file or options.ncont \
|
||||
or options.arch or not os.path.exists(CML2_CML_FILE)
|
||||
|
||||
# Prepare default if arch not supplied
|
||||
if autogen_true and not options.arch:
|
||||
print "No arch supplied (-a), using `arm' as default."
|
||||
options.arch = "arm"
|
||||
|
||||
# Prepare default if number of containers not supplied
|
||||
if autogen_true and not options.ncont:
|
||||
options.ncont = 4
|
||||
print "Max container count not supplied (-n), using %d as default." % options.ncont
|
||||
|
||||
# Regenerate cml file if options are supplied or the file doesn't exist.
|
||||
if autogen_true:
|
||||
generate_container_cml(options.arch, options.ncont)
|
||||
if options.reset_old_config == 1 and os.path.exists(CML2_OLDCONFIG_FILE):
|
||||
if options.backup_config == 1:
|
||||
print "Backing up %s into %s" % (CML2_OLDCONFIG_FILE, CML2_OLDCONFIG_FILE + '.saved')
|
||||
shutil.move(CML2_OLDCONFIG_FILE, CML2_OLDCONFIG_FILE + '.saved')
|
||||
else:
|
||||
print "Deleting %s" % CML2_OLDCONFIG_FILE
|
||||
os.remove(CML2_OLDCONFIG_FILE)
|
||||
return options, args
|
||||
|
||||
@@ -10,13 +10,13 @@ PROJROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||
BUILDDIR = join(PROJROOT, "build")
|
||||
TOOLSDIR = join(PROJROOT, "tools")
|
||||
CML2_CONFIG_SRCDIR = join(PROJROOT, "config/cml")
|
||||
CML2_CML_FILE = join(CML2_CONFIG_SRCDIR, 'out.cml')
|
||||
CML2_CONT_DEFFILE = join(PROJROOT, 'config/cml/container.template.cml')
|
||||
CML2_CONT_DEFFILE = join(PROJROOT, 'config/cml/container_ruleset.template')
|
||||
CML2TOOLSDIR = join(TOOLSDIR, "cml2-tools")
|
||||
CML2RULES = join(BUILDDIR, "cml2_rules.out")
|
||||
CML2_CONFIG_FILE = join(BUILDDIR, "cml2_config.out")
|
||||
CML2_OLDCONFIG_FILE = join(BUILDDIR, "cml2_oldconfig.in")
|
||||
CML2_CONFIG_H = join(BUILDDIR, "cml2_config.h")
|
||||
CML2_COMPILED_RULES = join(BUILDDIR, "rules.compiled")
|
||||
CML2_CONFIG_FILE = join(BUILDDIR, "config.cml")
|
||||
CML2_OLDCONFIG_FILE = join(BUILDDIR, "oldconfig.cml.in")
|
||||
CML2_CONFIG_H = join(BUILDDIR, "config.h")
|
||||
CML2_AUTOGEN_RULES = join(BUILDDIR, 'config.rules')
|
||||
CONFIG_H = join("include/l4/config.h")
|
||||
CONFIG_SHELVE_DIR = join(BUILDDIR, "configdata")
|
||||
CONFIG_SHELVE_FILENAME = "configuration"
|
||||
|
||||
152
configure.py
152
configure.py
@@ -1,13 +1,33 @@
|
||||
#! /usr/bin/env python2.6
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
|
||||
import os, sys, shelve, shutil
|
||||
from os.path import join
|
||||
from config.projpaths import *
|
||||
from config.configuration import *
|
||||
from scripts.bare.bare_generator import *
|
||||
from scripts.kernel.generate_kernel_cinfo import *
|
||||
from config.parse_options import *
|
||||
from scripts.cml.generate_container_cml import *
|
||||
from optparse import OptionParser
|
||||
|
||||
#
|
||||
# Rarely required. Only required when:
|
||||
# The number of containers defined in the ruleset are not enough.
|
||||
# E.g. you want 16 containers instead of 4.
|
||||
# You want to start from scratch and set _all_ the parameters yourself.
|
||||
#
|
||||
def autogen_rules_file(options, args):
|
||||
# Prepare default if arch not supplied
|
||||
if not options.arch:
|
||||
print "No arch supplied (-a), using `arm' as default."
|
||||
options.arch = "arm"
|
||||
|
||||
# Prepare default if number of containers not supplied
|
||||
if not options.ncont:
|
||||
options.ncont = 4
|
||||
print "Max container count not supplied (-n), using %d as default." % options.ncont
|
||||
|
||||
return generate_container_cml(options.arch, options.ncont)
|
||||
|
||||
|
||||
def cml2_header_to_symbols(cml2_header, config):
|
||||
with file(cml2_header) as header_file:
|
||||
@@ -22,28 +42,13 @@ def cml2_header_to_symbols(cml2_header, config):
|
||||
config.get_ncontainers(name, value)
|
||||
config.get_container_parameters(name, value)
|
||||
|
||||
|
||||
def cml2_update_config_h(config_h_path, config):
|
||||
with open(config_h_path, "a") as config_h:
|
||||
config_h.write("#define __ARCH__ " + config.arch + '\n')
|
||||
config_h.write("#define __PLATFORM__ " + config.platform + '\n')
|
||||
config_h.write("#define __SUBARCH__ " + config.subarch + '\n')
|
||||
|
||||
def cml2_configure(cml2_config_file):
|
||||
os.system(CML2TOOLSDIR + '/cmlcompile.py -o ' + CML2RULES + ' ' + cml2_config_file)
|
||||
if not os.path.exists(CML2_OLDCONFIG_FILE):
|
||||
os.system(CML2TOOLSDIR + '/cmlconfigure.py -c -o ' + \
|
||||
CML2_CONFIG_FILE + ' ' + CML2RULES)
|
||||
else:
|
||||
os.system(CML2TOOLSDIR + '/cmlconfigure.py -c -o ' + CML2_CONFIG_FILE + \
|
||||
' -i ' + CML2_OLDCONFIG_FILE + ' ' + CML2RULES)
|
||||
os.system(TOOLSDIR + '/cml2header.py -o ' + CML2_CONFIG_H + ' -i ' + CML2_CONFIG_FILE)
|
||||
|
||||
# Do the actual copying here
|
||||
shutil.copy(CML2_CONFIG_FILE, CML2_OLDCONFIG_FILE)
|
||||
|
||||
if not os.path.exists("build/l4"):
|
||||
os.mkdir("build/l4")
|
||||
shutil.copy(CML2_CONFIG_H, CONFIG_H)
|
||||
|
||||
def configure_kernel(cml_file):
|
||||
config = configuration()
|
||||
@@ -52,6 +57,105 @@ def configure_kernel(cml_file):
|
||||
os.mkdir(BUILDDIR)
|
||||
|
||||
cml2_configure(cml_file)
|
||||
|
||||
|
||||
|
||||
# Parse options + autogenerate cml rule file if necessary.
|
||||
def build_parse_options():
|
||||
autogen_true = 0
|
||||
usage = "usage: %prog [options] arg"
|
||||
parser = OptionParser(usage)
|
||||
|
||||
parser.add_option("-a", "--arch", type = "string", dest = "arch",
|
||||
help = "Use configuration file for architecture")
|
||||
parser.add_option("-n", "--num-containers", type = "int", dest = "ncont",
|
||||
help = "Maximum number of containers that will be "
|
||||
"made available in configuration")
|
||||
parser.add_option("-c", "--configure-first", action = "store_true", dest = "config",
|
||||
help = "Tells the build script to run configurator first")
|
||||
parser.add_option("-f", "--use-file", dest = "cml_file",
|
||||
help = "Supply user-defined cml file "
|
||||
"(Use only if you want to override default)")
|
||||
parser.add_option("-r", "--reset-old-config", action = "store_true",
|
||||
default = False, dest = "reset_old_config",
|
||||
help = "Reset configuration file settings "
|
||||
"(If you had configured before and changing the "
|
||||
"rule file, this will reset existing values to default)")
|
||||
parser.add_option("-s", "--save-old-config", action = "store_true",
|
||||
default = False, dest = "backup_config",
|
||||
help = "Backs up old configuration file settings to a .saved file"
|
||||
"(Subsequent calls would overwrite. Only meaningful with -r)")
|
||||
parser.add_option("-p", "--print-config", action = "store_true",
|
||||
default = False, dest = "print_config",
|
||||
help = "Prints out configuration settings"
|
||||
"(Symbol values and container parameters are printed)")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
return options, args
|
||||
|
||||
|
||||
def configure_system(options, args):
|
||||
#
|
||||
# Configure only if we are told to do so.
|
||||
#
|
||||
if not options.config:
|
||||
return
|
||||
|
||||
if not os.path.exists(BUILDDIR):
|
||||
os.mkdir(BUILDDIR)
|
||||
|
||||
#
|
||||
# If we have an existing config file or one supplied in options
|
||||
# and we're not forced to autogenerate, we use the config file.
|
||||
#
|
||||
# Otherwise we autogenerate a ruleset and compile it.
|
||||
#
|
||||
if options.cml_file or os.path.exists(CML2_CONFIG_FILE) \
|
||||
and not options.reset_old_config:
|
||||
if options.cml_file:
|
||||
cml2_config_file = options.cml_file
|
||||
else:
|
||||
cml2_config_file = CML2_CONFIG_FILE
|
||||
|
||||
#
|
||||
# If we have a valid config file but not a rules file,
|
||||
# we still need to autogenerate the rules file.
|
||||
#
|
||||
if not os.path.exists(CML2_COMPILED_RULES):
|
||||
rules_file = autogen_rules_file(options, args)
|
||||
|
||||
# Compile rules file.
|
||||
os.system(CML2TOOLSDIR + '/cmlcompile.py -o ' + \
|
||||
CML2_COMPILED_RULES + ' ' + rules_file)
|
||||
|
||||
# Create configuration from existing file
|
||||
os.system(CML2TOOLSDIR + '/cmlconfigure.py -c -o ' + \
|
||||
CML2_CONFIG_FILE + ' -i ' + CML2_CONFIG_FILE + \
|
||||
' ' + CML2_COMPILED_RULES)
|
||||
else:
|
||||
rules_file = autogen_rules_file(options, args)
|
||||
|
||||
# Compile rules file.
|
||||
os.system(CML2TOOLSDIR + '/cmlcompile.py -o ' + \
|
||||
CML2_COMPILED_RULES + ' ' + rules_file)
|
||||
|
||||
# Create configuration from scratch
|
||||
os.system(CML2TOOLSDIR + '/cmlconfigure.py -c -o ' + \
|
||||
CML2_CONFIG_FILE + ' ' + CML2_COMPILED_RULES)
|
||||
|
||||
# Create header file
|
||||
os.system(TOOLSDIR + '/cml2header.py -o ' + \
|
||||
CML2_CONFIG_H + ' -i ' + CML2_CONFIG_FILE)
|
||||
|
||||
# The rest:
|
||||
|
||||
if not os.path.exists(os.path.dirname(CONFIG_H)):
|
||||
os.mkdir(os.path.dirname(CONFIG_H))
|
||||
|
||||
shutil.copy(CML2_CONFIG_H, CONFIG_H)
|
||||
|
||||
config = configuration()
|
||||
cml2_header_to_symbols(CML2_CONFIG_H, config)
|
||||
cml2_update_config_h(CONFIG_H, config)
|
||||
|
||||
@@ -64,11 +168,17 @@ def configure_kernel(cml_file):
|
||||
# Generate kernel cinfo structure for container definitions
|
||||
generate_kernel_cinfo(config, KERNEL_CINFO_PATH)
|
||||
|
||||
# Print out the configuration if asked
|
||||
if opts.print_config:
|
||||
config.config_print()
|
||||
|
||||
return config
|
||||
|
||||
if __name__ == "__main__":
|
||||
opts, args = build_parse_options()
|
||||
config = configure_kernel(join(CML2_CONFIG_SRCDIR, "out.cml"))
|
||||
if opts.print_config:
|
||||
config.config_print()
|
||||
|
||||
# We force configuration when calling this script
|
||||
# whereas build.py can provide it as an option
|
||||
opts.config = 1
|
||||
|
||||
configure_system(opts, args)
|
||||
|
||||
@@ -40,8 +40,8 @@ def add_container_constraint(cid):
|
||||
|
||||
def generate_container_cml(arch, ncont):
|
||||
fbody = ""
|
||||
with open(join(CML2_CONFIG_SRCDIR, arch + '.cml')) as in_cml:
|
||||
fbody += in_cml.read()
|
||||
with open(join(CML2_CONFIG_SRCDIR, arch + '.ruleset')) as in_ruleset:
|
||||
fbody += in_ruleset.read()
|
||||
|
||||
# Add container visibility constraint
|
||||
for cont in range(ncont):
|
||||
@@ -63,8 +63,9 @@ def generate_container_cml(arch, ncont):
|
||||
fbody += defbody % { 'cn' : cont }
|
||||
|
||||
# Write the result to output rules file.
|
||||
with open(join(CML2_CONFIG_SRCDIR, "out.cml"), "w+") as out_cml:
|
||||
with open(CML2_AUTOGEN_RULES, "w+") as out_cml:
|
||||
out_cml.write(fbody)
|
||||
return CML2_AUTOGEN_RULES
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate_container_cml('arm', 4)
|
||||
|
||||
Reference in New Issue
Block a user