1
0
mirror of git://git.2f30.org/morpheus.git synced 2024-06-25 23:28:34 +00:00
morpheus/README

111 lines
2.4 KiB
Plaintext
Raw Normal View History

2014-03-03 17:26:07 +00:00
morpheus - a statically linked musl based Linux distro
======================================================
2013-09-06 11:05:08 +00:00
2014-03-03 17:26:07 +00:00
Building
--------
2013-09-17 16:25:48 +00:00
2014-03-04 16:39:24 +00:00
*** 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.
2013-09-05 13:31:38 +00:00
2014-03-03 17:36:28 +00:00
Please review config.mk prior to building and adjust any parameters.
2014-03-03 17:26:07 +00:00
2014-04-09 07:31:14 +00:00
Setting up the environment:
2014-03-03 17:26:07 +00:00
2014-04-09 07:31:14 +00:00
export mkbuild=$(pwd)/mkbuild
export configmk=$(pwd)/config.mk
export PATH=/path/to/musl/toolchain/bin:$PATH
To build everything (though this isn't recommended):
mk
2013-09-06 11:47:53 +00:00
2013-09-27 09:23:50 +00:00
To build specific packages:
2013-09-25 09:15:02 +00:00
2014-04-09 07:31:14 +00:00
mk TARG="pkg1 pkg2 ..."
or:
2013-09-25 09:15:02 +00:00
2014-04-09 07:31:14 +00:00
cd ports/pkg1; mk
2014-02-28 15:30:19 +00:00
2014-04-09 07:31:14 +00:00
To force build packages:
mk -a
2014-02-28 15:30:19 +00:00
2014-03-03 17:26:07 +00:00
To clean the build system's cache:
mk clean
2014-04-09 07:31:14 +00:00
To clean source dirs completely:
2014-03-03 17:26:07 +00:00
2014-04-09 07:31:14 +00:00
mk distclean
2014-03-03 17:26:07 +00:00
2014-03-03 17:26:48 +00:00
To fetch all packages without building anything:
2014-04-09 07:31:14 +00:00
mk fetch
2014-03-03 17:26:48 +00:00
Rebuilding the kernel
---------------------
2014-04-09 07:31:14 +00:00
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
2014-04-09 07:31:14 +00:00
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.
2014-03-03 17:26:07 +00:00
Installing
----------
2014-03-04 16:23:03 +00:00
There is currently no installer. There is a script that creates a 2GB
2014-03-03 17:26:07 +00:00
image file that is suitable to dd to a usb stick.
To create a bootable image:
2013-09-25 09:15:02 +00:00
2013-09-27 09:23:50 +00:00
sudo modprobe -r loop
sudo modprobe loop max_part=15 # to be done only once
2014-03-03 17:26:07 +00:00
sudo mk bootable # this invokes stuff/create-bootable
2013-09-17 15:16:00 +00:00
2014-03-03 17:26:07 +00:00
Make sure to change the kernel command line to point it to your root
2014-03-07 11:07:07 +00:00
device. You can do this at the boot prompt:
bzImage root=/dev/sd[X]1 rootwait init=/init ro
2013-09-27 09:23:50 +00:00
2014-04-09 07:31:14 +00:00
Otherwise modify ports/extlinux/extlinux.conf and rebuild the extlinux
package.
2014-03-07 11:07:07 +00:00
You will also want to modify the fstab file.
2014-03-03 17:26:07 +00:00
Testing
-------
2014-03-03 17:28:33 +00:00
To experiment with the x86_64 image in qemu:
2014-02-20 16:52:13 +00:00
qemu-system-x86_64 -hda morpheus-x86_64-0.0.img -enable-kvm -vga cirrus
2013-09-27 09:23:50 +00:00
Login with root and an empty password.
2013-09-05 13:31:38 +00:00
2013-12-12 14:23:58 +00:00
To obtain binary images go to http://dl.2f30.org/morpheus-img/
2014-03-03 17:36:28 +00:00
Debugging
---------
2014-04-09 07:31:14 +00:00
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:
2014-03-03 17:36:28 +00:00
2014-04-09 07:31:14 +00:00
mk 2>&1 | tee -a output.log
2014-03-03 17:36:28 +00:00
2014-03-15 20:19:42 +00:00
Props
-----
2014-03-16 15:38:03 +00:00
I'd like to thank the people behind the sabotage-linux project.
Their work has been really helpful to us.
2014-03-15 20:19:42 +00:00
2014-03-04 15:49:43 +00:00
Contact
-------
You can find us on #morpheus at irc.oftc.net.
2013-09-05 13:31:38 +00:00
Enjoy!