morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus.git
Log | Files | Refs | Submodules | README | LICENSE

README (3620B)


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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
morpheus - a statically linked musl based Linux distro
======================================================

Building
--------

*** HIGHLY EXPERIMENTAL SOFTWARE - READ THE CODE FIRST! ***

To build  morpheus you  currently need an  x86_64/x86 host.   You will
need to have mk(1) from 9base or plan9port.

Please review config.mk prior to building and adjust any parameters.

Setting up the environment:

  export mkbuild=$(pwd)/mkbuild
  export configmk=$(pwd)/config.mk
  export PATH=/path/to/musl/toolchain/bin:$PATH

Clone the git submodules, either via git commands or:

  mk init

To build everything (though this isn't recommended):

  mk

To build specific ports:

  mk TARG="port1 port2 ..."

  or:

  cd ports/port1; mk

To force build ports:

  mk -a

To clean the build system's cache:

  mk clean

To clean source dirs completely:

  mk distclean

To fetch all ports without building anything:

  mk fetch

To generate a package tarball:

  mk TARG="port1 port2 ..." package

You can then install the package using installpkg(1) from
http://git.2f30.org/pkgtools.

To install a port to the rootfs:

  mk TARG="port1 port2 ..." ROOT=$(pwd)/root install

Note that this however will *not* create the /var/log/packages
entries.

For a bootable system you need at least the following packages:

  busybox#1.22.1.pkg.tgz
  curl#7.36.0.pkg.tgz
  e2fsprogs#1.42.9.pkg.tgz
  extlinux#6.02.pkg.tgz
  file#5.17.pkg.tgz
  fs.pkg.tgz
  hbase.pkg.tgz
  ii.pkg.tgz
  libarchive#3.1.2.pkg.tgz
  linux#3.10.32.pkg.tgz
  mksh#R47.pkg.tgz
  pkgtools.pkg.tgz
  sbase.pkg.tgz
  sdhcp.pkg.tgz
  sinit.pkg.tgz
  smdev.pkg.tgz
  tmux#1.9a.pkg.tgz
  ubase.pkg.tgz
  vim#7.4.pkg.tgz

There are precompiled versions at http://morpheus.2f30.org/0.0 for the
x86_64   architecture.   Use   the  misc/install-morpheus   script  to
bootstrap your system.

We  suggest using  a  stripped-down CRUX  rootfs  for building  ports.

http://morpheus.2f30.org/0.0/packages/x86_64/emul.pkg.tgz.

Rebuilding the kernel
---------------------

There is a default config for  the kernel in ports/linux.  The default
config is  copied over  .config in the  kernel source  directory every
time you do a build via mk(1).   You can adjust your local .config and
copy  it over  the  relevant config  in ports/linux  or  you can  just
manually  compile  the  kernel  and copy  System.map  and  bzImage  to
$ROOT/boot.

Installing
----------

There is currently no installer.  There is a script that creates a 2GB
image file that is suitable to dd to a usb stick.

To create a bootable image:

  sudo modprobe -r loop
  sudo modprobe loop max_part=15 # to be done only once
  sudo mk ROOT=$(pwd)/root bootable # set ROOT to point to your rootfs

Make sure to change  the kernel command line to point  it to your root
device.  You can do this at the boot prompt:

  bzImage root=/dev/sd[X]1 rootwait ro

Otherwise modify ports/extlinux/extlinux.conf and rebuild the extlinux
port or directly modify $ROOT/boot/extlinux.conf.

You will also want to modify the fstab file.

Testing
-------

To experiment with the x86_64 image in qemu:

  qemu-system-x86_64 -hda morpheus-x86_64-0.0.img -enable-kvm -vga cirrus

Login with root and an empty password.

Debugging
---------

In some  cases you may  want to set nprocs to 1  in order to  get sane
build output. You can then use something like the following:

  mk 2>&1 | tee -a output.log

Props
-----

I'd like to thank the people behind the sabotage-linux project.
Their work has been really helpful to us.

Contact
-------

You can find us on #morpheus at irc.oftc.net or through
tech@lists.2f30.org.

Enjoy!