paul@397 | 1 | Introduction
|
paul@397 | 2 | ============
|
paul@394 | 3 |
|
paul@153 | 4 | This is a collection of L4Re packages for providing and using filesystems and
|
paul@153 | 5 | related components.
|
paul@153 | 6 |
|
paul@394 | 7 | This directory (departure) should be installed within the pkg directory in the
|
paul@153 | 8 | L4Re distribution.
|
paul@153 | 9 |
|
paul@397 | 10 | Prerequisites
|
paul@397 | 11 | =============
|
paul@397 | 12 |
|
paul@397 | 13 | This software requires some other software to be useful:
|
paul@397 | 14 |
|
paul@397 | 15 | * The Fiasco.OC microkernel and L4Re distribution
|
paul@397 | 16 | * The idl4re distribution
|
paul@397 | 17 |
|
paul@397 | 18 | Obtaining and Building idl4re
|
paul@397 | 19 | =============================
|
paul@397 | 20 |
|
paul@397 | 21 | The idl4re distribution provides a tool called idl that generates source files
|
paul@397 | 22 | from interface descriptions. It can be obtained as follows:
|
paul@397 | 23 |
|
paul@397 | 24 | hg clone https://hg.boddie.org.uk/L4Re/idl4re
|
paul@394 | 25 |
|
paul@397 | 26 | The software can be built as follows:
|
paul@397 | 27 |
|
paul@397 | 28 | cd idl4re
|
paul@397 | 29 | make
|
paul@397 | 30 |
|
paul@397 | 31 | When building the Departure software within the L4Re build system, the idl4re
|
paul@397 | 32 | directory will need to be present in the appropriate location, this being
|
paul@397 | 33 | inside the l4 directory. See below for more details.
|
paul@397 | 34 |
|
paul@397 | 35 | Obtaining and Building Fiasco.OC and L4Re
|
paul@397 | 36 | =========================================
|
paul@397 | 37 |
|
paul@397 | 38 | Although the build processes for Fiasco.OC and L4Re are generally documented,
|
paul@397 | 39 | the concise instructions for building the software have not been preserved in
|
paul@397 | 40 | the L4Re distribution, requiring the perusal of online resources. For example:
|
paul@394 | 41 |
|
paul@394 | 42 | https://github.com/kernkonzept/manifest/wiki/BUILDING
|
paul@394 | 43 |
|
paul@394 | 44 | Some reminders are provided below to save the reader the bother of looking up
|
paul@394 | 45 | or searching for this information, particularly if it does not continue to
|
paul@394 | 46 | reside in the above location.
|
paul@394 | 47 |
|
paul@401 | 48 | Obtaining and Building the ham Tool
|
paul@401 | 49 | -----------------------------------
|
paul@401 | 50 |
|
paul@394 | 51 | First of all, the ham tool has to be obtained. This can be done as follows:
|
paul@394 | 52 |
|
paul@394 | 53 | git clone https://github.com/kernkonzept/ham.git
|
paul@394 | 54 |
|
paul@394 | 55 | It can be built as follows:
|
paul@394 | 56 |
|
paul@394 | 57 | cd ham
|
paul@394 | 58 | make
|
paul@394 | 59 |
|
paul@397 | 60 | Returning to the parent directory, the Fiasco.OC and L4Re distributions can be
|
paul@394 | 61 | obtained as follows:
|
paul@394 | 62 |
|
paul@394 | 63 | ham/ham init -u https://github.com/kernkonzept/manifest.git
|
paul@394 | 64 | ham/ham sync
|
paul@394 | 65 |
|
paul@394 | 66 | (Referencing ham within its repository avoids any need to put the program on
|
paul@394 | 67 | the PATH, which is largely unnecessary since we will only be using it in this
|
paul@394 | 68 | particular location and for the specific purpose of downloading the remaining
|
paul@394 | 69 | software of interest.)
|
paul@394 | 70 |
|
paul@401 | 71 | Building Fiasco.OC
|
paul@401 | 72 | ------------------
|
paul@401 | 73 |
|
paul@397 | 74 | Here is a quick summary of the build process for Fiasco.OC starting at the
|
paul@397 | 75 | parent directory of the Fiasco.OC and L4Re distributions:
|
paul@394 | 76 |
|
paul@394 | 77 | cd fiasco
|
paul@394 | 78 | make BUILDDIR=mybuild
|
paul@394 | 79 | cd mybuild
|
paul@394 | 80 | make config
|
paul@394 | 81 | make
|
paul@394 | 82 |
|
paul@394 | 83 | The final make command can employ flags such as "-j8" or even "-j" without any
|
paul@394 | 84 | parameter to parallelise the build.
|
paul@394 | 85 |
|
paul@394 | 86 | At this point, this directory (departure) can be copied into the L4Re
|
paul@397 | 87 | distribution within the pkg directory. Also, the idl4re distribution should be
|
paul@397 | 88 | made available within the l4 directory itself.
|
paul@394 | 89 |
|
paul@401 | 90 | Possible L4Re Fix
|
paul@401 | 91 | -----------------
|
paul@401 | 92 |
|
paul@401 | 93 | It appears that the following file may need a fix or workaround for a problem
|
paul@401 | 94 | where IPC communications employ a bad protocol type:
|
paul@401 | 95 |
|
paul@401 | 96 | pkg/l4re-core/l4sys/include/cxx/ipc_iface
|
paul@401 | 97 |
|
paul@401 | 98 | Prior to this line...
|
paul@401 | 99 |
|
paul@401 | 100 | // handle in-data part of the arguments
|
paul@401 | 101 | int send_bytes =
|
paul@401 | 102 | Args::template write_op<Do_in_data>(mrs->mr, 0, Mr_bytes,
|
paul@401 | 103 | Opt::Opcode, a...);
|
paul@401 | 104 |
|
paul@401 | 105 | ...it appears necessary to introduce the following statement:
|
paul@401 | 106 |
|
paul@401 | 107 | mrs->mr[0] = 0;
|
paul@401 | 108 |
|
paul@401 | 109 | Building L4Re
|
paul@401 | 110 | -------------
|
paul@401 | 111 |
|
paul@394 | 112 | Here is a quick summary of the build process for L4Re, also starting at the
|
paul@397 | 113 | parent directory of the Fiasco.OC and L4Re distributions:
|
paul@394 | 114 |
|
paul@394 | 115 | cd l4
|
paul@394 | 116 | make B=mybuild
|
paul@394 | 117 | make O=mybuild config
|
paul@394 | 118 | make O=mybuild
|
paul@394 | 119 |
|
paul@394 | 120 | Again, the final make command can employ parallelisation flags. For example:
|
paul@394 | 121 |
|
paul@394 | 122 | make -j8 O=mybuild
|
paul@394 | 123 |
|
paul@394 | 124 | Along with the usual L4Re software, this will also build the software provided
|
paul@427 | 125 | by this distribution if this distribution has been placed at the pkg/departure
|
paul@427 | 126 | location within the l4 directory.
|
paul@427 | 127 |
|
paul@427 | 128 | Note also that to build this distribution successfully, the idl4re
|
paul@427 | 129 | distribution must reside within the l4 directory, as noted above.
|
paul@394 | 130 |
|
paul@397 | 131 | Defining the L4Re Configuration
|
paul@397 | 132 | ===============================
|
paul@394 | 133 |
|
paul@397 | 134 | An example configuration file is provided as conf/Makeconf.boot within this
|
paul@397 | 135 | distribution. Where no such existing file has been deployed, this example file
|
paul@397 | 136 | can be copied into a suitable location from within the l4 directory as
|
paul@397 | 137 | follows:
|
paul@397 | 138 |
|
paul@397 | 139 | cp pkg/departure/conf/Makeconf.boot conf/Makeconf.boot
|
paul@397 | 140 |
|
paul@397 | 141 | Otherwise, with an existing conf/Makeconf.boot file, to make the test programs
|
paul@397 | 142 | available to L4Re, add the following line to such a file:
|
paul@153 | 143 |
|
paul@394 | 144 | MODULE_SEARCH_PATH += $(L4DIR_ABS)/pkg/departure/conf
|
paul@153 | 145 |
|
paul@153 | 146 | It may also be necessary to add the following line as well:
|
paul@153 | 147 |
|
paul@394 | 148 | BOOTSTRAP_SEARCH_PATH += $(L4DIR_ABS)/pkg/departure/conf
|
paul@153 | 149 |
|
paul@153 | 150 | This removes any need to copy program configuration files and associated
|
paul@153 | 151 | resources to the L4Re distribution itself.
|
paul@153 | 152 |
|
paul@397 | 153 | Defining the Module Lists
|
paul@397 | 154 | =========================
|
paul@397 | 155 |
|
paul@153 | 156 | The program module lists in the conf subdirectory can either be appended to
|
paul@427 | 157 | the L4Re conf/modules.list file, or specific .list files can be copied to the
|
paul@394 | 158 | conf/modules.list location (potentially after taking a backup copy of the
|
paul@397 | 159 | original file). For example, from within the l4 directory:
|
paul@397 | 160 |
|
paul@397 | 161 | cp conf/modules.list conf/modules.list.orig
|
paul@427 | 162 | cat pkg/departure/conf/*.list > conf/modules.list
|
paul@397 | 163 |
|
paul@397 | 164 | Running Programs from this Distribution
|
paul@397 | 165 | =======================================
|
paul@397 | 166 |
|
paul@397 | 167 | With configuration measures in place, a program can be run in QEMU as follows:
|
paul@397 | 168 |
|
paul@427 | 169 | make O=mybuild qemu E=dstest_test_client
|
paul@397 | 170 |
|
paul@397 | 171 | The particular program used above is a short concurrency test.
|