Changeset 31fb9a0 in mainline


Ignore:
Timestamp:
2009-03-08T13:38:22Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0af8bcd
Parents:
ec944b1
Message:

add support for predefined configuration profiles (and subprofiles, configuration can be nested)

Files:
4 added
1 deleted
1 edited
13 moved

Legend:

Unmodified
Added
Removed
  • defaults/amd64/Makefile.config

    rec944b1 r31fb9a0  
    22PLATFORM = amd64
    33
    4 # CPU type
    5 MACHINE = opteron
    6 
    74# Ramdisk format
    8 RDFMT = tmpfs
     5RDFMT = fat
    96
    107# Compiler
     
    1411CONFIG_DEBUG = y
    1512
     13# Deadlock detection support for spinlocks
     14CONFIG_DEBUG_SPINLOCK = y
     15
    1616# Support for SMP
    1717CONFIG_SMP = y
     
    2020CONFIG_HT = y
    2121
    22 # Simics BIOS AP boot fix
    23 CONFIG_SIMICS_FIX = y
    24 
    2522# Lazy FPU context switching
    2623CONFIG_FPU_LAZY = y
    2724
    2825# Support for userspace debuggers
    29 CONFIG_UDEBUG = n
     26CONFIG_UDEBUG = y
    3027
    3128# Kernel console support
     
    3532CONFIG_LOG = n
    3633
    37 # Deadlock detection support for spinlocks
    38 CONFIG_DEBUG_SPINLOCK = y
    39 
    40 # Watchpoint on rewriting AS with zero
    41 CONFIG_DEBUG_AS_WATCHPOINT = y
    42 
    43 # Save all interrupt registers
    44 CONFIG_DEBUG_ALLREGS = y
    45 
    4634# Compile kernel tests
    4735CONFIG_TEST = y
     36
     37# What is your input device?
     38CONFIG_HID_IN = keyboard
     39
     40# What is your output device?
     41CONFIG_HID_OUT = monitor
     42
     43# i8042 controller support
     44CONFIG_I8042 = y
     45
     46# PC keyboard support
     47CONFIG_PC_KBD = y
     48
     49# EGA support
     50CONFIG_EGA = y
    4851
    4952# Framebuffer support
     
    5154
    5255# Framebuffer width
    53 CONFIG_VESA_WIDTH = 1024
     56CONFIG_VESA_WIDTH = 800
    5457
    5558# Framebuffer height
    56 CONFIG_VESA_HEIGHT = 768
     59CONFIG_VESA_HEIGHT = 600
    5760
    5861# Framebuffer depth
    59 CONFIG_VESA_BPP = 24
     62CONFIG_VESA_BPP = 16
     63
     64# Keyboard layout
     65KBD_LAYOUT = us_qwerty
  • defaults/arm32/Makefile.config

    rec944b1 r31fb9a0  
    33
    44# Ramdisk format
    5 RDFMT = tmpfs
     5RDFMT = fat
    66
    77# Compiler
     
    1212
    1313# Support for userspace debuggers
    14 CONFIG_UDEBUG = n
     14CONFIG_UDEBUG = y
    1515
    1616# Kernel console support
     
    2323CONFIG_TEST = y
    2424
     25# What is your input device?
     26CONFIG_HID_IN = keyboard
     27
     28# What is your output device?
     29CONFIG_HID_OUT = monitor
     30
    2531# Framebuffer support
    2632CONFIG_FB = y
     33
     34# Keyboard layout
     35KBD_LAYOUT = us_qwerty
  • defaults/ia32/Makefile.config

    rec944b1 r31fb9a0  
    33
    44# CPU type
    5 MACHINE = pentium4
     5PROCESSOR = pentium4
    66
    77# Ramdisk format
    8 RDFMT = tmpfs
     8RDFMT = fat
    99
    1010# Compiler
     
    1414CONFIG_DEBUG = y
    1515
     16# Deadlock detection support for spinlocks
     17CONFIG_DEBUG_SPINLOCK = y
     18
     19# ACPI support
     20CONFIG_ACPI = y
     21
    1622# Support for SMP
    1723CONFIG_SMP = y
     
    2026CONFIG_HT = y
    2127
    22 # Simics BIOS AP boot fix
    23 CONFIG_SIMICS_FIX = y
    24 
    2528# Lazy FPU context switching
    2629CONFIG_FPU_LAZY = y
    2730
    2831# Support for userspace debuggers
    29 CONFIG_UDEBUG = n
     32CONFIG_UDEBUG = y
    3033
    3134# Kernel console support
     
    3538CONFIG_LOG = n
    3639
    37 # Deadlock detection support for spinlocks
    38 CONFIG_DEBUG_SPINLOCK = y
    39 
    40 # Watchpoint on rewriting AS with zero
    41 CONFIG_DEBUG_AS_WATCHPOINT = y
    42 
    43 # Save all interrupt registers
    44 CONFIG_DEBUG_ALLREGS = y
    45 
    4640# Compile kernel tests
    4741CONFIG_TEST = y
     42
     43# What is your input device?
     44CONFIG_HID_IN = keyboard
     45
     46# What is your output device?
     47CONFIG_HID_OUT = monitor
     48
     49# i8042 controller support
     50CONFIG_I8042 = y
     51
     52# PC keyboard support
     53CONFIG_PC_KBD = y
     54
     55# EGA support
     56CONFIG_EGA = y
    4857
    4958# Framebuffer support
     
    5160
    5261# Framebuffer width
    53 CONFIG_VESA_WIDTH = 1024
     62CONFIG_VESA_WIDTH = 800
    5463
    5564# Framebuffer height
    56 CONFIG_VESA_HEIGHT = 768
     65CONFIG_VESA_HEIGHT = 600
    5766
    5867# Framebuffer depth
    59 CONFIG_VESA_BPP = 24
     68CONFIG_VESA_BPP = 16
     69
     70# Keyboard layout
     71KBD_LAYOUT = us_qwerty
  • defaults/ia64/Makefile.config

    rec944b1 r31fb9a0  
    22PLATFORM = ia64
    33
    4 # Machine type
    5 MACHINE = i460GX
    6 
    74# Ramdisk format
    8 RDFMT = tmpfs
     5RDFMT = fat
    96
    107# Compiler
     
    1310# Debug build
    1411CONFIG_DEBUG = y
     12
     13# Deadlock detection support for spinlocks
     14CONFIG_DEBUG_SPINLOCK = y
    1515
    1616# Support for SMP
     
    2121
    2222# Use VHPT
    23 CONFIG_VHPT = n
    24 
    25 # Support for NS16550 serial port
    26 CONFIG_NS16550 = y
    27 
    28 # IOSapic on default address support
    29 CONFIG_IOSAPIC = y
    30 
    31 # Interrupt-driven driver for NS16550?
    32 CONFIG_NS16550_INTERRUPT_DRIVEN = y
     23CONFIG_VHPT = y
    3324
    3425# Support for userspace debuggers
    35 CONFIG_UDEBUG = n
     26CONFIG_UDEBUG = y
    3627
    3728# Kernel console support
     
    4132CONFIG_LOG = n
    4233
    43 # Deadlock detection support for spinlocks
    44 CONFIG_DEBUG_SPINLOCK = y
    45 
    4634# Compile kernel tests
    4735CONFIG_TEST = y
     36
     37# Keyboard layout
     38KBD_LAYOUT = us_qwerty
  • defaults/mips32/Makefile.config

    rec944b1 r31fb9a0  
    22PLATFORM = mips32
    33
    4 # Machine type
    5 MACHINE = lgxemul
    6 
    74# Ramdisk format
    8 RDFMT = tmpfs
     5RDFMT = fat
    96
    107# Compiler
     
    1411CONFIG_DEBUG = y
    1512
    16 # Lazy FPU context switching
    17 CONFIG_FPU_LAZY = y
     13# Deadlock detection support for spinlocks
     14CONFIG_DEBUG_SPINLOCK = y
     15
     16# Support for SMP
     17CONFIG_SMP = y
    1818
    1919# Support for userspace debuggers
    20 CONFIG_UDEBUG = n
     20CONFIG_UDEBUG = y
    2121
    2222# Kernel console support
     
    2626CONFIG_LOG = n
    2727
    28 # Save all interrupt registers
    29 CONFIG_DEBUG_ALLREGS = y
    30 
    3128# Compile kernel tests
    3229CONFIG_TEST = y
    3330
    34 # Framebuffer support
    35 CONFIG_FB = y
     31# Keyboard layout
     32KBD_LAYOUT = us_qwerty
  • defaults/ppc32/Makefile.config

    rec944b1 r31fb9a0  
    33
    44# Ramdisk format
    5 RDFMT = tmpfs
     5RDFMT = fat
    66
    77# Compiler
     
    1212
    1313# Support for userspace debuggers
    14 CONFIG_UDEBUG = n
     14CONFIG_UDEBUG = y
    1515
    1616# Kernel console support
     
    2323CONFIG_TEST = y
    2424
     25# Input device class
     26CONFIG_HID_IN = keyboard
     27
     28# Output device class
     29CONFIG_HID_OUT = monitor
     30
     31# Framebuffer support
     32CONFIG_FB = y
     33
    2534# Use Block Address Translation by the loader
    2635CONFIG_BAT = y
     36
     37# Keyboard layout
     38KBD_LAYOUT = us_qwerty
  • tools/config.py

    rec944b1 r31fb9a0  
    4141MACROS = 'config.h'
    4242DEFS = 'config.defs'
     43PRECONF = 'defaults'
    4344
    4445def read_defaults(fname, defaults):
     
    277278        outdf.close()
    278279
     280def sorted_dir(root):
     281        list = os.listdir(root)
     282        list.sort()
     283        return list
     284
     285def read_preconfigured(root, fname, screen, defaults):
     286        options = []
     287        opt2path = {}
     288        cnt = 0
     289       
     290        # Look for profiles
     291        for name in sorted_dir(root):
     292                path = os.path.join(root, name)
     293                canon = os.path.join(path, fname)
     294               
     295                if ((os.path.isdir(path)) and (os.path.exists(canon)) and (os.path.isfile(canon))):
     296                        subprofile = False
     297                       
     298                        # Look for subprofiles
     299                        for subname in sorted_dir(path):
     300                                subpath = os.path.join(path, subname)
     301                                subcanon = os.path.join(subpath, fname)
     302                               
     303                                if ((os.path.isdir(subpath)) and (os.path.exists(subcanon)) and (os.path.isfile(subcanon))):
     304                                        subprofile = True
     305                                        options.append("%s (%s)" % (name, subname))
     306                                        opt2path[cnt] = (canon, subcanon)
     307                                        cnt += 1
     308                       
     309                        if (not subprofile):
     310                                options.append(name)
     311                                opt2path[cnt] = (canon, None)
     312                                cnt += 1
     313       
     314        (button, value) = xtui.choice_window(screen, 'Load preconfigured defaults', 'Choose configuration profile', options, None)
     315       
     316        if (button == 'cancel'):
     317                return None
     318       
     319        read_defaults(opt2path[value][0], defaults)
     320        if (opt2path[value][1] != None):
     321                read_defaults(opt2path[value][1], defaults)
     322
    279323def main():
    280324        defaults = {}
     
    303347        try:
    304348                selname = None
     349                position = None
    305350                while True:
    306351                       
     
    312357                        options = []
    313358                        opt2row = {}
    314                         position = None
    315                         cnt = 0
     359                        cnt = 1
     360                       
     361                        options.append("  --- Load preconfigured defaults ... ")
     362                       
    316363                        for varname, vartype, name, choices, cond in ask_names:
    317364                               
     
    362409                                cnt += 1
    363410                       
     411                        if (position >= options):
     412                                position = None
     413                       
    364414                        (button, value) = xtui.choice_window(screen, 'HelenOS configuration', 'Choose configuration option', options, position)
    365415                       
     
    367417                                return 'Configuration canceled'
    368418                       
     419                        if (value == 0):
     420                                read_preconfigured(PRECONF, MAKEFILE, screen, defaults)
     421                                position = 1
     422                                continue
     423                       
     424                        position = None
    369425                        if (not opt2row.has_key(value)):
    370426                                raise RuntimeError("Error selecting value: %s" % value)
Note: See TracChangeset for help on using the changeset viewer.