File indexing completed on 2025-05-11 08:24:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 #ifdef HAVE_CONFIG_H
0032 #include "config.h"
0033 #endif
0034
0035 #include <stdlib.h>
0036 #include <string.h>
0037
0038 #include <rtems.h>
0039
0040 int main( int argc, char **argv );
0041
0042 static void Init( rtems_task_argument arg )
0043 {
0044 const char *boot_cmdline = *((const char **) arg);
0045 char *cmdline = NULL;
0046 int argc = 0;
0047 char **argv = NULL;
0048 int result;
0049
0050 if ( boot_cmdline != NULL ) {
0051 size_t n = strlen( boot_cmdline ) + 1;
0052
0053 cmdline = malloc( n );
0054 if ( cmdline != NULL ) {
0055 char* command;
0056
0057 memcpy( cmdline, boot_cmdline, n);
0058
0059 command = cmdline;
0060
0061
0062
0063
0064 while ( true ) {
0065 command = strtok( command, " \t\r\n" );
0066 if ( command == NULL )
0067 break;
0068
0069 ++argc;
0070 command = '\0';
0071 }
0072
0073
0074
0075
0076
0077
0078
0079 argv = calloc( argc, sizeof( *argv ) );
0080 if ( argv != NULL ) {
0081 int a;
0082
0083 command = cmdline;
0084 argv[ 0 ] = command;
0085
0086 for ( a = 1; a < argc; ++a ) {
0087 command += strlen( command ) + 1;
0088 argv[ a ] = command;
0089 }
0090 } else {
0091 argc = 0;
0092 }
0093 }
0094 }
0095
0096 result = main( argc, argv );
0097
0098 free( argv );
0099 free( cmdline );
0100
0101 exit( result );
0102 }
0103
0104
0105
0106
0107 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
0108 #define CONFIGURE_UNIFIED_WORK_AREAS
0109 #define CONFIGURE_STACK_CHECKER_ENABLED
0110
0111
0112 #define CONFIGURE_UNLIMITED_OBJECTS
0113 #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 8
0114 #define CONFIGURE_MAXIMUM_DRIVERS 16
0115 #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 32
0116
0117
0118 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
0119 #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
0120
0121 #define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
0122
0123 #define CONFIGURE_MAXIMUM_PROCESSORS CPU_MAXIMUM_PROCESSORS
0124
0125 #define CONFIGURE_DISABLE_BSP_SETTINGS
0126
0127 #define CONFIGURE_INIT
0128
0129 #include <rtems/confdefs.h>