summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-29 21:35:42 -0700
committerMichael Forney <mforney@mforney.org>2016-07-02 21:39:52 -0700
commitbf7aaf5bf62c1c5a2bb43cbdaa7d5e84db515c8d (patch)
tree32310abf83e253af092cdea891682eca50e3cea2 /README.md
parentf1887cc80e103508d7ca72d36aeeb44d005a899c (diff)
Update installation instructions
Diffstat (limited to 'README.md')
-rw-r--r--README.md71
1 files changed, 53 insertions, 18 deletions
diff --git a/README.md b/README.md
index 8eab6aff..2d34ce66 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,9 @@ up from the following:
- rc, sam
* [awk](http://github.com/onetrueawk/awk/)
* [bzip2](http://bzip.org/)
+* [bc](https://www.gnu.org/software/bc/)
* [curl](https://curl.haxx.se/)
+* [e2fsprogs](http://e2fsprogs.sourceforge.net/)
* [file](https://www.darwinsys.com/file/)
* [git](https://git-scm.com/)
* [iproute2](http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2)
@@ -39,22 +41,23 @@ To build it, you need a POSIX system with following tools:
* C toolchain for both host and target system
- target toolchain must support [`#include_next`](https://gcc.gnu.org/onlinedocs/cpp/Wrapper-Headers.html)
+* curl
* git
* gzip (or compatible tool)
* ninja
* rc (plan9-compatible)
* zic
-On a stock Ubuntu install, you'll need to install a few packages.
+On a Debian-based system, you'll need to install a few packages.
- sudo apt install 9base ninja-build curl git pax bison libc6-i386
+ sudo apt install 9base bison curl git ninja-build pax
PATH=$PATH:/usr/lib/plan9/bin
-You'll also need a toolchain targeting musl libc. The stali toolchain is
-convenient and works nicely.
+You'll also need a toolchain targeting musl libc. I recommend [musl-cross-make]
+if you want to build your own. If not, feel free to use my pre-built toolchain.
- git clone http://git.sta.li/toolchain
- PATH=$PATH:$PWD/toolchain/
+ git clone https://github.com/michaelforney/oasis-toolchain
+ PATH=$PATH:$PWD/oasis-toolchain/bin
You should make sure that your git config has a set user and email (for applying
patches).
@@ -62,12 +65,15 @@ patches).
git config --global user.name $MYNAME
git config --global user.email $MYEMAIL
+[musl-cross-make]: https://github.com/richfelker/musl-cross-make
+
# Installation
-These instructions use some references to environment variables. You are meant to replace those with appropriate values for your system.
+These instructions use some references to environment variables. You are meant
+to replace those with appropriate values for your system.
* `EDITOR`: Your text editor.
-* `DRIVE`: Your boot disk device.
+* `DRIVE`: Your target disk device.
* `ROOTPART`: Your / partition device.
* `BOOTPART`: Your /boot partition device.
* `TIMEZONE`: Your timezone.
@@ -76,20 +82,33 @@ First, prepare a root directory for oasis. We'll call it `$ROOT`. You should
mount any sub-filesystems you want at this time (for example, `/boot`).
cd $ROOT
- git clone https://github.com/michaelforney/oasis src/oasis
+ git clone -c 'core.sharedRepository=group' https://github.com/michaelforney/oasis src/oasis
cd src/oasis
Next, configure `config.rc` to your liking.
$EDITOR config.rc
-Now, fetch and extract the sources for the various packages.
+Currently, tz's `gen.rc` requires the sources to exist to operate correctly. So,
+check them out.
- rc ./fetch.rc -a
+ git submodule update --init core/tz/src
-Build oasis.
+Generate the ninja build files.
rc ./setup.rc
+
+If the version of `file` on your host system is less than 5.28, you'll need to
+obtain a newer version. If you are not cross-compiling, you can just use the one
+from oasis.
+
+ ninja out/core/file/file
+ mkdir $HOME/bin
+ cp out/core/file/file $HOME/bin
+ PATH=$HOME/bin:$PATH
+
+Build oasis.
+
ninja
Prepare root repository.
@@ -100,9 +119,15 @@ Prepare root repository.
git fetch local
git checkout master
+You may want to include a toolchain.
+
+ git remote add toolchain https://github.com/michaelforney/oasis-toolchain
+ git fetch toolchain
+ git merge -Xours toolchain/master
+
Prepare your `/etc` repository.
- git clone --template src/oasis/template --config 'oasis.root=..' https://github.com/michaelforney/oasis-etc etc
+ git clone --template src/oasis/template -c 'oasis.root=..' https://github.com/michaelforney/oasis-etc etc
Set up your system configuration.
@@ -129,9 +154,23 @@ Exit the chroot.
exit
+## Kernel
+
+Build/obtain a kernel. By convention, install it at `/boot/linux`.
+
## Bootloader
-Feel free to install any bootloader you want. `syslinux` is easy and convenient. For a BIOS system:
+Feel free to install any bootloader you want.
+
+### syslinux
+
+syslinux is one option that is easy and convenient. You'll need a 32-bit libc in
+order to run the pre-built binaries. On Debian-based systems, this is in
+`libc6-i386`.
+
+ sudo apt install libc6-i386
+
+For a BIOS system:
cd /tmp
curl -O https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz
@@ -149,7 +188,3 @@ Feel free to install any bootloader you want. `syslinux` is easy and convenient.
LINUX ../linux
APPEND root=/dev/$ROOTPART init=/bin/sinit ro
EOF
-
-## Kernel
-
-Build/obtain a kernel. By convention, install it at `/boot/linux`.