Mercurial > ecos
comparison packages/hal/sh/arch/current/src/redboot_linux_exec.c @ 1661:431860e2ee69
Improve Linux 'exec' to be sensitive to load failures
| author | gthomas |
|---|---|
| date | Thu, 27 May 2004 13:22:05 +0000 |
| parents | 060f6b8274f3 |
| children | 74dbf4c3f2e1 |
comparison
equal
deleted
inserted
replaced
| 1660:eb74917a64e1 | 1661:431860e2ee69 |
|---|---|
| 7 //========================================================================== | 7 //========================================================================== |
| 8 //####ECOSGPLCOPYRIGHTBEGIN#### | 8 //####ECOSGPLCOPYRIGHTBEGIN#### |
| 9 // ------------------------------------------- | 9 // ------------------------------------------- |
| 10 // This file is part of eCos, the Embedded Configurable Operating System. | 10 // This file is part of eCos, the Embedded Configurable Operating System. |
| 11 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. | 11 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. |
| 12 // Copyright (C) 2004 Gary Thomas | |
| 12 // | 13 // |
| 13 // eCos is free software; you can redistribute it and/or modify it under | 14 // eCos is free software; you can redistribute it and/or modify it under |
| 14 // the terms of the GNU General Public License as published by the Free | 15 // the terms of the GNU General Public License as published by the Free |
| 15 // Software Foundation; either version 2 or (at your option) any later version. | 16 // Software Foundation; either version 2 or (at your option) any later version. |
| 16 // | 17 // |
| 121 (void **)&cmd_line, &cmd_line_set, "kernel command line"); | 122 (void **)&cmd_line, &cmd_line_set, "kernel command line"); |
| 122 | 123 |
| 123 if (!scan_opts(argc, argv, 1, opts, 8, (void *)&entry, | 124 if (!scan_opts(argc, argv, 1, opts, 8, (void *)&entry, |
| 124 OPTION_ARG_TYPE_NUM, "entry address")) | 125 OPTION_ARG_TYPE_NUM, "entry address")) |
| 125 return; | 126 return; |
| 127 if (entry == (unsigned long)NO_MEMORY) { | |
| 128 diag_printf("Can't execute Linux - invalid entry address\n"); | |
| 129 return; | |
| 130 } | |
| 126 | 131 |
| 127 diag_printf("Now booting linux kernel:\n"); | 132 diag_printf("Now booting linux kernel:\n"); |
| 128 diag_printf(" Base address 0x%08x Entry 0x%08x\n", base_addr, entry); | 133 diag_printf(" Base address 0x%08x Entry 0x%08x\n", base_addr, entry); |
| 129 diag_printf(" Cmdline : %s\n", cmd_line); | 134 diag_printf(" Cmdline : %s\n", cmd_line); |
| 130 | 135 |
