|
Lucio Andrés Illanes Albornoz |
11a356 |
> N.B. If you're interested in building Midipix using this script, please join the project's
|
|
Lucio Andrés Illanes Albornoz |
93594d |
IRC channel #midipix on Freenode and ask for the address of the internal repositories.
|
|
Lucio Andrés Illanes Albornoz |
93594d |
|
|
Lucio Andrés Illanes Albornoz |
d2a06e |
> N.B. If in doubt, consult the fault-tolerant & highly optimised 3D laser show-equipped
|
|
Lucio Andrés Illanes Albornoz |
2b85d0 |
usage screen w/ ./build.sh -h or a hungry lion might eat you alive.
|
|
Lucio Andrés Illanes Albornoz |
d2a06e |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
d3b354 |
A Midipix distribution consists of the following:
|
|
Lucio Andrés Illanes Albornoz |
cf57b4 |
* the native Midipix toolchain, consisting of perk, gcc, its dependencies,
|
|
Lucio Andrés Illanes Albornoz |
cf57b4 |
and binutils,
|
|
Lucio Andrés Illanes Albornoz |
cf57b4 |
* musl, a lightweight, fast, simple, and free libc[1] used by Midipix,
|
|
Lucio Andrés Illanes Albornoz |
cf57b4 |
* the Midipix runtime components that bridge the gap between the libc and the
|
|
Lucio Andrés Illanes Albornoz |
cf57b4 |
executive subsystems of all Windows NT-derived Windows OS starting with and
|
|
Lucio Andrés Illanes Albornoz |
cf57b4 |
including Windows XP, and
|
|
Lucio Andrés Illanes Albornoz |
cf57b4 |
* a steadily increasing number of 3rd party open source packages, as expected in
|
|
Lucio Andrés Illanes Albornoz |
584601 |
any modern POSIX-compliant \*nix environment, including GNU coreutils, shells,
|
|
Lucio Andrés Illanes Albornoz |
cf57b4 |
libraries such as ncurses, libressl, as well as Perl and Python.
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
d3b354 |
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
## Build-time dependencies
|
|
Lucio Andrés Illanes Albornoz |
0bd166 |
* **Alpine Linux**: binutils bzip2 cmake coreutils curl findutils g++ gawk gcc git grep gzip libc-dev linux-headers lzip make musl-dev net-tools patch perl perl-xml-parser procps sed tar util-linux wget xz zip
|
|
Lucio Andrés Illanes Albornoz |
154acf |
* **Debian/-derived Linux**: binutils bzip2 clzip cmake coreutils curl findutils g++ gawk gcc git grep gzip hostname libc6-dev libxml-parser-perl lzma make patch perl procps sed tar util-linux wget xz-utils zip
|
|
Lucio Andrés Illanes Albornoz |
0bd166 |
* **OpenSUSE Linux**: binutils bzip2 cmake coreutils curl findutils gawk gcc gcc-c++ git grep gzip hostname linux-glibc-devel lzip make patch perl perl-XML-Parser procps sed tar util-linux wget xz zip
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
d3b354 |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
> N.B. Busybox is not supported.
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
> N.B. Some packages (*coreutils*, *grep*, and *tar*, among others) override
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
Alpine's BusyBox utilities of the same name, as the latter are either non-
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
conformant or defective.
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
d3b354 |
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
## Building a midipix distribution
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
Install the above listed build-time dependencies, clone this repository, and run the
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
following command line within the latter:
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
d3b354 |
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
```shell
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
./build.sh -a nt64 -b release -D minipix,zipdist -P -v
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
```
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a8abe3 |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
## Non-exhaustive list of build variables
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
The following variables are primarily defined in ``midipix.env`` and may be overriden
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
on a per-build basis on the command-line after the last argument, if any, e.g.:
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
```shell
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
./build.sh -a nt64 -b release -D minipix,zipdist -P -v PREFIX_ROOT="${HOME}/midipix_tmp"
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
```
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
Furthermore, ``${HOME}/midipix_build.vars``, ``${HOME}/.midipix_build.vars``, and/or
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
``../midipix_build.vars`` are sourced during build initialisation and may contain
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
additional overrides, particularly ``${DEFAULT_GITROOT_HEAD}``.
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| Variable name | Default value | Description |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| ---------------- | ------------------------------- | ----------------------------------------------------------------------------- |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| ARCH | nt64 | Target 32-bit (nt32) or 64-bit (nt64) architecture |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| BUILD | debug | Build w/ debugging (debug) or release compiler flags |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| BUILD_DLCACHEDIR | ${PREFIX_ROOT}/dlcache | Absolute pathname to package downloads cache root directory |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| BUILD_WORKDIR | ${PREFIX}/tmp | Absolute pathname to temporary package build root directory |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| PREFIX | ${PREFIX_ROOT}/${ARCH}/${BUILD} | Absolute pathname to architecture- & build type-specific build root directory |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| PREFIX_CROSS | ${PREFIX}/${DEFAULT_TARGET} | Absolute pathname to toolchain root directory |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| PREFIX_MINGW32 | ${PREFIX}/x86_64-w64-mingw32 | Absolute pathname to MinGW toolchain root directory |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| PREFIX_MINIPIX | ${PREFIX}/minipix | Absolute pathname to minipix distribution root directory |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| PREFIX_NATIVE | ${PREFIX}/native | Absolute pathname to cross-compiled packages root directory |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| PREFIX_ROOT | ${HOME}/midipix | Absolute pathname to top-level directory |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
| PREFIX_RPM | ${PREFIX}/rpm | Absolute pathname to package RPM archive root directory |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
## Common tasks
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
Rebuild set of packages in isolation, along w/ their dependencies, if any, as needed,
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
or forcibly, respectively:
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
```shell
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
./build.sh [ ... ] -r mc,zsh
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
./build.sh [ ... ] -r \*mc,zsh
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
./build.sh [ ... ] -r \*\*mc,zsh
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
```
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
Rebuild entire build group:
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
```shell
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
./build.sh [ ... ] -r ALL native_runtime
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
```
|
|
Lucio Andrés Illanes Albornoz |
317b61 |
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
## References
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
* ``Sun, 25 Apr 2016 09:04:08 +0000 [1]`` musl FAQ
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
|
|
Lucio Andrés Illanes Albornoz |
11a356 |
vim:tw=0
|