Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changes between Version 3 and Version 4 of PortingSoftware


Ignore:
Timestamp:
2014-03-16T18:21:44Z (5 years ago)
Author:
Vojtech Horky
Comment:

A bit more about using coastline

Legend:

Unmodified
Added
Removed
Modified
  • PortingSoftware

    v3 v4  
    4545Currently, Coastline is hosted as a separate Git [https://github.com/vhotspur/coastline repository on GitHub].
    4646
    47 TODO:
     47Coastline is a set of scripts that allows the developer porting software to HelenOS capture the porting process in a reasonable way.
     48The porting is captured as a shell script that runs the `configure` and other commands needed to build the ported software.
     49Apart from this it also prepares variables that contains proper path to HelenOS include directories or libraries.
     50Use of Coastline means that the porting process is reproducible and it also allows to factor our common routines.
    4851
    49  * principles
    50    * extracting the flags
    51    * caching built libraries
    52    * harbours
    53  * usage
    54  * writing harbour files
     52When the developer uses the Coastline, he is working with 3 directories.
     53The first one is the directory with Coastline checkout, in the scripts referred to as `HSCT_HOME`.
     54Second one is the build directory where the building happens.
     55And the last one is directory with HelenOS sources (`HSCT_HELENOS_ROOT`).
     56
     57The build directory needs to be initialized first.
     58During initialization, headers and libraries from HelenOS source tree are copied to the build directory and used compiler/linker flags are extracted and prepared for further use.
     59These are stored in the `helenos/` subdirectory.
     60A shell script `helenos/env.sh` contains settings of various paths and also the flags for the compiler and the linker.
     61To initialize the build directory, you need to call
     62
     63{{{
     64$HSCT_HOME/hsct.sh init /path/to/HelenOS/source/tree
     65}}}
     66
     67If you specify a profile (e.g. `ia32`) as a third argument, the initialization would prepare the build directory for that profile.
     68Specifying the word `build` as a last (fourth) argument would force a complete rebuild for the specified profile.
     69
     70Once the directory is initialized, the user can build the ported software.
     71The build is invoked by calling `hsct.sh` in the following manner:
     72
     73{{{
     74hsct.sh build <package>
     75}}}
     76
     77
     78This would download the tarballs, unpack them and run `configure` and `make` (or alternatives) for the given software.
     79
     80Once the build is complete, the user can either package the software into a tarball or directly copy the application to HelenOS source tree.
     81Running
     82
     83{{{
     84hsct.sh install <package>
     85}}}
     86
     87would copy the application (library) to HelenOS source tree that was specified during initialization.
     88Executing
     89
     90{{{
     91hsct.sh archive <package>
     92}}}
     93
     94would create a tarball in `archives/` subdirectory.
     95Unpacking this tarball into `uspace/overlay` would effectively install the package.
     96
     97
     98If you do not want to rebuild the software yourself, you can download [http://helenos.alisma.cz/coastline/matrix/ pre-built packages].
     99Please note that these packages are not 100% up-to-date with mainline and sometimes may not work or may work only partially.
     100
     101
     102=== Porting new software ===
     103
     104 * harbour files
     105   * `$shipname`, `$shipsources` and `$shiptugs`
     106   * `build()` and `package()` functions
     107 * common issues
     108   * forcing cross-compilation
     109   * naming clashes