[[!meta title="Getting ProteanOS"]] Mini ProteanOS Development Kit ============================== ProteanOS can be installed using [miniprokit][], the Mini ProteanOS Development Kit. It can be cloned from the Git repository as follows: $ git clone git://git.proteanos.com/miniprokit/miniprokit.git $ cd miniprokit/ Or the program can be downloaded by itself: $ wget http://git.proteanos.com/miniprokit/miniprokit.git/plain/miniprokit.sh See the [`README` file][miniprokit-README] for instructions on using miniprokit to install ProteanOS into a directory. [miniprokit]: http://git.proteanos.com/miniprokit/miniprokit.git/ [miniprokit-README]: http://git.proteanos.com/miniprokit/miniprokit.git/tree/README Building From Source ==================== ProteanOS is self hosting – it can build its own packages. Packages can be built either in an existing ProteanOS system or in another UNIX-like system (using a three-stage bootstrap). Bootstrapping ------------- ProteanOS can be bootstrapped using a set of [scripts][]. See the included [`README` file][bootstrap-readme] for more information about bootstrapping ProteanOS. A dedicated Debian sid chroot (installed with debootstrap) is recommended for bootstrapping ProteanOS with these scripts. [scripts]: http://git.proteanos.com/porting/initial-bootstrap.git/ [bootstrap-README]: http://git.proteanos.com/porting/initial-bootstrap.git/tree/README Building in an Installed ProteanOS System ----------------------------------------- First install the `build-essential-` package for your architecture (check `/etc/proteanos_arch` to find your architecture). This causes the installation of all the packages that are commonly used to build ProteanOS packages. The following command will install the right `build-essential-` package for your system (where `/ #` is the BusyBox ash prompt and not something to be typed): / # opkg install build-essential-$(cat /etc/proteanos_arch) Installing build-essential-amd64-linux-glibc (1.0) to root... [...] Now pick a source package you want to build. If you're not sure which source package builds a particular binary package, you can use the **opkg** utility to check the package's `Source` control field. / # opkg info file | grep '^Source: ' Source: file This tells us that the `file` source package builds the `file` binary package. Now, install `src-`: / # opkg install src-file Installing src-file (5.17-3) to root... Downloading http://proteanos.mirror.gnu.dk/pub/proteanos/feeds/dev/trunk/src/all/base/../../../../../../pool/f/file/src-file_5.17-3_src_all.opk. Configuring src-file. Find the source package installed under `/usr/src`: / # cd /usr/src/file_5.17-3/ Now check the `control` file for build dependencies: /usr/src/file_5.17-3 # cat control Maintainer: "P. J. McDermott" Build-Depends: opkhelper-3.0, libz.1-dev Homepage: http://www.darwinsys.com/file/ Install the build dependencies: /usr/src/file_5.17-3 # opkg install opkhelper-3.0 libz.1-dev Package opkhelper-3.0 (3.0.0-2) installed in root is up to date. Installing libz.1-dev (1.2.8+sip1-1) to root... Downloading http://proteanos.mirror.gnu.dk/pub/proteanos/feeds/dev/trunk/amd64-linux-glibc/all/base/../../../../../../pool/z/zlib/libz.1-dev_1.2.8+sip1-1_amd64-linux-glibc_all.opk. Configuring libz.1-dev. Make any changes you want to the packaging. And finally build the package (run `opkbuild -h` for information on **opkbuild**'s invocation): /usr/src/file_5.17-3 # opkbuild opkbuild: Detecting architecture and platform... opkbuild: Making work area... opkbuild: Parsing package metadata... opkbuild: Building source package... ob-genchanges: Generating "file_5.17-3_src_all.changes"... opkbuild: Build system: opkbuild: Architecture: amd64-linux-glibc opkbuild: Platform: dev opkbuild: Host system: opkbuild: Architecture: amd64-linux-glibc opkbuild: Platform: dev [...] ob-installdocs: Making link to documentation in package "file"... ob-installdocs: Making link to documentation in package "libmagic-dev"... ob-installdocs: Installing package documentation into package "libmagic.1"... ob-installdocs: Making link to documentation in package "file-doc"... ob-installdocs: Making link to documentation in package "libmagic-doc"... ob-genchanges: Generating "file_5.17-3_amd64-linux-glibc_dev.changes"... Find the resulting packages and changes files in the parent directory: /usr/src/file_5.17-3 # ls -1 ../ file-doc_5.17-3_all_all.opk file_5.17-3 file_5.17-3_amd64-linux-glibc_all.opk file_5.17-3_amd64-linux-glibc_dev.changes file_5.17-3_src_all.changes libmagic-dev_5.17-3_amd64-linux-glibc_all.opk libmagic-doc_5.17-3_all_all.opk libmagic.1_5.17-3_amd64-linux-glibc_all.opk src-file_5.17-3_src_all.opk