Skip to content

Instantly share code, notes, and snippets.

View rick-masters's full-sized avatar

rick-masters

View GitHub Profile
@rick-masters
rick-masters / dovm
Created May 26, 2023 18:03
VirtualBox for live-bootstrap
#!/usr/bin/env bash
set -euo pipefail
set -v
rm -rf live-bootstrap
git clone https://github.com/fosslinux/live-bootstrap
cd live-bootstrap
git submodule update --init --recursive
sed -i bak "/^ if args.bare_metal:/d" rootfs.py
@rick-masters
rick-masters / run-sysb.sh
Created April 26, 2023 11:02
Script to complete live-bootstrap sysb/sysc after partial kernel bootstrap
#!/usr/bin/env bash [48/977428]
set -euo pipefail
if ! [ -f limine/bin/limine ]; then
git clone https://github.com/limine-bootloader/limine
(cd limine
./bootstrap
./configure --enable-bios
make
)
@rick-masters
rick-masters / fiwix-linux-caveats.md
Created December 11, 2022 16:12
List of caveats for getting a build of linux with live-boostrap on Fiwix kernel
  • Fiwix was built outside of live-bootstrap with gcc. Fiwix does compile and boot with tcc but I haven't taken that further.
  • I launched live-bootstrap on the Fiwix kernel rather than transitioning from builder-hex0.
  • I had to run live-bootstrap in phases due to unexplained intermittent Fiwix reboots.
  • I modified musl-1.1.24 to avoid syscalls set_thread_area and clone.
  • I modified autoconf-2.6.4 to expand a package version macro which was failing.
  • I modified helpers.sh to retry an intermittent failing rm -rf, probably due to a Fiwix kernel bug.
  • I skipped building musl-1.2.3 and curl.
  • I skipped the "sortextable" step in the Linux kernel build.
    • (sortextable "sorts the exception table" but it corrupted the kernel on fiwix.)
  • To test the built Linux kernel I inserted it into a Linux driven run of live-bootstrap.
@rick-masters
rick-masters / x86-bootstrap-syscalls.md
Last active November 30, 2022 18:07
x86 syscalls invoked in stage0-posix and live-bootstrap by first invoking process

These are the processes that first invoke a kernel x86 system call. It is not a list of every syscall a process invokes!

kaem-optional-seed: open(5) brk(45) read(3) write(4) fork(2) waitpid(7) execve(11)
hex0-seed: exit(1)
hex1: lseek(19)
M2: close(6)
hex2-1: chmod(15)
kaem: chdir(12)
M2-Mesoplanet: access(33) unlink(10)

@rick-masters
rick-masters / automake.log
Created September 16, 2022 13:39
Build failure of automake-1.11.2 in live-bootstrap
automake-1.11.2: beginning build using script automake-1.11.2.sh
automake-1.11.2: getting sources.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1171k 100 1171k 0 0 4362k 0 --:--:-- --:--:-- --:--:-- 4370k
automake-1.11.2.tar.bz2: OK
/usr/src/automake-1.11.2/build
automake-1.11.2: unpacking source.
automake-1.11.2: preparing source.
Applying patch: /usr/src/automake-1.11.2/patches/aclocal_glob.patch