Changes between Version 3 and Version 4 of PortingSoftware

2014-03-16T18:21:44Z (10 years ago)
Vojtech Horky

A bit more about using coastline


  • PortingSoftware

    v3 v4  
    4545Currently, Coastline is hosted as a separate Git [ repository on GitHub].
    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.
    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`).
     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/` contains settings of various paths and also the flags for the compiler and the linker.
     61To initialize the build directory, you need to call
     64$HSCT_HOME/ init /path/to/HelenOS/source/tree
     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.
     70Once the directory is initialized, the user can build the ported software.
     71The build is invoked by calling `` in the following manner:
     73{{{ build <package>
     78This would download the tarballs, unpack them and run `configure` and `make` (or alternatives) for the given software.
     80Once the build is complete, the user can either package the software into a tarball or directly copy the application to HelenOS source tree.
     83{{{ install <package>
     87would copy the application (library) to HelenOS source tree that was specified during initialization.
     90{{{ archive <package>
     94would create a tarball in `archives/` subdirectory.
     95Unpacking this tarball into `uspace/overlay` would effectively install the package.
     98If you do not want to rebuild the software yourself, you can download [ 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.
     102=== Porting new software ===
     104 * harbour files
     105   * `$shipname`, `$shipsources` and `$shiptugs`
     106   * `build()` and `package()` functions
     107 * common issues
     108   * forcing cross-compilation
     109   * naming clashes