Changes between Version 11 and Version 12 of PortingYourApp


Ignore:
Timestamp:
Jun 14, 2010, 3:37:11 PM (14 years ago)
Author:
Nicolas Pouillon
Comment:

Highlighting

Legend:

Unmodified
Added
Removed
Modified
  • PortingYourApp

    v11 v12  
    77Let's begin getting the source, and unpack it:
    88{{{
     9#!sh
    910$ wget http://ftp.gnu.org/pub/gnu/bc/bc-1.06.tar.gz
    1011$ tar xzvf bc-1.06.tar.gz
     
    1516Now create another directory, and extract the meaningful sources
    1617{{{
     18#!sh
    1719$ mkdir mutekh_port
    1820$ cd mutekh_port
     
    2729 * `bc/Makefile`
    2830   {{{
     31#!Makefile
    2932objs = bc.o execute.o global.o load.o main.o scan.o storage.o util.o
    3033
     
    3437 * `lib/Makefile`
    3538   {{{
     39#!Makefile
    3640objs = getopt.o getopt1.o number.o glue.o
    3741
     
    4044 * `Makefile`
    4145   {{{
     46#!Makefile
    4247subdirs = bc lib
    4348}}}
     
    5762Add a `lib/glue.c` file:
    5863{{{
     64#!c
    5965#include <hexo/types.h>
    6066
     
    8389Add a `signal.h` file:
    8490{{{
     91#!c
    8592#define SIGINT 0
    8693
     
    93100Create a `sys` directory, and a `sys/types.h` file containing:
    94101{{{
     102#!c
    95103#define isatty(x) 1
    96104#define fileno(x) 0
     
    108116Let's create a `config.h` file
    109117{{{
     118#!c
    110119#define HAVE_VPRINTF
    111120#define STDC_HEADERS
     
    157166
    158167{{{
     168#!sh
    159169user@host … mutekh $ make CONF=/path/to/my/ported/app/config BUILD=emu-darwin-x86
    160170
     
    166176
    167177{{{
     178#!sh
    168179user@host … mutekh $ ./kernel-emu.out
    169180MutekH is alive.
     
    184195
    185196{{{
     197#!sh
    186198user@host … mutekh $ make CONF=/path/to/my/ported/app/config BUILD=pf-tutorial:soclib-mips32el
    187199...
     
    193205
    194206{{{
     207#!sh
    195208user@host … caba-vgmn-mutekh_kernel_tutorial $ ./simulation.x mips32el:1 /path/to/mutekh/kernel-soclib-mips32el.out
    196209}}}