Changes between Version 5 and Version 6 of PortingYourApp
- Timestamp:
- Mar 24, 2010, 3:10:54 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PortingYourApp
v5 v6 60 60 char *getenv(const char *env) 61 61 { 62 62 return NULL; 63 63 } 64 64 … … 67 67 void app_start() 68 68 { 69 char *argv[] = {"bc"}; 70 main(1, argv); 69 printk("\x1b[12l\x1b[20h"); 70 char *argv[] = {"bc", "-l", NULL}; 71 main(sizeof(argv)/sizeof(char*)-1, argv); 71 72 } 72 73 }}} … … 115 116 = The MutekH configuration file = 116 117 117 FInally, let's create a configuration file. For instance, with the mutekh_tutorial soclib platform, we may use the following config: 118 Finally, let's create a configuration file. For instance, 119 with the tutorial platforms, we may use the following config: 118 120 {{{ 119 121 # Application license 120 122 CONFIG_LICENSE_APP_GPL 121 123 122 # Platform types123 CONFIG_ARCH_SOCLIB124 125 # Processor types126 CONFIG_CPU_ARM127 CONFIG_CPU_ARM_SOCLIB128 129 124 # Mutek features 130 125 CONFIG_PTHREAD 131 126 CONFIG_MUTEK_CONSOLE 127 128 CONFIG_ARCH_SMP undefined 132 129 133 130 CONFIG_LIBC_STREAM … … 136 133 CONFIG_HEXO_INTTYPES_DEPRECATED undefined 137 134 138 # Device drivers 139 CONFIG_DRIVER_CHAR_SOCLIBTTY 140 CONFIG_DRIVER_ICU_SOCLIB 135 # New source code module to be compiled 136 %append MODULES bc:$(CONFIGPATH) 141 137 142 # Code compilation options 143 CONFIG_COMPILE_DEBUG 144 CONFIG_COMPILE_OPTIMIZE 2 145 146 # New source code module to be compiled 147 CONFIG_MODULES bc:%CONFIGPATH 138 %include $(SRC_DIR)/examples/common/platforms.conf 139 %include $(SRC_DIR)/examples/common/build_options.conf 148 140 }}} 149 141 … … 152 144 = Compiling and running = 153 145 146 As seen in [wiki:Arch/Soclib/Tutorial tutorial], we may compile our application 147 154 148 {{{ 155 user@host ... caba-vgmn-mutekh_tutorial $ make CONFIG=config_soclib_arm APP=/path/to/mutek_port/src MUTEKH_DIR=path/to/mutekh149 user@host … mutekh $ make CONF=/path/to/my/ported/app/config BUILD=pf-tutorial:soclib-mips32el 156 150 ... 157 LD o .../caba-vgmn-mutekh_tutorial/mutekh/kernel-soclib-arm.o 158 LD out .../caba-vgmn-mutekh_tutorial/mutekh/kernel-soclib-arm.out 159 soclib-cc -P -p .../caba-vgmn-mutekh_tutorial/platform_desc -o system.x 160 [-------------------------------------------------------------------------=] 0 left 161 user@host … caba-vgmn-mutekh_tutorial $ ./simulation.x 151 LD o .../mutekh/kernel-soclib-mips32el.o 152 LD out .../mutekh/kernel-soclib-mips32el.out 162 153 }}} 154 155 Then run a simulator hosting the kernel 156 157 {{{ 158 user@host … mutekh $ ./simulation.x .../mutekh/kernel-soclib-mips32el.out 159 }}}