Changes between Version 5 and Version 6 of PortingYourApp


Ignore:
Timestamp:
Mar 24, 2010, 3:10:54 PM (14 years ago)
Author:
Nicolas Pouillon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PortingYourApp

    v5 v6  
    6060char *getenv(const char *env)
    6161{
    62         return NULL;
     62    return NULL;
    6363}
    6464
     
    6767void app_start()
    6868{
    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);
    7172}
    7273}}}
     
    115116= The MutekH configuration file =
    116117
    117 FInally, let's create a configuration file. For instance, with the mutekh_tutorial soclib platform, we may use the following config:
     118Finally, let's create a configuration file. For instance,
     119with the tutorial platforms, we may use the following config:
    118120{{{
    119121# Application license
    120122CONFIG_LICENSE_APP_GPL
    121123
    122 # Platform types
    123 CONFIG_ARCH_SOCLIB
    124 
    125 # Processor types
    126 CONFIG_CPU_ARM
    127 CONFIG_CPU_ARM_SOCLIB
    128 
    129124# Mutek features
    130125CONFIG_PTHREAD
    131126CONFIG_MUTEK_CONSOLE
     127
     128CONFIG_ARCH_SMP undefined
    132129
    133130CONFIG_LIBC_STREAM
     
    136133CONFIG_HEXO_INTTYPES_DEPRECATED undefined
    137134
    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)
    141137
    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
    148140}}}
    149141
     
    152144= Compiling and running =
    153145
     146As seen in [wiki:Arch/Soclib/Tutorial tutorial], we may compile our application
     147
    154148{{{
    155 user@host ... caba-vgmn-mutekh_tutorial $ make CONFIG=config_soclib_arm APP=/path/to/mutek_port/src MUTEKH_DIR=path/to/mutekh
     149user@host … mutekh $ make CONF=/path/to/my/ported/app/config BUILD=pf-tutorial:soclib-mips32el
    156150...
    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
    162153}}}
     154
     155Then run a simulator hosting the kernel
     156
     157{{{
     158user@host … mutekh $ ./simulation.x .../mutekh/kernel-soclib-mips32el.out
     159}}}