2021-02-04 16:58:42 +00:00
2021-02-11 10:57:17 +00:00
Welcome, this is iglunix-autobuild.
2021-02-21 12:14:54 +00:00
Thu GNU General Public License v3 licensed (mostly) automatic build system for Iglunix.
2021-02-21 12:13:31 +00:00
Iglunix for the uninitiated is a linux distribution designed to not use _GNU_ , sadly this is quit hard. GNU make is still available inside this environment.
2021-02-04 16:58:42 +00:00
# Usage
## Fase 1: Docker
This will create an llvm/musl toolchain.
I've heard that you guys don't like waiting for code to be compiled.
2021-02-21 12:13:31 +00:00
A docker swarm to the rescue, completely over engineered.
2021-02-04 16:58:42 +00:00
Make your main pc/laptop the manager of the swarm using:
`docker swarm init --advertise-addr [The IP-address of your device you want to use local/global]`
It will return a command that allows your other pcs to join, use it.
On the main node run: `docker network create -d overlay my_docker_net`
2021-02-21 12:13:31 +00:00
The problem is that we can't chain commands when starting a docker service create, so we'll have to modify the base abyssos/abyss:dev docker container. We'll need to download packages for the installation, we'll add these to the our modified package.
2021-02-04 16:58:42 +00:00
This method might also reduce internet usage.
2021-02-11 10:57:17 +00:00
To initialize run ```docker_init_clean```, this will create iglunix_abyss.tar, this will have to be manually moved to all docker nodes and then loaded using: ``` docker load -i iglunix_abyss.tar```
2021-02-04 16:58:42 +00:00
To start the distributed compiler `docker_start_farm` can be used. Prior to execution modify `docker_start_farm` to suit the number of jobs you need to run.
Run ```docker ps -a``` to find the container id of your work nodes
2021-02-21 12:13:31 +00:00
and execute a shell on a node of your choosing using. This can be done as follows:
2021-02-04 16:58:42 +00:00
`docker exec -it [container id] /bin/sh`
Modify DISTCC_HOSTS in `compile` in one container to point to all the docker distcc volunteers. Afterwards run `compile` .
When your compiles are finished, `docker_rm_farm` can be used to remove the compile farm.
It could be useful to leave the compile farm around for the compilation indide the chroot. This is not yet supported.
## Fase 2: Chroot
2021-03-27 15:05:13 +00:00
WARNING: This part makes use of loopback devices, if the kernel was updated but the system not rebooted, reboot.
2021-02-21 12:13:31 +00:00
This part is significantly less over engineered (luckily).
There are 4 new commands the user should be aware of, they are written in chronological order.
2021-02-04 16:58:42 +00:00
2021-02-11 10:57:17 +00:00
* chroot_prepare_iglunix
2021-02-04 16:58:42 +00:00
2021-02-11 10:57:17 +00:00
This creates the chroot and cleans the most important locations (/lib, /bin, /sbin, /usr, /iglunix, /etc).
2021-02-21 12:13:31 +00:00
It will also copy the network and keyboard configuration from the host. This will be put into the `*.img` by a script hosted in iglunix/iglunix.
2021-02-04 16:58:42 +00:00
* chroot_fetch
2021-02-21 12:22:49 +00:00
This command will fetch the sources needed to get curl working inside the chroot. And some files for to be used inside the chroot environment. This command will automatically be executed by `chroot_prepare_iglunix` . It is __NOT NEEDED__ to be manually executed. But it can be for development purposes.
2021-02-11 10:57:17 +00:00
* chroot_iglunix
2021-02-04 16:58:42 +00:00
2021-02-21 12:13:31 +00:00
This will chroot into the Iglunix environment. Once inside run `source /etc/profile` this helps debugging.
2021-02-04 16:58:42 +00:00
* inside_chroot
2021-02-21 12:13:31 +00:00
This is the script that has to be executed inside the chroot to compile all the required packages in the correct order.
This will also generate `iglunix.img` in `/iglunix/`
2021-02-04 16:58:42 +00:00
## Fase 3: Boot
2021-02-11 10:57:17 +00:00
Use virt-manager or qemu to boot the `iglunix.img` .
2021-02-04 16:58:42 +00:00
2021-02-21 12:21:24 +00:00
Execute QEMU directly with the following command:
2021-02-04 17:27:19 +00:00
```
qemu-system-x86_64 path/to/disk -enable-kvm -m 4096
```
2021-02-06 12:28:41 +00:00
2021-02-21 12:21:24 +00:00
NOTE: Qemu is broken, we don't know why, use virt-manager.
2021-02-21 12:13:31 +00:00
## Trivia
Everything in trivia is not important.
* The name `Iglunix`
This comes from the following reasoning, by yours truly aheirman.
```
∄GNU --> iglu
iglu-unix --> iglunix
```
* The location to place the git repository of `iglunix` in the filesystem is controversial. These are the contenders:
```
/iglunix
/root/iglunix
```
The `iglunix` repo tries to be agnostic to the install dir. This repo choses (because it must choose) for `/root/iglunix` .
Further reading:
2021-02-06 12:28:41 +00:00
* https://www.youtube.com/watch?v=nGSNULpHHZc
* https://docs.docker.com/network/overlay/
* https://docs.docker.com/registry/