-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
60 lines (46 loc) · 1.9 KB
/
README
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
Northstar linux is an experimental linux distribution based on sabotage[1]
linux. Northstar builds its core userspace statically using the musl[2] C
standard library. Dynamic linking support is under development, but is very
experimental at this point and only targeting bloated software and a small
set of extreneous languages that require dynamic objects.
=== BOOTSTRAP INSTRUCTIONS:
To build northstar linux on a foreign linux system, you must first create a
bootstrap toolchain and then a chroot environment.
--- Building a bootstrap toolchain:
The bootstrap toolchain is built statically and installed to the prefix $BS
(default: /tmp/bootstrap) which is then mounted read-only at the same point
inside the chroot.
cp dist/bootstrap.config config
# set ARCH and MAKE_THREADS
vi config
. config
mk install-bootstrap
--- Preparing and entering the chroot:
At this point there should be toolchain capable of building northstar proper
inside a chroot. The next step is to prepare the chroot environment, copy the
northstar source tree inside the chroot, and enter the chroot.
. config
utils/prepare-chroot
utils/mount-chroot
# copy the source tree into $NS_ROOT
cp -r . $NS_ROOT/src/northstar
utils/enter-chroot
# ...
utils/umount-chroot
NOTE: remember to unmount the bind mounts inside the chroot before modifying
the contents of $NS_ROOT (eg: deleting them) or you could delete /dev/*,
causing varying amounts of damage to your host system.
=== BUILD INSTRUCTIONS:
Once you are running in a bootstrap environment, you can use mk to build
northstar packages, building and installing any build dependencies as needed.
cd /src/northstar
cp dist/stage1.config config
# set ARCH and MAKE_THREADS
vi config
. config
mk install-devel
mk install-core
=== LINKS ===
[1] http://github.com/chneukirchen/sabotage
http://github.com/rofl0r/sabotage
[2] http://www.etalabs.net/musl