diff --git a/rootfs.sh b/rootfs.sh index dbedb99..90d9b8f 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -10,18 +10,34 @@ mkdir -p tmp/ sudo mount -t tmpfs -o size=8G tmpfs tmp # base: mescc-tools-seed + +#debugging +cp busybox.static tmp/ + +# copy in all the mescc-tools-seed stuff cp -r mescc-tools-seed/x86/* tmp cp -r mescc-tools-seed/{M2-Planet,mes-m2,mescc-tools} tmp/ +# and the kaem seed cp ../bootstrap-seeds/POSIX/x86/kaem-optional-seed tmp/init cp ../bootstrap-seeds/POSIX/x86/kaem-optional-seed tmp/ cp -r ../bootstrap-seeds tmp/ +# replace the init kaem with our own custom one +mv tmp/kaem.run tmp/mescc-tools-seed.kaem.run +cp base.kaem.run tmp/kaem.run +# create directories needed mkdir tmp/bin +# after mescc-tools-seed we get into our own little directory because +# the mescc-tools-seed one is hella messy +mkdir tmp/after/bin -p +# put all the kaems for after in +cp after.kaem tmp/ +cp after.kaem.run tmp/after/kaem.run + # blynn-compiler -pushd tmp -git clone ../blynn-compiler-oriansj blynn-compiler -cp ../blynn-compiler-extras/go.kaem blynn-compiler/ -patch -Np0 -i ../blynn-compiler-extras/kaem.patch +pushd tmp/after +git clone ../../blynn-compiler-oriansj blynn-compiler +cp ../../blynn-compiler.kaem blynn-compiler/go.kaem mkdir blynn-compiler/{bin,generated} popd diff --git a/sysa/after.kaem b/sysa/after.kaem new file mode 100755 index 0000000..155b54b --- /dev/null +++ b/sysa/after.kaem @@ -0,0 +1,34 @@ +#!/bin/sh +# Copyright © 2020 fosslinux +# +# This file is part of live-bootstrap. +# +# live-bootstrap is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# live-bootstrap is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with live-bootstrap. If not, see . + +cd after + +# Prepare the directory +../catm bin/hex2 ../bin/hex2 +../catm bin/M1 ../bin/M1 +../catm bin/M2-Planet ../bin/M2-Planet +../catm bin/blood-elf ../bin/blood-elf +../catm bin/get_machine ../bin/get_machine +../catm bin/mes-m2 ../bin/mes-m2 +../catm bin/kaem ../bin/kaem +../catm bin/catm ../catm + +/busybox.static sh + +# Finally, reinvoke kaem in this directory +bin/kaem kaem.run diff --git a/sysa/after.kaem.run b/sysa/after.kaem.run new file mode 100755 index 0000000..a8e86c4 --- /dev/null +++ b/sysa/after.kaem.run @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright © 2020 fosslinux +# +# This file is part of live-bootstrap. +# +# live-bootstrap is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# live-bootstrap is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with live-bootstrap. If not, see . + +PATH=/after/bin + +# Part 2: blynn-compiler + +cd blynn-compiler +kaem go.kaem +cd .. diff --git a/sysa/base.kaem.run b/sysa/base.kaem.run new file mode 100755 index 0000000..121646b --- /dev/null +++ b/sysa/base.kaem.run @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright © 2020 fosslinux +# +# This file is part of live-bootstrap. +# +# live-bootstrap is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# live-bootstrap is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with live-bootstrap. If not, see . + +# Part 1: mescc-tools-seed + +./bootstrap-seeds/POSIX/x86/kaem-optional-seed mescc-tools-seed.kaem.run + +# Part 2-infinity: get the hell out of this mess of a directory + +bin/kaem --verbose --strict --file after.kaem diff --git a/sysa/blynn-compiler-extras/kaem.patch b/sysa/blynn-compiler-extras/kaem.patch deleted file mode 100644 index 0d475df..0000000 --- a/sysa/blynn-compiler-extras/kaem.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- kaem.run 2020-12-14 17:54:49.590792093 +1100 -+++ kaem.run 2020-12-14 17:55:34.293053332 +1100 -@@ -36,3 +36,9 @@ - ############################################ - - ../bin/kaem --verbose --strict --file mes-m2.kaem -+ -+############################################ -+# Phase-14 Build blynn-compiler # -+############################################ -+ -+../bin/kaem --verbose --strict --file blynn-compiler/go.kaem diff --git a/sysa/blynn-compiler-extras/go.kaem b/sysa/blynn-compiler.kaem similarity index 76% rename from sysa/blynn-compiler-extras/go.kaem rename to sysa/blynn-compiler.kaem index f43507f..08f2f21 100755 --- a/sysa/blynn-compiler-extras/go.kaem +++ b/sysa/blynn-compiler.kaem @@ -1,8 +1,24 @@ +#!/bin/sh +# Copyright © 2020 fosslinux +# +# This file is part of live-bootstrap. +# +# live-bootstrap is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# live-bootstrap is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with live-bootstrap. If not, see . + set -ex -PATH=/bin - -cd blynn-compiler +PATH=/after/bin # compile pack_blobs.c M2-Planet --architecture x86 \ diff --git a/sysa/busybox.static b/sysa/busybox.static new file mode 100755 index 0000000..336b302 Binary files /dev/null and b/sysa/busybox.static differ