Definition in file redboot_linux_exec.c.
Go to the source code of this file.
Functions | |
| void | do_exec (int argc, char *argv[]) |
| Execute an uClinux image. | |
| RedBoot_cmd ("exec","Execute an uClinux image","[-b< command line addr >][-c\"kernel command line\"]\n""[< entry point >]", do_exec) | |
|
||||||||||||
|
Execute an uClinux image. Because the H8S does not support these by hardware we have to implement the macro HAL_LSBIT_INDEX( index, mask ) as call to this function
Definition at line 108 of file redboot_linux_exec.c.
00109 {
00110 cyg_uint32 entry = CYGDAT_REDBOOT_H8S_LINUX_BOOT_ENTRY;
00111 cyg_uint32 command_addr = CYGDAT_REDBOOT_H8S_LINUX_COMMAND_START;
00112 char *cmd_line = xstr( CYGDAT_REDBOOT_H8S_LINUX_BOOT_COMMAND_LINE );
00113 bool command_addr_set;
00114 bool command_line_set;
00115 struct option_info opts[2];
00116 char *pcmd;
00117 cyg_uint32 oldints;
00118
00119
00120 //
00121 // initialise options
00122 //
00123 init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
00124 (void **)&command_addr, &command_addr_set, "command line address");
00125 init_opts(&opts[1], 'c', true, OPTION_ARG_TYPE_STR,
00126 (void **)&cmd_line, &command_line_set, "kernel command line");
00127
00128 if (!scan_opts(argc, argv, 1, opts, 2, (void *)&entry,
00129 OPTION_ARG_TYPE_NUM, "entry address"))
00130 {
00131 return ;
00132 }
00133
00134 diag_printf("Now booting linux kernel:\n");
00135 diag_printf(" Entry Address 0x%08x\n", entry);
00136 diag_printf(" Cmdline : %s\n", cmd_line);
00137
00138 HAL_DISABLE_INTERRUPTS(oldints);
00139 HAL_DCACHE_SYNC();
00140 HAL_ICACHE_DISABLE();
00141 HAL_DCACHE_DISABLE();
00142 HAL_DCACHE_SYNC();
00143 HAL_ICACHE_INVALIDATE_ALL();
00144 HAL_DCACHE_INVALIDATE_ALL();
00145
00146 pcmd = (char *)command_addr;
00147 while ((*pcmd++ = *cmd_line++));
00148
00149 asm ("jmp @%0" : : "r" (entry));
00150 }
|
|
||||||||||||||||||||
|
|
1.3.5