blob: e1990f850aadd8decfa54b7faceb0be4f5b80b1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
[[!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/tree/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-<ARCH>` 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-<ARCH>` 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-<srcpkg>`:
/ # 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" <pj@pehjota.net>
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
|