Ejemplo n.º 1
0
def branch_start_linux_no_prom(args):
    (prefix, prompt, boot_param) = args
    con0 = SIM_get_object("%scon0" % prefix)
    # Disable interactive keyboard input
    con0.read_only = 1
    # Wait for the kernel to show the boot params
    wait_for_string(con0, prompt)
    # Adjust the boot parameters
    con0.input = boot_param
    con0.input = "\n"
    # Enable interactive keyboard input again
    con0.read_only = 0    
Ejemplo n.º 2
0
def branch_start_linux(con0):
    # Disable interactive keyboard input
    con0.read_only = 1
    # Type 's' to get into the monitor setup early
    con0.input = "s"
    # Wait for the prompt
    wait_for_string(con0, "PM/PPC[Ver 1.")
    # Load the kernel directly into memory
    cmd = "load-file %s 0x400000" % (linux_kernel)
    eval_cli_line(cmd)
    # Jump to the kernel start address
    con0.input = "call 400000\n"
    # Wait for the kernel to show the boot params
    wait_for_string(con0, "console=ttyS0,9600 root=nfs rw")
    # Adjust the boot parameters
    con0.input = "\b\b\b\b\b\b\b\b\b\b\b"
    con0.input = boot_param
    con0.input = "\n"
    # Enable interactive keyboard input again
    con0.read_only = 0    
Ejemplo n.º 3
0
def branch_start_linux_no_prom_login_network_setup(args):
    (prefix, prompt, boot_param, ipaddr) = args
    con0 = SIM_get_object("%scon0" % prefix)
    # Disable interactive keyboard input
    con0.read_only = 1
    # Wait for the kernel to show the boot params
    wait_for_string(con0, prompt)
    # Adjust the boot parameters
    con0.input = boot_param
    con0.input = "\n"
    # Wait for linux login prompt
    wait_for_string(con0,"(none) login:"******"root\n"
    wait_for_string(con0,"# ")
    con0.input = "ifconfig eth0 %s netmask 255.255.255.0\n" % (ipaddr)
    # Enable interactive keyboard input again
    con0.read_only = 0