Personal development fork of Iglunix-autobuild.
Find a file
Ella Stanforth 61a41d947c mo packages
2022-04-23 10:46:17 +00:00
bugs Init lazy-autobuild 2021-02-04 18:00:27 +01:00
dont_use_here Add a working fdisk (from util-linux) 2021-03-28 16:33:05 +02:00
.gitignore Fixes, many fixes 2021-02-12 17:20:43 +01:00
autobuild.sh mo packages 2022-04-23 10:46:17 +00:00
chroot.sh mo packages 2022-04-23 10:46:17 +00:00
chroot_fetch Move resolv.conf fase from prepare to fetch 2021-03-29 19:57:25 +02:00
chroot_iglunix use sh instead of ash for login shell 2021-02-21 15:39:18 +01:00
chroot_prepare_iglunix Move resolv.conf fase from prepare to fetch 2021-03-29 19:57:25 +02:00
docker_init_clean Rename to iglunix from lazybox 2021-02-06 13:52:14 +01:00
docker_port_forward Init lazy-autobuild 2021-02-04 18:00:27 +01:00
docker_remove_all_containers Init lazy-autobuild 2021-02-04 18:00:27 +01:00
docker_rm_farm Init lazy-autobuild 2021-02-04 18:00:27 +01:00
docker_start_farm Rename to iglunix from lazybox 2021-02-06 13:52:14 +01:00
Dockerfile_update Init lazy-autobuild 2021-02-04 18:00:27 +01:00
enter_chroot.sh mo packages 2022-04-23 10:46:17 +00:00
img.fdisk mo packages 2022-04-23 10:46:17 +00:00
initrd.sh mo packages 2022-04-23 10:46:17 +00:00
LICENSE Create LICENSE 2021-02-04 18:09:29 +01:00
qemu.sh mo packages 2022-04-23 10:46:17 +00:00
README.md Fase -> Phase 2022-03-25 18:26:05 +00:00

Welcome, this is iglunix-autobuild. Thu GNU General Public License v3 licensed (mostly) automatic build system for Iglunix. Iglunix for the uninitiated is a linux distribution designed to not use GNU, sadly this is quite hard. GNU make is still available inside this environment.

Usage

Phase 1: Docker

This will create an llvm/musl toolchain. I've heard that you guys don't like waiting for code to be compiled. A docker swarm to the rescue, completely over engineered.

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_overlay_net

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. This method might also reduce internet usage.

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

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 and execute a shell on a node of your choosing using. This can be done as follows: 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.

Phase 2: Chroot

WARNING: This part makes use of loopback devices, if the kernel was updated but the system not rebooted, reboot.

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.

  • chroot_prepare_iglunix

    This creates the chroot and cleans the most important locations (/lib, /bin, /sbin, /usr, /iglunix, /etc). It will also copy the network and keyboard configuration from the host. This will be put into the *.imgby a script hosted in iglunix/iglunix.

  • chroot_fetch

    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.

  • chroot_iglunix

    This will chroot into the Iglunix environment. Once inside run source /etc/profile this helps debugging.

  • inside_chroot

    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/

Phase 3: Boot

Use virt-manager or qemu to boot the iglunix.img.

Execute QEMU directly with the following command:

qemu-system-x86_64 path/to/disk -enable-kvm -m 4096

NOTE: Qemu is broken if you don't pass -m

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
  /usr/src/iglunix

The iglunix repo tries to be agnostic to the install dir. This repo choses (because it must choose) for /root/iglunix.

Further reading: