mirror of
https://github.com/drasko/codezero.git
synced 2026-10-24 19:57:28 +02:00
Added default values to cml symbols
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
symbols
|
symbols
|
||||||
CONT%(cn)d_TYPE_LINUX 'Linux Container'
|
CONT%(cn)d_TYPE_LINUX 'Linux Container'
|
||||||
CONT%(cn)d_TYPE_BARE 'Bare Container'
|
CONT%(cn)d_TYPE_BARE 'Bare Container'
|
||||||
CONT%(cn)d_TYPE_POSIX 'Codezero POSIX Services'
|
CONT%(cn)d_TYPE_POSIX 'POSIX Container'
|
||||||
CONT%(cn)d_TYPE_TEST 'Test Container'
|
CONT%(cn)d_TYPE_TEST 'Test Container'
|
||||||
CONT%(cn)d_OPT_NAME 'Container Name'
|
CONT%(cn)d_OPT_NAME 'Container Name'
|
||||||
|
|
||||||
@@ -44,18 +44,18 @@ CONT%(cn)d_LINUX_PAGE_OFFSET 'Container %(cn)d Linux PAGE_OFFSET Parameter'
|
|||||||
CONT%(cn)d_LINUX_PHYS_OFFSET 'Container %(cn)d Linux PHYS_OFFSET Parameter'
|
CONT%(cn)d_LINUX_PHYS_OFFSET 'Container %(cn)d Linux PHYS_OFFSET Parameter'
|
||||||
CONT%(cn)d_LINUX_ROOTFS_ADDRESS 'Container %(cn)d Linux ROOTFS Address'
|
CONT%(cn)d_LINUX_ROOTFS_ADDRESS 'Container %(cn)d Linux ROOTFS Address'
|
||||||
|
|
||||||
default CONT%(cn)d_PAGER_LMA from 0x0
|
default CONT%(cn)d_PAGER_LMA from CONT%(cn)d_PHYS0_START
|
||||||
default CONT%(cn)d_PAGER_VMA from 0x0
|
default CONT%(cn)d_PAGER_VMA from CONT%(cn)d_VIRT0_START
|
||||||
default CONT%(cn)d_PAGER_SHM_START from 0x0
|
default CONT%(cn)d_PAGER_SHM_START from 0x40000000
|
||||||
default CONT%(cn)d_PAGER_SHM_END from 0x0
|
default CONT%(cn)d_PAGER_SHM_END from 0x50000000
|
||||||
default CONT%(cn)d_PAGER_TASK_START from 0x0
|
default CONT%(cn)d_PAGER_TASK_START from 0x30000000
|
||||||
default CONT%(cn)d_PAGER_TASK_END from 0x0
|
default CONT%(cn)d_PAGER_TASK_END from 0x40000000
|
||||||
default CONT%(cn)d_PAGER_UTCB_START from 0x0
|
default CONT%(cn)d_PAGER_UTCB_START from 0xf8100000
|
||||||
default CONT%(cn)d_PAGER_UTCB_END from 0x0
|
default CONT%(cn)d_PAGER_UTCB_END from 0xf8200000
|
||||||
default CONT%(cn)d_LINUX_ZRELADDR from 0x0
|
default CONT%(cn)d_LINUX_ZRELADDR from (CONT%(cn)d_LINUX_PHYS_OFFSET + 0x8000)
|
||||||
default CONT%(cn)d_LINUX_PAGE_OFFSET from 0x0
|
default CONT%(cn)d_LINUX_PAGE_OFFSET from CONT%(cn)d_VIRT0_START
|
||||||
default CONT%(cn)d_LINUX_PHYS_OFFSET from 0x0
|
default CONT%(cn)d_LINUX_PHYS_OFFSET from CONT%(cn)d_PHYS0_START
|
||||||
default CONT%(cn)d_LINUX_ROOTFS_ADDRESS from 0x0
|
default CONT%(cn)d_LINUX_ROOTFS_ADDRESS from (CONT%(cn)d_LINUX_PHYS_OFFSET + 0x500000)
|
||||||
|
|
||||||
default CONT%(cn)d_VIRTMEM_REGIONS from 1
|
default CONT%(cn)d_VIRTMEM_REGIONS from 1
|
||||||
default CONT%(cn)d_PHYSMEM_REGIONS from 1
|
default CONT%(cn)d_PHYSMEM_REGIONS from 1
|
||||||
@@ -91,27 +91,63 @@ when CONT%(cn)d_PHYSMEM_REGIONS < 3 suppress CONT%(cn)d_PHYS3_START CONT%(cn)d_P
|
|||||||
|
|
||||||
when CONT%(cn)d_PHYSMEM_REGIONS < 4 suppress CONT%(cn)d_PHYS3_START CONT%(cn)d_PHYS3_END
|
when CONT%(cn)d_PHYSMEM_REGIONS < 4 suppress CONT%(cn)d_PHYS3_START CONT%(cn)d_PHYS3_END
|
||||||
|
|
||||||
default CONT%(cn)d_PHYS0_START from 0x0
|
### Sanity check for memory regions ###
|
||||||
default CONT%(cn)d_PHYS0_END from 0x0
|
require CONT%(cn)d_PHYS0_START < CONT%(cn)d_PHYS0_END
|
||||||
default CONT%(cn)d_PHYS1_START from 0x0
|
require CONT%(cn)d_PHYS1_START < CONT%(cn)d_PHYS1_END
|
||||||
default CONT%(cn)d_PHYS1_END from 0x0
|
require CONT%(cn)d_PHYS2_START < CONT%(cn)d_PHYS2_END
|
||||||
default CONT%(cn)d_PHYS2_START from 0x0
|
require CONT%(cn)d_PHYS3_START < CONT%(cn)d_PHYS3_END
|
||||||
default CONT%(cn)d_PHYS2_END from 0x0
|
|
||||||
default CONT%(cn)d_PHYS3_START from 0x0
|
|
||||||
default CONT%(cn)d_PHYS3_END from 0x0
|
|
||||||
|
|
||||||
default CONT%(cn)d_VIRT0_START from 0x0
|
require CONT%(cn)d_VIRT0_START < CONT%(cn)d_VIRT0_END
|
||||||
default CONT%(cn)d_VIRT0_END from 0x0
|
require CONT%(cn)d_VIRT1_START < CONT%(cn)d_VIRT1_END
|
||||||
default CONT%(cn)d_VIRT1_START from 0x0
|
require CONT%(cn)d_VIRT2_START < CONT%(cn)d_VIRT2_END
|
||||||
default CONT%(cn)d_VIRT1_END from 0x0
|
require CONT%(cn)d_VIRT3_START < CONT%(cn)d_VIRT3_END
|
||||||
default CONT%(cn)d_VIRT2_START from 0x0
|
require CONT%(cn)d_VIRT4_START < CONT%(cn)d_VIRT4_END
|
||||||
default CONT%(cn)d_VIRT2_END from 0x0
|
require CONT%(cn)d_VIRT5_START < CONT%(cn)d_VIRT5_END
|
||||||
default CONT%(cn)d_VIRT3_START from 0x0
|
|
||||||
default CONT%(cn)d_VIRT3_END from 0x0
|
# Physical Regions for containers should start after kernel,
|
||||||
default CONT%(cn)d_VIRT4_START from 0x0
|
# assuming kernel to be using 0x0-0x40000 Physcial Memory region
|
||||||
default CONT%(cn)d_VIRT4_END from 0x0
|
derive kernel_size from (0x0 + 0x40000) # cannot set value directly
|
||||||
default CONT%(cn)d_VIRT5_START from 0x0
|
require CONT%(cn)d_PHYS0_START >= kernel_size
|
||||||
default CONT%(cn)d_VIRT5_END from 0x0
|
require CONT%(cn)d_PHYS1_START >= kernel_size
|
||||||
|
require CONT%(cn)d_PHYS2_START >= kernel_size
|
||||||
|
require CONT%(cn)d_PHYS3_START >= kernel_size
|
||||||
|
|
||||||
|
# TODO: We can add check for end address of physical region to be
|
||||||
|
# less than RAM SIZE, need to find out RAM SIZE?
|
||||||
|
|
||||||
|
# Rules for Linux kernel parameters
|
||||||
|
require CONT%(cn)d_LINUX_ZRELADDR > CONT%(cn)d_LINUX_PHYS_OFFSET + 0x8000
|
||||||
|
|
||||||
|
# FIXME: Restriction for rootfs?
|
||||||
|
|
||||||
|
# Rules for posix containers
|
||||||
|
# UTCB area starts from 0xf8100000
|
||||||
|
derive utcb_start from (0x0 + 0xf8100000) # cannot set value directly
|
||||||
|
require CONT%(cn)d_PAGER_UTCB_START >= utcb_start
|
||||||
|
|
||||||
|
# TODO: Do we want to check if PAGER_LMA/VMA lies in allocated memory regions
|
||||||
|
|
||||||
|
default CONT%(cn)d_PHYS0_START from 0x40000
|
||||||
|
default CONT%(cn)d_PHYS0_END from 0x1000000
|
||||||
|
default CONT%(cn)d_PHYS1_START from 0x1000000
|
||||||
|
default CONT%(cn)d_PHYS1_END from 0x1100000
|
||||||
|
default CONT%(cn)d_PHYS2_START from 0x1100000
|
||||||
|
default CONT%(cn)d_PHYS2_END from 0x1200000
|
||||||
|
default CONT%(cn)d_PHYS3_START from 0x1200000
|
||||||
|
default CONT%(cn)d_PHYS3_END from 0x1300000
|
||||||
|
|
||||||
|
default CONT%(cn)d_VIRT0_START from 0x90000000
|
||||||
|
default CONT%(cn)d_VIRT0_END from 0xa0000000
|
||||||
|
default CONT%(cn)d_VIRT1_START from 0x40000000
|
||||||
|
default CONT%(cn)d_VIRT1_END from 0x50000000
|
||||||
|
default CONT%(cn)d_VIRT2_START from 0x30000000
|
||||||
|
default CONT%(cn)d_VIRT2_END from 0x40000000
|
||||||
|
default CONT%(cn)d_VIRT3_START from 0xf8100000
|
||||||
|
default CONT%(cn)d_VIRT3_END from 0xf8200000
|
||||||
|
default CONT%(cn)d_VIRT4_START from 0xd0000000
|
||||||
|
default CONT%(cn)d_VIRT4_END from 0xe0000000
|
||||||
|
default CONT%(cn)d_VIRT5_START from 0xe0000000
|
||||||
|
default CONT%(cn)d_VIRT5_END from 0xf0000000
|
||||||
|
|
||||||
default CONT%(cn)d_OPT_NAME from (CONT%(cn)d_TYPE_LINUX==y) ? "linux%(cn)d" : ((CONT%(cn)d_TYPE_BARE==y) ? "bare%(cn)d" : ((CONT%(cn)d_TYPE_TEST==y) ? "test%(cn)d" : "posix%(cn)d"))
|
default CONT%(cn)d_OPT_NAME from (CONT%(cn)d_TYPE_LINUX==y) ? "linux%(cn)d" : ((CONT%(cn)d_TYPE_BARE==y) ? "bare%(cn)d" : ((CONT%(cn)d_TYPE_TEST==y) ? "test%(cn)d" : "posix%(cn)d"))
|
||||||
|
|
||||||
@@ -145,10 +181,10 @@ menu cont%(cn)d_posix_pager_params
|
|||||||
|
|
||||||
|
|
||||||
menu cont%(cn)d_linux_pager_params
|
menu cont%(cn)d_linux_pager_params
|
||||||
CONT%(cn)d_LINUX_ZRELADDR@
|
|
||||||
CONT%(cn)d_LINUX_PAGE_OFFSET@
|
|
||||||
CONT%(cn)d_LINUX_PHYS_OFFSET@
|
CONT%(cn)d_LINUX_PHYS_OFFSET@
|
||||||
|
CONT%(cn)d_LINUX_ZRELADDR@
|
||||||
CONT%(cn)d_LINUX_ROOTFS_ADDRESS@
|
CONT%(cn)d_LINUX_ROOTFS_ADDRESS@
|
||||||
|
CONT%(cn)d_LINUX_PAGE_OFFSET@
|
||||||
|
|
||||||
menu cont%(cn)d_virtmem_list
|
menu cont%(cn)d_virtmem_list
|
||||||
CONT%(cn)d_VIRTMEM_REGIONS%
|
CONT%(cn)d_VIRTMEM_REGIONS%
|
||||||
@@ -178,16 +214,16 @@ menu cont%(cn)d_physmem_list
|
|||||||
|
|
||||||
menu container%(cn)d_options
|
menu container%(cn)d_options
|
||||||
CONT%(cn)d_OPT_NAME$
|
CONT%(cn)d_OPT_NAME$
|
||||||
|
cont%(cn)d_physmem_list
|
||||||
|
cont%(cn)d_virtmem_list
|
||||||
cont%(cn)d_linux_pager_params
|
cont%(cn)d_linux_pager_params
|
||||||
cont%(cn)d_bare_pager_params
|
cont%(cn)d_bare_pager_params
|
||||||
cont%(cn)d_posix_pager_params
|
cont%(cn)d_posix_pager_params
|
||||||
cont%(cn)d_physmem_list
|
|
||||||
cont%(cn)d_virtmem_list
|
|
||||||
|
|
||||||
choices container%(cn)d_type
|
choices container%(cn)d_type
|
||||||
CONT%(cn)d_TYPE_LINUX
|
|
||||||
CONT%(cn)d_TYPE_BARE
|
CONT%(cn)d_TYPE_BARE
|
||||||
CONT%(cn)d_TYPE_POSIX
|
CONT%(cn)d_TYPE_POSIX
|
||||||
|
CONT%(cn)d_TYPE_LINUX
|
||||||
CONT%(cn)d_TYPE_TEST
|
CONT%(cn)d_TYPE_TEST
|
||||||
default CONT%(cn)d_TYPE_BARE
|
default CONT%(cn)d_TYPE_BARE
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ def autogen_rules_file(options, args):
|
|||||||
|
|
||||||
# Prepare default if number of containers not supplied
|
# Prepare default if number of containers not supplied
|
||||||
if not options.ncont:
|
if not options.ncont:
|
||||||
options.ncont = 4
|
options.ncont = 1
|
||||||
print "Max container count not supplied (-n), using %d as default." % options.ncont
|
print "Max container count not supplied (-n), using %d as default." % options.ncont
|
||||||
|
|
||||||
return generate_container_cml(options.arch, options.ncont)
|
return generate_container_cml(options.arch, options.ncont)
|
||||||
|
|||||||
Reference in New Issue
Block a user