Verified Commit 783f5d60 authored by Firas Khalil Khana's avatar Firas Khalil Khana 🦋
Browse files

Archive stuff for now...

parent d44d76e8
......@@ -31,27 +31,32 @@ all: toolchain chroot
initialize:
@scripts/$@
@$(SCRD)/contact 34 "\033[0m $@ complete"
@$(SCRD)/contact "$@ complete"
toolchain:
@scripts/$@/run
@$(SCRD)/contact 34 "\033[0m $@ complete"
@$(SCRD)/contact "$@ complete"
release:
@scripts/$@
@$(SCRD)/contact "$@ complete"
chroot:
@scripts/$@/run
@$(SCRD)/contact 34 "\033[0m $@ complete"
@$(SCRD)/contact "$@ complete"
system:
@scripts/$@/run
@$(SCRD)/contact 34 "\033[0m $@ complete"
@$(SCRD)/contact "$@ complete"
release:
@scripts/$@
@$(SCRD)/contact 34 "\033[0m $@ complete"
img:
@sudo \
scripts/system/$@
@$(SCRD)/contact "$@ complete"
clean:
@scripts/$@
@$(SCRD)/contact 34 "\033[0m $@ complete"
@$(SCRD)/contact "$@ complete"
distclean:
@scripts/$@
......@@ -60,13 +65,13 @@ distclean:
@$(RM) $(SRCD)
@$(RM) $(TMPD)
@$(RM) $(TOLD)
@$(SCRD)/contact 34 "\033[0m $@ complete"
@$(SCRD)/contact "$@ complete"
restore restore-toolchain: clean
ifneq ($(wildcard $(BAKD)/toolchain/*),)
@sudo \
$(RSYNC) $(BAKD)/toolchain/ $(GLAD)/toolchain --delete
@$(SCRD)/contact 34 "\033[0m $@ complete"
@$(SCRD)/contact "$@ complete"
else
@echo Please construct the toolchain first!
@exit 1
......@@ -76,19 +81,20 @@ restore-chroot: clean
ifneq ($(wildcard $(BAKD)/chroot/*),)
@sudo \
$(RSYNC) $(BAKD)/chroot/ $(GLAD)/toolchain --delete
@$(SCRD)/contact 34 "\033[0m $@ complete"
@$(SCRD)/contact "$@ complete"
else
@echo Please construct the chroot first!
@exit 1
endif
enter enter-chroot: restore-chroot
@$(SCRD)/contact
@. $(SCRD)/chroot/variables
@. $(SCRD)/chroot/root
@. $(SCRD)/chroot/vkfs
@. $(SCRD)/chroot/resolv
@. $(SCRD)/system/check
@. $(SCRD)/chroot/enter
@$(SCRD)/contact 34 "\033[0m $@ complete"
@$(SCRD)/contact "$@ complete"
.PHONY: toolchain
......@@ -13,7 +13,6 @@ prepare() {
configure() {
./configure \
--prefix=/usr \
--with-sysdeps=/usr/lib/skalibs/sysdeps \
--with-include=/usr/include \
--with-dynlib=/usr/lib \
--enable-shared \
......
......@@ -10,7 +10,12 @@ prepare() {
$MAKE \
ARCH=$LARCH \
mrproper
mrproper &&
$MAKE \
O=$SBLD/$nom \
ARCH=$LARCH \
headers_check
} &&
configure() {
......
......@@ -5,12 +5,16 @@
. $CERD/$1/ceras &&
$SCRD/contact "$nom version $ver" &&
$SCRD/contact "check" &&
if [ ! -d $SRCD/$nom ]; then
$MKDIR $SRCD/$nom &&
$MKDIR $SRCD/$nom &&
. $SCRD/fetch ||
$SCRD/die ceras $nom fetch $? ||
exit
. $SCRD/fetch ||
$SCRD/die ceras $nom fetch $? ||
exit
else
. $SCRD/verify
. $SCRD/verify &&
$SCRD/contact
fi
......@@ -6,30 +6,30 @@
. $CERD/$2/ceras &&
. $CERD/$nom/$1.ceras &&
$SCRD/contact 34 "$nom version $ver" &&
$SCRD/contact "$nom $ver" &&
$SCRD/contact 34 "~~\033[0m prepare" &&
$SCRD/contact "prepare" &&
$MKDIR $FLOG/$nom/prepare &&
prepare > $FLOG/$nom/prepare/out.log 2> $FLOG/$nom/prepare/err.log ||
$SCRD/die $1 $nom prepare $? ||
exit
$SCRD/contact 34 "~~\033[0m configure" &&
$SCRD/contact "configure" &&
$MKDIR $FLOG/$nom/configure &&
configure > $FLOG/$nom/configure/out.log 2> $FLOG/$nom/configure/err.log ||
$SCRD/die $1 $nom configure $? ||
exit
$SCRD/contact 34 "~~\033[0m build" &&
$SCRD/contact "build" &&
$MKDIR $FLOG/$nom/build &&
build > $FLOG/$nom/build/out.log 2> $FLOG/$nom/build/err.log ||
$SCRD/die $1 $nom build $? ||
exit
$SCRD/contact 34 "~~\033[0m install" &&
$SCRD/contact "install" &&
$MKDIR $FLOG/$nom/install &&
install > $FLOG/$nom/install/out.log 2> $FLOG/$nom/install/err.log ||
$SCRD/die $1 $nom install $? ||
exit
$SCRD/contact 34 "\033[0m"
$SCRD/contact
......@@ -3,4 +3,4 @@
# Copyright (c) 2018-2020, Firas Khalil Khana
# Distributed under the terms of the ISC License
printf "\033[0;${1}m~~ $2\n"
printf "\033[0;34m~~\033[0m $1\n"
......@@ -3,6 +3,6 @@
# Copyright (c) 2018-2020, Firas Khalil Khana
# Distributed under the terms of the ISC License
[ $4 ] && printf "\033[0;31m~~ ~~ exited with status $4\033[0m\n" >&2 &&
tail $FLOG/$2/$3/err.log | sed -e "s/^/$(printf '\033[0;31m~~ ~~ ')/" -e "s/$/$(printf '\033[0m')/" &&
[ $4 ] && printf "\033[0;31m~~ exited with status $4\033[0m\n" >&2 &&
tail $FLOG/$2/$3/err.log | sed -e "s/^/$(printf '\033[0;31m~~ ')/" -e "s/$/$(printf '\033[0m')/" &&
exit $4
# Copyright (c) 2018-2020, Firas Khalil Khana
# Distributed under the terms of the ISC License
$SCRD/contact 34 "~~\033[0m fetch $nom" &&
$SCRD/contact "fetch $nom" &&
if [ $ver = git ]; then
$SCRD/contact 34 "~~\033[0m clone $nom" &&
$SCRD/contact "clone $nom" &&
git clone -q $url $SRCD/$nom &&
$SCRD/contact 34 "\033[0m"
$SCRD/contact
else
$SCRD/contact 34 "~~\033[0m download $nom" &&
$SCRD/contact "download $nom" &&
curl -Lso $SRCD/$nom/$(basename $url) $url &&
. $SCRD/verify &&
$SCRD/contact 34 "~~\033[0m extract $nom" &&
$SCRD/contact "extract $nom" &&
tar xf $SRCD/$nom/$(basename $url) -C $SRCD/$nom
fi
......@@ -18,31 +18,31 @@ $SCRD/envenomate libedit &&
$SCRD/envenomate bash &&
$SCRD/envenomate zstd &&
$SCRD/envenomate zlib-ng &&
$SCRD/envenomate lbzip2 &&
$SCRD/envenomate lbzip2-utils &&
#$SCRD/envenomate lbzip2 &&
#$SCRD/envenomate lbzip2-utils &&
$SCRD/envenomate xz &&
$SCRD/envenomate file &&
$SCRD/envenomate m4 &&
#$SCRD/envenomate file &&
#$SCRD/envenomate m4 &&
$SCRD/envenomate bc &&
$SCRD/envenomate binutils &&
$SCRD/envenomate gmp &&
$SCRD/envenomate mpfr &&
$SCRD/envenomate mpc &&
$SCRD/envenomate isl &&
$SCRD/envenomate gcc &&
$SCRD/envenomate ccache &&
$SCRD/envenomate attr &&
$SCRD/envenomate acl &&
$SCRD/envenomate skalibs &&
$SCRD/envenomate utmps &&
$SCRD/envenomate libcap &&
$SCRD/envenomate shadow &&
#$SCRD/envenomate gcc &&
$SCRD/envenomate ccache &&
$SCRD/envenomate pkgconf &&
$SCRD/envenomate sed &&
$SCRD/envenomate psmisc &&
#$SCRD/envenomate sed &&
#$SCRD/envenomate psmisc &&
$SCRD/envenomate flex &&
$SCRD/envenomate bison &&
$SCRD/envenomate grep &&
#$SCRD/envenomate grep &&
$SCRD/envenomate oksh &&
$SCRD/envenomate dash &&
$SCRD/envenomate libuargp &&
......@@ -51,30 +51,30 @@ $SCRD/envenomate musl-obstack &&
$SCRD/envenomate elfutils-libelf &&
$SCRD/envenomate libffi &&
$SCRD/envenomate libressl &&
$SCRD/envenomate kmod &&
$SCRD/envenomate python &&
$SCRD/envenomate samurai &&
$SCRD/envenomate meson &&
#$SCRD/envenomate kmod &&
#$SCRD/envenomate python &&
#$SCRD/envenomate samurai &&
#$SCRD/envenomate meson &&
$SCRD/envenomate toybox &&
$SCRD/envenomate hostname &&
$SCRD/envenomate which &&
$SCRD/envenomate popt &&
$SCRD/envenomate rsync &&
$SCRD/envenomate diffutils &&
$SCRD/envenomate mawk &&
$SCRD/envenomate findutils &&
$SCRD/envenomate grub &&
$SCRD/envenomate pcre2 &&
$SCRD/envenomate less &&
#$SCRD/envenomate popt &&
#$SCRD/envenomate rsync &&
#$SCRD/envenomate diffutils &&
#$SCRD/envenomate mawk &&
#$SCRD/envenomate findutils &&
#$SCRD/envenomate grub &&
#$SCRD/envenomate pcre2 &&
#$SCRD/envenomate less &&
$SCRD/envenomate pigz &&
$SCRD/envenomate iputils &&
$SCRD/envenomate iproute2 &&
$SCRD/envenomate kbd &&
$SCRD/envenomate make &&
$SCRD/envenomate patch &&
$SCRD/envenomate mandoc &&
$SCRD/envenomate libarchive &&
$SCRD/envenomate vim &&
#$SCRD/envenomate iputils &&
#$SCRD/envenomate iproute2 &&
#$SCRD/envenomate kbd &&
#$SCRD/envenomate make &&
#$SCRD/envenomate patch &&
#$SCRD/envenomate mandoc &&
#$SCRD/envenomate libarchive &&
#$SCRD/envenomate vim &&
$SCRD/envenomate execline &&
$SCRD/envenomate s6 &&
$SCRD/envenomate procps-ng &&
......@@ -84,6 +84,6 @@ $SCRD/envenomate s6-linux-init &&
$SCRD/envenomate s6-rc &&
$SCRD/envenomate eudev &&
$SCRD/envenomate s6-boot-scripts &&
$($SCRD/classify genome x86-64 "$SCRD/envenomate iucode-tool" true) &&
$($SCRD/classify genome x86-64 "$SCRD/envenomate intel-ucode" true) &&
#$($SCRD/classify genome x86-64 "$SCRD/envenomate iucode-tool" true) &&
#$($SCRD/classify genome x86-64 "$SCRD/envenomate intel-ucode" true) &&
$SCRD/envenomate linux
#!/usr/bin/dash -eux
# Copyright (c) 2018-2020, Firas Khalil Khana
# Distributed under the terms of the ISC License
CHOWN="chown -R" &&
LN="ln -fns" &&
MKDIR="install -d" &&
RM="rm -fr" &&
RSYNC="rsync -aHAXx" &&
UMOUNT="umount -fqR" &&
NAME=glaucus.img &&
SIZE=2G &&
LOOP=$(losetup -f) &&
MKDIR='/usr/bin/install -dv' &&
RM='/usr/bin/rm -frv' &&
RSYNC='/usr/bin/rsync -vaHAXx' &&
cd /home/glaucus &&
$RM glaucus.img &&
qemu-img create -f raw $NAME $SIZE &&
dd if=scripts/other/mbr.bin of=glaucus.img conv=notrunc bs=440 count=1 &&
......@@ -33,16 +37,21 @@ $MKDIR /mnt/loop/proc &&
$MKDIR /mnt/loop/run &&
$MKDIR /mnt/loop/sys &&
$RSYNC boot /mnt/loop --delete &&
$MKDIR -m 0750 /mnt/loop/root &&
$RSYNC boot /mnt/loop &&
$RSYNC etc /mnt/loop &&
$RSYNC root /mnt/loop &&
$RSYNC usr /mnt/loop &&
$RSYNC var /mnt/loop &&
$LN usr/bin /mnt/loop/bin &&
$LN usr/lib /mnt/loop/lib &&
$MKDIR /mnt/loop/boot/extlinux &&
$RSYNC scripts/other/extlinux.conf /mnt/loop/boot/extlinux &&
$CHOWN 0:0 /mnt/loop/boot/extlinux/extlinux.conf &&
extlinux --install /mnt/loop/boot/extlinux &&
umount /mnt/loop &&
$UMOUNT /mnt/loop &&
partx -d $LOOP &&
losetup -d $LOOP
......@@ -2,9 +2,11 @@
# Distributed under the terms of the ISC License
if [ $ver != git ]; then
$SCRD/contact "verify" &&
printf "$sum $SRCD/$nom/$(basename $url)" | sha512sum -c > /dev/null ||
$SCRD/die ceras $nom verify $? ||
exit
else
$SCRD/contact &&
exit 0
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment