logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 545bb42ca800af28086ebd1fa2c8ed46726a6f74
parent d13320dbfa9d4c10325e80783e040ae6a9559dfa
Author: fosslinux <fosslinux@aussies.space>
Date:   Fri, 15 Dec 2023 11:54:29 +0000

Merge pull request #334 from fosslinux/simplify

Simplify + Sustainability

Diffstat:

M.github/workflows/lint.yml4++--
M.gitignore5++---
M.gitmodules7+++----
M.reuse/dep52+-
MDEVEL.md60+++++++++++++++++++++++++++++-------------------------------
MREADME.rst222++++++++++++++++++++++++++++++++-----------------------------------------------
Mdownload-distfiles.sh35+++++++++++++----------------------
Alib/generator.py338+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/sysgeneral.py132-------------------------------------------------------------------------------
Mlib/tmpdir.py15+++------------
Mlib/utils.py8+++++---
Mparts.rst147+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
Mrootfs.py65+++++++++++++++++++++++++++++++----------------------------------
Aseed/after.kaem15+++++++++++++++
Aseed/preseeded.kaem8++++++++
Aseed/script-generator.c627+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aseed/seed.kaem67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aseed/stage0-posix1+
Asteps/SHA256SUMS.pkgs118+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsysa/autoconf-2.52/autoconf-2.52.sh -> steps/autoconf-2.52/pass1.sh0
Rsysa/autoconf-2.52/sources -> steps/autoconf-2.52/sources0
Rsysa/autoconf-2.53/autoconf-2.53.sh -> steps/autoconf-2.53/pass1.sh0
Rsysa/autoconf-2.53/patches/autoconf_252.patch -> steps/autoconf-2.53/patches/autoconf_252.patch0
Rsysa/autoconf-2.53/sources -> steps/autoconf-2.53/sources0
Rsysa/autoconf-2.54/autoconf-2.54.sh -> steps/autoconf-2.54/pass1.sh0
Rsysa/autoconf-2.54/sources -> steps/autoconf-2.54/sources0
Rsysa/autoconf-2.55/autoconf-2.55.sh -> steps/autoconf-2.55/pass1.sh0
Rsysa/autoconf-2.55/sources -> steps/autoconf-2.55/sources0
Rsysa/autoconf-2.57/autoconf-2.57.sh -> steps/autoconf-2.57/pass1.sh0
Rsysa/autoconf-2.57/sources -> steps/autoconf-2.57/sources0
Rsysa/autoconf-2.59/autoconf-2.59.sh -> steps/autoconf-2.59/pass1.sh0
Rsysa/autoconf-2.59/sources -> steps/autoconf-2.59/sources0
Rsysa/autoconf-2.61/autoconf-2.61.sh -> steps/autoconf-2.61/pass1.sh0
Rsysa/autoconf-2.61/sources -> steps/autoconf-2.61/sources0
Rsysa/autoconf-2.64/autoconf-2.64.sh -> steps/autoconf-2.64/pass1.sh0
Rsysa/autoconf-2.64/sources -> steps/autoconf-2.64/sources0
Rsysa/autoconf-2.69/autoconf-2.69.sh -> steps/autoconf-2.69/pass1.sh0
Rsysa/autoconf-2.69/sources -> steps/autoconf-2.69/sources0
Rsysc/autoconf-2.71/autoconf-2.71.sh -> steps/autoconf-2.71/pass1.sh0
Rsysc/autoconf-2.71/sources -> steps/autoconf-2.71/sources0
Rsysc/autoconf-archive-2021.02.19/autoconf-archive-2021.02.19.sh -> steps/autoconf-archive-2021.02.19/pass1.sh0
Rsysc/autoconf-archive-2021.02.19/sources -> steps/autoconf-archive-2021.02.19/sources0
Rsysc/autogen-5.18.16/autogen-5.18.16.sh -> steps/autogen-5.18.16/pass1.sh0
Rsysc/autogen-5.18.16/sources -> steps/autogen-5.18.16/sources0
Rsysa/automake-1.10.3/automake-1.10.3.sh -> steps/automake-1.10.3/pass1.sh0
Rsysa/automake-1.10.3/patches/aclocal_glob.patch -> steps/automake-1.10.3/patches/aclocal_glob.patch0
Rsysa/automake-1.10.3/sources -> steps/automake-1.10.3/sources0
Rsysa/automake-1.11.2/automake-1.11.2.sh -> steps/automake-1.11.2/pass1.sh0
Rsysa/automake-1.11.2/patches/aclocal_glob.patch -> steps/automake-1.11.2/patches/aclocal_glob.patch0
Rsysa/automake-1.11.2/sources -> steps/automake-1.11.2/sources0
Rsysa/automake-1.15.1/automake-1.15.1.sh -> steps/automake-1.15.1/pass1.sh0
Rsysa/automake-1.15.1/patches/aclocal_glob.patch -> steps/automake-1.15.1/patches/aclocal_glob.patch0
Rsysa/automake-1.15.1/patches/bootstrap.patch -> steps/automake-1.15.1/patches/bootstrap.patch0
Rsysa/automake-1.15.1/patches/shellcheck-bypass.patch -> steps/automake-1.15.1/patches/shellcheck-bypass.patch0
Rsysa/automake-1.15.1/sources -> steps/automake-1.15.1/sources0
Rsysc/automake-1.16.3/automake-1.16.3.sh -> steps/automake-1.16.3/pass1.sh0
Rsysc/automake-1.16.3/sources -> steps/automake-1.16.3/sources0
Rsysa/automake-1.6.3/stage1.sh -> steps/automake-1.6.3/pass1.sh0
Rsysa/automake-1.6.3/stage2.sh -> steps/automake-1.6.3/pass2.sh0
Rsysa/automake-1.6.3/sources -> steps/automake-1.6.3/sources0
Rsysa/automake-1.7.8/automake-1.7.8.sh -> steps/automake-1.7.8/pass1.sh0
Rsysa/automake-1.7.8/sources -> steps/automake-1.7.8/sources0
Rsysa/automake-1.7/automake-1.7.sh -> steps/automake-1.7/pass1.sh0
Rsysa/automake-1.7/sources -> steps/automake-1.7/sources0
Rsysa/automake-1.8.5/automake-1.8.5.sh -> steps/automake-1.8.5/pass1.sh0
Rsysa/automake-1.8.5/sources -> steps/automake-1.8.5/sources0
Rsysa/automake-1.9.6/automake-1.9.6.sh -> steps/automake-1.9.6/pass1.sh0
Rsysa/automake-1.9.6/sources -> steps/automake-1.9.6/sources0
Asteps/bash-2.05b/bash-2.05b.checksums1+
Rsysa/bash-2.05b/mk/builtins.mk -> steps/bash-2.05b/mk/builtins.mk0
Rsysa/bash-2.05b/mk/common.mk -> steps/bash-2.05b/mk/common.mk0
Rsysa/bash-2.05b/mk/main.mk -> steps/bash-2.05b/mk/main.mk0
Rsysa/bash-2.05b/bash-2.05b.kaem -> steps/bash-2.05b/pass1.kaem0
Rsysa/bash-2.05b/bash-2.05b.sh -> steps/bash-2.05b/pass2.sh0
Rsysa/bash-2.05b/patches/dev-tty.patch -> steps/bash-2.05b/patches/dev-tty.patch0
Rsysa/bash-2.05b/patches/extern.patch -> steps/bash-2.05b/patches/extern.patch0
Rsysa/bash-2.05b/patches/locale.patch -> steps/bash-2.05b/patches/locale.patch0
Rsysa/bash-2.05b/patches/mes-libc.patch -> steps/bash-2.05b/patches/mes-libc.patch0
Rsysa/bash-2.05b/patches/missing-defines.patch -> steps/bash-2.05b/patches/missing-defines.patch0
Rsysa/bash-2.05b/patches/size.patch -> steps/bash-2.05b/patches/size.patch0
Rsysa/bash-2.05b/patches/tinycc.patch -> steps/bash-2.05b/patches/tinycc.patch0
Rsysa/bash-2.05b/sources -> steps/bash-2.05b/sources0
Rsysc/bash-5.2.15/bash-5.2.15.sh -> steps/bash-5.2.15/pass1.sh0
Rsysc/bash-5.2.15/sources -> steps/bash-5.2.15/sources0
Rsysa/bc-1.07.1/bc-1.07.1.sh -> steps/bc-1.07.1/pass1.sh0
Rsysa/bc-1.07.1/sources -> steps/bc-1.07.1/sources0
Rsysa/binutils-2.30/binutils-2.30.sh -> steps/binutils-2.30/pass1.sh0
Rsysa/binutils-2.30/patches/libiberty-add-missing-config-directory-reference.patch -> steps/binutils-2.30/patches/libiberty-add-missing-config-directory-reference.patch0
Rsysa/binutils-2.30/patches/new-gettext.patch -> steps/binutils-2.30/patches/new-gettext.patch0
Rsysa/binutils-2.30/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch -> steps/binutils-2.30/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch0
Rsysa/binutils-2.30/sources -> steps/binutils-2.30/sources0
Rsysc/binutils-2.38/pass1.sh -> steps/binutils-2.38/pass1.sh0
Rsysc/binutils-2.38/pass2.sh -> steps/binutils-2.38/pass2.sh0
Rsysc/binutils-2.38/patches/libiberty-add-missing-config-directory-reference.patch -> steps/binutils-2.38/patches/libiberty-add-missing-config-directory-reference.patch0
Rsysc/binutils-2.38/patches/new-gettext.patch -> steps/binutils-2.38/patches/new-gettext.patch0
Rsysc/binutils-2.38/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch -> steps/binutils-2.38/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch0
Rsysc/binutils-2.38/sources -> steps/binutils-2.38/sources0
Rsysc/bison-2.3/import-gnulib.sh -> steps/bison-2.3/import-gnulib.sh0
Rsysc/bison-2.3/bison-2.3.sh -> steps/bison-2.3/pass1.sh0
Rsysc/bison-2.3/patches/autover-mismatch.patch -> steps/bison-2.3/patches/autover-mismatch.patch0
Rsysc/bison-2.3/patches/fopen-safer.patch -> steps/bison-2.3/patches/fopen-safer.patch0
Rsysc/bison-2.3/patches/gnulib-fix.patch -> steps/bison-2.3/patches/gnulib-fix.patch0
Rsysc/bison-2.3/patches/our-bison.patch -> steps/bison-2.3/patches/our-bison.patch0
Rsysc/bison-2.3/sources -> steps/bison-2.3/sources0
Rsysa/bison-3.4.1/files/config.h -> steps/bison-3.4.1/files/config.h0
Rsysa/bison-3.4.1/files/configmake.h -> steps/bison-3.4.1/files/configmake.h0
Rsysa/bison-3.4.1/files/parse-gram.c -> steps/bison-3.4.1/files/parse-gram.c0
Rsysa/bison-3.4.1/files/parse-gram.h -> steps/bison-3.4.1/files/parse-gram.h0
Rsysa/bison-3.4.1/files/parse-gram.y -> steps/bison-3.4.1/files/parse-gram.y0
Rsysa/bison-3.4.1/mk/lib.mk -> steps/bison-3.4.1/mk/lib.mk0
Rsysa/bison-3.4.1/mk/main.mk -> steps/bison-3.4.1/mk/main.mk0
Rsysa/bison-3.4.1/mk/src.mk -> steps/bison-3.4.1/mk/src.mk0
Rsysa/bison-3.4.1/stage1.sh -> steps/bison-3.4.1/pass1.sh0
Rsysa/bison-3.4.1/stage2.sh -> steps/bison-3.4.1/pass2.sh0
Rsysa/bison-3.4.1/stage3.sh -> steps/bison-3.4.1/pass3.sh0
Rsysa/bison-3.4.1/patches/fseterr.patch -> steps/bison-3.4.1/patches/fseterr.patch0
Rsysa/bison-3.4.1/patches/missing-includes.patch -> steps/bison-3.4.1/patches/missing-includes.patch0
Rsysa/bison-3.4.1/sources -> steps/bison-3.4.1/sources0
Rsysc/bison-3.4.2/import-gnulib.sh -> steps/bison-3.4.2/import-gnulib.sh0
Rsysc/bison-3.4.2/bison-3.4.2.sh -> steps/bison-3.4.2/pass1.sh0
Rsysc/bison-3.4.2/patches/gnulib-makefile.patch -> steps/bison-3.4.2/patches/gnulib-makefile.patch0
Rsysc/bison-3.4.2/patches/our-bison.patch -> steps/bison-3.4.2/patches/our-bison.patch0
Rsysc/bison-3.4.2/patches/po-files.patch -> steps/bison-3.4.2/patches/po-files.patch0
Rsysc/bison-3.4.2/sources -> steps/bison-3.4.2/sources0
Asteps/bzip2-1.0.8/bzip2-1.0.8.checksums1+
Rsysa/bzip2-1.0.8/bzip2-1.0.8.kaem -> steps/bzip2-1.0.8/pass1.kaem0
Rsysa/bzip2-1.0.8/bzip2-1.0.8.sh -> steps/bzip2-1.0.8/pass2.sh0
Rsysa/bzip2-1.0.8/patches/coreutils.patch -> steps/bzip2-1.0.8/patches/coreutils.patch0
Rsysa/bzip2-1.0.8/patches/mes-libc.patch -> steps/bzip2-1.0.8/patches/mes-libc.patch0
Rsysa/bzip2-1.0.8/sources -> steps/bzip2-1.0.8/sources0
Rsysc/ca-certificates-3.88.1/ca-certificates-3.88.1.sh -> steps/ca-certificates-3.88.1/pass1.sh0
Rsysc/ca-certificates-3.88.1/sources -> steps/ca-certificates-3.88.1/sources0
Rsysa/checksum-transcriber-1.0/checksum-transcriber-1.0.amd64.checksums -> steps/checksum-transcriber-1.0/checksum-transcriber-1.0.amd64.checksums0
Rsysa/checksum-transcriber-1.0/checksum-transcriber-1.0.riscv64.checksums -> steps/checksum-transcriber-1.0/checksum-transcriber-1.0.riscv64.checksums0
Asteps/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums1+
Rsysa/checksum-transcriber-1.0/checksum-transcriber-1.0.kaem -> steps/checksum-transcriber-1.0/pass1.kaem0
Rsysa/checksum-transcriber-1.0/src/checksum-transcriber.c -> steps/checksum-transcriber-1.0/src/checksum-transcriber.c0
Rsysa/coreutils-5.0/coreutils-5.0.checksums -> steps/coreutils-5.0/coreutils-5.0.checksums0
Rsysa/coreutils-5.0/mk/main.mk -> steps/coreutils-5.0/mk/main.mk0
Rsysa/coreutils-5.0/mk/pass2.mk -> steps/coreutils-5.0/mk/pass2.mk0
Rsysa/coreutils-5.0/coreutils-5.0.kaem -> steps/coreutils-5.0/pass1.kaem0
Rsysa/coreutils-5.0/coreutils-5.0.sh -> steps/coreutils-5.0/pass2.sh0
Asteps/coreutils-5.0/patches-pass2/touch-dereference.patch2++
Asteps/coreutils-5.0/patches-pass2/touch-getdate.patch2++
Rsysa/coreutils-5.0/patches/expr-strcmp.patch -> steps/coreutils-5.0/patches/expr-strcmp.patch0
Rsysa/coreutils-5.0/patches/ls-strcmp.patch -> steps/coreutils-5.0/patches/ls-strcmp.patch0
Rsysa/coreutils-5.0/patches/mbstate.patch -> steps/coreutils-5.0/patches/mbstate.patch0
Rsysa/coreutils-5.0/patches/modechange.patch -> steps/coreutils-5.0/patches/modechange.patch0
Rsysa/coreutils-5.0/patches/sort-locale.patch -> steps/coreutils-5.0/patches/sort-locale.patch0
Rsysa/coreutils-5.0/patches/tac-uint64.patch -> steps/coreutils-5.0/patches/tac-uint64.patch0
Rsysa/coreutils-5.0/patches/touch-dereference.patch -> steps/coreutils-5.0/patches/touch-dereference.patch0
Rsysa/coreutils-5.0/patches/touch-getdate.patch -> steps/coreutils-5.0/patches/touch-getdate.patch0
Rsysa/coreutils-5.0/patches/uniq-fopen.patch -> steps/coreutils-5.0/patches/uniq-fopen.patch0
Rsysa/coreutils-5.0/sources -> steps/coreutils-5.0/sources0
Rsysa/coreutils-6.10/mk/main.mk -> steps/coreutils-6.10/mk/main.mk0
Rsysa/coreutils-6.10/coreutils-6.10.sh -> steps/coreutils-6.10/pass1.sh0
Rsysa/coreutils-6.10/sources -> steps/coreutils-6.10/sources0
Rsysc/coreutils-8.32/import-gnulib.sh -> steps/coreutils-8.32/import-gnulib.sh0
Rsysc/coreutils-8.32/coreutils-8.32.sh -> steps/coreutils-8.32/pass1.sh0
Rsysc/coreutils-8.32/patches/force_to_use_nanosleep.patch -> steps/coreutils-8.32/patches/force_to_use_nanosleep.patch0
Rsysc/coreutils-8.32/patches/gperf_dependency.patch -> steps/coreutils-8.32/patches/gperf_dependency.patch0
Rsysc/coreutils-8.32/patches/remove_gettext.patch -> steps/coreutils-8.32/patches/remove_gettext.patch0
Rsysc/coreutils-8.32/sources -> steps/coreutils-8.32/sources0
Rsysc/curl-7.88.1/files/sinus.pl -> steps/curl-7.88.1/files/sinus.pl0
Rsysc/curl-7.88.1/pass1.sh -> steps/curl-7.88.1/pass1.sh0
Rsysc/curl-7.88.1/pass2.sh -> steps/curl-7.88.1/pass2.sh0
Rsysc/curl-7.88.1/patches/help.patch -> steps/curl-7.88.1/patches/help.patch0
Rsysc/curl-7.88.1/patches/timeless-mk-ca-bundle.patch -> steps/curl-7.88.1/patches/timeless-mk-ca-bundle.patch0
Rsysa/curl-7.88.1/sources -> steps/curl-7.88.1/sources0
Rsysa/dhcpcd-10.0.1/dhcpcd-10.0.1.sh -> steps/dhcpcd-10.0.1/pass1.sh0
Rsysa/dhcpcd-10.0.1/patches/remove-ctassert.patch -> steps/dhcpcd-10.0.1/patches/remove-ctassert.patch0
Rsysa/dhcpcd-10.0.1/sources -> steps/dhcpcd-10.0.1/sources0
Rsysa/diffutils-2.7/mk/main.mk -> steps/diffutils-2.7/mk/main.mk0
Rsysa/diffutils-2.7/diffutils-2.7.sh -> steps/diffutils-2.7/pass1.sh0
Rsysa/diffutils-2.7/sources -> steps/diffutils-2.7/sources0
Rsysc/dist-3.5-236/files/config.sh.in -> steps/dist-3.5-236/files/config.sh.in0
Rsysc/dist-3.5-236/files/revision.h -> steps/dist-3.5-236/files/revision.h0
Rsysc/dist-3.5-236/dist-3.5-236.sh -> steps/dist-3.5-236/pass1.sh0
Rsysc/dist-3.5-236/patches/env.patch -> steps/dist-3.5-236/patches/env.patch0
Rsysc/dist-3.5-236/sources -> steps/dist-3.5-236/sources0
Rsysa/e2fsprogs-1.45.7/e2fsprogs-1.45.7.sh -> steps/e2fsprogs-1.45.7/pass1.sh0
Rsysa/e2fsprogs-1.45.7/patches/gawk-fix.patch -> steps/e2fsprogs-1.45.7/patches/gawk-fix.patch0
Rsysa/e2fsprogs-1.45.7/patches/remove-intl.patch -> steps/e2fsprogs-1.45.7/patches/remove-intl.patch0
Rsysa/e2fsprogs-1.45.7/sources -> steps/e2fsprogs-1.45.7/sources0
Rsysa/ed-1.4/ed-1.4.sh -> steps/ed-1.4/pass1.sh0
Rsysa/ed-1.4/sources -> steps/ed-1.4/sources0
Asteps/env12++++++++++++
Rsysc/file-5.44/file-5.44.sh -> steps/file-5.44/pass1.sh0
Rsysc/file-5.44/sources -> steps/file-5.44/sources0
Rsysa/findutils-4.2.33/import-gnulib.sh -> steps/findutils-4.2.33/import-gnulib.sh0
Rsysa/findutils-4.2.33/findutils-4.2.33.sh -> steps/findutils-4.2.33/pass1.sh0
Rsysa/findutils-4.2.33/patches/force-getcwd-fallback.patch -> steps/findutils-4.2.33/patches/force-getcwd-fallback.patch0
Rsysa/findutils-4.2.33/sources -> steps/findutils-4.2.33/sources0
Rsysa/fiwix-1.4.0-lb3/fiwix-1.4.0-lb3.checksums -> steps/fiwix-1.4.0-lb3/fiwix-1.4.0-lb3.checksums0
Rsysa/fiwix-1.4.0-lb3/fiwix-1.4.0-lb3.kaem -> steps/fiwix-1.4.0-lb3/pass1.kaem0
Rsysa/fiwix-1.4.0-lb3/sources -> steps/fiwix-1.4.0-lb3/sources0
Rsysa/flex-2.5.11/files/scan.lex.l -> steps/flex-2.5.11/files/scan.lex.l0
Rsysa/flex-2.5.11/mk/main.mk -> steps/flex-2.5.11/mk/main.mk0
Rsysa/flex-2.5.11/flex-2.5.11.sh -> steps/flex-2.5.11/pass1.sh0
Rsysa/flex-2.5.11/patches/scan_l.patch -> steps/flex-2.5.11/patches/scan_l.patch0
Rsysa/flex-2.5.11/patches/yyin.patch -> steps/flex-2.5.11/patches/yyin.patch0
Rsysa/flex-2.5.11/sources -> steps/flex-2.5.11/sources0
Rsysc/flex-2.5.33/flex-2.5.33.sh -> steps/flex-2.5.33/pass1.sh0
Rsysc/flex-2.5.33/sources -> steps/flex-2.5.33/sources0
Rsysa/flex-2.6.4/mk/main.mk -> steps/flex-2.6.4/mk/main.mk0
Asteps/flex-2.6.4/pass1.sh26++++++++++++++++++++++++++
Rsysa/flex-2.6.4/sources -> steps/flex-2.6.4/sources0
Rsysa/gawk-3.0.4/mk/main.mk -> steps/gawk-3.0.4/mk/main.mk0
Rsysa/gawk-3.0.4/gawk-3.0.4.sh -> steps/gawk-3.0.4/pass1.sh0
Rsysa/gawk-3.0.4/sources -> steps/gawk-3.0.4/sources0
Rsysc/gc-8.0.4/gc-8.0.4.sh -> steps/gc-8.0.4/pass1.sh0
Rsysc/gc-8.0.4/sources -> steps/gc-8.0.4/sources0
Rsysc/gcc-10.4.0/gcc-10.4.0.sh -> steps/gcc-10.4.0/pass1.sh0
Rsysc/gcc-10.4.0/patches/fix-autoreconf.patch -> steps/gcc-10.4.0/patches/fix-autoreconf.patch0
Rsysc/gcc-10.4.0/patches/includes.patch -> steps/gcc-10.4.0/patches/includes.patch0
Rsysc/gcc-10.4.0/patches/libgcc-xfmode.patch -> steps/gcc-10.4.0/patches/libgcc-xfmode.patch0
Rsysc/gcc-10.4.0/patches/new-gettext.patch -> steps/gcc-10.4.0/patches/new-gettext.patch0
Rsysc/gcc-10.4.0/patches/no-isolate-erroneous-paths-dereference.patch -> steps/gcc-10.4.0/patches/no-isolate-erroneous-paths-dereference.patch0
Rsysc/gcc-10.4.0/sources -> steps/gcc-10.4.0/sources0
Rsysc/gcc-13.1.0/gcc-13.1.0.sh -> steps/gcc-13.1.0/pass1.sh0
Rsysc/gcc-13.1.0/patches/new-gettext.patch -> steps/gcc-13.1.0/patches/new-gettext.patch0
Rsysc/gcc-13.1.0/sources -> steps/gcc-13.1.0/sources0
Rsysa/gcc-4.0.4/pass1.sh -> steps/gcc-4.0.4/pass1.sh0
Rsysa/gcc-4.0.4/pass2.sh -> steps/gcc-4.0.4/pass2.sh0
Rsysa/gcc-4.0.4/sources -> steps/gcc-4.0.4/sources0
Rsysc/gcc-4.7.4/gcc-4.7.4.sh -> steps/gcc-4.7.4/pass1.sh0
Rsysc/gcc-4.7.4/patches/0001-libitm-fixes-for-musl-support.patch -> steps/gcc-4.7.4/patches/0001-libitm-fixes-for-musl-support.patch0
Rsysc/gcc-4.7.4/patches/0002-fixincludes-update-for-musl-support.patch -> steps/gcc-4.7.4/patches/0002-fixincludes-update-for-musl-support.patch0
Rsysc/gcc-4.7.4/patches/0003-unwind-fix-for-musl.patch -> steps/gcc-4.7.4/patches/0003-unwind-fix-for-musl.patch0
Rsysc/gcc-4.7.4/patches/0004-libstdc-gthr-workaround-for-musl.patch -> steps/gcc-4.7.4/patches/0004-libstdc-gthr-workaround-for-musl.patch0
Rsysc/gcc-4.7.4/patches/0005-musl-libc-config.patch -> steps/gcc-4.7.4/patches/0005-musl-libc-config.patch0
Rsysc/gcc-4.7.4/patches/0006-add-musl-support-to-gcc.patch -> steps/gcc-4.7.4/patches/0006-add-musl-support-to-gcc.patch0
Rsysc/gcc-4.7.4/patches/0007-x86-musl-support.patch -> steps/gcc-4.7.4/patches/0007-x86-musl-support.patch0
Rsysc/gcc-4.7.4/patches/0008-config-linux.h-add-INCLUDE_DEFAULTS_MUSL_LOCAL.patch -> steps/gcc-4.7.4/patches/0008-config-linux.h-add-INCLUDE_DEFAULTS_MUSL_LOCAL.patch0
Rsysc/gcc-4.7.4/patches/gcc-10-fself-test.patch -> steps/gcc-4.7.4/patches/gcc-10-fself-test.patch0
Rsysc/gcc-4.7.4/patches/gcc-10-libgcc-builtin-macros.patch -> steps/gcc-4.7.4/patches/gcc-10-libgcc-builtin-macros.patch0
Rsysc/gcc-4.7.4/patches/gcc-10-mlong-double.patch -> steps/gcc-4.7.4/patches/gcc-10-mlong-double.patch0
Rsysc/gcc-4.7.4/patches/remove_gperf_dependency.patch -> steps/gcc-4.7.4/patches/remove_gperf_dependency.patch0
Rsysc/gcc-4.7.4/sources -> steps/gcc-4.7.4/sources0
Rsysc/gettext-0.21/gettext-0.21.sh -> steps/gettext-0.21/pass1.sh0
Rsysc/gettext-0.21/sources -> steps/gettext-0.21/sources0
Rsysc/gmp-6.2.1/gmp-6.2.1.sh -> steps/gmp-6.2.1/pass1.sh0
Rsysc/gmp-6.2.1/sources -> steps/gmp-6.2.1/sources0
Rsysc/gperf-3.1/gperf-3.1.sh -> steps/gperf-3.1/pass1.sh0
Rsysc/gperf-3.1/sources -> steps/gperf-3.1/sources0
Rsysa/grep-2.4/mk/main.mk -> steps/grep-2.4/mk/main.mk0
Rsysa/grep-2.4/sources -> steps/grep-2.4/sources0
Rsysc/grep-3.7/import-gnulib.sh -> steps/grep-3.7/import-gnulib.sh0
Rsysc/grep-3.7/grep-3.7.sh -> steps/grep-3.7/pass1.sh0
Rsysc/grep-3.7/sources -> steps/grep-3.7/sources0
Rsysc/guile-3.0.9/import-gnulib-3.0.7.sh -> steps/guile-3.0.9/import-gnulib-3.0.7.sh0
Rsysc/guile-3.0.9/import-gnulib.sh -> steps/guile-3.0.9/import-gnulib.sh0
Rsysc/guile-3.0.9/guile-3.0.9.sh -> steps/guile-3.0.9/pass1.sh0
Rsysc/guile-3.0.9/sources -> steps/guile-3.0.9/sources0
Rsysa/gzip-1.2.4/files/stat_override.c -> steps/gzip-1.2.4/files/stat_override.c0
Rsysa/gzip-1.2.4/gzip-1.2.4.checksums -> steps/gzip-1.2.4/gzip-1.2.4.checksums0
Rsysa/gzip-1.2.4/mk/main.mk -> steps/gzip-1.2.4/mk/main.mk0
Rsysa/gzip-1.2.4/gzip-1.2.4.kaem -> steps/gzip-1.2.4/pass1.kaem0
Rsysa/gzip-1.2.4/patches/makecrc-write-to-file.patch -> steps/gzip-1.2.4/patches/makecrc-write-to-file.patch0
Rsysa/gzip-1.2.4/patches/removecrc.patch -> steps/gzip-1.2.4/patches/removecrc.patch0
Rsysa/gzip-1.2.4/sources -> steps/gzip-1.2.4/sources0
Asteps/heirloom-devtools-070527/heirloom-devtools-070527.checksums5+++++
Asteps/heirloom-devtools-070527/pass1.kaem60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsysa/heirloom-devtools-070527/patches/lex_remove_wchar.patch -> steps/heirloom-devtools-070527/patches/lex_remove_wchar.patch0
Rsysa/heirloom-devtools-070527/patches/yacc_remove_wchar.patch -> steps/heirloom-devtools-070527/patches/yacc_remove_wchar.patch0
Rsysa/heirloom-devtools-070527/sources -> steps/heirloom-devtools-070527/sources0
Rsysa/help2man-1.36.4/help2man-1.36.4.sh -> steps/help2man-1.36.4/pass1.sh0
Rsysa/help2man-1.36.4/patches/date.patch -> steps/help2man-1.36.4/patches/date.patch0
Rsysa/help2man-1.36.4/sources -> steps/help2man-1.36.4/sources0
Asteps/helpers.sh449+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asteps/improve/clean_ram.sh15+++++++++++++++
Asteps/improve/finalize_fhs.sh18++++++++++++++++++
Asteps/improve/get_network.sh18++++++++++++++++++
Asteps/improve/musl_libdir.sh9+++++++++
Asteps/improve/null_time.sh10++++++++++
Asteps/improve/populate_device_nodes.sh40++++++++++++++++++++++++++++++++++++++++
Asteps/improve/setup_repo.sh7+++++++
Asteps/improve/update_env.sh23+++++++++++++++++++++++
Asteps/jump/fiwix.sh13+++++++++++++
Asteps/jump/linux.sh32++++++++++++++++++++++++++++++++
Asteps/jump/move_disk.sh31+++++++++++++++++++++++++++++++
Rsysa/kbd-1.15/kbd-1.15.sh -> steps/kbd-1.15/pass1.sh0
Rsysa/kbd-1.15/patches/fcntl.patch -> steps/kbd-1.15/patches/fcntl.patch0
Rsysa/kbd-1.15/patches/resizecons.patch -> steps/kbd-1.15/patches/resizecons.patch0
Rsysa/kbd-1.15/sources -> steps/kbd-1.15/sources0
Asteps/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums1+
Rsysa/kexec-fiwix-1.0/kexec-fiwix-1.0.kaem -> steps/kexec-fiwix-1.0/pass1.kaem0
Rsysa/kexec-fiwix-1.0/src/kexec-fiwix.c -> steps/kexec-fiwix-1.0/src/kexec-fiwix.c0
Rsysa/kexec-fiwix-1.0/src/multiboot1.h -> steps/kexec-fiwix-1.0/src/multiboot1.h0
Asteps/kexec-linux-1.0.0/files/kexec-linux.c87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsysa/kexec-linux-1.0.0/mk/main.mk -> steps/kexec-linux-1.0.0/mk/main.mk0
Rsysa/kexec-linux-1.0.0/kexec-linux-1.0.0.sh -> steps/kexec-linux-1.0.0/pass1.sh0
Rsysa/kexec-tools-2.0.22/kexec-tools-2.0.22.sh -> steps/kexec-tools-2.0.22/pass1.sh0
Rsysa/kexec-tools-2.0.22/patches/bad-gcc-arg.patch -> steps/kexec-tools-2.0.22/patches/bad-gcc-arg.patch0
Rsysa/kexec-tools-2.0.22/sources -> steps/kexec-tools-2.0.22/sources0
Rsysc/libarchive-3.5.2/libarchive-3.5.2.sh -> steps/libarchive-3.5.2/pass1.sh0
Rsysc/libarchive-3.5.2/sources -> steps/libarchive-3.5.2/sources0
Rsysc/libatomic_ops-7.6.10/libatomic_ops-7.6.10.sh -> steps/libatomic_ops-7.6.10/pass1.sh0
Rsysc/libatomic_ops-7.6.10/sources -> steps/libatomic_ops-7.6.10/sources0
Rsysc/libffi-3.3/libffi-3.3.sh -> steps/libffi-3.3/pass1.sh0
Rsysc/libffi-3.3/sources -> steps/libffi-3.3/sources0
Rsysa/libtool-2.2.4/libtool-2.2.4.sh -> steps/libtool-2.2.4/pass1.sh0
Rsysa/libtool-2.2.4/patches/archive-objs-order.patch -> steps/libtool-2.2.4/patches/archive-objs-order.patch0
Rsysa/libtool-2.2.4/patches/hostname.patch -> steps/libtool-2.2.4/patches/hostname.patch0
Rsysa/libtool-2.2.4/sources -> steps/libtool-2.2.4/sources0
Rsysc/libtool-2.4.7/bootstrap-helper.sh -> steps/libtool-2.4.7/bootstrap-helper.sh0
Rsysc/libtool-2.4.7/import-gnulib.sh -> steps/libtool-2.4.7/import-gnulib.sh0
Rsysc/libtool-2.4.7/libtool-2.4.7.sh -> steps/libtool-2.4.7/pass1.sh0
Rsysc/libtool-2.4.7/patches/hostname.patch -> steps/libtool-2.4.7/patches/hostname.patch0
Rsysc/libtool-2.4.7/sources -> steps/libtool-2.4.7/sources0
Rsysc/libunistring-0.9.10/libunistring-0.9.10.sh -> steps/libunistring-0.9.10/pass1.sh0
Rsysc/libunistring-0.9.10/sources -> steps/libunistring-0.9.10/sources0
Rsysa/linux-4.9.10/files/config -> steps/linux-4.9.10/files/config0
Asteps/linux-4.9.10/pass1.sh68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsysa/linux-4.9.10/patches/bad-asm.patch -> steps/linux-4.9.10/patches/bad-asm.patch0
Rsysa/linux-4.9.10/patches/disable-broken-check.patch -> steps/linux-4.9.10/patches/disable-broken-check.patch0
Rsysa/linux-4.9.10/patches/initramfs_list.patch -> steps/linux-4.9.10/patches/initramfs_list.patch0
Rsysa/linux-4.9.10/patches/linking.patch -> steps/linux-4.9.10/patches/linking.patch0
Rsysa/linux-4.9.10/patches/regen.patch -> steps/linux-4.9.10/patches/regen.patch0
Rsysa/linux-4.9.10/patches/remove-alternative-asm.patch -> steps/linux-4.9.10/patches/remove-alternative-asm.patch0
Rsysa/linux-4.9.10/patches/remove-kconfig.patch -> steps/linux-4.9.10/patches/remove-kconfig.patch0
Rsysa/linux-4.9.10/sources -> steps/linux-4.9.10/sources0
Rsysa/linux-headers-4.9.10/linux-headers-4.9.10.sh -> steps/linux-headers-4.9.10/pass1.sh0
Rsysa/linux-headers-4.9.10/patches/musl.patch -> steps/linux-headers-4.9.10/patches/musl.patch0
Rsysa/linux-headers-4.9.10/patches/winsize.patch -> steps/linux-headers-4.9.10/patches/winsize.patch0
Rsysa/linux-headers-4.9.10/sources -> steps/linux-headers-4.9.10/sources0
Rsysa/lwext4-1.0.0-lb1/config/ext4_config.h -> steps/lwext4-1.0.0-lb1/config/ext4_config.h0
Asteps/lwext4-1.0.0-lb1/files/early-artifacts-needed-after-fiwix.txt177+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asteps/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c295+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asteps/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums1+
Asteps/lwext4-1.0.0-lb1/pass1.kaem61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsysa/lwext4-1.0.0-lb1/sources -> steps/lwext4-1.0.0-lb1/sources0
Rsysa/m4-1.4.7/mk/main.mk -> steps/m4-1.4.7/mk/main.mk0
Rsysa/m4-1.4.7/sources -> steps/m4-1.4.7/sources0
Rsysa/make-3.82/files/putenv_stub.c -> steps/make-3.82/files/putenv_stub.c0
Asteps/make-3.82/make-3.82.checksums1+
Rsysa/make-3.82/make-3.82.kaem -> steps/make-3.82/pass1.kaem0
Rsysa/make-3.82/make-3.82.sh -> steps/make-3.82/pass2.sh0
Rsysa/make-3.82/sources -> steps/make-3.82/sources0
Rsysc/make-4.2.1/make-4.2.1.sh -> steps/make-4.2.1/pass1.sh0
Rsysc/make-4.2.1/sources -> steps/make-4.2.1/sources0
Asteps/manifest173+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asteps/mes-0.25/files/config.h7+++++++
Rsysa/mes-0.25/mes-0.25.amd64.checksums -> steps/mes-0.25/mes-0.25.amd64.checksums0
Rsysa/mes-0.25/mes-0.25.riscv64.checksums -> steps/mes-0.25/mes-0.25.riscv64.checksums0
Asteps/mes-0.25/mes-0.25.x86.checksums14++++++++++++++
Rsysa/mes-0.25/mes-0.25.kaem -> steps/mes-0.25/pass1.kaem0
Rsysa/mes-0.25/sources -> steps/mes-0.25/sources0
Rsysc/mpc-1.2.1/mpc-1.2.1.sh -> steps/mpc-1.2.1/pass1.sh0
Rsysc/mpc-1.2.1/sources -> steps/mpc-1.2.1/sources0
Rsysc/mpfr-4.1.0/files/mparam.h -> steps/mpfr-4.1.0/files/mparam.h0
Rsysc/mpfr-4.1.0/mpfr-4.1.0.sh -> steps/mpfr-4.1.0/pass1.sh0
Rsysc/mpfr-4.1.0/sources -> steps/mpfr-4.1.0/sources0
Rsysa/musl-1.1.24/musl-1.1.24.sh -> steps/musl-1.1.24/pass1.sh0
Asteps/musl-1.1.24/pass2.sh2++
Rsysa/musl-1.1.24/binutils-rebuild.sh -> steps/musl-1.1.24/pass3.sh0
Asteps/musl-1.1.24/patches-pass3/avoid_set_thread_area.patch2++
Asteps/musl-1.1.24/patches-pass3/avoid_sys_clone.patch2++
Asteps/musl-1.1.24/patches-pass3/set_thread_area.patch2++
Asteps/musl-1.1.24/patches-pass3/va_list.patch2++
Rsysa/musl-1.1.24/patches/avoid_set_thread_area.patch -> steps/musl-1.1.24/patches/avoid_set_thread_area.patch0
Rsysa/musl-1.1.24/patches/avoid_sys_clone.patch -> steps/musl-1.1.24/patches/avoid_sys_clone.patch0
Rsysa/musl-1.1.24/patches/fenv.patch -> steps/musl-1.1.24/patches/fenv.patch0
Rsysa/musl-1.1.24/patches/makefile.patch -> steps/musl-1.1.24/patches/makefile.patch0
Rsysa/musl-1.1.24/patches/musl_weak_symbols.patch -> steps/musl-1.1.24/patches/musl_weak_symbols.patch0
Rsysa/musl-1.1.24/patches/set_thread_area.patch -> steps/musl-1.1.24/patches/set_thread_area.patch0
Rsysa/musl-1.1.24/patches/sigsetjmp.patch -> steps/musl-1.1.24/patches/sigsetjmp.patch0
Rsysa/musl-1.1.24/patches/stdio_flush_on_exit.patch -> steps/musl-1.1.24/patches/stdio_flush_on_exit.patch0
Rsysa/musl-1.1.24/patches/va_list.patch -> steps/musl-1.1.24/patches/va_list.patch0
Rsysa/musl-1.1.24/sources -> steps/musl-1.1.24/sources0
Rsysc/musl-1.2.4/files/__stack_chk_fail_local.c -> steps/musl-1.2.4/files/__stack_chk_fail_local.c0
Rsysc/musl-1.2.4/files/ld-musl-i386.path -> steps/musl-1.2.4/files/ld-musl-i386.path0
Rsysc/musl-1.2.4/files/ld-musl-i386.path.license -> steps/musl-1.2.4/files/ld-musl-i386.path.license0
Rsysa/musl-1.2.4/musl-1.2.4.sh -> steps/musl-1.2.4/pass1.sh0
Asteps/musl-1.2.4/pass2.sh2++
Asteps/musl-1.2.4/pass3.sh46++++++++++++++++++++++++++++++++++++++++++++++
Asteps/musl-1.2.4/patches-pass2/.keep0
Asteps/musl-1.2.4/patches-pass32++
Rsysa/musl-1.2.4/patches/avoid_set_thread_area.patch -> steps/musl-1.2.4/patches/avoid_set_thread_area.patch0
Rsysa/musl-1.2.4/patches/avoid_sys_clone.patch -> steps/musl-1.2.4/patches/avoid_sys_clone.patch0
Rsysa/musl-1.2.4/sources -> steps/musl-1.2.4/sources0
Rsysc/openssl-1.1.1l/openssl-1.1.1l.sh -> steps/openssl-1.1.1l/pass1.sh0
Rsysc/openssl-1.1.1l/sources -> steps/openssl-1.1.1l/sources0
Rsysa/patch-2.5.9/mk/main.mk -> steps/patch-2.5.9/mk/main.mk0
Rsysa/patch-2.5.9/patch-2.5.9.kaem -> steps/patch-2.5.9/pass1.kaem0
Rsysa/patch-2.5.9/patch-2.5.9.checksums -> steps/patch-2.5.9/patch-2.5.9.checksums0
Rsysa/patch-2.5.9/sources -> steps/patch-2.5.9/sources0
Rsysc/patch-2.7.6/import-gnulib.sh -> steps/patch-2.7.6/import-gnulib.sh0
Rsysc/patch-2.7.6/patch-2.7.6.sh -> steps/patch-2.7.6/pass1.sh0
Rsysc/patch-2.7.6/sources -> steps/patch-2.7.6/sources0
Rsysa/perl-5.000/files/config.h -> steps/perl-5.000/files/config.h0
Rsysa/perl-5.000/files/keywords.sh -> steps/perl-5.000/files/keywords.sh0
Rsysa/perl-5.000/files/opcode.awk -> steps/perl-5.000/files/opcode.awk0
Rsysa/perl-5.000/files/opcode.sh -> steps/perl-5.000/files/opcode.sh0
Rsysa/perl-5.000/mk/main.mk -> steps/perl-5.000/mk/main.mk0
Rsysa/perl-5.000/perl-5.000.sh -> steps/perl-5.000/pass1.sh0
Rsysa/perl-5.000/sources -> steps/perl-5.000/sources0
Rsysa/perl-5.003/files/config.h -> steps/perl-5.003/files/config.h0
Rsysa/perl-5.003/mk/main.mk -> steps/perl-5.003/mk/main.mk0
Rsysa/perl-5.003/perl-5.003.sh -> steps/perl-5.003/pass1.sh0
Rsysa/perl-5.003/sources -> steps/perl-5.003/sources0
Rsysc/perl-5.10.1/files/config.h -> steps/perl-5.10.1/files/config.h0
Rsysc/perl-5.10.1/files/config.sh -> steps/perl-5.10.1/files/config.sh0
Rsysc/perl-5.10.1/mk/main.mk -> steps/perl-5.10.1/mk/main.mk0
Rsysc/perl-5.10.1/perl-5.10.1.sh -> steps/perl-5.10.1/pass1.sh0
Rsysc/perl-5.10.1/patches/undefined_hack.patch -> steps/perl-5.10.1/patches/undefined_hack.patch0
Rsysc/perl-5.10.1/sources -> steps/perl-5.10.1/sources0
Rsysc/perl-5.32.1/perl-5.32.1.sh -> steps/perl-5.32.1/pass1.sh0
Rsysc/perl-5.32.1/patches/reproducibility.patch -> steps/perl-5.32.1/patches/reproducibility.patch0
Rsysc/perl-5.32.1/patches/reproducibility2.patch -> steps/perl-5.32.1/patches/reproducibility2.patch0
Rsysc/perl-5.32.1/sources -> steps/perl-5.32.1/sources0
Rsysa/perl-5.6.2/files/config.h -> steps/perl-5.6.2/files/config.h0
Rsysa/perl-5.6.2/files/config.sh -> steps/perl-5.6.2/files/config.sh0
Rsysa/perl-5.6.2/mk/main.mk -> steps/perl-5.6.2/mk/main.mk0
Rsysa/perl-5.6.2/perl-5.6.2.sh -> steps/perl-5.6.2/pass1.sh0
Rsysa/perl-5.6.2/sources -> steps/perl-5.6.2/sources0
Rsysa/perl5.004-05/files/config.h -> steps/perl5.004-05/files/config.h0
Rsysa/perl5.004-05/mk/main.mk -> steps/perl5.004-05/mk/main.mk0
Rsysa/perl5.004-05/perl5.004-05.sh -> steps/perl5.004-05/pass1.sh0
Rsysa/perl5.004-05/sources -> steps/perl5.004-05/sources0
Rsysa/perl5.005-03/files/config.h -> steps/perl5.005-03/files/config.h0
Rsysa/perl5.005-03/mk/main.mk -> steps/perl5.005-03/mk/main.mk0
Rsysa/perl5.005-03/perl5.005-03.sh -> steps/perl5.005-03/pass1.sh0
Rsysa/perl5.005-03/sources -> steps/perl5.005-03/sources0
Rsysc/pkg-config-0.29.2/pkg-config-0.29.2.sh -> steps/pkg-config-0.29.2/pass1.sh0
Rsysc/pkg-config-0.29.2/sources -> steps/pkg-config-0.29.2/sources0
Asteps/pre-network-sources86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsysc/python-2.0.1/files/disable-unicode.patch -> steps/python-2.0.1/files/disable-unicode.patch0
Rsysc/python-2.0.1/files/keyword.c -> steps/python-2.0.1/files/keyword.c0
Rsysc/python-2.0.1/files/token.c -> steps/python-2.0.1/files/token.c0
Rsysc/python-2.0.1/stage1.sh -> steps/python-2.0.1/pass1.sh0
Rsysc/python-2.0.1/stage2.sh -> steps/python-2.0.1/pass2.sh0
Rsysc/python-2.0.1/patches/destdir.patch -> steps/python-2.0.1/patches/destdir.patch0
Rsysc/python-2.0.1/patches/posixmodule.patch -> steps/python-2.0.1/patches/posixmodule.patch0
Rsysc/python-2.0.1/patches/undefs.patch -> steps/python-2.0.1/patches/undefs.patch0
Rsysc/python-2.0.1/sources -> steps/python-2.0.1/sources0
Rsysc/python-2.3.7/files/disable-unicode.patch -> steps/python-2.3.7/files/disable-unicode.patch0
Rsysc/python-2.3.7/stage1.sh -> steps/python-2.3.7/pass1.sh0
Rsysc/python-2.3.7/stage2.sh -> steps/python-2.3.7/pass2.sh0
Rsysc/python-2.3.7/patches/posixmodule.patch -> steps/python-2.3.7/patches/posixmodule.patch0
Rsysc/python-2.3.7/sources -> steps/python-2.3.7/sources0
Rsysc/python-2.5.6/files/graminit-regen.patch -> steps/python-2.5.6/files/graminit-regen.patch0
Rsysc/python-2.5.6/python-2.5.6.sh -> steps/python-2.5.6/pass1.sh0
Rsysc/python-2.5.6/patches/keyword.patch -> steps/python-2.5.6/patches/keyword.patch0
Rsysc/python-2.5.6/patches/pgen-timestamp.patch -> steps/python-2.5.6/patches/pgen-timestamp.patch0
Rsysc/python-2.5.6/patches/posixmodule.patch -> steps/python-2.5.6/patches/posixmodule.patch0
Rsysc/python-2.5.6/patches/sorted.patch -> steps/python-2.5.6/patches/sorted.patch0
Rsysc/python-2.5.6/patches/sre_constants.patch -> steps/python-2.5.6/patches/sre_constants.patch0
Rsysc/python-2.5.6/sources -> steps/python-2.5.6/sources0
Rsysc/python-3.1.5/files/graminit-regen.patch -> steps/python-3.1.5/files/graminit-regen.patch0
Rsysc/python-3.1.5/files/py2.patch -> steps/python-3.1.5/files/py2.patch0
Rsysc/python-3.1.5/stage1.sh -> steps/python-3.1.5/pass1.sh0
Rsysc/python-3.1.5/stage2.sh -> steps/python-3.1.5/pass2.sh0
Rsysc/python-3.1.5/patches/install-perms.patch -> steps/python-3.1.5/patches/install-perms.patch0
Rsysc/python-3.1.5/patches/openssl.patch -> steps/python-3.1.5/patches/openssl.patch0
Rsysc/python-3.1.5/patches/posixmodule.patch -> steps/python-3.1.5/patches/posixmodule.patch0
Rsysc/python-3.1.5/sources -> steps/python-3.1.5/sources0
Rsysc/python-3.11.1/files/Setup.local -> steps/python-3.11.1/files/Setup.local0
Rsysc/python-3.11.1/python-3.11.1.sh -> steps/python-3.11.1/pass1.sh0
Rsysc/python-3.11.1/patches/empty-date.patch -> steps/python-3.11.1/patches/empty-date.patch0
Rsysc/python-3.11.1/patches/multiarch.patch -> steps/python-3.11.1/patches/multiarch.patch0
Rsysc/python-3.11.1/sources -> steps/python-3.11.1/sources0
Rsysc/python-3.3.7/python-3.3.7.sh -> steps/python-3.3.7/pass1.sh0
Rsysc/python-3.3.7/patches/install-perms.patch -> steps/python-3.3.7/patches/install-perms.patch0
Rsysc/python-3.3.7/patches/symbol.patch -> steps/python-3.3.7/patches/symbol.patch0
Rsysc/python-3.3.7/sources -> steps/python-3.3.7/sources0
Rsysc/python-3.4.10/python-3.4.10.sh -> steps/python-3.4.10/pass1.sh0
Rsysc/python-3.4.10/patches/install-perms.patch -> steps/python-3.4.10/patches/install-perms.patch0
Rsysc/python-3.4.10/patches/symbol.patch -> steps/python-3.4.10/patches/symbol.patch0
Rsysc/python-3.4.10/sources -> steps/python-3.4.10/sources0
Rsysc/python-3.8.16/python-3.8.16.sh -> steps/python-3.8.16/pass1.sh0
Rsysc/python-3.8.16/patches/empty-date.patch -> steps/python-3.8.16/patches/empty-date.patch0
Rsysc/python-3.8.16/patches/maxgroups.patch -> steps/python-3.8.16/patches/maxgroups.patch0
Rsysc/python-3.8.16/patches/refractor.patch -> steps/python-3.8.16/patches/refractor.patch0
Rsysc/python-3.8.16/sources -> steps/python-3.8.16/sources0
Rsysa/sed-4.0.9/mk/main.mk -> steps/sed-4.0.9/mk/main.mk0
Rsysa/sed-4.0.9/sed-4.0.9.kaem -> steps/sed-4.0.9/pass1.kaem0
Rsysa/sed-4.0.9/sed-4.0.9.sh -> steps/sed-4.0.9/pass2.sh0
Rsysa/sed-4.0.9/sed-4.0.9.checksums -> steps/sed-4.0.9/sed-4.0.9.checksums0
Rsysa/sed-4.0.9/sources -> steps/sed-4.0.9/sources0
Rsysc/sed-4.8/import-gnulib.sh -> steps/sed-4.8/import-gnulib.sh0
Rsysc/sed-4.8/sed-4.8.sh -> steps/sed-4.8/pass1.sh0
Rsysc/sed-4.8/sources -> steps/sed-4.8/sources0
Rsysa/simple-patch-1.0/simple-patch-1.0.kaem -> steps/simple-patch-1.0/pass1.kaem0
Rsysa/simple-patch-1.0/simple-patch-1.0.x86.checksums -> steps/simple-patch-1.0/simple-patch-1.0.x86.checksums0
Rsysa/simple-patch-1.0/src/simple-patch.c -> steps/simple-patch-1.0/src/simple-patch.c0
Rsysa/tar-1.12/files/getdate_stub.c -> steps/tar-1.12/files/getdate_stub.c0
Rsysa/tar-1.12/files/stat_override.c -> steps/tar-1.12/files/stat_override.c0
Rsysa/tar-1.12/mk/main.mk -> steps/tar-1.12/mk/main.mk0
Rsysa/tar-1.12/tar-1.12.kaem -> steps/tar-1.12/pass1.kaem0
Rsysa/tar-1.12/sources -> steps/tar-1.12/sources0
Rsysa/tar-1.12/tar-1.12.checksums -> steps/tar-1.12/tar-1.12.checksums0
Rsysc/tar-1.34/import-gnulib.sh -> steps/tar-1.34/import-gnulib.sh0
Rsysc/tar-1.34/tar-1.34.sh -> steps/tar-1.34/pass1.sh0
Rsysc/tar-1.34/sources -> steps/tar-1.34/sources0
Asteps/tcc-0.9.26/pass1.kaem333+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsysa/tcc-0.9.26/simple-patches/addback-fileopen.after -> steps/tcc-0.9.26/simple-patches/addback-fileopen.after0
Rsysa/tcc-0.9.26/simple-patches/addback-fileopen.before -> steps/tcc-0.9.26/simple-patches/addback-fileopen.before0
Rsysa/tcc-0.9.26/simple-patches/remove-fileopen.after -> steps/tcc-0.9.26/simple-patches/remove-fileopen.after0
Rsysa/tcc-0.9.26/simple-patches/remove-fileopen.before -> steps/tcc-0.9.26/simple-patches/remove-fileopen.before0
Rsysa/tcc-0.9.26/sources -> steps/tcc-0.9.26/sources0
Rsysa/tcc-0.9.26/tcc-0.9.26.riscv64.checksums -> steps/tcc-0.9.26/tcc-0.9.26.riscv64.checksums0
Asteps/tcc-0.9.26/tcc-0.9.26.x86.checksums10++++++++++
Rsysa/tcc-0.9.27/tcc-0.9.27.kaem -> steps/tcc-0.9.27/pass1.kaem0
Rsysa/tcc-0.9.27/tcc-mes-pass2.sh -> steps/tcc-0.9.27/pass2.sh0
Rsysa/tcc-0.9.27/tcc-musl-pass1.sh -> steps/tcc-0.9.27/pass3.sh0
Rsysa/tcc-0.9.27/tcc-musl-pass2.sh -> steps/tcc-0.9.27/pass4.sh0
Rsysa/tcc-0.9.27/tcc-musl-pass3.sh -> steps/tcc-0.9.27/pass5.sh0
Asteps/tcc-0.9.27/patches-pass5/ignore-static-inside-array.patch2++
Asteps/tcc-0.9.27/patches-pass5/static-link.patch2++
Rsysa/tcc-0.9.27/patches/ignore-duplicate-symbols.patch -> steps/tcc-0.9.27/patches/ignore-duplicate-symbols.patch0
Rsysa/tcc-0.9.27/patches/ignore-static-inside-array.patch -> steps/tcc-0.9.27/patches/ignore-static-inside-array.patch0
Rsysa/tcc-0.9.27/patches/static-link.patch -> steps/tcc-0.9.27/patches/static-link.patch0
Rsysa/tcc-0.9.27/simple-patches/addback-fileopen.after -> steps/tcc-0.9.27/simple-patches/addback-fileopen.after0
Rsysa/tcc-0.9.27/simple-patches/addback-fileopen.before -> steps/tcc-0.9.27/simple-patches/addback-fileopen.before0
Rsysa/tcc-0.9.27/simple-patches/check-reloc-null.after -> steps/tcc-0.9.27/simple-patches/check-reloc-null.after0
Rsysa/tcc-0.9.27/simple-patches/check-reloc-null.before -> steps/tcc-0.9.27/simple-patches/check-reloc-null.before0
Rsysa/tcc-0.9.27/simple-patches/fiwix-paddr.after -> steps/tcc-0.9.27/simple-patches/fiwix-paddr.after0
Rsysa/tcc-0.9.27/simple-patches/fiwix-paddr.before -> steps/tcc-0.9.27/simple-patches/fiwix-paddr.before0
Rsysa/tcc-0.9.27/simple-patches/remove-fileopen.after -> steps/tcc-0.9.27/simple-patches/remove-fileopen.after0
Rsysa/tcc-0.9.27/simple-patches/remove-fileopen.before -> steps/tcc-0.9.27/simple-patches/remove-fileopen.before0
Rsysa/tcc-0.9.27/sources -> steps/tcc-0.9.27/sources0
Asteps/tcc-0.9.27/tcc-0.9.27.checksums1+
Rsysc/texinfo-6.7/import-gnulib.sh -> steps/texinfo-6.7/import-gnulib.sh0
Rsysc/texinfo-6.7/texinfo-6.7.sh -> steps/texinfo-6.7/pass1.sh0
Rsysc/texinfo-6.7/sources -> steps/texinfo-6.7/sources0
Rsysa/util-linux-2.19.1/util-linux-2.19.1.sh -> steps/util-linux-2.19.1/pass1.sh0
Rsysa/util-linux-2.19.1/patches/broken-programs.patch -> steps/util-linux-2.19.1/patches/broken-programs.patch0
Rsysa/util-linux-2.19.1/patches/disable-tests.patch -> steps/util-linux-2.19.1/patches/disable-tests.patch0
Rsysa/util-linux-2.19.1/patches/headers-bsd.patch -> steps/util-linux-2.19.1/patches/headers-bsd.patch0
Rsysa/util-linux-2.19.1/patches/headers-gpl2.patch -> steps/util-linux-2.19.1/patches/headers-gpl2.patch0
Rsysa/util-linux-2.19.1/patches/headers.patch -> steps/util-linux-2.19.1/patches/headers.patch0
Rsysa/util-linux-2.19.1/patches/pkg-config.patch -> steps/util-linux-2.19.1/patches/pkg-config.patch0
Rsysa/util-linux-2.19.1/sources -> steps/util-linux-2.19.1/sources0
Rsysc/which-2.21/which-2.21.sh -> steps/which-2.21/pass1.sh0
Rsysc/which-2.21/sources -> steps/which-2.21/sources0
Rsysc/xz-5.4.1/xz-5.4.1.sh -> steps/xz-5.4.1/pass1.sh0
Rsysc/xz-5.4.1/sources -> steps/xz-5.4.1/sources0
Rsysc/zlib-1.2.13/zlib-1.2.13.sh -> steps/zlib-1.2.13/pass1.sh0
Rsysc/zlib-1.2.13/sources -> steps/zlib-1.2.13/sources0
Dsysa.py227-------------------------------------------------------------------------------
Dsysa/SHA256SUMS.pkgs118-------------------------------------------------------------------------------
Dsysa/after-preseeded.kaem25-------------------------
Dsysa/after.kaem72------------------------------------------------------------------------
Dsysa/after2.kaem14--------------
Dsysa/base-preseeded.kaem7-------
Dsysa/bash-2.05b/bash-2.05b.checksums1-
Dsysa/bzip2-1.0.8/bzip2-1.0.8.checksums1-
Dsysa/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums1-
Dsysa/coreutils-5.0/patches-musl/touch-dereference.patch2--
Dsysa/coreutils-5.0/patches-musl/touch-getdate.patch2--
Dsysa/flex-2.6.4/flex-2.6.4.sh27---------------------------
Dsysa/heirloom-devtools-070527/heirloom-devtools-070527.checksums5-----
Dsysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem62--------------------------------------------------------------
Dsysa/helpers.sh505-------------------------------------------------------------------------------
Dsysa/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums1-
Dsysa/kexec-linux-1.0.0/files/kexec-linux.c87-------------------------------------------------------------------------------
Dsysa/linux-4.9.10/linux-4.9.10.sh64----------------------------------------------------------------
Dsysa/lwext4-1.0.0-lb1/files/early-artifacts-needed-after-fiwix.txt95-------------------------------------------------------------------------------
Dsysa/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c298-------------------------------------------------------------------------------
Dsysa/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums1-
Dsysa/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.kaem61-------------------------------------------------------------
Dsysa/make-3.82/make-3.82.checksums1-
Dsysa/mes-0.25/files/config.h7-------
Dsysa/mes-0.25/mes-0.25.x86.checksums14--------------
Dsysa/musl-1.1.24/patches-pass3/avoid_set_thread_area.patch2--
Dsysa/musl-1.1.24/patches-pass3/avoid_sys_clone.patch2--
Dsysa/musl-1.1.24/patches-pass3/set_thread_area.patch2--
Dsysa/musl-1.1.24/patches-pass3/va_list.patch2--
Dsysa/run-after-fiwix.kaem88-------------------------------------------------------------------------------
Dsysa/run.kaem92-------------------------------------------------------------------------------
Dsysa/run.sh188-------------------------------------------------------------------------------
Dsysa/run2.sh119-------------------------------------------------------------------------------
Dsysa/stage0-posix/src1-
Dsysa/tcc-0.9.26/tcc-0.9.26.kaem333-------------------------------------------------------------------------------
Dsysa/tcc-0.9.26/tcc-0.9.26.x86.checksums10----------
Dsysa/tcc-0.9.27/patches-musl-pass3/ignore-static-inside-array.patch2--
Dsysa/tcc-0.9.27/patches-musl-pass3/static-link.patch2--
Dsysa/tcc-0.9.27/tcc-0.9.27.checksums1-
Dsysb/init46----------------------------------------------
Dsysb/run.sh95-------------------------------------------------------------------------------
Dsysc.py49-------------------------------------------------
Dsysc/after.sh38--------------------------------------
Dsysc/curl-7.88.1/sources1-
Dsysc/init84-------------------------------------------------------------------------------
Dsysc/musl-1.2.4/musl-1.2.4.sh51---------------------------------------------------
Dsysc/musl-1.2.4/sources1-
Dsysc/run.sh65-----------------------------------------------------------------
Dsysc/run2.sh147-------------------------------------------------------------------------------
589 files changed, 3599 insertions(+), 3550 deletions(-)

diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml @@ -21,7 +21,7 @@ jobs: - name: Install pylint run: sudo pip3 install pylint - name: pylint - run: pylint rootfs.py sysa.py sysc.py lib/utils.py lib/sysgeneral.py lib/tmpdir.py --disable=duplicate-code + run: pylint rootfs.py lib/utils.py lib/generator.py lib/tmpdir.py --disable=duplicate-code shellcheck: name: Lint shell files @@ -30,7 +30,7 @@ jobs: - name: Checkout repo uses: actions/checkout@v3 - name: shellcheck - run: shellcheck sysa/run.sh sysa/run2.sh sysb/init sysb/run.sh sysc/init sysc/run.sh sysa/helpers.sh download-distfiles.sh + run: shellcheck steps/helpers.sh download-distfiles.sh reuse: name: Lint reuse information diff --git a/.gitignore b/.gitignore @@ -5,7 +5,6 @@ tmp/ kernel -sysa/distfiles/ -sysc/distfiles/ +distfiles/ __pycache__ -sysa/bootstrap.cfg +steps/bootstrap.cfg diff --git a/.gitmodules b/.gitmodules @@ -2,7 +2,6 @@ # SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space> # # SPDX-License-Identifier: MIT - -[submodule "sysa/stage0-posix/src"] - path = sysa/stage0-posix/src - url = https://github.com/oriansj/stage0-posix/ +[submodule "seed/stage0-posix"] + path = seed/stage0-posix + url = https://github.com/oriansj/stage0-posix diff --git a/.reuse/dep5 b/.reuse/dep5 @@ -9,6 +9,6 @@ Source: https://github.com/fosslinux/live-bootstrap # Copyright: $YEAR $NAME <$CONTACT> # License: ... -Files: sys*/*/sources sysa/*/*.checksums sysa/SHA256SUMS.pkgs sysa/*/simple-patches/* +Files: steps/*/sources steps/*/*.checksums steps/SHA256SUMS.pkgs steps/*/simple-patches/* steps/pre-network-sources Copyright: none License: MIT diff --git a/DEVEL.md b/DEVEL.md @@ -14,31 +14,40 @@ and that a full build completes. ## Structure -Each system corresponds to a reboot of the live environment. There is only one -appropriate structure as shown below (eg for sysa): - ``` -sysa -├── any-global-files.sh +seed +├── seed.kaem +├── script-generator.c +├── ... +└── stage0-posix + +steps +├── manifest +├── any-global-files +├── jump +│   └── linux.sh +├── improve +│   └── x.sh ├── somepackage-version -│   ├── somepackage-version.kaem (or .sh) +│   ├── pass1.kaem +│   ├── pass2.sh │   ├── files │   ├── simple-patches │   ├── mk │   └── patches -└── tmp ``` -Global scripts that drive the entire system go directly under `sysx`. `tmp` -contains the temporary system used for QEMU or a chroot. - -Then, each package is in its own specific directory, named `package-version`. -It then diverges based upon which driver is being used: +The `seed` directory contains everything required for `script-generator` to be +run. -- `kaem`: A file named `package-version.kaem` is called by the master script. -- `bash`: The `build` function from helper.sh is called from the master script. - There are default functions run which can be overridden by an optional script - `package-version.sh` within the package-specific directory. +In the `steps` directory, the bootstrap process is defined in `manifest`. +Each package to be built is named `package-version`. +Each subsequent build of a package is the nth pass. Scripts are named +accordingly; eg, the first build would be called `pass1.sh`, the second would be +`pass2.sh`, etc. +Scripts run in kaem era should be denoted as such in their filename; +`pass1.kaem`, for example. Pass numbers do not reset after kaem, ie, you cannot +have both `pass1.kaem` and `pass1.sh`. In this folder, there are other folders/files. `*.checksums` are required for early packages that are build with kaem, others are optional. @@ -51,21 +60,16 @@ Permissible folders/files: - `simple-patches`: patches for the source that use the before/after convention of simple-patch.c - `*.checksums`: files containing the checksums for the resulting binaries and libraries that are compiled and installed. - - Up to and including `coreutils-6.10`, `sha256sum` from `stage0-posix` - is used for the checksumming. Later we switch to GNU version. - - To extract checksums of the binaries, use of qemu mode is recommended - (i.e. `./rootfs.py -q -qk $kernel --update-checksums`). -- compilation script - -The directory m2-functions is used for M2-Planet functions (currently). + - Otherwise, the package's checksum is in SHA256SUMS.pkgs. +- compilation script(s) ## Conventions - **Patches:** - all patches are `-p0` - all patches begin with a patch header -- **README:** - - all stages are explained in README +- **parts.rst:** + - all packages are explained in `parts.rst` - **General:** - Where possible, all blocks of text should be limited to a length of 80 characters. @@ -79,9 +83,3 @@ The directory m2-functions is used for M2-Planet functions (currently). - Patches are licensed under the license of the project which they are patching. - All files (excluding files within submodules) must comply with REUSE v3.0. - -## git - -All changes must be submitted as PRs. Pushing to master is disallowed, even if -push access is granted to a user. Only pushes to master should be merging of -patches into master. diff --git a/README.rst b/README.rst @@ -12,94 +12,90 @@ An attempt to provide a reproducible, automatic, complete end-to-end bootstrap from a minimal number of binary seeds to a supported fully functioning operating system. -Get me started! ---------------- +How do I use this? +------------------ + +Quick start: + +See ``./rootfs.py --help`` and follow the instructions given there. +This uses a variety of userland tools to prepare the bootstrap. + +(*Currently, there is no way to perform the bootstrap without external +preparations! This is a currently unsolved problem.*) + +Without using Python: 1. ``git clone https://github.com/fosslinux/live-bootstrap`` 2. ``git submodule update --init --recursive`` -3. Provide a kernel (vmlinuz file) as the name ``kernel`` in the root of the - repository. **This must be a 32-bit kernel.** -4. ``./rootfs.py --qemu`` - ensure your account has kvm privileges and qemu - installed. - - a. Alternatively, run ``./rootfs.py --chroot`` to run it in a chroot. - b. Alternatively, run ``./rootfs.py --bwrap`` to run it in a bubblewrap - sandbox. When user namespaces are supported, this mode is rootless. - c. Alternatively, run ``./rootfs.py`` but don’t run the actual - virtualization and instead copy sysa/tmp/initramfs to a USB or - some other device and boot from bare metal. NOTE: we now require - a hard drive. This is currently hardcoded as sda. You also need - to put ``sysc/tmp/disk.img`` onto your sda on the bootstrapping - machine. - d. Alternatively, do not use python at all, see "Python-less build" - below. - -5. Wait. -6. If you can, observe the many binaries in ``/usr/bin``! When the - bootstrap is completed ``bash`` is launched providing a shell to - explore the system. - +3. Consider whether you are going to run this in a chroot, in QEMU, or on bare + metal. (All of this *can* be automated, but not in a trustable way. See + further below.) + a. **chroot:** Create a directory where the chroot will reside, run + ``./download-distfiles.sh``, and copy: + * The entire contents of ``seed/stage0-posix`` into that directory. + * All other files in ``seed`` into that directory. + * ``steps/`` and ``distfiles/`` into that directory. + * At least all files listed in ``steps/pre-network-sources`` must be + copied in. All other files will be obtained from the network. + * Run ``/bootstrap-seeds/POSIX/x86/kaem-optional-seed`` in the chroot. + (Eg, ``chroot rootfs /bootstrap-seeds/POSIX/x86/kaem-optional-seed``). + b. **QEMU:** Create two blank disk images. + * On the first image, write + ``seed/stage0-posix/bootstrap-seeds/NATIVE/x86/builder-hex0-x86-stage1.img`` + to it, followed by ``kernel-bootstrap/builder-hex0-x86-stage2.hex0``, + followed by zeros padding the disk to the next sector. + * distfiles can be obtained using ``./download-distfiles.sh``. + * See the list in part a. For every file within that list, write a line to + the disk ``src <size-of-file> <path-to-file>``, followed by the contents + of the file. + * *Only* copy distfiles listed in ``steps/pre-network-sources`` into + this disk. + * Optionally (if you don't do this, distfiles will be network downloaded): + * On the second image, create an MSDOS partition table and one ext3 + partition. + * Copy ``distfiles/`` into this disk. + * Run QEMU, with 4+G RAM, optionally SMP (multicore), both drives (in the + order introduced above), a NIC with model E1000 (``-nic + user,model=e1000``), and ``-machine kernel-irqchip=split``. + c. **Bare metal:** Follow the same steps as QEMU, but the disks need to be + two different *physical* disks, and boot from the first disk. Background ---------- -This project is a part of the bootstrappable project, a project that -aims to be able to build complete computing platforms through the use of -source code. When you build a compiler like GCC, you need another C -compiler to compile the compiler - turtles all the way down. Even the -first GCC compiler was written in C. There has to be a way to break the -chain… - -There has been significant work on this over the last 5 years, from -Jeremiah Orians’ stage0, hex2 and M2-Planet to janneke’s Mes. We have a -currently, fully-functioning chain of bootstrapping from the 357-byte -hex0 seed to a complete GCC compiler and hence a full Linux operating -system. From there, it is trivial to move to other UNIXes. However, -there is only currently one vector through which this can be -automatically done, GNU Guix. - -While the primary author of this project does not believe Guix is a bad -project, the great reliance on Guile, the complexity of many of the -scripts and the rather steep learning curve to install and run Guix make -it a very non plug-and-play solution. Furthermore, there is currently -(Jan 2021) no possible way to run the bootstrap from outside of a -pre-existing Linux environment. Additionally, Guix uses many scripts and -distributed files that cannot be considered source code. - -(NOTE: Guix is working on a Full Source Bootstrap, but I’m not -completely sure what that entails). - -Furthermore, having an alternative bootstrap automation tool allows -people to have greater trust in the bootstrap procedure. - -Comparison between GNU Guix and live-bootstrap ----------------------------------------------- - -+----------------------+----------------------+----------------------+ -| Item | Guix | live-bootstrap | -+======================+======================+======================+ -| Total size of seeds | ~30MB (Reduced | ~1KB | -| [1] | Source Bootstrap) | | -| | [2] | | -+----------------------+----------------------+----------------------+ -| Use of kernel | Linux-Libre Kernel | Any Linux Kernel | -| | | (2.6+) [3] | -+----------------------+----------------------+----------------------+ -| Implementation | Yes | No (in development) | -| complete | | | -+----------------------+----------------------+----------------------+ -| Automation | Almost fully | Optional user | -| | automatic | customization | -+----------------------+----------------------+----------------------+ - -[1]: Both projects only use software licensed under a FSF-approved -free software license. Kernel is excluded from seed. -[2]: Reiterating that Guix is working on a full source bootstrap, -although that still uses guile (~12 MB). [3]: Work is ongoing to use -other, smaller POSIX kernels. - -Why would I want bootstrapping? -------------------------------- +Problem statement +================= + +live-bootstrap's overarching problem statement is; + +> How can a usable Linux system be created with only human-auditable, and +wherever possible, human-written, source code? + +Clarifications: + +* "usable" means a modern toolchain, with appropriate utilities, that can be + used to expand the amount of software on the system, interactively, or + non-interactively. +* "human-auditable" is discretionary, but is usually fairly strict. See + "Specific things to be bootstrapped" below. + +Why is this difficult? +====================== + +The core of a modern Linux system is primarily written in C and C++. C and C++ +are **self-hosting**, ie, nearly every single C compiler is written in C. + +Every single version of GCC was written in C. To avoid using an existing +toolchain, we need some way to be able to compile a GCC version without C. We +can use a less well-featured compiler, TCC, to do this. And so forth, until we +get to a fairly primitive C compiler written in assembly, ``cc_x86``. + +Going up through this process requires a bunch of other utilities as well; the +autotools suite, guile and autogen, etc. These also have to be matched +appropriately to the toolchain available. + +Why should I care? +------------------ That is outside of the scope of this README. Here’s a few things you can look at: @@ -117,7 +113,7 @@ bootstrapping. However, there are a number of non-auditable files used in many of their packages. Here is a list of file types that we deem unsuitable for bootstrapping. -1. Binaries (apart from seed hex0, kaem, kernel). +1. Binaries (apart from seed hex0, kaem, builder-hex0). 2. Any pre-generated configure scripts, or Makefile.in’s from autotools. 3. Pre-generated bison/flex parsers (identifiable through a ``.y`` file). @@ -131,56 +127,18 @@ How does this work? **For a more in-depth discussion, see parts.rst.** -sysa -~~~~ - -sysa is the first ‘system’ used in live-bootstrap. We move to a new -system after a reboot, which often occurs after the movement to a new -kernel. It is run by the seed Linux kernel provided by the user. It -compiles everything we need to be able to compile our own Linux kernel. -It runs fully in an initramfs and does not rely on disk support in the -seed Linux kernel. - -sysb -~~~~ - -sysb is the second 'system' of live-bootstrap. This uses the Linux 4.9.10 -kernel compiled within sysa. As we do not rely on disk support in sysa, we -need this intermediate system to be able to add the missing binaries to sysc -before moving into it. This is executed through kexec from sysa. At this point, -a SATA disk IS required. - -sysc -~~~~ - -sysc is the (current) last 'system' of live-bootstrap. This is a continuation -from sysb, executed through util-linux's ``switch_root`` command which moves -the entire rootfs without a reboot. Every package from here on out is compiled -under this system, taking binaries from sysa. Chroot and bubblewrap modes skip -sysb, as it is obviously irrelevant to them. - -Python-less build ------------------ - -Python is no longer a requirement to set up the build system. The -repository is almost completely in a form where it can be used as the -source of a build. - -1. Download required tarballs into ``sysa/distfiles`` and ``sysc/distfiles``. - You can use the ``download-distfiles.sh`` script. -2. Copy sysa/stage0-posix/src/* to the root of the repository. -3. Copy sysa/stage0-posix/src/bootstrap-seeds/POSIX/x86/kaem-optional-seed - to init in the root of the repository. -4. Copy sysa/after.kaem to after.kaem -5. Create a CPIO archive (eg, ``cpio --format newc --create --directory . > ../initramfs``). -6. Boot your initramfs and kernel. - -chroot builds -~~~~~~~~~~~~~ +Firstly, ``builder-hex0`` is launched. ``builder-hex0`` is a minimal kernel that is +written in ``hex0``, existing in 3 self-bootstrapping stages. -For chroot based bootstraps you can skip creation of initramfs and instead start bootstrap with +This is capable of executing the entirety of ``stage0-posix``, (see +``seed/stage0-posix``), which produces a variety of useful utilities and a basic +C language, ``M2-Planet``. -``sudo chroot . bootstrap-seeds/POSIX/x86/kaem-optional-seed`` +``stage0-posix`` runs a file called ``after.kaem``. This is a shell script that +builds and runs a small program called ``script-generator``. This program reads +``steps/manifest`` and converts it into a series of shell scripts that can be +executed in sequence to complete the bootstrap. -It is also recommended to copy everything to a new directory as bootstrapping messes up with files -in git repository and cannot be re-run again. +From this point forward, ``steps/manifest`` is effectively self documenting. +Each package built exists in ``steps/<pkg>``, and the build scripts can be seen +there. diff --git a/download-distfiles.sh b/download-distfiles.sh @@ -20,27 +20,18 @@ download_source() { echo "${checksum} ${dest_path}" | sha256sum -c } -download_for_sys() { - local sysdir="${1}" - local distfiles="${sysdir}/distfiles" - - mkdir -p "${distfiles}" - - local entry - for entry in "${sysdir}"/*; do - [ -e "${entry}/sources" ] || continue - - local line - # shellcheck disable=SC2162 - while read line; do - # This is intentional - we want to split out ${line} into separate arguments. - # shellcheck disable=SC2086 - download_source "${distfiles}" ${line} - done < "${entry}/sources" - done -} - set -e + cd "$(dirname "$(readlink -f "$0")")" -download_for_sys sysa -download_for_sys sysc +mkdir -p distfiles + +for entry in steps/*; do + [ -e "${entry}/sources" ] || continue + + # shellcheck disable=SC2162 + while read line; do + # This is intentional - we want to split out ${line} into separate arguments. + # shellcheck disable=SC2086 + download_source distfiles ${line} + done < "${entry}/sources" +done diff --git a/lib/generator.py b/lib/generator.py @@ -0,0 +1,338 @@ +#!/usr/bin/env python3 +""" +This file contains all code required to generate the boot image for live-bootstrap +""" +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: 2022-2023 Dor Askayo <dor.askayo@gmail.com> +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com> +# SPDX-FileCopyrightText: 2021-23 fosslinux <fosslinux@aussies.space> + +import hashlib +import os +import shutil +import tarfile +import requests + +class Generator(): + """ + Class responsible for generating the basic media to be consumed. + """ + + git_dir = os.path.join(os.path.dirname(os.path.join(__file__)), '..') + distfiles_dir = os.path.join(git_dir, 'distfiles') + + # pylint: disable=too-many-arguments + def __init__(self, tmpdir, arch, external_sources, + early_preseed, repo_path): + self.arch = arch + self.early_preseed = early_preseed + self.external_sources = external_sources + self.repo_path = repo_path + self.tmpdir = tmpdir + self.tmp_dir = tmpdir.path + self.external_dir = os.path.join(self.tmp_dir, 'external') + + def prepare(self, using_kernel=False, kernel_bootstrap=False): + """ + Prepare basic media of live-bootstrap. + /steps -- contains steps to be built + / -- contains seed to allow steps to be built, containing custom + scripts and stage0-posix + """ + # We use ext3 here; ext4 actually has a variety of extensions that + # have been added with varying levels of recency + # Linux 4.9.10 does not support a bunch of them + # Attempting to disable extensions that a particular e2fsprogs + # is *unaware* of causes the filesystem creation to fail + # We could hypothetically detect e2fsprogs version and create an + # argument matrix ... or we could just use ext3 instead which + # is effectively universally the same + if kernel_bootstrap: + init_path = os.path.join(self.tmp_dir, 'init') + + os.mkdir(init_path) + self.tmp_dir = init_path + + if self.repo_path or self.external_sources: + self.tmpdir.add_disk("external", filesystem="ext3") + self.tmpdir.mount_disk("external", "external") + else: + self.tmpdir.add_disk("external", tabletype="none") + elif using_kernel: + self.tmp_dir = os.path.join(self.tmp_dir, 'disk') + self.tmpdir.add_disk("disk", filesystem="ext3") + self.tmpdir.mount_disk("disk", "disk") + self.external_dir = os.path.join(self.tmp_dir, 'external') + + os.makedirs(self.external_dir, exist_ok=True) + + if self.early_preseed: + # Extract tar containing preseed + with tarfile.open(self.early_preseed, "r") as seed: + seed.extractall(self.tmp_dir) + shutil.copy2(os.path.join(self.git_dir, 'seed', 'preseeded.kaem'), + os.path.join(self.tmp_dir, 'kaem.x86')) + else: + self.stage0_posix() + self.seed() + + self.steps() + + self.distfiles() + + self.create_fiwix_file_list() + + if self.repo_path: + repo_dir = os.path.join(self.external_dir, 'repo-preseeded') + shutil.copytree(self.repo_path, repo_dir) + + if kernel_bootstrap: + self.create_builder_hex0_disk_image(os.path.join(self.tmp_dir, 'disk.img')) + + if kernel_bootstrap and (self.external_sources or self.repo_path): + self.tmpdir.umount_disk('external') + elif using_kernel: + self.tmpdir.umount_disk('disk') + + def steps(self): + """Copy in steps.""" + source_manifest = self.get_source_manifest() + self.get_packages(source_manifest) + + shutil.copytree(os.path.join(self.git_dir, 'steps'), os.path.join(self.tmp_dir, 'steps')) + + def stage0_posix(self): + """Copy in all of the stage0-posix""" + stage0_posix_base_dir = os.path.join(self.git_dir, 'seed', 'stage0-posix') + for f in os.listdir(stage0_posix_base_dir): + orig = os.path.join(stage0_posix_base_dir, f) + to = os.path.join(self.tmp_dir, f) + if os.path.isfile(orig): + shutil.copy2(orig, to) + else: + shutil.copytree(orig, to) + + arch = stage0_arch_map.get(self.arch, self.arch) + kaem_optional_seed = os.path.join(self.git_dir, 'seed', 'stage0-posix', 'bootstrap-seeds', + 'POSIX', arch, 'kaem-optional-seed') + shutil.copy2(kaem_optional_seed, os.path.join(self.tmp_dir, 'init')) + + def seed(self): + """Copy in extra seed files""" + seed_dir = os.path.join(self.git_dir, 'seed') + for f in os.listdir(seed_dir): + if os.path.isfile(os.path.join(seed_dir, f)): + shutil.copy2(os.path.join(seed_dir, f), os.path.join(self.tmp_dir, f)) + + def add_fiwix_files(self, file_list_path, dirpath): + """Add files to the list to populate Fiwix file system""" + for root, _, filepaths in os.walk(dirpath): + if 'stage0-posix' in root: + continue + with open(file_list_path, 'a', encoding="utf-8") as file_list: + for filepath in filepaths: + file_list.write(f"/{os.path.join(root, filepath)}\n") + + def create_fiwix_file_list(self): + """Create a list of files to populate Fiwix file system""" + file_list_path = os.path.join(self.tmp_dir, 'steps', 'lwext4-1.0.0-lb1', + 'files', 'fiwix-file-list.txt') + shutil.copyfile(os.path.join(self.tmp_dir, 'steps', 'lwext4-1.0.0-lb1', + 'files', 'early-artifacts-needed-after-fiwix.txt'), + file_list_path) + + save_cwd = os.getcwd() + os.chdir(self.tmp_dir) + self.add_fiwix_files(file_list_path, 'steps') + self.add_fiwix_files(file_list_path, 'distfiles') + os.chdir(save_cwd) + + def distfiles(self): + """Copy in distfiles""" + def copy_no_network_distfiles(out): + # Note that no network == no disk for kernel bootstrap mode + pre_src_path = os.path.join(self.git_dir, 'steps', 'pre-network-sources') + with open(pre_src_path, 'r', encoding="utf-8") as source_list: + for file in source_list.readlines(): + file = file.strip() + shutil.copy2(os.path.join(self.distfiles_dir, file), + os.path.join(out, file)) + + early_distfile_dir = os.path.join(self.tmp_dir, 'external', 'distfiles') + main_distfile_dir = os.path.join(self.external_dir, 'distfiles') + + if early_distfile_dir != main_distfile_dir: + os.makedirs(early_distfile_dir) + copy_no_network_distfiles(early_distfile_dir) + + if self.external_sources: + os.mkdir(main_distfile_dir) + shutil.copytree(self.distfiles_dir, main_distfile_dir) + else: + os.mkdir(main_distfile_dir) + copy_no_network_distfiles(main_distfile_dir) + + @staticmethod + def output_dir(srcfs_file, dirpath): + """Add a directory to srcfs file system""" + srcline = f"src 0 {dirpath}\n" + srcfs_file.write(srcline.encode()) + + @staticmethod + def output_file(srcfs_file, filepath): + """Add a file to srcfs file system""" + srcline = f"src {os.path.getsize(filepath)} {filepath}\n" + srcfs_file.write(srcline.encode()) + with open(filepath, 'rb') as srcfile: + srcfs_file.write(srcfile.read()) + + def output_tree(self, srcfs_file, treepath): + """Add a tree of files to srcfs file system""" + self.output_dir(srcfs_file, treepath) + for root, dirs, files in os.walk(treepath): + if ".git" in root: + continue + for dirpath in dirs: + if ".git" in dirpath: + continue + self.output_dir(srcfs_file, os.path.join(root, dirpath)) + + for filepath in files: + if ".git" in filepath: + continue + self.output_file(srcfs_file, os.path.join(root, filepath)) + + def append_srcfs(self, image_file): + """Append srcfs file system to disk image""" + save_cwd = os.getcwd() + + os.chdir(self.tmp_dir) + self.output_tree(image_file, '.') + + # Add commands to kick off stage0-posix + cmd = ' '.join(['hex0', + './bootstrap-seeds/POSIX/x86/hex0_x86.hex0', + './bootstrap-seeds/POSIX/x86/hex0-seed\n']) + image_file.write(cmd.encode()) + cmd = ' '.join(['hex0', + './bootstrap-seeds/POSIX/x86/kaem-minimal.hex0', + './bootstrap-seeds/POSIX/x86/kaem-optional-seed\n']) + image_file.write(cmd.encode()) + cmd = ' '.join(['./bootstrap-seeds/POSIX/x86/kaem-optional-seed', './kaem.x86\n']) + image_file.write(cmd.encode()) + + os.chdir(save_cwd) + + def create_builder_hex0_disk_image(self, image_file_name): + """Create builder-hex0 disk image""" + shutil.copyfile(os.path.join('seed', 'stage0-posix', 'bootstrap-seeds', + 'NATIVE', 'x86', 'builder-hex0-x86-stage1.img'), + image_file_name) + + with open(image_file_name, 'ab') as image_file: + # Append stage2 hex0 source + with open(os.path.join('kernel-bootstrap', 'builder-hex0-x86-stage2.hex0'), + encoding="utf-8") as infile: + image_file.write(infile.read().encode()) + # Pad to next sector + current_size = os.stat(image_file_name).st_size + while current_size % 512 != 0: + image_file.write(b'\0') + current_size += 1 + self.append_srcfs(image_file) + + current_size = os.stat(image_file_name).st_size + + megabyte = 1024 * 1024 + # fill file with zeros up to next megabyte + extra = current_size % megabyte + round_up = megabyte - extra + with open(image_file_name, 'ab') as image_file: + image_file.write(b'\0' * round_up) + current_size += round_up + + # fill file with zeros up to desired size, one megabyte at a time + with open(image_file_name, 'ab') as image_file: + while current_size < 16384 * megabyte: + image_file.write(b'\0' * megabyte) + current_size += megabyte + + def check_file(self, file_name, expected_hash): + """Check hash of downloaded source file.""" + with open(file_name, "rb") as downloaded_file: + downloaded_content = downloaded_file.read() # read entire file as bytes + readable_hash = hashlib.sha256(downloaded_content).hexdigest() + if expected_hash == readable_hash: + return + raise ValueError(f"Checksum mismatch for file {os.path.basename(file_name)}:\n\ +expected: {expected_hash}\n\ +actual: {readable_hash}\n\ +When in doubt, try deleting the file in question -- it will be downloaded again when running \ +this script the next time") + + def download_file(self, url, directory, file_name): + """ + Download a single source archive. + """ + abs_file_name = os.path.join(directory, file_name) + + # Create a directory for downloaded file + if not os.path.isdir(directory): + os.mkdir(directory) + + # Actually download the file + headers = { + "Accept-Encoding": "identity" + } + if not os.path.isfile(abs_file_name): + print(f"Downloading: {file_name}") + response = requests.get(url, allow_redirects=True, stream=True, + headers=headers, timeout=20) + if response.status_code == 200: + with open(abs_file_name, 'wb') as target_file: + target_file.write(response.raw.read()) + else: + raise requests.HTTPError("Download failed.") + return abs_file_name + + def get_packages(self, source_manifest): + """Prepare remaining sources""" + for line in source_manifest.split("\n"): + line = line.strip().split(" ") + + path = self.download_file(line[2], line[1], line[3]) + self.check_file(path, line[0]) + + @classmethod + def get_source_manifest(cls): + """ + Generate a source manifest for the system. + """ + manifest_lines = [] + directory = os.path.relpath(cls.distfiles_dir, cls.git_dir) + + # Find all source files + steps_dir = os.path.join(cls.git_dir, 'steps') + for file in os.listdir(steps_dir): + if os.path.isdir(os.path.join(steps_dir, file)): + sourcef = os.path.join(steps_dir, file, "sources") + if os.path.exists(sourcef): + # Read sources from the source file + with open(sourcef, "r", encoding="utf_8") as sources: + for line in sources.readlines(): + line = line.strip().split(" ") + + if len(line) > 2: + file_name = line[2] + else: + # Automatically determine file name based on URL. + file_name = os.path.basename(line[0]) + + manifest_lines.append(f"{line[1]} {directory} {line[0]} {file_name}") + + return "\n".join(manifest_lines) + +stage0_arch_map = { + "amd64": "AMD64", +} diff --git a/lib/sysgeneral.py b/lib/sysgeneral.py @@ -1,132 +0,0 @@ -#!/usr/bin/env python3 -""" -This file contains a few functions to be shared by all Sys* classes -""" - -# SPDX-FileCopyrightText: 2022-2023 Dor Askayo <dor.askayo@gmail.com> -# SPDX-FileCopyrightText: 2021-23 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-License-Identifier: GPL-3.0-or-later - -import os -import hashlib -import glob -import subprocess - -import requests - -class SysGeneral: - """ - A class from which all Sys* class are extended. - Contains functions used in all Sys* - """ - - # All of these are variables defined in the individual Sys* classes - cache_dir = None - base_dir = None - git_dir = None - sys_dir = None - initramfs_path = None - tmp_dir = None - - def check_file(self, file_name, expected_hash): - """Check hash of downloaded source file.""" - with open(file_name, "rb") as downloaded_file: - downloaded_content = downloaded_file.read() # read entire file as bytes - readable_hash = hashlib.sha256(downloaded_content).hexdigest() - if expected_hash == readable_hash: - return - raise ValueError(f"Checksum mismatch for file {os.path.basename(file_name)}:\n\ -expected: {expected_hash}\n\ -actual: {readable_hash}\n\ -When in doubt, try deleting the file in question -- it will be downloaded again when running \ -this script the next time") - - def download_file(self, url, directory, file_name): - """ - Download a single source archive. - """ - abs_file_name = os.path.join(directory, file_name) - - # Create a directory for downloaded file - if not os.path.isdir(directory): - os.mkdir(directory) - - # Actually download the file - headers = { - "Accept-Encoding": "identity" - } - if not os.path.isfile(abs_file_name): - print(f"Downloading: {file_name}") - response = requests.get(url, allow_redirects=True, stream=True, - headers=headers, timeout=20) - if response.status_code == 200: - with open(abs_file_name, 'wb') as target_file: - target_file.write(response.raw.read()) - else: - raise requests.HTTPError("Download failed.") - return abs_file_name - - def get_packages(self, source_manifest): - """Prepare remaining sources""" - for line in source_manifest.split("\n"): - line = line.strip().split(" ") - - path = self.download_file(line[2], line[1], line[3]) - self.check_file(path, line[0]) - - @classmethod - def get_source_manifest(cls): - """ - Generate a source manifest for the system. - """ - manifest_lines = [] - directory = os.path.relpath(cls.cache_dir, cls.git_dir) - - # Find all source files - for file in os.listdir(cls.sys_dir): - if os.path.isdir(os.path.join(cls.sys_dir, file)): - sourcef = os.path.join(cls.sys_dir, file, "sources") - if os.path.exists(sourcef): - # Read sources from the source file - with open(sourcef, "r", encoding="utf_8") as sources: - for line in sources.readlines(): - line = line.strip().split(" ") - - if len(line) > 2: - file_name = line[2] - else: - # Automatically determine file name based on URL. - file_name = os.path.basename(line[0]) - - manifest_lines.append(f"{line[1]} {directory} {line[0]} {file_name}") - - return "\n".join(manifest_lines) - - def make_initramfs(self): - """Package binary bootstrap seeds and sources into initramfs.""" - self.initramfs_path = os.path.join(self.tmp_dir, 'initramfs') - - # Create a list of files to go within the initramfs - file_list = glob.glob(os.path.join(self.tmp_dir, '**'), recursive=True) - - # Use built-in removeprefix once we can use Python 3.9 - def remove_prefix(text, prefix): - if text.startswith(prefix): - return text[len(prefix):] - return text # or whatever - - file_list = [remove_prefix(f, self.tmp_dir + os.sep) for f in file_list] - - # Create the initramfs - with open(self.initramfs_path, "w", encoding="utf_8") as initramfs: - # pylint: disable=consider-using-with - cpio = subprocess.Popen( - ["cpio", "--format", "newc", "--create", - "--directory", self.tmp_dir], - stdin=subprocess.PIPE, stdout=initramfs) - cpio.communicate(input='\n'.join(file_list).encode()) - -stage0_arch_map = { - "amd64": "AMD64", -} diff --git a/lib/tmpdir.py b/lib/tmpdir.py @@ -24,7 +24,6 @@ class Tmpdir: Represents a tmpdir """ - _syses = {} _disks = {} _disk_filesystems = {} _mountpoints = {} @@ -60,19 +59,11 @@ class Tmpdir: mount("tmpfs", self.path, "tmpfs", f"size={size}") self._type = TmpType.TMPFS - def add_sys(self, name, subdir=None): - """Create a subdirectory and register a sys""" - if subdir is None: - subdir = name - sys_path = os.path.join(self.path, name) - if not os.path.exists(sys_path): - os.mkdir(sys_path) - return sys_path - - def add_disk(self, name, size="16G", filesystem="ext4"): + # pylint: disable=too-many-arguments + def add_disk(self, name, size="16G", filesystem="ext4", tabletype="msdos", mkfs_args=None): """Add a disk""" disk_path = os.path.join(self.path, f"{name}.img") - self._disks[name] = create_disk(disk_path, "msdos", filesystem, size) + self._disks[name] = create_disk(disk_path, tabletype, filesystem, size, mkfs_args=mkfs_args) self._disk_filesystems[name] = filesystem # Allow executing user to access it run_as_root("chown", getpass.getuser(), self._disks[name]) diff --git a/lib/utils.py b/lib/utils.py @@ -31,8 +31,10 @@ def run_as_root(*args, **kwargs): return run("sudo", *args, **kwargs) return run(*args, **kwargs) -def create_disk(image, disk_type, fs_type, size): +def create_disk(image, disk_type, fs_type, size, mkfs_args=None): """Create a disk image, with a filesystem on it""" + if mkfs_args is None: + mkfs_args = [] run('truncate', '-s', size, image) # First find the device we will use, then actually use it loop_dev = run_as_root('losetup', '-f', capture_output=True).stdout.decode().strip() @@ -40,9 +42,9 @@ def create_disk(image, disk_type, fs_type, size): # Create the partition if disk_type != "none": run_as_root('parted', '--script', image, 'mklabel', disk_type, 'mkpart', - 'primary', 'ext4', '0%', '100%') + 'primary', fs_type, '0%', '100%') run_as_root('partprobe', loop_dev) - run_as_root('mkfs.' + fs_type, loop_dev + "p1") + run_as_root('mkfs.' + fs_type, loop_dev + "p1", *mkfs_args) return loop_dev def mount(source, target, fs_type, options='', **kwargs): diff --git a/parts.rst b/parts.rst @@ -155,14 +155,46 @@ checksumming tool, that we use to ensure reproducibility and authenticity of generated binaries. We also build initial ``untar``, ``ungz`` and ``unbz2`` utilities to deal with compressed archives. -``/sysa`` -========= +live-bootstrap seed +=================== + +``stage0-posix`` executes a file ``after.kaem``, which creates a kaem script to +continue the bootstrap. This is responsible for cleaning up the mess in +``/x86/bin`` and moving it to the permanent ``/usr/bin``, and setting a few +environment variables. + +script-generator +================ + +``script-generator`` is a program that translates live-bootstrap's +domain-specific manifest language into shell scripts that can be run to complete +the bootstrap. The translator is implemented in ``M2-Planet``. + +The language is fairly simple; each line has the format +``<directive>: <arguments> <predicate>``. A predicate only runs the line if a +particular condition is true. -We now move into the ``/sysa`` directory. As stage0-posix has no -concept of ``chdir()`` (not added until very late in stage0-posix), -we have to copy a lot of files into the root of the initramfs, making it -very messy. We get into the move ordered directory ``/sysa`` here, -copying over all of the required binaries from ``/``. +The following directives are supported: + +* ``build``, builds a particular package defined in ``steps/``. +* ``improve``, runs a script making a distinct and logical improvement to the + live bootstrap system. +* ``define``, define a variable evaluated from other constants/variables. +* ``jump``, moves into a new rootfs/kernel using a custom script. + +checksum-transcriber 1.0 +======================== + +``checksum-transcriber`` is a small program that converts live-bootstrap's +source specification for packages into a SHA256SUM file that can be used to +checksum source tarballs. + +simple-patch 1.0 +================ + +``simple-patch`` is a rudimentary patching program. It works by matching for a +text block given to it, and replacing it with another text block. This is +sufficient for the early patching required before we have full proper GNU patch. mes 0.25 ======== @@ -177,6 +209,10 @@ to this part: 2. We then use this to recompile the Mes interpreter as well as building the libc. This second interpreter is faster and less buggy. +From this point until musl, we are capable of making non-standard and strange +libraries. All libraries are in ``/usr/lib/mes``, and includes are in +``/usr/include/mes``, as they are incompatible with musl. + tinycc 0.9.26 ============= @@ -215,8 +251,8 @@ This is a Linux 2.0 clone which is much simpler to understand and build than Linux. This version of Fiwix is a fork of 1.4.0 that contains many modifications and enhancements to support live-boostrap. -lwext4 1.0.0 -============ +lwext4 1.0.0-lb1 +================ If the kernel bootstrap option is enabled then `lwext4 <https://github.com/gkostka/lwext4>` is built next. This is a library for creating ext2/3/4 file systems from user land. @@ -230,11 +266,19 @@ kexec-fiwix If the kernel bootstrap option is enabled then a C program `kexec-fiwix` is compiled and run which places the Fiwix ram drive in memory and launches the Fiwix kernel. -kexec-linux -=========== +esfu 1.0 +======== + +This is an extremely crippled basic implementation of ``mount`` and ``mknod``. +Sufficient only for the next step. -If the kernel bootstrap option is enabled then a C program `kexec-linux` is compiled. -This is used as part of the go_sysb step later to launch the Linux kernel. +early_mount_disk +================ + +When using kernel bootstrap, distfiles from this point exist on an external +disk. Using ``esfu``'s ``mount`` and ``mknod``, we are able to mount this disk. +This is unnecessary when not using kernel bootstrap as everything is done on the +disk. make 3.82 ========= @@ -304,6 +348,12 @@ Bash ships with a bison pre-generated file here which we delete. Unfortunately, we have not bootstrapped bison but fortunately for us, heirloom yacc is able to cope here. +update_env +========== + +This is a simple script that makes some small updates to the env file that were +not possible when using kaem. + flex 2.5.11 =========== @@ -321,8 +371,8 @@ tcc 0.9.27 (patched) We recompile ``tcc`` with some patches needed to build musl. -musl 1.1.24 -=========== +musl 1.1.24 and musl_libdir +=========================== ``musl`` is a C standard library that is lightweight, fast, simple, free, and strives to be correct in the sense of standards-conformance @@ -335,6 +385,9 @@ apply a few patches. In particular, we replace all weak symbols with strong symbols and will patch ``tcc`` in the next step to ignore duplicate symbols. +We do not use any of ``/usr/lib/mes`` or ``/usr/include/mes`` any longer, rather +using ``/usr/lib`` and ``/usr/include`` like normal. + tcc 0.9.27 (musl) ================= @@ -586,12 +639,6 @@ libtool 2.2.4 GNU Libtool is the final part of GNU Autotools. It is a script used to hide away differences when compiling shared libraries on different platforms. -bash 2.05b -========== - -Up to this point, our build of ``bash`` could run scripts but could not be used -interactively. Rebuilding bash makes this functionality work. - automake 1.15.1 =============== @@ -646,6 +693,12 @@ GCC can build the latest as of the time of writing musl version. We also don't need any of the TCC patches that we used before. To accomodate Fiwix, there are patches to avoid syscalls set_thread_area and clone. +Linux headers 5.10.41 +===================== + +This gets some headers out of the Linux kernel that are required to use the +kernel ABI, needed for ``util-linux``. + gcc 4.0.4 ========= @@ -655,10 +708,15 @@ util-linux 2.19.1 ================= ``util-linux`` contains a number of general system administration utilities. -Most pressingly, we need these for being able to mount disks (for non-chroot -mode, but it is built it in chroot mode anyway because it will likely be useful -later). The latest version is not used because of autotools/GCC -incompatibilities. +This gives us access to a much less crippled version of ``mount`` and ``mknod``. +The latest version is not used because of autotools/GCC incompatibilities. + +move_disk +========= + +In ``kernel-bootstrap`` mode, we have been working off an initramfs for some +things up until now. At this point we are now capable of moving to it entirely, +so we do so. kbd-1.15 ======== @@ -685,6 +743,12 @@ bc 1.07.1 ``bc`` is a console based calculator that is sometime used in scripts. We need ``bc`` to rebuild some Linux kernel headers. +kexec-linux +=========== + +If the kernel bootstrap option is enabled then a C program ``kexec-linux`` is compiled. +This can be used to launch a Linux kernel from Fiwix. + kexec-tools 2.0.22 ================== @@ -693,13 +757,6 @@ Linux kernel without a manual restart from within a running system. It is a kind of soft-restart. It is only built for non-chroot mode, as we only use it in non-chroot mode. It is used to go into sysb/sysc. -create_sysb -=========== - -The next step is not a package, but the creation of the sysb rootfs, containing -all of the scripts for sysb (which merely move to sysc). Again, this is only -done in non-chroot mode, because sysb does not exist in chroot mode. - Linux kernel 4.9.10 =================== @@ -716,30 +773,10 @@ so we use a ``find`` command to remove those, which are automatically regenerate The kernel config was originally taken from Void Linux, and was then modified for the requirements of live-bootstrap, including compiler features, drivers, and removing modules. Modules are unused. They are difficult to transfer to -subsequent systems, and we do not have ``modprobe``. Lastly, -the initramfs of sysb is generated in this stage, using ``gen_init_cpio`` within -the Linux kernel tree. This avoids the compilation of ``cpio`` as well. - -musl 1.2.4 -========== -Prior to booting Linux, musl is rebuilt yet again with syscalls -``clone`` and ``set_thread_area`` enabled for Linux thread support. - -go_sysb -======= - -This is the last step of sysa, run for non-chroot mode. It uses kexec to load -the new Linux kernel into RAM and execute it, moving into sysb. - -In chroot, sysb is skipped, and data is transferred directly to sysc and -chrooted into. - -sysb -==== +subsequent systems, and we do not have ``modprobe``. -sysb is purely a transition to sysc, allowing binaries from sysa to get onto a -disk (as sysa does not necessarily have hard disk support in the kernel). -It populates device nodes, mounts sysc, copies over data, and executes sysc. +We then kexec to use the new Linux kernel, using ``kexec-tools`` for a Linux +kernel and ``kexec-linux`` for Fiwix. curl 7.88.1 =========== diff --git a/rootfs.py b/rootfs.py @@ -17,18 +17,16 @@ import argparse import os import shutil -from sysa import SysA -from sysc import SysC from lib.utils import run, run_as_root -from lib.sysgeneral import stage0_arch_map from lib.tmpdir import Tmpdir +from lib.generator import Generator, stage0_arch_map def create_configuration_file(args): """ Creates bootstrap.cfg file which would contain options used to customize bootstrap. """ - config_path = os.path.join('sysa', 'bootstrap.cfg') + config_path = os.path.join('steps', 'bootstrap.cfg') with open(config_path, "w", encoding="utf_8") as config: config.write(f"FORCE_TIMESTAMPS={args.force_timestamps}\n") config.write(f"CHROOT={args.chroot or args.bwrap}\n") @@ -38,7 +36,10 @@ def create_configuration_file(args): config.write(f"INTERNAL_CI={args.internal_ci}\n") config.write(f"BARE_METAL={args.bare_metal}\n") if (args.bare_metal or args.qemu) and not args.kernel: - config.write("DISK=sda\n") + if args.repo or args.external_sources: + config.write("DISK=sdb1\n") + else: + config.write("DISK=sdb\n") config.write("KERNEL_BOOTSTRAP=True\n") else: config.write("DISK=sda1\n") @@ -49,7 +50,7 @@ def create_configuration_file(args): def main(): """ A few command line arguments to customize bootstrap. - This function also creates SysA object which prepares directory + This function also creates object which prepares directory structure with bootstrap seeds and all sources. """ parser = argparse.ArgumentParser() @@ -151,16 +152,15 @@ def main(): if args.tmpfs: tmpdir.tmpfs(size=args.tmpfs_size) - # sys - system_c = SysC(arch=args.arch, tmpdir=tmpdir, - external_sources=args.external_sources) - system_a = SysA(arch=args.arch, early_preseed=args.early_preseed, - tmpdir=tmpdir, external_sources=args.external_sources, - repo_path=args.repo) + generator = Generator(tmpdir=tmpdir, + arch=args.arch, + external_sources=args.external_sources, + repo_path=args.repo, + early_preseed=args.early_preseed) - bootstrap(args, system_a, system_c, tmpdir) + bootstrap(args, generator, tmpdir) -def bootstrap(args, system_a, system_c, tmpdir): +def bootstrap(args, generator, tmpdir): """Kick off bootstrap process.""" print(f"Bootstrapping {args.arch} -- SysA") if args.chroot: @@ -171,17 +171,15 @@ print(shutil.which('chroot')) chroot_binary = run_as_root('python3', '-c', find_chroot, capture_output=True).stdout.decode().strip() - system_c.prepare(create_disk_image=False) - system_a.prepare(create_initramfs=False) + generator.prepare(using_kernel=False) arch = stage0_arch_map.get(args.arch, args.arch) init = os.path.join(os.sep, 'bootstrap-seeds', 'POSIX', arch, 'kaem-optional-seed') - run_as_root('env', '-i', 'PATH=/bin', chroot_binary, system_a.tmp_dir, init) + run_as_root('env', '-i', 'PATH=/bin', chroot_binary, generator.tmp_dir, init) elif args.bwrap: if not args.internal_ci or args.internal_ci == "pass1": - system_c.prepare(create_disk_image=False) - system_a.prepare(create_initramfs=False) + generator.prepare(using_kernel=False) arch = stage0_arch_map.get(args.arch, args.arch) init = os.path.join(os.sep, 'bootstrap-seeds', 'POSIX', arch, 'kaem-optional-seed') @@ -191,7 +189,7 @@ print(shutil.which('chroot')) '--unshare-net', '--clearenv', '--setenv', 'PATH', '/usr/bin', - '--bind', system_a.tmp_dir, '/', + '--bind', generator.tmp_dir, '/', '--dir', '/dev', '--dev-bind', '/dev/null', '/dev/null', '--dev-bind', '/dev/zero', '/dev/zero', @@ -210,7 +208,7 @@ print(shutil.which('chroot')) '--unshare-net' if args.external_sources else None, '--clearenv', '--setenv', 'PATH', '/usr/bin', - '--bind', system_a.tmp_dir + "/sysc_image", '/', + '--bind', generator.tmp_dir + "/sysc_image", '/', '--dir', '/dev', '--dev-bind', '/dev/null', '/dev/null', '--dev-bind', '/dev/zero', '/dev/zero', @@ -226,40 +224,39 @@ print(shutil.which('chroot')) elif args.bare_metal: if args.kernel: - system_c.prepare(create_disk_image=True) - system_a.prepare(create_initramfs=True) + generator.prepare(using_kernel=True) print("Please:") - print(" 1. Take tmp/sysa/initramfs and your kernel, boot using this.") - print(" 2. Take tmp/sysc/disk.img and put this on a writable storage medium.") + print(" 1. Take tmp/initramfs and your kernel, boot using this.") + print(" 2. Take tmp/disk.img and put this on a writable storage medium.") else: - system_a.prepare(create_initramfs=True, kernel_bootstrap=True) + generator.prepare(kernel_bootstrap=True) print("Please:") - print(" 1. Take tmp/sysa/sysa.img and write it to a boot drive and then boot it.") + print(" 1. Take tmp/disk.img and write it to a boot drive and then boot it.") else: if args.kernel: - system_c.prepare(create_disk_image=True) - system_a.prepare(create_initramfs=True) + generator.prepare(using_kernel=True) run(args.qemu_cmd, '-enable-kvm', '-m', str(args.qemu_ram) + 'M', '-smp', str(args.cores), '-no-reboot', - '-hda', tmpdir.get_disk("sysc"), + '-drive', 'file=' + tmpdir.get_disk("disk") + ',format=raw', + '-drive', 'file=' + tmpdir.get_disk("external") + ',format=raw', '-nic', 'user,ipv6=off,model=e1000', '-kernel', args.kernel, - '-initrd', system_a.initramfs_path, '-nographic', - '-append', 'console=ttyS0') + '-append', 'console=ttyS0 root=/dev/sda1 rootfstype=ext3 init=/init rw') else: - system_a.prepare(create_initramfs=True, kernel_bootstrap=True) + generator.prepare(kernel_bootstrap=True) run(args.qemu_cmd, '-enable-kvm', '-m', "4G", '-smp', str(args.cores), '-no-reboot', - '-drive', 'file=' + os.path.join(system_a.tmp_dir, 'sysa.img') + ',format=raw', + '-drive', 'file=' + os.path.join(generator.tmp_dir, 'disk.img') + ',format=raw', + '-drive', 'file=' + tmpdir.get_disk("external") + ',format=raw', '-machine', 'kernel-irqchip=split', '-nic', 'user,ipv6=off,model=e1000', '-nographic') diff --git a/seed/after.kaem b/seed/after.kaem @@ -0,0 +1,15 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> +# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space> +# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +PATH=/${ARCH_DIR}/bin + +catm seed-full.kaem /steps/env seed.kaem +kaem --file seed-full.kaem diff --git a/seed/preseeded.kaem b/seed/preseeded.kaem @@ -0,0 +1,8 @@ +#!/bin/sh +# +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +/script-generator /steps/manifest +/usr/bin/kaem --file /preseed-jump.kaem diff --git a/seed/script-generator.c b/seed/script-generator.c @@ -0,0 +1,627 @@ +/* + * SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#define MAX_TOKEN 64 +#define MAX_STRING 2048 + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <bootstrappable.h> + +struct Token { + char *val; + struct Token *next; +}; +typedef struct Token Token; + +#define TYPE_BUILD 1 +#define TYPE_IMPROVE 2 +#define TYPE_DEFINE 3 +#define TYPE_JUMP 4 +#define TYPE_MAINT 5 + +struct Directive { + Token *tok; + struct Directive *next; + int type; + char *arg; /* The primary argument */ +}; +typedef struct Directive Directive; + +/* Tokenizer. */ + +/* Skip over a comment. */ +char consume_comment(FILE *in) { + /* Discard the rest of the line. */ + char c = fgetc(in); + while (c != -1 && c != '\n') + c = fgetc(in); + return c; +} + +char consume_line(FILE *in, Directive *directive) { + char c = fgetc(in); + + /* Short-circuit if whole line is comment or blank line. */ + if (c == '#') { + c = consume_comment(in); + return c; + } else if (c == '\n' || c == -1) { + return c; + } + + /* Ok, we will have something to put here. */ + directive->next = calloc(1, sizeof(Directive)); + directive = directive->next; + + Token *head = calloc(1, sizeof(Token)); + Token *cur = head; + char *out; + int i = 0; + while (c != -1 && c != '\n') { + /* Initialize next token. */ + cur->next = calloc(1, sizeof(Token)); + cur = cur->next; + cur->val = calloc(MAX_TOKEN, sizeof(char)); + out = cur->val; + /* Copy line to token until a space (or EOL/EOF) or comment is found. */ + while (c != -1 && c != '\n' && c != ' ' && c != '#') { + out[0] = c; + out += 1; + c = fgetc(in); + } + /* Go to start of next token. */ + if (c == ' ') { + c = fgetc(in); + } + /* Handle comment. */ + if (c == '#') { + c = consume_comment(in); + } + } + + /* Add information to directive. */ + directive->tok = head->next; + + return c; +} + +Directive *tokenizer(FILE *in) { + Directive *head = calloc(1, sizeof(Directive)); + Directive *cur = head; + + char c; + while (c != -1) { + /* + * Note that consume_line fills cur->next, not cur. + * This avoids having an empty last Directive. + */ + c = consume_line(in, cur); + if (cur->next != NULL) { + cur = cur->next; + } + } + return head->next; +} + +/* Config variables. */ + +struct Variable { + char *name; + char *val; + struct Variable *next; +}; +typedef struct Variable Variable; + +Variable *variables; + +Variable *load_config() { + FILE *config = fopen("/steps/bootstrap.cfg", "r"); + /* File does not exist check. */ + if (config == NULL) { + return NULL; + } + + char *line = calloc(MAX_STRING, sizeof(char)); + Variable *head = calloc(1, sizeof(Variable)); + Variable *cur = head; + /* For each line... */ + char *equals; + while (fgets(line, MAX_STRING, config) != 0) { + /* Weird M2-Planet behaviour. */ + if (*line == 0) { + break; + } + cur->next = calloc(1, sizeof(Variable)); + cur = cur->next; + /* Split on the equals. First half is name, second half is value. */ + equals = strchr(line, '='); + if (equals == 0) { + fputs("bootstrap.cfg should have the format var=val on each line.", stderr); + exit(1); + } + cur->name = calloc(equals - line + 1, sizeof(char)); + strncpy(cur->name, line, equals - line); + equals += 1; + cur->val = calloc(strlen(equals), sizeof(char)); + strncpy(cur->val, equals, strlen(equals) - 1); + line = calloc(MAX_STRING, sizeof(char)); + } + variables = head->next; + fclose(config); +} + +void output_config(FILE *out) { + Variable *variable; + for (variable = variables; variable != NULL; variable = variable->next) { + fputs(variable->name, out); + fputs("=", out); + fputs(variable->val, out); + fputs("\n", out); + } +} + +char *get_var(char *name) { + /* Search through existing variables. */ + Variable *var; + Variable *last; + for (var = variables; var != NULL; var = var->next) { + if (strcmp(name, var->name) == 0) { + return var->val; + } + last = var; + } + + /* If the variable is unset, prompt the user. */ + if (variables == NULL) { + variables = calloc(1, sizeof(Variable)); + var = variables; + } else { + last->next = calloc(1, sizeof(Variable)); + var = last->next; + } + var->name = calloc(strlen(name) + 1, sizeof(char)); + strcpy(var->name, name); + var->val = calloc(MAX_STRING, sizeof(char)); + fputs("You have not set a value for ", stdout); + fputs(name, stdout); + fputs(" in bootstrap.cfg. Please set it now:\n", stdout); + while (fgets(var->val, MAX_STRING, stdin) == 0 || var->val[0] == '\n') { + fputs("Error inputting, try again:\n", stdout); + } + if (var->val[0] == 0) { + fputs("You put in an EOF!\n", stderr); + exit(1); + } + /* Trim the newline. */ + var->val[strlen(var->val)] = 0; + return var->val; +} + +/* Recursive descent interpreter. */ + +Token *fill(Token *tok, Directive *directive, int type) { + directive->type = type; + directive->arg = tok->val; + return tok->next; +} + +Token *logic(Token *tok, char **val) { + /* logic = "(" + * (name | + * (name "==" value) | + * (logic "||" logic) | + * (logic "&&" logic)) + * ")" + */ + + char *lhs = tok->val; + char *rhs; + tok = tok->next; + if (strcmp(tok->val, ")") == 0) { + /* Case where it's just a constant. */ + *val = lhs; + return tok; + } else if (strcmp(tok->val, "==") == 0) { + /* Case for equality. */ + rhs = tok->next->val; + tok = tok->next->next; + if (strcmp(get_var(lhs), rhs) == 0) { + lhs = "True"; + } else { + lhs = "False"; + } + } else { + fputs("Expected == after ", stderr); + fputs(lhs, stderr); + fputs(" in logic\n", stderr); + exit(1); + } + + if (strcmp(tok->val, ")") == 0) { + *val = lhs; + return tok; + } else if (strcmp(tok->val, "||") == 0) { + /* OR */ + tok = logic(tok->next, &rhs); + if (strcmp(lhs, "True") == 0 || strcmp(rhs, "True") == 0) { + lhs = "True"; + } else { + lhs = "False"; + } + } else if (strcmp(tok->val, "&&") == 0) { + /* AND */ + tok = logic(tok->next, &rhs); + if (strcmp(lhs, "True") == 0 && strcmp(rhs, "True") == 0) { + lhs = "True"; + } else { + lhs = "False"; + } + } else { + fputs("Expected || or && in logic\n", stderr); + exit(1); + } + + *val = lhs; + return tok; +} + +Token *primary_logic(Token *tok, char **val) { + /* Starting ( */ + if (strcmp(tok->val, "(") != 0) { + fputs("Expected logic to begin with (\n", stderr); + exit(1); + } + tok = tok->next; + + tok = logic(tok, val); + + if (strcmp(tok->val, ")") != 0) { + fputs("Expected logic to end with )\n", stderr); + exit(1); + } + + return tok; +} + +int eval_predicate(Token *tok) { + char *result; + tok = primary_logic(tok, &result); + return strcmp(result, "True") == 0; +} + +Token *define(Token *tok, Directive *directive) { + /* define = name "=" (logic | constant) */ + char *name = tok->val; + tok = tok->next; + if (strcmp(tok->val, "=") != 0) { + fputs("define of ", stderr); + fputs(name, stderr); + fputs(" has a missing equals\n", stderr); + exit(1); + } + tok = tok->next; + + char *val = calloc(MAX_STRING, sizeof(char)); + if (strcmp(tok->val, "(") == 0) { + /* It is a logic. */ + tok = primary_logic(tok, &val); + } else { + /* It is a constant. */ + strcpy(val, tok->val); + } + + /* Check for predicate. */ + tok = tok->next; + if (tok != NULL) { + if (!eval_predicate(tok)) { + /* Nothing more to do. */ + return tok; + } + } + + /* Update existing variable, or else, add to the end of variables. */ + /* Special case: empty variables. */ + if (variables == NULL) { + variables = calloc(1, sizeof(Variable)); + variables->name = name; + variables->val = val; + } + + Variable *var; + for (var = variables; var->next != NULL; var = var->next) { + if (strcmp(var->next->name, name) == 0) { + var->next->val = val; + break; + } + } + if (var->next == NULL) { + /* We did not update an existing variable. */ + var->next = calloc(1, sizeof(Variable)); + var->next->name = name; + var->next->val = val; + } + + return tok; +} + +int interpret(Directive *directive) { + /* directive = (build | improve | define | jump | maint) predicate? */ + Token *tok = directive->tok; + if (strcmp(tok->val, "build:") == 0) { + tok = fill(tok->next, directive, TYPE_BUILD); + } else if (strcmp(tok->val, "improve:") == 0) { + tok = fill(tok->next, directive, TYPE_IMPROVE); + } else if (strcmp(tok->val, "jump:") == 0) { + tok = fill(tok->next, directive, TYPE_JUMP); + } else if (strcmp(tok->val, "maint:") == 0) { + tok = fill(tok->next, directive, TYPE_MAINT); + } else if (strcmp(tok->val, "define:") == 0) { + tok = define(tok->next, directive); + return 1; /* There is no codegen for a define. */ + } + + if (tok != NULL) { + return !eval_predicate(tok); + } + return 0; +} + +Directive *interpreter(Directive *directives) { + Directive *directive; + Directive *last; + for (directive = directives; directive != NULL; directive = directive->next) { + if (interpret(directive)) { + /* This means this directive needs to be removed from the linked list. */ + if (last == NULL) { + /* First directive. */ + directives = directive->next; + } else { + last->next = directive->next; + } + } else { + last = directive; + } + } + return directives; +} + +void add_to_fiwix_filelist(char *filename) { + /* Add the filename to fiwix-file-list.txt */ + FILE *fiwix_list = fopen("/steps/lwext4-1.0.0-lb1/files/fiwix-file-list.txt", "r"); + fseek(fiwix_list, 0, SEEK_END); + long size = ftell(fiwix_list); + char *contents = calloc(size, sizeof(char)); + fseek(fiwix_list, 0, SEEK_SET); + fread(contents, 1, size, fiwix_list); + fclose(fiwix_list); + fiwix_list = fopen("/steps/lwext4-1.0.0-lb1/files/fiwix-file-list.txt", "w"); + fwrite(contents, 1, size, fiwix_list); + fputs(filename, fiwix_list); + fputc('\n', fiwix_list); + fclose(fiwix_list); +} + +/* Script generator. */ +FILE *start_script(int id, int using_bash) { + /* Create the file /steps/$id.sh */ + char *filename = calloc(MAX_STRING, sizeof(char)); + strcpy(filename, "/steps/"); + strcat(filename, int2str(id, 10, 0)); + strcat(filename, ".sh"); + add_to_fiwix_filelist(filename); + + FILE *out = fopen(filename, "w"); + if (out == NULL) { + fputs("Error opening output file ", stderr); + fputs(filename, stderr); + fputs("\n", stderr); + exit(1); + } + + if (using_bash) { + fputs("#!/bin/bash\n", out); + fputs("set -e\n", out); + fputs("cd /steps\n", out); + fputs(". ./bootstrap.cfg\n", out); + fputs(". ./env\n", out); + fputs(". ./helpers.sh\n", out); + } else { + fputs("set -ex\n", out); + fputs("cd /steps\n", out); + output_config(out); + FILE *env = fopen("/steps/env", "r"); + char *line = calloc(MAX_STRING, sizeof(char)); + while (fgets(line, MAX_STRING, env) != 0) { + /* Weird M2-Planet behaviour. */ + if (*line == 0) { + break; + } + fputs(line, out); + line = calloc(MAX_STRING, sizeof(char)); + } + fclose(env); + } + + return out; +} + +void output_call_script(FILE *out, char *type, char *name, int using_bash, int source) { + if (using_bash) { + if (source) { + fputs(". ", out); + } else { + fputs("bash ", out); + } + } else { + fputs("kaem --file ", out); + } + fputs("/steps/", out); + fputs(type, out); + fputs("/", out); + fputs(name, out); + fputs(".sh\n", out); +} + +void output_build(FILE *out, Directive *directive, int pass_no, int using_bash) { + if (using_bash) { + fputs("build ", out); + fputs(directive->arg, out); + fputs(" pass", out); + fputs(int2str(pass_no, 10, 0), out); + fputs(".sh\n", out); + } else { + fputs("pkg=", out); + fputs(directive->arg, out); + fputs("\n", out); + fputs("cd ${pkg}\n", out); + fputs("kaem --file pass", out); + fputs(int2str(pass_no, 10, 0), out); + fputs(".kaem\n", out); + fputs("cd ..\n", out); + } +} + +void generate_preseed_jump(int id) { + FILE *out = fopen("/preseed-jump.kaem", "w"); + fputs("set -ex\n", out); + fputs("PATH=/usr/bin\n", out); + fputs("bash /steps/", out); + fputs(int2str(id, 10, 0), out); + fputs(".sh\n", out); + fclose(out); +} + +void generate(Directive *directives) { + /* + * We are separating the stages given in the mainfest into a bunch of + * smaller scripts. The following conditions call for the creation of + * a new script: + * - a jump + * - build of bash + */ + + int counter = 0; + + /* Initially, we use kaem, not bash. */ + int using_bash = 0; + + FILE *out = start_script(counter, using_bash); + counter += 1; + + Directive *directive; + Directive *past; + char *filename; + int pass_no; + for (directive = directives; directive != NULL; directive = directive->next) { + if (directive->type == TYPE_BUILD) { + /* Get what pass number this is. */ + pass_no = 1; + for (past = directives; past != directive; past = past->next) { + if (strcmp(past->arg, directive->arg) == 0) { + pass_no += 1; + } + } + output_build(out, directive, pass_no, using_bash); + if (strncmp(directive->arg, "bash-", 5) == 0) { + if (!using_bash) { + /* + * We are transitioning from bash to kaem, the point at which "early + * preseed" occurs. So generate the preseed jump script at this point. + */ + generate_preseed_jump(counter); + } + using_bash = 1; + /* Create call to new script. */ + output_call_script(out, "", int2str(counter, 10, 0), using_bash, 0); + fclose(out); + out = start_script(counter, using_bash); + counter += 1; + } + } else if (directive->type == TYPE_IMPROVE) { + output_call_script(out, "improve", directive->arg, using_bash, 1); + } else if (directive->type == TYPE_JUMP) { + /* + * Create /init to call new script. + * We actually do this by creating /init.X for some number X, and then + * moving that to /init at the appropriate time. + */ + filename = calloc(MAX_STRING, sizeof(char)); + if (using_bash) { + fputs("mv /init /init.bak\n", out); + /* Move new init to /init. */ + strcpy(filename, "/init."); + strcat(filename, int2str(counter, 10, 0)); + fputs("cp ", out); + fputs(filename, out); + fputs(" /init\n", out); + fputs("chmod 755 /init\n", out); + } else { + strcpy(filename, "/kaem.run."); + strcat(filename, int2str(counter, 10, 0)); + fputs("cp ", out); + fputs(filename, out); + fputs(" /kaem.run\n", out); + fputs("cp /usr/bin/kaem /init\n", out); + fputs("chmod 755 /init\n", out); + } + + output_call_script(out, "jump", directive->arg, using_bash, 1); + fclose(out); + + /* + * This cannot go before here as builder-hex0 does not like having + * multiple files open at once! + */ + add_to_fiwix_filelist(filename); + + if (using_bash) { + out = fopen(filename, "w"); + if (out == NULL) { + fputs("Error opening /init\n", stderr); + exit(1); + } + fputs("#!/bin/bash\n", out); + } else { + out = fopen(filename, "w"); + if (out == NULL) { + fputs("Error opening /kaem.run\n", stderr); + exit(1); + } + fputs("set -ex\n", out); + } + output_call_script(out, "", int2str(counter, 10, 0), using_bash, 0); + fclose(out); + out = start_script(counter, using_bash); + counter += 1; + } else if (directive->type == TYPE_MAINT) { + output_call_script(out, "maint", directive->arg, using_bash, 1); + } + } + fclose(out); +} + +void main(int argc, char **argv) { + if (argc != 2) { + fputs("Usage: script-generator <script>\n", stderr); + exit(1); + } + + FILE *in = fopen(argv[1], "r"); + if (in == NULL) { + fputs("Error opening input file\n", stderr); + exit(1); + } + Directive *directives = tokenizer(in); + fclose(in); + load_config(); + directives = interpreter(directives); + generate(directives); + FILE *config = fopen("/steps/bootstrap.cfg", "w"); + output_config(config); + fclose(config); +} diff --git a/seed/seed.kaem b/seed/seed.kaem @@ -0,0 +1,67 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> +# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space> +# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +mkdir -p ${PREFIX} ${BINDIR} ${LIBDIR} ${INCDIR} ${SRCDIR} ${TMPDIR} /dev + +# Temporarily change PATH +PATH=/${ARCH_DIR}/bin + +# Remove remaining dependencies on /bin (stage0-posix directory) +cp /${ARCH_DIR}/bin/blood-elf ${BINDIR}/blood-elf +cp /${ARCH_DIR}/bin/catm ${BINDIR}/catm +cp /${ARCH_DIR}/bin/chmod ${BINDIR}/chmod +cp /${ARCH_DIR}/bin/get_machine ${BINDIR}/get_machine +cp /${ARCH_DIR}/bin/hex2 ${BINDIR}/hex2 +cp /${ARCH_DIR}/bin/kaem ${BINDIR}/kaem +cp /${ARCH_DIR}/bin/match ${BINDIR}/match +cp /${ARCH_DIR}/bin/M1 ${BINDIR}/M1 +cp /${ARCH_DIR}/bin/M2-Mesoplanet ${BINDIR}/M2-Mesoplanet +cp /${ARCH_DIR}/bin/M2-Planet ${BINDIR}/M2-Planet +cp /${ARCH_DIR}/bin/mkdir ${BINDIR}/mkdir +cp /${ARCH_DIR}/bin/sha256sum ${BINDIR}/sha256sum +cp /${ARCH_DIR}/bin/unbz2 ${BINDIR}/unbz2 +cp /${ARCH_DIR}/bin/ungz ${BINDIR}/ungz +cp /${ARCH_DIR}/bin/untar ${BINDIR}/untar +cp /${ARCH_DIR}/bin/cp ${BINDIR}/cp +cp /${ARCH_DIR}/bin/replace ${BINDIR}/replace +cp /${ARCH_DIR}/bin/rm ${BINDIR}/rm + +chmod 755 ${BINDIR}/blood-elf +chmod 755 ${BINDIR}/catm +chmod 755 ${BINDIR}/chmod +chmod 755 ${BINDIR}/cp +chmod 755 ${BINDIR}/get_machine +chmod 755 ${BINDIR}/hex2 +chmod 755 ${BINDIR}/kaem +chmod 755 ${BINDIR}/match +chmod 755 ${BINDIR}/M1 +chmod 755 ${BINDIR}/M2-Mesoplanet +chmod 755 ${BINDIR}/M2-Planet +chmod 755 ${BINDIR}/mkdir +chmod 755 ${BINDIR}/sha256sum +chmod 755 ${BINDIR}/unbz2 +chmod 755 ${BINDIR}/ungz +chmod 755 ${BINDIR}/untar +chmod 755 ${BINDIR}/replace +chmod 755 ${BINDIR}/rm + +PATH=${BINDIR} +M2LIBC_PATH=/M2libc + +# mes envars +NYACC_PKG=nyacc-1.00.2 +MES_PKG=mes-0.25 +MES_PREFIX=${SRCDIR}/${MES_PKG}/build/${MES_PKG} +GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${SRCDIR}/${MES_PKG}/build/${NYACC_PKG}/module + +M2-Mesoplanet --architecture ${ARCH} -f script-generator.c -o script-generator +./script-generator /steps/manifest +kaem --file /steps/0.sh diff --git a/seed/stage0-posix b/seed/stage0-posix @@ -0,0 +1 @@ +Subproject commit a5c382e9ab5d070d192841122e453ca72754eec1 diff --git a/steps/SHA256SUMS.pkgs b/steps/SHA256SUMS.pkgs @@ -0,0 +1,118 @@ +2dac610769286171ca81e736d729f5227938596cf44a0a8a764009715c55d23b autoconf-2.52_0.tar.bz2 +7345a49227ed69774e01097c514f1ebd3abaeed0b2b9136b7f5ee1b0fe573390 autoconf-2.53_0.tar.bz2 +22418f18b0dbf0476efb1823dcebdf70d7619113ca10076ba9b078ab3597a578 autoconf-2.54_0.tar.bz2 +8e74f93f12599f883ba62fe2bf4f69c70270ce368f71aa782f8f42a36a752d19 autoconf-2.55_0.tar.bz2 +1bd66ca8cc6300e192afe06cd90b1250f02ca64539a4f3e98a872333ec04f44b autoconf-2.57_0.tar.bz2 +83235c739887f0d801e410e922553a6fd7723cbd0c9b2e96106e20538abb3a3b autoconf-2.59_0.tar.bz2 +8912ae2a24ea40a7cd3ccab5e97dd109db7be4a86f40458ac836568aa7437b6a autoconf-2.61_0.tar.bz2 +d5fcce4baea5e11f983a7e4b7148545ab6720bb4e010898c73387f6711be67f4 autoconf-2.64_0.tar.bz2 +298dcf17a439adb306237b308e3c4ed3d376cb863ae0f0f08bfdf1f3199a548b autoconf-2.69_0.tar.bz2 +8c2401edf1c68910005bbcb8b8e84727a46f7d9643d2ad1267bd0259078dadc4 autoconf-2.71_0.tar.bz2 +6ff691e3ddd4f3d1796d28b07a2a96691dbd9801844c99ccbe660da59dabd74b autoconf-archive-2021.02.19_0.tar.bz2 +56cb475253b1175f09d69bc81a5b1d954f486c9b97b1a0ae3217e63d18f64573 autogen-5.18.16_0.tar.bz2 +02a426e82a52d4a2cd7e73fe3dc5a2c58b3ed100f24a92c57e42511fd86e247c automake-1.10.3_0.tar.bz2 +34925adeaa2876a5e068adeb17b71fe7c7105244c3cb5439d33f7406310674da automake-1.11.2_0.tar.bz2 +a7bd12bd0c639783ce1c0e9f640cf004a87460bbda8154bc550c5e6884457b48 automake-1.15.1_0.tar.bz2 +57100612d902537b72ee2fd3dfecc903f2ea3959f1a480af87c6a1ef9a9d7c03 automake-1.16.3_0.tar.bz2 +1c7e09ac08f156960420fca1f6e8560c1855bf01b001a0648b56153d6ceb9c28 automake-1.6.3_0.tar.bz2 +444131776779d1f27628088a817bfb8c9aa85f4b036b934794a71e484ec9bd70 automake-1.6.3_1.tar.bz2 +ef08694bf8e78ffcf56f9c8a63b0f189e301c06f02ab240e15e4c7fe354c2a0d automake-1.7_0.tar.bz2 +e8ff13753943e43972a8cf1672819f001718ed38e5497cf7b554c21a507ba22b automake-1.7.8_0.tar.bz2 +9922651b64ad2e29b944082f26db223008220155048f25d64df1f6d82071ff1c automake-1.8.5_0.tar.bz2 +c5807850a377e4bb9aa4121d9781d145bdd80327626a9419630a75ce2c8d9c71 automake-1.9.6_0.tar.bz2 +f8a55bf656f950ee3c5cea48af03f552166f6db9926b78c78843f3cc52a6e22d bash-5.2.15_0.tar.bz2 +ebc631ee8e9382650005984ec5f3910492ccb6fb2656b4c0af0f4afc16998906 bc-1.07.1_0.tar.bz2 +28b38078f88d77ebfa8ad1a514a5724fe11581bdbfc72b79f087fa24986ac9cb binutils-2.30_0.tar.bz2 +6eb26a856e1eb79a1b3f6d76e42138bf1b868fc5f229c3a1e22d3eb68dfb88ba binutils-2.38_0.tar.bz2 +57e339eb76a5a0f4b7298d0071f83354911dda928f4aa54e47a21ebc9c8390a7 binutils-2.38_1.tar.bz2 +f0bb18831983493b82fde53917e8d16c6a380761ac5e71e14769a82193fee788 bison-2.3_0.tar.bz2 +7018edd13a1dd5ba35fdc8be49af91b28901aad3080fdeebdb98b79f8a90d7ed bison-3.4.1_0.tar.bz2 +41c9a95b11cf183524927f52f9f7e97a479e0261c0551f6a4c22690b931243db bison-3.4.1_1.tar.bz2 +4a291da4dc1d2a49eeff6bd6017d0d91f804d0a8a2b701de9ed5c53cf5061fe4 bison-3.4.1_2.tar.bz2 +6d5e4debdec03aee096dbcefcad878fb5c6a069f895ee7ade878d9eeb97fb83e bison-3.4.2_0.tar.bz2 +e196396a3073992ca4d8ce1606831e3a6e06fd22753f89b778eec01eed549a92 bzip2-1.0.8_0.tar.bz2 +c511d571d24675a141258e0e198c5ed1bcfd4889ddd736ff8e25c0d97b44e2cf ca-certificates-3.88.1_0.tar.bz2 +692ec3f83fdd94a3687c764e6246f608e4600bc8f9fec953a0b23617ad24d08d coreutils-5.0_0.tar.bz2 +09092e187588c5d33c023ac41671b367aef9f7ee967d2c7c03430b33cc03f251 coreutils-6.10_0.tar.bz2 +f49900486ae7f0c8107d729b71ede155ee44544cdf8d562b50fbea4095bd05b2 coreutils-8.32_0.tar.bz2 +a133ec4b2c1c913821743a97bbb6e6842d67999c12c09dc821014c4e0661c365 curl-7.88.1_0.tar.bz2 +2afc7d5f899a43807003f743ba2f173bbc14de836bd14f89d3991c73b56b37d8 curl-7.88.1_1.tar.bz2 +1d4dec2d1885a6b5499a0f0d55e9c2c65dab532c4c593d848b6a542f67789627 dhcpcd-10.0.1_0.tar.bz2 +c4008ae6b168aee4120b0f3624a1875f9e413d8f0c637708b8b04a1fb5be173c diffutils-2.7_0.tar.bz2 +bda6afcd3a390a34a57443269a4857ccc470129f7a557981778c145fd841cbd1 dist-3.5-236_0.tar.bz2 +3a4c5143a241364019afd39af067f1e8433bab78b04096870d9bf2c70ec6ded8 e2fsprogs-1.45.7_0.tar.bz2 +9c6f7e156f299f1d0948537e28f00d40e727a3debae3cce158e9bce827136214 ed-1.4_0.tar.bz2 +0061d240f9bb2bb534db7003ddcc4eae9981954ad72e8f41ff1d76dc449ebd37 file-5.44_0.tar.bz2 +d1db172ab3ea159cad1d76a7de9ec92fa8fec33270ddce16e304ece908dd1344 findutils-4.2.33_0.tar.bz2 +41902ec0383ea977a8d008dee37150e022e0714cd99f54c37f29c153464b758a flex-2.5.11_0.tar.bz2 +b3a8d59229289ca5a1de6a24c9c828d2847144f6662e0d5b7f41e7ff6e57abaa flex-2.5.33_0.tar.bz2 +408131b1c033a5f8a6845997b049784be0b466cec107a71270e5a04dae2c1e6c flex-2.6.4_0.tar.bz2 +5ff7fbe16b55563719b108260bd6a34ebabab0465d758ca98cba522932532e45 gawk-3.0.4_0.tar.bz2 +6de1c1380026ef9948387e665610185b6014f47a80453177a6c81898c95cbbd3 gc-8.0.4_0.tar.bz2 +872eabeff12a0b1b9dc2bd146f2c1e493597281795548377ff1ec5f6a1853e88 gcc-10.4.0_0.tar.bz2 +4f50d8f5e1f123a8e6d34dff1d5892f79d250f2fb5d7fa2a94cff1f2e8f9649c gcc-13.1.0_0.tar.bz2 +526c3710b5067bd2fc869371541d7e71dcff1cffcba7ddecabedc33967e19e2c gcc-4.0.4_0.tar.bz2 +c1bf792e90df13bf7a24d3f8ce3939fd96ff61b8117e4dcef75605974f3fcf25 gcc-4.0.4_1.tar.bz2 +7ac087bf006188154c28401d0c875ede56076c19d41bc54ffa0d7cc18ce40800 gcc-4.7.4_0.tar.bz2 +dc67fc1b132fa3945349efe74c5b2197bd0b6babf4d29d2deddd04f09d9af680 gettext-0.21_0.tar.bz2 +309282ba840f80b5e10897b1221f3ff3329b9e05b982c788d03652f411974524 gmp-6.2.1_0.tar.bz2 +f5917ffad5dd282d5ea17e791b470455c328ea0ebc845ed5ec80937a8d0eb933 gperf-3.1_0.tar.bz2 +67d706423e079a9cd764fd9607027d296c0ff2380c1104006a2230a299eb2c1d grep-2.4_0.tar.bz2 +0939a34d58ff31e2c234f6f47f964633ceae4839de49ce368ad027c016850d58 grep-3.7_0.tar.bz2 +9dacbb0d2a12585079ba2527af5bb165337aa6fe68fa42b93842abe3b8d46ef6 guile-3.0.9_0.tar.bz2 +8d2015b87337abbf287f7a39ee4cf53514120b5d3e90a93fe7d533dcc43f14fa help2man-1.36.4_0.tar.bz2 +f650c3b24de6edd49cd662c9e9ce11f7b0b5ea6df66d561b46a032b08fc34faa kbd-1.15_0.tar.bz2 +3e3bc64af937c351be2538bb89de99f36ffc240721c32fcc84a76769e235ed66 kexec-linux-1.0.0_0.tar.bz2 +1be7bf0319635b8bd22fd3c1a5a88ea267730a9a2e3cfff37473a5fea0779efb kexec-tools-2.0.22_0.tar.bz2 +453c10220178f097e1ab26fac6dffbee63b61890cdb8d7d24dcd6acad6ad08a3 libarchive-3.5.2_0.tar.bz2 +36550df491767bb24d2ccab304ce70a3b4956e7c0c0e0c343d922fd57cdafbdd libatomic_ops-7.6.10_0.tar.bz2 +b39826742e236890f3562cdf19492e7ef4224b271f3e75ddeab1f07982b03ebe libffi-3.3_0.tar.bz2 +daae709e98d2df2190d1d13b4e86f7f3fe90fa7a975282fe0bb03289b6539f29 libtool-2.2.4_0.tar.bz2 +6cefa575362149620f8008a32c8af54f0198a18bc6ab910bd3cead196c1507d7 libtool-2.4.7_0.tar.bz2 +503007bbcddcf4e49d26514c59b4c9501f8b42f0c994a59dfdc388b1ae6b7900 libunistring-0.9.10_0.tar.bz2 +e10734d700e3ab870374d3f37f6e6cb394d6ba7e2da6f4e70bb324e834b0ad7f linux-4.9.10_0.tar.bz2 +d15c922973c15a8206e09020e8cfe6a78f7e93614de212f2b37ff80163799c6c linux-headers-4.9.10_0.tar.bz2 +3864f2c66516fc4f5086f626f4da2b2a7635e21babca86ba478f866920868e2b m4-1.4.7_0.tar.bz2 +e69554b0a77b419ddd5d0a0e418ba4005ecd0f6784c92a6928a0270bd929a098 make-3.82_0.tar.bz2 +6d24960d6a987f68a7e0e3abf6edb52d2e0fe4c86f6ba45327e9634dbf7d40b4 make-4.2.1_0.tar.bz2 +17cd976bc0f6e897c6fffe43dd7c55d93ce0adadf1b4dc72925b80e2d266519f mpc-1.2.1_0.tar.bz2 +98a9f55c01ed375fae21913284e7fa07ff434c0810f34d791f3fbaa1df221302 mpfr-4.1.0_0.tar.bz2 +12dfbee21a78220b4eb9fb843b6a00dd50c5849ffc4754b78209369499e3fefe musl-1.1.24_0.tar.bz2 +8d09bb24659023897cacf959068cdd492acc965777d7fb49e1888c14e867b36d musl-1.1.24_1.tar.bz2 +b79e0f8a39ba8880d43aa27551b72915655c62af39125e1f4ac8f8e69e71aaca musl-1.1.24_2.tar.bz2 +81f79a0faf58e105c5f12d9f538d3ea7578a3b361e633ab8f47324ec23ec9de6 musl-1.2.4_0.tar.bz2 +6dc5e763b747b66f72692c6820d7f46b7f4cf2e2fe05229a1d01c03919c1c936 musl-1.2.4_1.tar.bz2 +107548dd69ff4d5dfceb5891eed8a237cc6a22fd65915b44c838be1eba07668b musl-1.2.4_2.tar.bz2 +c490016e49bbf77e7f63071f7aa60e8290a0c67f017846def1c3f65bd10d5712 openssl-1.1.1l_0.tar.bz2 +71864d042cdc564b65eab21360902c714e9b43f80a19689c5600589529b267e7 patch-2.7.6_0.tar.bz2 +914a7abf36a64723b6e9f9b0b6ccd19c8e544fa798896a2bb1151dc341890c22 perl-5.000_0.tar.bz2 +887d835562d471653bcda60e652fceb4b3ef58a83321a4eb5af0431dc182781b perl-5.003_0.tar.bz2 +b86fc586d72a6d204d0b9017afe17aa2439529e13f43befc56648b78de17c8f8 perl5.004-05_0.tar.bz2 +451ae6bb6e996a1c857fe92ec379654413fadec180c6477cf5fd4b5d7a079e26 perl5.005-03_0.tar.bz2 +74d64a8af080022432fa94dba449090419d25b103d247710dc0b6102a4ad86a6 perl-5.10.1_0.tar.bz2 +fdccd3ba27a44d2149f159040414a04b39bfc72673ba36f50051b61199cc425c perl-5.32.1_0.tar.bz2 +9fa8850897248d77d554caa2b3d52e7890308cbf28750ffc24c09f498aee563c perl-5.6.2_0.tar.bz2 +1b9d4260edf7b2241d10e4c4ad17d0f90047bd4bf42f2487a7133902529e9dfe pkg-config-0.29.2_0.tar.bz2 +d4a263a4039b8d18ab95b5a7188a5c8b0defdf17d1cf899bf23a597be2df0658 python-2.0.1_0.tar.bz2 +95ecbf909a8781d77e9b89e6ff3dc39e3ed702aebdec8b0a491df2dd4af8c780 python-2.0.1_1.tar.bz2 +14b20bd76f6dfab0cc19141fd8d39c2841227b3876e5d107b1b57b05a51a83aa python-2.3.7_0.tar.bz2 +5395d185003b22c607eb55a5b9f1adca5bbe178e7c774faabe758d0499936397 python-2.3.7_1.tar.bz2 +374fc8c2577d681b7aa2670000fcc2450e2b50eb1cc8d739994ece69f83f4155 python-2.5.6_0.tar.bz2 +e1321250c6421515f982a89ee4ceb8a8b7d2ecc3e192c7c7ede58e98f2bc75de python-3.11.1_0.tar.bz2 +8f096d93f799a6575bae06a578625b92a888c25ed6b4d296173fc20fcadb003a python-3.1.5_0.tar.bz2 +fb123d00e591452a6f077aaa8aa22ab8693e665ffa95e185a2bf79883d3d4684 python-3.1.5_1.tar.bz2 +a9b73271407427f749406e1d3eabd51f627fd0fbe92332b792eeff1b9bfc44a5 python-3.3.7_0.tar.bz2 +f95ce9de6002c47d82c41804e943a7079614fe7bc669fba15fe4552f9f08a7e3 python-3.4.10_0.tar.bz2 +18bf5480d894d65bb11cad9d8591410e8a3b399f6eef3568d45144c363cd7d43 python-3.8.16_0.tar.bz2 +6081832f1fc258df7dd927986821991b49fa78a71b76f4b37b5c34a8ebc9bc86 sed-4.0.9_0.tar.bz2 +e58d8ec46c5b31175de9598bf0da214b88ccbd4cca7a787f3d048c44edaf3ceb sed-4.8_0.tar.bz2 +912d8f344104f1322255d6210c7c7e1371413ab530b2c6796e6aa565c74bf647 tar-1.34_0.tar.bz2 +d5d0df210248a385ae255cc5651369108e9a71fa8668821a6b1ed30a8d7364a1 tcc-0.9.27_0.tar.bz2 +79276f54bc57933b6002e5511e6d8d88e22159dcf1cbbc9da763c38691a2c628 tcc-0.9.27_1.tar.bz2 +31b5cbfec69d8037cc7f788c658f6fcd8c88794ecba34a2c5724bf6223b210f5 tcc-0.9.27_2.tar.bz2 +2b503cd31d3326ac1ed0eb9f506ac93c93770da51164e152a812cd248961069c tcc-0.9.27_3.tar.bz2 +50ebaa1d8fcc4a03a43d431eb71e2f435cc8712ae47d400564df3716037d553a texinfo-6.7_0.tar.bz2 +229d9189adac10ad2a2c76fc147a4c317fc5b34026cef1c47edc9159aee480da util-linux-2.19.1_0.tar.bz2 +5a1fdd2b42080f3b4808ceb1bf80a95873e614a25524545e6803b7d9f1fd5605 which-2.21_0.tar.bz2 +3fade2079cc91f2c5624ff7247220059caee82e7de493332103d7a78155400b2 xz-5.4.1_0.tar.bz2 +ca8ec9876a7334f5f87e1159e0efe343b8b497ffb0dea8b548223035ecd67f9e zlib-1.2.13_0.tar.bz2 diff --git a/sysa/autoconf-2.52/autoconf-2.52.sh b/steps/autoconf-2.52/pass1.sh diff --git a/sysa/autoconf-2.52/sources b/steps/autoconf-2.52/sources diff --git a/sysa/autoconf-2.53/autoconf-2.53.sh b/steps/autoconf-2.53/pass1.sh diff --git a/sysa/autoconf-2.53/patches/autoconf_252.patch b/steps/autoconf-2.53/patches/autoconf_252.patch diff --git a/sysa/autoconf-2.53/sources b/steps/autoconf-2.53/sources diff --git a/sysa/autoconf-2.54/autoconf-2.54.sh b/steps/autoconf-2.54/pass1.sh diff --git a/sysa/autoconf-2.54/sources b/steps/autoconf-2.54/sources diff --git a/sysa/autoconf-2.55/autoconf-2.55.sh b/steps/autoconf-2.55/pass1.sh diff --git a/sysa/autoconf-2.55/sources b/steps/autoconf-2.55/sources diff --git a/sysa/autoconf-2.57/autoconf-2.57.sh b/steps/autoconf-2.57/pass1.sh diff --git a/sysa/autoconf-2.57/sources b/steps/autoconf-2.57/sources diff --git a/sysa/autoconf-2.59/autoconf-2.59.sh b/steps/autoconf-2.59/pass1.sh diff --git a/sysa/autoconf-2.59/sources b/steps/autoconf-2.59/sources diff --git a/sysa/autoconf-2.61/autoconf-2.61.sh b/steps/autoconf-2.61/pass1.sh diff --git a/sysa/autoconf-2.61/sources b/steps/autoconf-2.61/sources diff --git a/sysa/autoconf-2.64/autoconf-2.64.sh b/steps/autoconf-2.64/pass1.sh diff --git a/sysa/autoconf-2.64/sources b/steps/autoconf-2.64/sources diff --git a/sysa/autoconf-2.69/autoconf-2.69.sh b/steps/autoconf-2.69/pass1.sh diff --git a/sysa/autoconf-2.69/sources b/steps/autoconf-2.69/sources diff --git a/sysc/autoconf-2.71/autoconf-2.71.sh b/steps/autoconf-2.71/pass1.sh diff --git a/sysc/autoconf-2.71/sources b/steps/autoconf-2.71/sources diff --git a/sysc/autoconf-archive-2021.02.19/autoconf-archive-2021.02.19.sh b/steps/autoconf-archive-2021.02.19/pass1.sh diff --git a/sysc/autoconf-archive-2021.02.19/sources b/steps/autoconf-archive-2021.02.19/sources diff --git a/sysc/autogen-5.18.16/autogen-5.18.16.sh b/steps/autogen-5.18.16/pass1.sh diff --git a/sysc/autogen-5.18.16/sources b/steps/autogen-5.18.16/sources diff --git a/sysa/automake-1.10.3/automake-1.10.3.sh b/steps/automake-1.10.3/pass1.sh diff --git a/sysa/automake-1.10.3/patches/aclocal_glob.patch b/steps/automake-1.10.3/patches/aclocal_glob.patch diff --git a/sysa/automake-1.10.3/sources b/steps/automake-1.10.3/sources diff --git a/sysa/automake-1.11.2/automake-1.11.2.sh b/steps/automake-1.11.2/pass1.sh diff --git a/sysa/automake-1.11.2/patches/aclocal_glob.patch b/steps/automake-1.11.2/patches/aclocal_glob.patch diff --git a/sysa/automake-1.11.2/sources b/steps/automake-1.11.2/sources diff --git a/sysa/automake-1.15.1/automake-1.15.1.sh b/steps/automake-1.15.1/pass1.sh diff --git a/sysa/automake-1.15.1/patches/aclocal_glob.patch b/steps/automake-1.15.1/patches/aclocal_glob.patch diff --git a/sysa/automake-1.15.1/patches/bootstrap.patch b/steps/automake-1.15.1/patches/bootstrap.patch diff --git a/sysa/automake-1.15.1/patches/shellcheck-bypass.patch b/steps/automake-1.15.1/patches/shellcheck-bypass.patch diff --git a/sysa/automake-1.15.1/sources b/steps/automake-1.15.1/sources diff --git a/sysc/automake-1.16.3/automake-1.16.3.sh b/steps/automake-1.16.3/pass1.sh diff --git a/sysc/automake-1.16.3/sources b/steps/automake-1.16.3/sources diff --git a/sysa/automake-1.6.3/stage1.sh b/steps/automake-1.6.3/pass1.sh diff --git a/sysa/automake-1.6.3/stage2.sh b/steps/automake-1.6.3/pass2.sh diff --git a/sysa/automake-1.6.3/sources b/steps/automake-1.6.3/sources diff --git a/sysa/automake-1.7.8/automake-1.7.8.sh b/steps/automake-1.7.8/pass1.sh diff --git a/sysa/automake-1.7.8/sources b/steps/automake-1.7.8/sources diff --git a/sysa/automake-1.7/automake-1.7.sh b/steps/automake-1.7/pass1.sh diff --git a/sysa/automake-1.7/sources b/steps/automake-1.7/sources diff --git a/sysa/automake-1.8.5/automake-1.8.5.sh b/steps/automake-1.8.5/pass1.sh diff --git a/sysa/automake-1.8.5/sources b/steps/automake-1.8.5/sources diff --git a/sysa/automake-1.9.6/automake-1.9.6.sh b/steps/automake-1.9.6/pass1.sh diff --git a/sysa/automake-1.9.6/sources b/steps/automake-1.9.6/sources diff --git a/steps/bash-2.05b/bash-2.05b.checksums b/steps/bash-2.05b/bash-2.05b.checksums @@ -0,0 +1 @@ +dd42ffbc30919b13693cbd58536599907d057dc58aabde2b2b1e36ec0475e694 /usr/bin/bash diff --git a/sysa/bash-2.05b/mk/builtins.mk b/steps/bash-2.05b/mk/builtins.mk diff --git a/sysa/bash-2.05b/mk/common.mk b/steps/bash-2.05b/mk/common.mk diff --git a/sysa/bash-2.05b/mk/main.mk b/steps/bash-2.05b/mk/main.mk diff --git a/sysa/bash-2.05b/bash-2.05b.kaem b/steps/bash-2.05b/pass1.kaem diff --git a/sysa/bash-2.05b/bash-2.05b.sh b/steps/bash-2.05b/pass2.sh diff --git a/sysa/bash-2.05b/patches/dev-tty.patch b/steps/bash-2.05b/patches/dev-tty.patch diff --git a/sysa/bash-2.05b/patches/extern.patch b/steps/bash-2.05b/patches/extern.patch diff --git a/sysa/bash-2.05b/patches/locale.patch b/steps/bash-2.05b/patches/locale.patch diff --git a/sysa/bash-2.05b/patches/mes-libc.patch b/steps/bash-2.05b/patches/mes-libc.patch diff --git a/sysa/bash-2.05b/patches/missing-defines.patch b/steps/bash-2.05b/patches/missing-defines.patch diff --git a/sysa/bash-2.05b/patches/size.patch b/steps/bash-2.05b/patches/size.patch diff --git a/sysa/bash-2.05b/patches/tinycc.patch b/steps/bash-2.05b/patches/tinycc.patch diff --git a/sysa/bash-2.05b/sources b/steps/bash-2.05b/sources diff --git a/sysc/bash-5.2.15/bash-5.2.15.sh b/steps/bash-5.2.15/pass1.sh diff --git a/sysc/bash-5.2.15/sources b/steps/bash-5.2.15/sources diff --git a/sysa/bc-1.07.1/bc-1.07.1.sh b/steps/bc-1.07.1/pass1.sh diff --git a/sysa/bc-1.07.1/sources b/steps/bc-1.07.1/sources diff --git a/sysa/binutils-2.30/binutils-2.30.sh b/steps/binutils-2.30/pass1.sh diff --git a/sysa/binutils-2.30/patches/libiberty-add-missing-config-directory-reference.patch b/steps/binutils-2.30/patches/libiberty-add-missing-config-directory-reference.patch diff --git a/sysa/binutils-2.30/patches/new-gettext.patch b/steps/binutils-2.30/patches/new-gettext.patch diff --git a/sysa/binutils-2.30/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch b/steps/binutils-2.30/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch diff --git a/sysa/binutils-2.30/sources b/steps/binutils-2.30/sources diff --git a/sysc/binutils-2.38/pass1.sh b/steps/binutils-2.38/pass1.sh diff --git a/sysc/binutils-2.38/pass2.sh b/steps/binutils-2.38/pass2.sh diff --git a/sysc/binutils-2.38/patches/libiberty-add-missing-config-directory-reference.patch b/steps/binutils-2.38/patches/libiberty-add-missing-config-directory-reference.patch diff --git a/sysc/binutils-2.38/patches/new-gettext.patch b/steps/binutils-2.38/patches/new-gettext.patch diff --git a/sysc/binutils-2.38/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch b/steps/binutils-2.38/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch diff --git a/sysc/binutils-2.38/sources b/steps/binutils-2.38/sources diff --git a/sysc/bison-2.3/import-gnulib.sh b/steps/bison-2.3/import-gnulib.sh diff --git a/sysc/bison-2.3/bison-2.3.sh b/steps/bison-2.3/pass1.sh diff --git a/sysc/bison-2.3/patches/autover-mismatch.patch b/steps/bison-2.3/patches/autover-mismatch.patch diff --git a/sysc/bison-2.3/patches/fopen-safer.patch b/steps/bison-2.3/patches/fopen-safer.patch diff --git a/sysc/bison-2.3/patches/gnulib-fix.patch b/steps/bison-2.3/patches/gnulib-fix.patch diff --git a/sysc/bison-2.3/patches/our-bison.patch b/steps/bison-2.3/patches/our-bison.patch diff --git a/sysc/bison-2.3/sources b/steps/bison-2.3/sources diff --git a/sysa/bison-3.4.1/files/config.h b/steps/bison-3.4.1/files/config.h diff --git a/sysa/bison-3.4.1/files/configmake.h b/steps/bison-3.4.1/files/configmake.h diff --git a/sysa/bison-3.4.1/files/parse-gram.c b/steps/bison-3.4.1/files/parse-gram.c diff --git a/sysa/bison-3.4.1/files/parse-gram.h b/steps/bison-3.4.1/files/parse-gram.h diff --git a/sysa/bison-3.4.1/files/parse-gram.y b/steps/bison-3.4.1/files/parse-gram.y diff --git a/sysa/bison-3.4.1/mk/lib.mk b/steps/bison-3.4.1/mk/lib.mk diff --git a/sysa/bison-3.4.1/mk/main.mk b/steps/bison-3.4.1/mk/main.mk diff --git a/sysa/bison-3.4.1/mk/src.mk b/steps/bison-3.4.1/mk/src.mk diff --git a/sysa/bison-3.4.1/stage1.sh b/steps/bison-3.4.1/pass1.sh diff --git a/sysa/bison-3.4.1/stage2.sh b/steps/bison-3.4.1/pass2.sh diff --git a/sysa/bison-3.4.1/stage3.sh b/steps/bison-3.4.1/pass3.sh diff --git a/sysa/bison-3.4.1/patches/fseterr.patch b/steps/bison-3.4.1/patches/fseterr.patch diff --git a/sysa/bison-3.4.1/patches/missing-includes.patch b/steps/bison-3.4.1/patches/missing-includes.patch diff --git a/sysa/bison-3.4.1/sources b/steps/bison-3.4.1/sources diff --git a/sysc/bison-3.4.2/import-gnulib.sh b/steps/bison-3.4.2/import-gnulib.sh diff --git a/sysc/bison-3.4.2/bison-3.4.2.sh b/steps/bison-3.4.2/pass1.sh diff --git a/sysc/bison-3.4.2/patches/gnulib-makefile.patch b/steps/bison-3.4.2/patches/gnulib-makefile.patch diff --git a/sysc/bison-3.4.2/patches/our-bison.patch b/steps/bison-3.4.2/patches/our-bison.patch diff --git a/sysc/bison-3.4.2/patches/po-files.patch b/steps/bison-3.4.2/patches/po-files.patch diff --git a/sysc/bison-3.4.2/sources b/steps/bison-3.4.2/sources diff --git a/steps/bzip2-1.0.8/bzip2-1.0.8.checksums b/steps/bzip2-1.0.8/bzip2-1.0.8.checksums @@ -0,0 +1 @@ +d04adf65091f839217b5ae725df01ad9ddeb77e74cd7474b26cf2fa8962ad150 /usr/bin/bzip2 diff --git a/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem b/steps/bzip2-1.0.8/pass1.kaem diff --git a/sysa/bzip2-1.0.8/bzip2-1.0.8.sh b/steps/bzip2-1.0.8/pass2.sh diff --git a/sysa/bzip2-1.0.8/patches/coreutils.patch b/steps/bzip2-1.0.8/patches/coreutils.patch diff --git a/sysa/bzip2-1.0.8/patches/mes-libc.patch b/steps/bzip2-1.0.8/patches/mes-libc.patch diff --git a/sysa/bzip2-1.0.8/sources b/steps/bzip2-1.0.8/sources diff --git a/sysc/ca-certificates-3.88.1/ca-certificates-3.88.1.sh b/steps/ca-certificates-3.88.1/pass1.sh diff --git a/sysc/ca-certificates-3.88.1/sources b/steps/ca-certificates-3.88.1/sources diff --git a/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.amd64.checksums b/steps/checksum-transcriber-1.0/checksum-transcriber-1.0.amd64.checksums diff --git a/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.riscv64.checksums b/steps/checksum-transcriber-1.0/checksum-transcriber-1.0.riscv64.checksums diff --git a/steps/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums b/steps/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums @@ -0,0 +1 @@ +a670c810b4f94d67bd171d5a79469882c04066ea7585f31c52f4c166ad5e5ee8 /usr/bin/checksum-transcriber diff --git a/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.kaem b/steps/checksum-transcriber-1.0/pass1.kaem diff --git a/sysa/checksum-transcriber-1.0/src/checksum-transcriber.c b/steps/checksum-transcriber-1.0/src/checksum-transcriber.c diff --git a/sysa/coreutils-5.0/coreutils-5.0.checksums b/steps/coreutils-5.0/coreutils-5.0.checksums diff --git a/sysa/coreutils-5.0/mk/main.mk b/steps/coreutils-5.0/mk/main.mk diff --git a/sysa/coreutils-5.0/mk/pass2.mk b/steps/coreutils-5.0/mk/pass2.mk diff --git a/sysa/coreutils-5.0/coreutils-5.0.kaem b/steps/coreutils-5.0/pass1.kaem diff --git a/sysa/coreutils-5.0/coreutils-5.0.sh b/steps/coreutils-5.0/pass2.sh diff --git a/steps/coreutils-5.0/patches-pass2/touch-dereference.patch b/steps/coreutils-5.0/patches-pass2/touch-dereference.patch @@ -0,0 +1 @@ +../patches/touch-dereference.patch +\ No newline at end of file diff --git a/steps/coreutils-5.0/patches-pass2/touch-getdate.patch b/steps/coreutils-5.0/patches-pass2/touch-getdate.patch @@ -0,0 +1 @@ +../patches/touch-getdate.patch +\ No newline at end of file diff --git a/sysa/coreutils-5.0/patches/expr-strcmp.patch b/steps/coreutils-5.0/patches/expr-strcmp.patch diff --git a/sysa/coreutils-5.0/patches/ls-strcmp.patch b/steps/coreutils-5.0/patches/ls-strcmp.patch diff --git a/sysa/coreutils-5.0/patches/mbstate.patch b/steps/coreutils-5.0/patches/mbstate.patch diff --git a/sysa/coreutils-5.0/patches/modechange.patch b/steps/coreutils-5.0/patches/modechange.patch diff --git a/sysa/coreutils-5.0/patches/sort-locale.patch b/steps/coreutils-5.0/patches/sort-locale.patch diff --git a/sysa/coreutils-5.0/patches/tac-uint64.patch b/steps/coreutils-5.0/patches/tac-uint64.patch diff --git a/sysa/coreutils-5.0/patches/touch-dereference.patch b/steps/coreutils-5.0/patches/touch-dereference.patch diff --git a/sysa/coreutils-5.0/patches/touch-getdate.patch b/steps/coreutils-5.0/patches/touch-getdate.patch diff --git a/sysa/coreutils-5.0/patches/uniq-fopen.patch b/steps/coreutils-5.0/patches/uniq-fopen.patch diff --git a/sysa/coreutils-5.0/sources b/steps/coreutils-5.0/sources diff --git a/sysa/coreutils-6.10/mk/main.mk b/steps/coreutils-6.10/mk/main.mk diff --git a/sysa/coreutils-6.10/coreutils-6.10.sh b/steps/coreutils-6.10/pass1.sh diff --git a/sysa/coreutils-6.10/sources b/steps/coreutils-6.10/sources diff --git a/sysc/coreutils-8.32/import-gnulib.sh b/steps/coreutils-8.32/import-gnulib.sh diff --git a/sysc/coreutils-8.32/coreutils-8.32.sh b/steps/coreutils-8.32/pass1.sh diff --git a/sysc/coreutils-8.32/patches/force_to_use_nanosleep.patch b/steps/coreutils-8.32/patches/force_to_use_nanosleep.patch diff --git a/sysc/coreutils-8.32/patches/gperf_dependency.patch b/steps/coreutils-8.32/patches/gperf_dependency.patch diff --git a/sysc/coreutils-8.32/patches/remove_gettext.patch b/steps/coreutils-8.32/patches/remove_gettext.patch diff --git a/sysc/coreutils-8.32/sources b/steps/coreutils-8.32/sources diff --git a/sysc/curl-7.88.1/files/sinus.pl b/steps/curl-7.88.1/files/sinus.pl diff --git a/sysc/curl-7.88.1/pass1.sh b/steps/curl-7.88.1/pass1.sh diff --git a/sysc/curl-7.88.1/pass2.sh b/steps/curl-7.88.1/pass2.sh diff --git a/sysc/curl-7.88.1/patches/help.patch b/steps/curl-7.88.1/patches/help.patch diff --git a/sysc/curl-7.88.1/patches/timeless-mk-ca-bundle.patch b/steps/curl-7.88.1/patches/timeless-mk-ca-bundle.patch diff --git a/sysa/curl-7.88.1/sources b/steps/curl-7.88.1/sources diff --git a/sysa/dhcpcd-10.0.1/dhcpcd-10.0.1.sh b/steps/dhcpcd-10.0.1/pass1.sh diff --git a/sysa/dhcpcd-10.0.1/patches/remove-ctassert.patch b/steps/dhcpcd-10.0.1/patches/remove-ctassert.patch diff --git a/sysa/dhcpcd-10.0.1/sources b/steps/dhcpcd-10.0.1/sources diff --git a/sysa/diffutils-2.7/mk/main.mk b/steps/diffutils-2.7/mk/main.mk diff --git a/sysa/diffutils-2.7/diffutils-2.7.sh b/steps/diffutils-2.7/pass1.sh diff --git a/sysa/diffutils-2.7/sources b/steps/diffutils-2.7/sources diff --git a/sysc/dist-3.5-236/files/config.sh.in b/steps/dist-3.5-236/files/config.sh.in diff --git a/sysc/dist-3.5-236/files/revision.h b/steps/dist-3.5-236/files/revision.h diff --git a/sysc/dist-3.5-236/dist-3.5-236.sh b/steps/dist-3.5-236/pass1.sh diff --git a/sysc/dist-3.5-236/patches/env.patch b/steps/dist-3.5-236/patches/env.patch diff --git a/sysc/dist-3.5-236/sources b/steps/dist-3.5-236/sources diff --git a/sysa/e2fsprogs-1.45.7/e2fsprogs-1.45.7.sh b/steps/e2fsprogs-1.45.7/pass1.sh diff --git a/sysa/e2fsprogs-1.45.7/patches/gawk-fix.patch b/steps/e2fsprogs-1.45.7/patches/gawk-fix.patch diff --git a/sysa/e2fsprogs-1.45.7/patches/remove-intl.patch b/steps/e2fsprogs-1.45.7/patches/remove-intl.patch diff --git a/sysa/e2fsprogs-1.45.7/sources b/steps/e2fsprogs-1.45.7/sources diff --git a/sysa/ed-1.4/ed-1.4.sh b/steps/ed-1.4/pass1.sh diff --git a/sysa/ed-1.4/sources b/steps/ed-1.4/sources diff --git a/steps/env b/steps/env @@ -0,0 +1,12 @@ +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +DISTFILES=/external/distfiles +PREFIX=/usr +BINDIR=${PREFIX}/bin +LIBDIR=${PREFIX}/lib/mes +INCDIR=${PREFIX}/include/mes +SRCDIR=/steps +TMPDIR=/tmp +PATH=${BINDIR}:/${ARCH}/bin diff --git a/sysc/file-5.44/file-5.44.sh b/steps/file-5.44/pass1.sh diff --git a/sysc/file-5.44/sources b/steps/file-5.44/sources diff --git a/sysa/findutils-4.2.33/import-gnulib.sh b/steps/findutils-4.2.33/import-gnulib.sh diff --git a/sysa/findutils-4.2.33/findutils-4.2.33.sh b/steps/findutils-4.2.33/pass1.sh diff --git a/sysa/findutils-4.2.33/patches/force-getcwd-fallback.patch b/steps/findutils-4.2.33/patches/force-getcwd-fallback.patch diff --git a/sysa/findutils-4.2.33/sources b/steps/findutils-4.2.33/sources diff --git a/sysa/fiwix-1.4.0-lb3/fiwix-1.4.0-lb3.checksums b/steps/fiwix-1.4.0-lb3/fiwix-1.4.0-lb3.checksums diff --git a/sysa/fiwix-1.4.0-lb3/fiwix-1.4.0-lb3.kaem b/steps/fiwix-1.4.0-lb3/pass1.kaem diff --git a/sysa/fiwix-1.4.0-lb3/sources b/steps/fiwix-1.4.0-lb3/sources diff --git a/sysa/flex-2.5.11/files/scan.lex.l b/steps/flex-2.5.11/files/scan.lex.l diff --git a/sysa/flex-2.5.11/mk/main.mk b/steps/flex-2.5.11/mk/main.mk diff --git a/sysa/flex-2.5.11/flex-2.5.11.sh b/steps/flex-2.5.11/pass1.sh diff --git a/sysa/flex-2.5.11/patches/scan_l.patch b/steps/flex-2.5.11/patches/scan_l.patch diff --git a/sysa/flex-2.5.11/patches/yyin.patch b/steps/flex-2.5.11/patches/yyin.patch diff --git a/sysa/flex-2.5.11/sources b/steps/flex-2.5.11/sources diff --git a/sysc/flex-2.5.33/flex-2.5.33.sh b/steps/flex-2.5.33/pass1.sh diff --git a/sysc/flex-2.5.33/sources b/steps/flex-2.5.33/sources diff --git a/sysa/flex-2.6.4/mk/main.mk b/steps/flex-2.6.4/mk/main.mk diff --git a/steps/flex-2.6.4/pass1.sh b/steps/flex-2.6.4/pass1.sh @@ -0,0 +1,26 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + default + + mv Makefile src/ + touch src/config.h + rm src/parse.c src/parse.h src/scan.c src/skel.c +} + +src_compile() { + cd src + make -j1 PREFIX="${PREFIX}" + cd .. +} + +src_install() { + cd src + default + cd .. + + # Remove yacc, we won't need it any longer + rm "${PREFIX}/bin/yacc" +} diff --git a/sysa/flex-2.6.4/sources b/steps/flex-2.6.4/sources diff --git a/sysa/gawk-3.0.4/mk/main.mk b/steps/gawk-3.0.4/mk/main.mk diff --git a/sysa/gawk-3.0.4/gawk-3.0.4.sh b/steps/gawk-3.0.4/pass1.sh diff --git a/sysa/gawk-3.0.4/sources b/steps/gawk-3.0.4/sources diff --git a/sysc/gc-8.0.4/gc-8.0.4.sh b/steps/gc-8.0.4/pass1.sh diff --git a/sysc/gc-8.0.4/sources b/steps/gc-8.0.4/sources diff --git a/sysc/gcc-10.4.0/gcc-10.4.0.sh b/steps/gcc-10.4.0/pass1.sh diff --git a/sysc/gcc-10.4.0/patches/fix-autoreconf.patch b/steps/gcc-10.4.0/patches/fix-autoreconf.patch diff --git a/sysc/gcc-10.4.0/patches/includes.patch b/steps/gcc-10.4.0/patches/includes.patch diff --git a/sysc/gcc-10.4.0/patches/libgcc-xfmode.patch b/steps/gcc-10.4.0/patches/libgcc-xfmode.patch diff --git a/sysc/gcc-10.4.0/patches/new-gettext.patch b/steps/gcc-10.4.0/patches/new-gettext.patch diff --git a/sysc/gcc-10.4.0/patches/no-isolate-erroneous-paths-dereference.patch b/steps/gcc-10.4.0/patches/no-isolate-erroneous-paths-dereference.patch diff --git a/sysc/gcc-10.4.0/sources b/steps/gcc-10.4.0/sources diff --git a/sysc/gcc-13.1.0/gcc-13.1.0.sh b/steps/gcc-13.1.0/pass1.sh diff --git a/sysc/gcc-13.1.0/patches/new-gettext.patch b/steps/gcc-13.1.0/patches/new-gettext.patch diff --git a/sysc/gcc-13.1.0/sources b/steps/gcc-13.1.0/sources diff --git a/sysa/gcc-4.0.4/pass1.sh b/steps/gcc-4.0.4/pass1.sh diff --git a/sysa/gcc-4.0.4/pass2.sh b/steps/gcc-4.0.4/pass2.sh diff --git a/sysa/gcc-4.0.4/sources b/steps/gcc-4.0.4/sources diff --git a/sysc/gcc-4.7.4/gcc-4.7.4.sh b/steps/gcc-4.7.4/pass1.sh diff --git a/sysc/gcc-4.7.4/patches/0001-libitm-fixes-for-musl-support.patch b/steps/gcc-4.7.4/patches/0001-libitm-fixes-for-musl-support.patch diff --git a/sysc/gcc-4.7.4/patches/0002-fixincludes-update-for-musl-support.patch b/steps/gcc-4.7.4/patches/0002-fixincludes-update-for-musl-support.patch diff --git a/sysc/gcc-4.7.4/patches/0003-unwind-fix-for-musl.patch b/steps/gcc-4.7.4/patches/0003-unwind-fix-for-musl.patch diff --git a/sysc/gcc-4.7.4/patches/0004-libstdc-gthr-workaround-for-musl.patch b/steps/gcc-4.7.4/patches/0004-libstdc-gthr-workaround-for-musl.patch diff --git a/sysc/gcc-4.7.4/patches/0005-musl-libc-config.patch b/steps/gcc-4.7.4/patches/0005-musl-libc-config.patch diff --git a/sysc/gcc-4.7.4/patches/0006-add-musl-support-to-gcc.patch b/steps/gcc-4.7.4/patches/0006-add-musl-support-to-gcc.patch diff --git a/sysc/gcc-4.7.4/patches/0007-x86-musl-support.patch b/steps/gcc-4.7.4/patches/0007-x86-musl-support.patch diff --git a/sysc/gcc-4.7.4/patches/0008-config-linux.h-add-INCLUDE_DEFAULTS_MUSL_LOCAL.patch b/steps/gcc-4.7.4/patches/0008-config-linux.h-add-INCLUDE_DEFAULTS_MUSL_LOCAL.patch diff --git a/sysc/gcc-4.7.4/patches/gcc-10-fself-test.patch b/steps/gcc-4.7.4/patches/gcc-10-fself-test.patch diff --git a/sysc/gcc-4.7.4/patches/gcc-10-libgcc-builtin-macros.patch b/steps/gcc-4.7.4/patches/gcc-10-libgcc-builtin-macros.patch diff --git a/sysc/gcc-4.7.4/patches/gcc-10-mlong-double.patch b/steps/gcc-4.7.4/patches/gcc-10-mlong-double.patch diff --git a/sysc/gcc-4.7.4/patches/remove_gperf_dependency.patch b/steps/gcc-4.7.4/patches/remove_gperf_dependency.patch diff --git a/sysc/gcc-4.7.4/sources b/steps/gcc-4.7.4/sources diff --git a/sysc/gettext-0.21/gettext-0.21.sh b/steps/gettext-0.21/pass1.sh diff --git a/sysc/gettext-0.21/sources b/steps/gettext-0.21/sources diff --git a/sysc/gmp-6.2.1/gmp-6.2.1.sh b/steps/gmp-6.2.1/pass1.sh diff --git a/sysc/gmp-6.2.1/sources b/steps/gmp-6.2.1/sources diff --git a/sysc/gperf-3.1/gperf-3.1.sh b/steps/gperf-3.1/pass1.sh diff --git a/sysc/gperf-3.1/sources b/steps/gperf-3.1/sources diff --git a/sysa/grep-2.4/mk/main.mk b/steps/grep-2.4/mk/main.mk diff --git a/sysa/grep-2.4/sources b/steps/grep-2.4/sources diff --git a/sysc/grep-3.7/import-gnulib.sh b/steps/grep-3.7/import-gnulib.sh diff --git a/sysc/grep-3.7/grep-3.7.sh b/steps/grep-3.7/pass1.sh diff --git a/sysc/grep-3.7/sources b/steps/grep-3.7/sources diff --git a/sysc/guile-3.0.9/import-gnulib-3.0.7.sh b/steps/guile-3.0.9/import-gnulib-3.0.7.sh diff --git a/sysc/guile-3.0.9/import-gnulib.sh b/steps/guile-3.0.9/import-gnulib.sh diff --git a/sysc/guile-3.0.9/guile-3.0.9.sh b/steps/guile-3.0.9/pass1.sh diff --git a/sysc/guile-3.0.9/sources b/steps/guile-3.0.9/sources diff --git a/sysa/gzip-1.2.4/files/stat_override.c b/steps/gzip-1.2.4/files/stat_override.c diff --git a/sysa/gzip-1.2.4/gzip-1.2.4.checksums b/steps/gzip-1.2.4/gzip-1.2.4.checksums diff --git a/sysa/gzip-1.2.4/mk/main.mk b/steps/gzip-1.2.4/mk/main.mk diff --git a/sysa/gzip-1.2.4/gzip-1.2.4.kaem b/steps/gzip-1.2.4/pass1.kaem diff --git a/sysa/gzip-1.2.4/patches/makecrc-write-to-file.patch b/steps/gzip-1.2.4/patches/makecrc-write-to-file.patch diff --git a/sysa/gzip-1.2.4/patches/removecrc.patch b/steps/gzip-1.2.4/patches/removecrc.patch diff --git a/sysa/gzip-1.2.4/sources b/steps/gzip-1.2.4/sources diff --git a/steps/heirloom-devtools-070527/heirloom-devtools-070527.checksums b/steps/heirloom-devtools-070527/heirloom-devtools-070527.checksums @@ -0,0 +1,5 @@ +22356e9e871747acbd93f0e08aee1c05aa0de8240bfd80f5d2565e3ea281ae0e /usr/bin/yacc +3719795cec49866ad20fdd75aceb1eb0cce9975f2afd716069f880dff16f668f /usr/bin/lex +ffe696afc1bda32a5f4035e29b3275cab73a27df7635ccbe02ed49a30374ccdd /usr/lib/mes/libl.a +bf3fb293f1ff89ee3dbcb08166c64b7a6793b49a12673d7633e3353ebea80d4d /usr/lib/mes/yaccpar +ee0f187b844f50d64c912bfcb5d73706662846d6d8a90b8b1fb20dda60464734 /usr/lib/mes/lex/ncform diff --git a/steps/heirloom-devtools-070527/pass1.kaem b/steps/heirloom-devtools-070527/pass1.kaem @@ -0,0 +1,60 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +# Check tarball checksums +checksum-transcriber sources +sha256sum -c sources.SHA256SUM + +mkdir build src +cd build + +# Extract +cp ${DISTFILES}/${pkg}.tar.bz2 ../src/ +bunzip2 -f ../src/${pkg}.tar.bz2 +tar xf ../src/${pkg}.tar ${pkg}/yacc ${pkg}/lex +rm -r ../src/ +cd ${pkg} + +# Prepare and patch +patch -Np0 -i ../../patches/yacc_remove_wchar.patch +patch -Np0 -i ../../patches/lex_remove_wchar.patch + +# Build yacc +cd yacc +make -f Makefile.mk CC=tcc AR=tcc\ -ar CFLAGS=-DMAXPATHLEN=100\ -DEILSEQ=84\ -DMB_LEN_MAX=100 LDFLAGS=-lgetopt\ -static RANLIB=true + +# Install yacc +install yacc ${BINDIR} +install -m 644 yaccpar ${LIBDIR} + +# Build lex +cd ../lex +make -f Makefile.mk CC=tcc AR=tcc\ -ar CFLAGS=-DEILSEQ=84\ -DMB_LEN_MAX=100 LDFLAGS=-lgetopt\ -static RANLIB=true + +# Install lex +mkdir ${LIBDIR}/lex +install lex ${BINDIR} +install libl.a ${LIBDIR} +install -m 644 ncform ${LIBDIR}/lex + +cd ../../.. + +# Checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/yacc \ + /usr/bin/lex \ + /usr/lib/mes/libl.a \ + /usr/lib/mes/yaccpar \ + /usr/lib/mes/lex/ncform + + install ${pkg}.checksums ${SRCDIR} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/heirloom-devtools-070527/patches/lex_remove_wchar.patch b/steps/heirloom-devtools-070527/patches/lex_remove_wchar.patch diff --git a/sysa/heirloom-devtools-070527/patches/yacc_remove_wchar.patch b/steps/heirloom-devtools-070527/patches/yacc_remove_wchar.patch diff --git a/sysa/heirloom-devtools-070527/sources b/steps/heirloom-devtools-070527/sources diff --git a/sysa/help2man-1.36.4/help2man-1.36.4.sh b/steps/help2man-1.36.4/pass1.sh diff --git a/sysa/help2man-1.36.4/patches/date.patch b/steps/help2man-1.36.4/patches/date.patch diff --git a/sysa/help2man-1.36.4/sources b/steps/help2man-1.36.4/sources diff --git a/steps/helpers.sh b/steps/helpers.sh @@ -0,0 +1,449 @@ +#!/bin/bash -e + +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> +# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> +# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# Get a list of files +get_files() { + echo "." + _get_files "${1}" +} + +_get_files() { + local prefix + prefix="${1}" + fs= + if [ -n "$(ls 2>/dev/null)" ]; then + # This can be removed once Debian 12 is stable + # shellcheck disable=SC2035 + fs=$(echo *) + fi + if [ -n "$(ls .[0-z]* 2>/dev/null)" ]; then + fs="${fs} $(echo .[0-z]*)" + fi + for f in ${fs}; do + # Archive symlinks to directories as symlinks + echo "${prefix}/${f}" + if [ -d "${f}" ] && ! [ -h "${f}" ]; then + cd "${f}" + _get_files "${prefix}/${f}" + cd .. + fi + done +} + +# Reset all timestamps to unix time 0 +reset_timestamp() { + if command -v find >/dev/null 2>&1; then + # find does not error out on exec error + find . -print0 | xargs -0 touch -h -t 197001010000.00 + else + # A rudimentary find implementation that does the trick + fs= + if [ -n "$(ls 2>/dev/null)" ]; then + fs=$(echo ./*) + fi + if [ -n "$(ls .[0-z]* 2>/dev/null)" ]; then + fs="${fs} $(echo .[0-z]*)" + fi + for f in ${fs}; do + touch -h -t 197001010000.00 "${f}" + if [ -d "${f}" ]; then + cd "${f}" + reset_timestamp + cd .. + fi + done + fi +} + +# Fake grep +_grep() { + local text="${1}" + local fname="${2}" + if command -v grep >/dev/null 2>&1; then + grep "${text}" "${fname}" + else + # shellcheck disable=SC2162 + while read line; do + case "${line}" in *"${text}"*) + echo "${line}" ;; + esac + done < "${fname}" + fi +} + +get_revision() { + local pkg=$1 + cd "/external/repo" + # Get revision (n time this package has been built) + revision=$( (ls -1 "${pkg}"* 2>/dev/null || true) | wc -l | sed 's/ *//g') +} + +# Installs binary packages from an earlier run +# This is useful to speed up development cycle +bin_preseed() { + if [ -d "/external/repo-preseeded" ]; then + get_revision "${pkg}" + cd "/external/repo-preseeded" + if [ "${UPDATE_CHECKSUMS}" = "True" ] || src_checksum "${pkg}" $((revision)); then + echo "${pkg}: installing prebuilt package." + mv "${pkg}_${revision}"* /external/repo || return 1 + if [[ "${pkg}" == bash-* ]]; then + # tar does not like overwriting running bash + # shellcheck disable=SC2153 + rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh" + fi + cd "/external/repo" + rm -f /tmp/filelist.txt + src_apply "${pkg}" $((revision)) + cd "${SRCDIR}" + return 0 + fi + fi + return 1 +} + +# Common build steps +# Build function provides a few common stages with default implementation +# that can be overridden on per package basis in the build script. +# build takes two arguments: +# 1) name-version of the package +# 2) optionally specify build script. Default is name-version.sh +# 3) optionally specify directory to cd into +build() { + pkg=$1 + script_name=${2:-${pkg}.sh} + dirname=${3:-${pkg}} + + # shellcheck disable=SC2015 + bin_preseed && return || true # Normal build if preseed fails + + cd "${SRCDIR}/${pkg}" || (echo "Cannot cd into ${pkg}!"; kill $$) + echo "${pkg}: beginning build using script ${script_name}" + base_dir="${PWD}" + if [ -e "${base_dir}/patches-$(basename "${script_name}" .sh)" ]; then + patch_dir="${base_dir}/patches-$(basename "${script_name}" .sh)" + else + patch_dir="${base_dir}/patches" + fi + mk_dir="${base_dir}/mk" + files_dir="${base_dir}/files" + + rm -rf "build" + mkdir "build" + cd "build" + + build_script="${base_dir}/${script_name}" + if test -e "${build_script}"; then + # shellcheck source=/dev/null + . "${build_script}" + fi + + echo "${pkg}: getting sources." + build_stage=src_get + call $build_stage + + echo "${pkg}: unpacking source." + build_stage=src_unpack + call $build_stage + unset EXTRA_DISTFILES + + cd "${dirname}" || (echo "Cannot cd into build/${dirname}!"; kill $$) + + echo "${pkg}: preparing source." + build_stage=src_prepare + call $build_stage + + echo "${pkg}: configuring source." + build_stage=src_configure + call $build_stage + + echo "${pkg}: compiling source." + build_stage=src_compile + call $build_stage + + echo "${pkg}: install to fakeroot." + build_stage=src_install + call $build_stage + + echo "${pkg}: postprocess binaries." + build_stage=src_postprocess + call $build_stage + + echo "${pkg}: creating package." + get_revision "${pkg}" + cd "${DESTDIR}" + src_pkg + + src_checksum "${pkg}" "${revision}" + + echo "${pkg}: cleaning up." + rm -rf "${SRCDIR}/${pkg}/build" + rm -rf "${DESTDIR}" + mkdir -p "${DESTDIR}" + + echo "${pkg}: installing package." + src_apply "${pkg}" "${revision}" + + echo "${pkg}: build successful" + + cd "${SRCDIR}" + + unset -f src_unpack src_prepare src_configure src_compile src_install src_postprocess + unset extract +} + +interpret_source_line() { + url="${1}" + checksum="${2}" + fname="${3}" + # Default to basename of url if not given + fname="${fname:-$(basename "${url}")}" + if ! [ -e "${fname}" ]; then + curl --fail --retry 5 --location "${url}" --output "${fname}" + fi + echo "${checksum} ${fname}" > "${fname}.sum" + sha256sum -c "${fname}.sum" + rm "${fname}.sum" +} + +# Default get function that downloads source tarballs. +default_src_get() { + # shellcheck disable=SC2153 + cd "${DISTFILES}" + # shellcheck disable=SC2162 + while read line; do + # This is intentional - we want to split out ${line} into separate arguments. + # shellcheck disable=SC2086 + interpret_source_line ${line} + done < "${base_dir}/sources" + cd - +} + +# Intelligently extracts a file based upon its filetype. +extract_file() { + f="${3:-$(basename "${1}")}" + # shellcheck disable=SC2154 + case "${noextract}" in + *${f}*) + cp "${DISTFILES}/${f}" . + ;; + *) + case "${f}" in + *.tar* | *.tgz) + if test -e "${PREFIX}/libexec/rmt"; then + # Again, we want to split out into words. + # shellcheck disable=SC2086 + tar --no-same-owner -xf "${DISTFILES}/${f}" ${extract} + else + # shellcheck disable=SC2086 + case "${f}" in + *.tar.gz) tar -xzf "${DISTFILES}/${f}" ${extract} ;; + *.tar.bz2) + # Initial bzip2 built against meslibc has broken pipes + bzip2 -dc "${DISTFILES}/${f}" | tar -xf - ${extract} ;; + *.tar.xz) + tar -xf "${DISTFILES}/${f}" --use-compress-program=xz ${extract} ;; + esac + fi + ;; + *) + cp "${DISTFILES}/${f}" . + ;; + esac + ;; + esac +} + +# Default unpacking function that unpacks all sources. +default_src_unpack() { + # Handle the first one differently + first_line=$(head -n 1 ../sources) + # Again, we want to split out into words. + # shellcheck disable=SC2086 + extract_file ${first_line} + # This assumes there is only one directory in the tarball + # Get the dirname "smartly" + if ! [ -e "${dirname}" ]; then + for i in *; do + if [ -d "${i}" ]; then + dirname="${i}" + break + fi + done + fi + # shellcheck disable=SC2162 + tail -n +2 ../sources | while read line; do + # shellcheck disable=SC2086 + extract_file ${line} + done +} + +# Default function to prepare source code. +# It applies all patches from patch_dir (at the moment only -p0 patches are supported). +# Then it copies our custom makefile and any other custom files from files directory. +default_src_prepare() { + if test -d "${patch_dir}"; then + if ls "${patch_dir}"/*.patch >/dev/null 2>&1; then + for p in "${patch_dir}"/*.patch; do + echo "Applying patch: ${p}" + patch -Np0 < "${p}" + done + fi + fi + + makefile="${mk_dir}/main.mk" + if test -e "${makefile}"; then + cp "${makefile}" Makefile + fi + + if test -d "${files_dir}"; then + cp --no-preserve=mode "${files_dir}"/* "${PWD}/" + fi +} + +# Default function for configuring source. +default_src_configure() { + : +} + +# Default function for compiling source. It simply runs make without any parameters. +default_src_compile() { + make "${MAKEJOBS}" -f Makefile PREFIX="${PREFIX}" +} + +# Default installing function. PREFIX should be set by run.sh script. +# Note that upstream makefiles might ignore PREFIX and have to be configured in configure stage. +default_src_install() { + make -f Makefile install PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" +} + +# Default function for postprocessing binaries. +default_src_postprocess() { + if (command -v find && command -v file && command -v strip) >/dev/null 2>&1; then + # Logic largely taken from void linux 06-strip-and-debug-pkgs.sh + # shellcheck disable=SC2162 + find "${DESTDIR}" -type f | while read f; do + case "$(file -bi "${f}")" in + application/x-executable*) strip "${f}" ;; + application/x-sharedlib*|application/x-pie-executable*) + machine_set="$(file -b "${f}")" + case "${machine_set}" in + *no\ machine*) ;; # don't strip ELF container-only + *) strip --strip-unneeded "${f}" ;; + esac + ;; + application/x-archive*) strip --strip-debug "${f}" ;; + esac + done + fi +} + +src_pkg() { + touch -t 197001010000.00 . + reset_timestamp + + local tar_basename="${pkg}_${revision}.tar" + local dest_tar="/external/repo/${tar_basename}" + local filelist=/tmp/filelist.txt + + cd /external/repo + # If grep is unavailable, then tar --sort is unavailable. + # So this does not need a command -v grep. + if tar --help | grep ' \-\-sort' >/dev/null 2>&1; then + tar -C "${DESTDIR}" --sort=name --hard-dereference \ + --numeric-owner --owner=0 --group=0 --mode=go=rX,u+rw,a-s -cf "${dest_tar}" . + else + local olddir + olddir=$PWD + cd "${DESTDIR}" + local null + if command -v find >/dev/null 2>&1 && command -v sort >/dev/null 2>&1; then + find . -print0 | LC_ALL=C sort -z > "${filelist}" + null="--null" + elif command -v sort >/dev/null 2>&1; then + get_files . | LC_ALL=C sort > "${filelist}" + else + get_files . > ${filelist} + fi + tar --no-recursion ${null} --files-from "${filelist}" \ + --numeric-owner --owner=0 --group=0 --mode=go=rX,u+rw,a-s -cf "${dest_tar}" + rm -f "$filelist" + cd "$olddir" + fi + touch -t 197001010000.00 "${tar_basename}" + bzip2 --best "${tar_basename}" +} + +src_checksum() { + local pkg=$1 revision=$2 + local rval=0 + if ! [ "$UPDATE_CHECKSUMS" = True ] ; then + # We avoid using pipes as that is not supported by initial sha256sum from mescc-tools-extra + local checksum_file=/tmp/checksum + _grep "${pkg}_${revision}" "${SRCDIR}/SHA256SUMS.pkgs" > "${checksum_file}" || true + # Check there is something in checksum_file + if ! [ -s "${checksum_file}" ]; then + echo "${pkg}: no checksum stored!" + false + fi + echo "${pkg}: checksumming created package." + sha256sum -c "${checksum_file}" || rval=$? + rm "${checksum_file}" + fi + return "${rval}" +} + +src_apply() { + local pkg="${1}" revision="${2}" + local TAR_PREFIX BZIP2_PREFIX + + # Make sure we have at least one copy of tar + if [[ "${pkg}" == tar-* ]]; then + mkdir -p /tmp + cp "${PREFIX}/bin/tar" "/tmp/tar" + TAR_PREFIX="/tmp/" + fi + + # Overwriting files is mega busted, so do it manually + # shellcheck disable=SC2162 + if [ -e /tmp/filelist.txt ]; then + while IFS= read -d $'\0' file; do + rm -f "/${file}" >/dev/null 2>&1 || true + done < /tmp/filelist.txt + fi + + # Bzip2 does not like to be overwritten + if [[ "${pkg}" == bzip2-* ]]; then + mkdir -p /tmp + mv "${PREFIX}/bin/bzip2" "/tmp/bzip2" + BZIP2_PREFIX="/tmp/" + fi + "${BZIP2_PREFIX}bzip2" -dc "/external/repo/${pkg}_${revision}.tar.bz2" | \ + "${TAR_PREFIX}tar" -C / -xpf - + rm -f "/tmp/bzip2" "/tmp/tar" +} + +# Check if bash function exists +fn_exists() { + test "$(type -t "$1")" == 'function' +} + +# Call package specific function or default implementation. +call() { + if fn_exists "$1"; then + $1 + else + default_"${1}" + fi +} + +# Call default build stage function +default() { + "default_${build_stage}" +} diff --git a/steps/improve/clean_ram.sh b/steps/improve/clean_ram.sh @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# Save because linux deletes all distfiles to save space +cp "${DISTFILES}"/musl-1.2.4.tar.gz /tmp +cp "${DISTFILES}"/curl-7.88.1.tar.bz2 /tmp + +# Clear up some RAM space +grep --no-filename '^build' "${SOURCES}"/run*.sh | grep -v musl-1.2.4 | sed "s/build //" | sed "s/ .*$//" | while read -r p ; do + rm -rf "${SOURCES:?}/${p:?}" +done + +mv /tmp/musl-1.2.4.tar.gz "${DISTFILES}" +mv /tmp/curl-7.88.1.tar.bz2 "${DISTFILES}" diff --git a/steps/improve/finalize_fhs.sh b/steps/improve/finalize_fhs.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +# Add the rest of the FHS that we will use and is not created pre-boot +rm -rf /sbin /usr/sbin +for d in bin lib sbin; do + ln -s "usr/${d}" "/${d}" +done +mkdir -p /etc /run /var +test -d /proc || (mkdir /proc && mount -t proc proc /proc) +test -d /sys || (mkdir /sys && mount -t sysfs sysfs /sys) +# Make /tmp a ramdisk (speeds up configure etc significantly) +test -d /tmp || (mkdir /tmp && mount -t tmpfs tmpfs /tmp) +# Add /etc/resolv.conf +echo 'nameserver 1.1.1.1' > /etc/resolv.conf diff --git a/steps/improve/get_network.sh b/steps/improve/get_network.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +dhcpcd --waitip=4 +# Ensure network accessible +timeout=120 +while ! curl example.com >/dev/null 2>&1; do + sleep 1 + # shellcheck disable=SC2219 + let timeout-- + if [ "${timeout}" -le 0 ]; then + echo "Timeout reached for internet to become accessible" + false + fi +done diff --git a/steps/improve/musl_libdir.sh b/steps/improve/musl_libdir.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +sed -i "/^LIBDIR/d" /steps/env +LIBDIR=${PREFIX}/lib/i386-unknown-linux-musl +echo "LIBDIR=${LIBDIR}" >> /steps/env diff --git a/steps/improve/null_time.sh b/steps/improve/null_time.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# Set modified dates of all files to be 0 unix time. +# This function needs `touch` that supports --no-dereference +# (at least coreutils 8.1). +find / -xdev -exec touch --no-dereference -t 197001010000.00 {} + diff --git a/steps/improve/populate_device_nodes.sh b/steps/improve/populate_device_nodes.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# http://www.linuxfromscratch.org/lfs/view/6.1/chapter06/devices.html +mkdir -p "/dev" +test -c "/dev/null" || (rm -f "/dev/null" && + mknod -m 666 "/dev/null" c 1 3) +test -c "/dev/zero" || mknod -m 666 "/dev/zero" c 1 5 +test -c "/dev/random" || mknod -m 444 "/dev/random" c 1 8 +test -c "/dev/urandom" || mknod -m 444 "/dev/urandom" c 1 9 + +test -c "/dev/ptmx" || mknod -m 666 "/dev/ptmx" c 5 2 +test -c "/dev/tty" || mknod -m 666 "/dev/tty" c 5 0 + +test -b "/dev/sda" || mknod -m 600 "/dev/sda" b 8 0 +test -b "/dev/sda1" || mknod -m 600 "/dev/sda1" b 8 1 +test -b "/dev/sda2" || mknod -m 600 "/dev/sda2" b 8 2 +test -b "/dev/sda3" || mknod -m 600 "/dev/sda3" b 8 3 +test -b "/dev/sdb" || mknod -m 600 "/dev/sdb" b 8 16 +test -b "/dev/sdb1" || mknod -m 600 "/dev/sdb1" b 8 17 +test -b "/dev/sdb2" || mknod -m 600 "/dev/sdb2" b 8 18 +test -b "/dev/sdb2" || mknod -m 600 "/dev/sdb3" b 8 19 +test -b "/dev/sdc" || mknod -m 600 "/dev/sdc" b 8 32 +test -b "/dev/sdc1" || mknod -m 600 "/dev/sdc1" b 8 33 +test -b "/dev/sdc2" || mknod -m 600 "/dev/sdc2" b 8 34 +test -b "/dev/sdc3" || mknod -m 600 "/dev/sdc3" b 8 35 + +test -e "/dev/stdout" || ln -s "/proc/self/fd/1" "/dev/stdout" + +if mount --version >/dev/null 2>&1; then + test -d "/dev/shm" || (mkdir /dev/shm && mount -t tmpfs tmpfs /dev/shm) + test -d "/proc" || (mkdir /proc && mount -t proc proc /proc) +fi + +if [ "${CHROOT}" = False ]; then + test -c "/dev/console" || mknod -m 666 "/dev/console" c 5 1 +fi diff --git a/steps/improve/setup_repo.sh b/steps/improve/setup_repo.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +mkdir -p /external/repo diff --git a/steps/improve/update_env.sh b/steps/improve/update_env.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +unset GUILE_LOAD_PATH + +cat > /steps/env <<- EOF +export PATH=${PREFIX}/bin +PREFIX=${PREFIX} +LIBDIR=${LIBDIR} +DESTDIR=${DESTDIR} +DISTFILES=${DISTFILES} +SRCDIR=${SRCDIR} +MAKEJOBS=-j${JOBS} +export HOME=/tmp +export SOURCE_DATE_EPOCH=0 +export SHELL=/usr/bin/bash +DESTDIR=/tmp/destdir +EOF + +. /steps/env diff --git a/steps/jump/fiwix.sh b/steps/jump/fiwix.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +# Build the ext2 image +make_fiwix_initrd + +# Boot Fiwix +kexec-fiwix diff --git a/steps/jump/linux.sh b/steps/jump/linux.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +. /steps/bootstrap.cfg + +set -e + +# Perform the actual kexec +if [ "${KERNEL_BOOTSTRAP}" = True ]; then + sync + # We don't use the gen_initramfs_list.sh script because it is so *SLOW* + # This emulates the same thing it does + find / -xdev -type d -printf "dir %p %m %U %G\n" >> /initramfs.list + find / -xdev -type f -printf "file %p %p %m %U %G\n" >> /initramfs.list + find / -xdev -type l -printf "slink %p %l %m %U %G\n" >> /initramfs.list + find / -xdev -type c -or -type b -not -name "ram*" -printf "nod %p %m %U %G %y " -exec stat -c '%Hr %Lr' {} \; >> /initramfs.list + kexec-linux "/dev/ram1" "/boot/linux-4.9.10" "!$(command -v gen_init_cpio) /initramfs.list" +else + mkdir /etc + # kexec time + if [ "${BARE_METAL}" = True ]; then + kexec -l "/boot/linux-4.9.10" \ + --append="root=/dev/sda1 rootfstype=ext3 init=/init rw" + else + kexec -l "/boot/linux-4.9.10" --console-serial \ + --append="console=ttyS0 root=/dev/sda1 rootfstype=ext3 init=/init rw" + fi + kexec -e +fi diff --git a/steps/jump/move_disk.sh b/steps/jump/move_disk.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +# Create partition if it doesn't exist +if [ $(($(stat -c "%Lr" "/dev/${DISK}") % 8)) -eq 0 ]; then + echo "Creating partition table..." + echo ";" | sfdisk "/dev/${DISK}" + fdisk -l "/dev/${DISK}" + echo "Creating ext4 partition..." + mkfs.ext4 "/dev/${DISK}1" + DISK="${DISK}1" +fi + +# Mount the partition, move everything into /external +mkdir -p /newroot +mount -t ext4 "/dev/${DISK}" /newroot +mkdir -p /newroot/external +mv /newroot/* /newroot/external/ 2>/dev/null || true # obviously errors trying to move external into itself + +# Switch root +mkdir -p /rootonly +# This doesn't recursively mount - that's why we're able to copy everything over +mount --bind / /rootonly +cp -ar /rootonly/* /newroot/ +umount /rootonly +switch_root /newroot /init diff --git a/sysa/kbd-1.15/kbd-1.15.sh b/steps/kbd-1.15/pass1.sh diff --git a/sysa/kbd-1.15/patches/fcntl.patch b/steps/kbd-1.15/patches/fcntl.patch diff --git a/sysa/kbd-1.15/patches/resizecons.patch b/steps/kbd-1.15/patches/resizecons.patch diff --git a/sysa/kbd-1.15/sources b/steps/kbd-1.15/sources diff --git a/steps/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums b/steps/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums @@ -0,0 +1 @@ +7d98c6ce71a3b45d86453d50b2bc91e651b31aac9615705bb73d09580b220997 /usr/bin/kexec-fiwix diff --git a/sysa/kexec-fiwix-1.0/kexec-fiwix-1.0.kaem b/steps/kexec-fiwix-1.0/pass1.kaem diff --git a/sysa/kexec-fiwix-1.0/src/kexec-fiwix.c b/steps/kexec-fiwix-1.0/src/kexec-fiwix.c diff --git a/sysa/kexec-fiwix-1.0/src/multiboot1.h b/steps/kexec-fiwix-1.0/src/multiboot1.h diff --git a/steps/kexec-linux-1.0.0/files/kexec-linux.c b/steps/kexec-linux-1.0.0/files/kexec-linux.c @@ -0,0 +1,87 @@ +/* SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com> */ +/* SPDX-License-Identifier: MIT */ +#include <stdio.h> +#include <stdlib.h> +#include <stdint.h> +#include <unistd.h> +#include <sys/reboot.h> +#include <sys/stat.h> +#include <time.h> + +int append_file(FILE *dst_file, char *src_file_name); + +int main(int argc, char **argv) { + char *ramdrive_file_name, *kernel_file_name, *initramfs_file_name; + FILE *ramdrive_file; + struct stat stats; + uint32_t size; + + if (argc < 3) { + puts("Usage: fiwix-kexec-linux <ram-drive-name> <kernel-file-name> <initramfs-file-name>"); + exit(1); + } + + ramdrive_file_name = argv[1]; + kernel_file_name = argv[2]; + initramfs_file_name = argv[3]; + + ramdrive_file = fopen(ramdrive_file_name, "wb"); + + /* Move past where lengths go */ + int length_offset = 2 * sizeof(uint32_t); + fseek(ramdrive_file, length_offset, SEEK_SET); + uint32_t last_pos = ftell(ramdrive_file); + + /* Write the kernel and initramfs */ + if (append_file(ramdrive_file, kernel_file_name)) { + fprintf(stderr, "Cannot append kernel '%s'\n", kernel_file_name); + exit(1); + } + + uint32_t kernel_size = ftell(ramdrive_file) - last_pos; + last_pos = ftell(ramdrive_file); + + if (append_file(ramdrive_file, initramfs_file_name)) { + fprintf(stderr, "Cannot append initramfs '%s'\n", initramfs_file_name); + exit(1); + } + + uint32_t initramfs_size = ftell(ramdrive_file) - last_pos; + + /* Now write the lengths */ + fseek(ramdrive_file, 0, SEEK_SET); + fwrite(&kernel_size, sizeof(kernel_size), 1, ramdrive_file); + fwrite(&initramfs_size, sizeof(initramfs_size), 1, ramdrive_file); + + fclose(ramdrive_file); + + /* Flush ram drive writes to device */ + sync(); + + /* Perform syscall reboot to initiate kexec */ + reboot(RB_HALT_SYSTEM); +} + +int append_file(FILE *dst_file, char *src_file_name) { + FILE *src_file; + char buff[BUFSIZ]; + size_t n; + + if (*src_file_name == '!') { + src_file_name++; + src_file = popen(src_file_name, "r"); + } else { + src_file = fopen(src_file_name, "rb"); + } + + if (src_file) { + while ((n = fread(buff, 1, BUFSIZ, src_file)) != 0) { + fwrite(buff, 1, n, dst_file); + } + fclose(src_file); + return 0; + } else { + printf("Cannot open file '%s'\n", src_file_name); + return 1; + } +} diff --git a/sysa/kexec-linux-1.0.0/mk/main.mk b/steps/kexec-linux-1.0.0/mk/main.mk diff --git a/sysa/kexec-linux-1.0.0/kexec-linux-1.0.0.sh b/steps/kexec-linux-1.0.0/pass1.sh diff --git a/sysa/kexec-tools-2.0.22/kexec-tools-2.0.22.sh b/steps/kexec-tools-2.0.22/pass1.sh diff --git a/sysa/kexec-tools-2.0.22/patches/bad-gcc-arg.patch b/steps/kexec-tools-2.0.22/patches/bad-gcc-arg.patch diff --git a/sysa/kexec-tools-2.0.22/sources b/steps/kexec-tools-2.0.22/sources diff --git a/sysc/libarchive-3.5.2/libarchive-3.5.2.sh b/steps/libarchive-3.5.2/pass1.sh diff --git a/sysc/libarchive-3.5.2/sources b/steps/libarchive-3.5.2/sources diff --git a/sysc/libatomic_ops-7.6.10/libatomic_ops-7.6.10.sh b/steps/libatomic_ops-7.6.10/pass1.sh diff --git a/sysc/libatomic_ops-7.6.10/sources b/steps/libatomic_ops-7.6.10/sources diff --git a/sysc/libffi-3.3/libffi-3.3.sh b/steps/libffi-3.3/pass1.sh diff --git a/sysc/libffi-3.3/sources b/steps/libffi-3.3/sources diff --git a/sysa/libtool-2.2.4/libtool-2.2.4.sh b/steps/libtool-2.2.4/pass1.sh diff --git a/sysa/libtool-2.2.4/patches/archive-objs-order.patch b/steps/libtool-2.2.4/patches/archive-objs-order.patch diff --git a/sysa/libtool-2.2.4/patches/hostname.patch b/steps/libtool-2.2.4/patches/hostname.patch diff --git a/sysa/libtool-2.2.4/sources b/steps/libtool-2.2.4/sources diff --git a/sysc/libtool-2.4.7/bootstrap-helper.sh b/steps/libtool-2.4.7/bootstrap-helper.sh diff --git a/sysc/libtool-2.4.7/import-gnulib.sh b/steps/libtool-2.4.7/import-gnulib.sh diff --git a/sysc/libtool-2.4.7/libtool-2.4.7.sh b/steps/libtool-2.4.7/pass1.sh diff --git a/sysc/libtool-2.4.7/patches/hostname.patch b/steps/libtool-2.4.7/patches/hostname.patch diff --git a/sysc/libtool-2.4.7/sources b/steps/libtool-2.4.7/sources diff --git a/sysc/libunistring-0.9.10/libunistring-0.9.10.sh b/steps/libunistring-0.9.10/pass1.sh diff --git a/sysc/libunistring-0.9.10/sources b/steps/libunistring-0.9.10/sources diff --git a/sysa/linux-4.9.10/files/config b/steps/linux-4.9.10/files/config diff --git a/steps/linux-4.9.10/pass1.sh b/steps/linux-4.9.10/pass1.sh @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> +# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# XXX: Fix package after builder-hex0 + +src_unpack() { + # Remove all previous source tarballs + mkdir /tmp/keep + for keep in deblob-4.9 ${pkg}.tar.gz musl-1.2.4.tar.gz curl-7.88.1.tar.bz2; do + mv "${DISTFILES}/${keep}" /tmp/keep + done + rm -r "${DISTFILES}/"* + mv /tmp/keep/* "${DISTFILES}" + + mkdir "${pkg}" + mv "${DISTFILES}/deblob-4.9" "${pkg}/" + default || true # Predictable link errors - not a problem + rm "${DISTFILES}/${pkg}.tar.gz" +} + +generate_autoconf_h() { + # generate include/linux/autoconf.h -- we do not have gperf rn to do it the normal way + mkdir -p include/generated + # Transform each of the CONFIG_* options that are =y into header + grep -E '=y$' .config | sed 's/=y$/ 1/' | sed 's/^/#define /' >> include/generated/autoconf.h + # Transform each of the CONFIG_* options that are unset into headers + grep -E ' is not set$' .config | sed 's/ is not set$//' | sed 's/#/#undef/' >> include/generated/autoconf.h + # Transform each of the non-boolean options into headers + grep -E '=.*$' .config | grep -v -E '=y$' | sed 's/=/ /' | sed 's/^/#define /' >> include/generated/autoconf.h +} + +src_prepare() { + default + + mv config .config + mkdir -p include/config + cp .config include/config/auto.conf + + generate_autoconf_h + + # Deblob the kernel + chmod +x deblob-4.9 + ./deblob-4.9 --force + + # Remove shipped files + find . -name "*_shipped*" -delete +} + +src_compile() { + cp .config include/config/auto.conf + rm include/generated/autoconf.h + generate_autoconf_h + + # Allow use of patched initramfs_list.sh (which is required anyway) + make "${MAKEJOBS}" ARCH=i386 prepare + PATH="${PWD}/usr:${PATH}" make "${MAKEJOBS}" ARCH=i386 + + # Clear up more space + find . -name '*.o' -delete +} + +src_install() { + install -D -m 644 arch/i386/boot/bzImage "${DESTDIR}/boot/linux-4.9.10" + install -D -m 755 usr/gen_init_cpio "${DESTDIR}${PREFIX}/bin/gen_init_cpio" + install -D -m 755 scripts/gen_initramfs_list.sh "${DESTDIR}${PREFIX}/bin/gen_initramfs_list.sh" +} diff --git a/sysa/linux-4.9.10/patches/bad-asm.patch b/steps/linux-4.9.10/patches/bad-asm.patch diff --git a/sysa/linux-4.9.10/patches/disable-broken-check.patch b/steps/linux-4.9.10/patches/disable-broken-check.patch diff --git a/sysa/linux-4.9.10/patches/initramfs_list.patch b/steps/linux-4.9.10/patches/initramfs_list.patch diff --git a/sysa/linux-4.9.10/patches/linking.patch b/steps/linux-4.9.10/patches/linking.patch diff --git a/sysa/linux-4.9.10/patches/regen.patch b/steps/linux-4.9.10/patches/regen.patch diff --git a/sysa/linux-4.9.10/patches/remove-alternative-asm.patch b/steps/linux-4.9.10/patches/remove-alternative-asm.patch diff --git a/sysa/linux-4.9.10/patches/remove-kconfig.patch b/steps/linux-4.9.10/patches/remove-kconfig.patch diff --git a/sysa/linux-4.9.10/sources b/steps/linux-4.9.10/sources diff --git a/sysa/linux-headers-4.9.10/linux-headers-4.9.10.sh b/steps/linux-headers-4.9.10/pass1.sh diff --git a/sysa/linux-headers-4.9.10/patches/musl.patch b/steps/linux-headers-4.9.10/patches/musl.patch diff --git a/sysa/linux-headers-4.9.10/patches/winsize.patch b/steps/linux-headers-4.9.10/patches/winsize.patch diff --git a/sysa/linux-headers-4.9.10/sources b/steps/linux-headers-4.9.10/sources diff --git a/sysa/lwext4-1.0.0-lb1/config/ext4_config.h b/steps/lwext4-1.0.0-lb1/config/ext4_config.h diff --git a/steps/lwext4-1.0.0-lb1/files/early-artifacts-needed-after-fiwix.txt b/steps/lwext4-1.0.0-lb1/files/early-artifacts-needed-after-fiwix.txt @@ -0,0 +1,177 @@ +# SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com> +# SPDX-License-Identifier: MIT +/usr/bin/blood-elf +/usr/bin/catm +/usr/bin/chmod +/usr/bin/get_machine +/usr/bin/hex2 +/usr/bin/kaem +/usr/bin/match +/usr/bin/M1 +/usr/bin/M2-Mesoplanet +/usr/bin/M2-Planet +/usr/bin/mkdir +/usr/bin/sha256sum +/usr/bin/unbz2 +/usr/bin/ungz +/usr/bin/untar +/usr/bin/cp +/usr/bin/replace +/usr/bin/rm +/usr/bin/checksum-transcriber +/usr/bin/tcc +/usr/bin/tcc-0.9.26 +/usr/bin/kexec-linux +/usr/lib/mes/libc.a +/usr/lib/mes/libgetopt.a +/usr/lib/mes/crt1.o +/usr/lib/mes/crti.o +/usr/lib/mes/crtn.o +/usr/lib/mes/tcc/libtcc1.a +/usr/include/mes/alloca.h +/usr/include/mes/argz.h +/usr/include/mes/ar.h +/usr/include/mes/assert.h +/usr/include/mes/ctype.h +/usr/include/mes/dirent.h +/usr/include/mes/dirstream.h +/usr/include/mes/dlfcn.h +/usr/include/mes/endian.h +/usr/include/mes/errno.h +/usr/include/mes/fcntl.h +/usr/include/mes/features.h +/usr/include/mes/float.h +/usr/include/mes/getopt.h +/usr/include/mes/grp.h +/usr/include/mes/inttypes.h +/usr/include/mes/libgen.h +/usr/include/mes/limits.h +/usr/include/mes/locale.h +/usr/include/mes/math.h +/usr/include/mes/memory.h +/usr/include/mes/pwd.h +/usr/include/mes/setjmp.h +/usr/include/mes/signal.h +/usr/include/mes/stdarg.h +/usr/include/mes/stdbool.h +/usr/include/mes/stddef.h +/usr/include/mes/stdint.h +/usr/include/mes/stdio.h +/usr/include/mes/stdlib.h +/usr/include/mes/stdnoreturn.h +/usr/include/mes/string.h +/usr/include/mes/strings.h +/usr/include/mes/termio.h +/usr/include/mes/time.h +/usr/include/mes/unistd.h +/usr/include/mes/arch/kernel-stat.h +/usr/include/mes/arch/syscall.h +/usr/include/mes/linux/syscall.h +/usr/include/mes/linux/x86/syscall.h +/usr/include/mes/mes/builtins.h +/usr/include/mes/mes/cc.h +/usr/include/mes/mes/config.h +/usr/include/mes/mes/constants.h +/usr/include/mes/mes/lib.h +/usr/include/mes/mes/lib-cc.h +/usr/include/mes/mes/lib-mini.h +/usr/include/mes/mes/mes.h +/usr/include/mes/mes/symbols.h +/usr/include/mes/sys/cdefs.h +/usr/include/mes/sys/dir.h +/usr/include/mes/sys/file.h +/usr/include/mes/sys/ioctl.h +/usr/include/mes/sys/mman.h +/usr/include/mes/sys/param.h +/usr/include/mes/sys/resource.h +/usr/include/mes/sys/select.h +/usr/include/mes/sys/stat.h +/usr/include/mes/sys/timeb.h +/usr/include/mes/sys/time.h +/usr/include/mes/sys/times.h +/usr/include/mes/sys/types.h +/usr/include/mes/sys/ucontext.h +/usr/include/mes/sys/user.h +/usr/include/mes/sys/wait.h +/init +/kaem.run +/external/distfiles/make-3.82.tar.bz2 +/external/distfiles/patch-2.5.9.tar.gz +/external/distfiles/gzip-1.2.4.tar.gz +/external/distfiles/tar-1.12.tar.gz +/external/distfiles/sed-4.0.9.tar.gz +/external/distfiles/bzip2-1.0.8.tar.gz +/external/distfiles/coreutils-5.0.tar.bz2 +/external/distfiles/heirloom-devtools-070527.tar.bz2 +/external/distfiles/bash-2.05b.tar.gz +/external/distfiles/flex-2.5.11.tar.gz +/external/distfiles/tcc-0.9.27.tar.bz2 +/external/distfiles/musl-1.1.24.tar.gz +/external/distfiles/tcc-0.9.27.tar.bz2 +/external/distfiles/musl-1.1.24.tar.gz +/external/distfiles/tcc-0.9.27.tar.bz2 +/external/distfiles/sed-4.0.9.tar.gz +/external/distfiles/bzip2-1.0.8.tar.gz +/external/distfiles/m4-1.4.7.tar.gz +/external/distfiles/flex-2.6.4.tar.gz +/external/distfiles/bison-3.4.1.tar.gz +/external/distfiles/bison-3.4.1.tar.gz +/external/distfiles/bison-3.4.1.tar.gz +/external/distfiles/grep-2.4.tar.gz +/external/distfiles/diffutils-2.7.tar.gz +/external/distfiles/coreutils-5.0.tar.bz2 +/external/distfiles/coreutils-6.10.tar.gz +/external/distfiles/gawk-3.0.4.tar.gz +/external/distfiles/perl-5.000.tar.gz +/external/distfiles/perl-5.003.tar.gz +/external/distfiles/perl5.004_05.tar.gz +/external/distfiles/perl5.005_03.tar.gz +/external/distfiles/perl-5.6.2.tar.gz +/external/distfiles/autoconf-2.52.tar.bz2 +/external/distfiles/automake-1.6.3.tar.bz2 +/external/distfiles/automake-1.6.3.tar.bz2 +/external/distfiles/autoconf-2.53.tar.bz2 +/external/distfiles/automake-1.7.tar.bz2 +/external/distfiles/autoconf-2.54.tar.bz2 +/external/distfiles/autoconf-2.55.tar.bz2 +/external/distfiles/automake-1.7.8.tar.bz2 +/external/distfiles/autoconf-2.57.tar.bz2 +/external/distfiles/autoconf-2.59.tar.bz2 +/external/distfiles/automake-1.8.5.tar.bz2 +/external/distfiles/help2man-1.36.4.tar.gz +/external/distfiles/autoconf-2.61.tar.bz2 +/external/distfiles/automake-1.9.6.tar.bz2 +/external/distfiles/automake-1.10.3.tar.bz2 +/external/distfiles/autoconf-2.64.tar.bz2 +/external/distfiles/automake-1.11.2.tar.bz2 +/external/distfiles/autoconf-2.69.tar.gz +/external/distfiles/libtool-2.2.4.tar.bz2 +/external/distfiles/automake-1.15.1.tar.gz +/external/distfiles/binutils-2.30.tar.bz2 +/external/distfiles/musl-1.1.24.tar.gz +/external/distfiles/tcc-0.9.27.tar.bz2 +/external/distfiles/gcc-core-4.0.4.tar.bz2 +/external/distfiles/automake-1.16.3.tar.gz +/external/distfiles/findutils-4.2.33.tar.gz +/external/distfiles/gnulib-8e128e.tar.gz +/external/distfiles/musl-1.2.4.tar.gz +/external/distfiles/gcc-core-4.0.4.tar.bz2 +/external/distfiles/automake-1.16.3.tar.gz +/external/distfiles/util-linux-2.19.1.tar.gz +/external/distfiles/e2fsprogs-1.45.7.tar.gz +/external/distfiles/CaseFolding.txt +/external/distfiles/DerivedAge.txt +/external/distfiles/DerivedCombiningClass.txt +/external/distfiles/DerivedCoreProperties.txt +/external/distfiles/NormalizationCorrections.txt +/external/distfiles/NormalizationTest.txt +/external/distfiles/UnicodeData.txt +/external/distfiles/v10.0.1.tar.gz +/external/distfiles/kbd-1.15.tar.gz +/external/distfiles/make-3.82.tar.bz2 +/external/distfiles/ed-1.4.tar.gz +/external/distfiles/bc-1.07.1.tar.gz +/external/distfiles/v2.0.22.tar.gz +/external/distfiles/linux-4.9.10.tar.gz +/external/distfiles/deblob-4.9 +/external/distfiles/curl-7.88.1.tar.bz2 diff --git a/steps/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c b/steps/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c @@ -0,0 +1,295 @@ +/* + * SPDX-FileCopyrightText: Copyright (c) 2015 Grzegorz Kostka (kostka.grzegorz@gmail.com) + * SPDX-License-Identifier: BSD-3-Clause + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Modifications: + * SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com> + * SPDX-License-Identifier: MIT + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <stdbool.h> +#include <inttypes.h> +#include <time.h> +#include <unistd.h> +#include <sys/time.h> + +#include <ext4.h> +#include <ext4_mkfs.h> +#include "../blockdev/linux/file_dev.h" +#include "../blockdev/windows/file_windows.h" + +#define BLOCK_SIZE 1024 +#define FILENAME_LENGTH 256 +#define INITRD_MB 1152 + +const char *input_name = NULL; +/**@brief Block device handle.*/ +static struct ext4_blockdev *bd; +/**@brief Block cache handle.*/ +static struct ext4_bcache *bc; +static struct ext4_fs fs; + + +static struct ext4_mkfs_info info = { + .block_size = BLOCK_SIZE, + .journal = false, + .inode_size = 128, +}; + +#define MKDEV(major, minor) (((major) << 8) | (minor)) + +static bool open_filedev(void) +{ + file_dev_name_set(input_name); + bd = file_dev_get(); + if (!bd) { + puts("open_filedev: fail"); + return false; + } + return true; +} + +bool lwext4_mount(struct ext4_blockdev *bdev, struct ext4_bcache *bcache) +{ + int r; + + bc = bcache; + bd = bdev; + + if (!bd) { + puts("lwext4_mount: no block device"); + return false; + } + + /* ext4_dmask_set(DEBUG_ALL); */ + + r = ext4_device_register(bd, "ext4_fs"); + if (r != EOK) { + printf("ext4_device_register: rc = %d\n", r); + return false; + } + + r = ext4_mount("ext4_fs", "/mp/", false); + if (r != EOK) { + printf("ext4_mount: rc = %d\n", r); + return false; + } + + r = ext4_recover("/mp/"); + if (r != EOK && r != ENOTSUP) { + printf("ext4_recover: rc = %d\n", r); + return false; + } + + /* ext4_cache_write_back("/mp/", 1); */ + + return true; +} + +bool lwext4_umount(void) +{ + int r; + + /* ext4_cache_write_back("/mp/", 0); */ + + r = ext4_umount("/mp/"); + if (r != EOK) { + printf("ext4_umount: fail %d", r); + return false; + } + return true; +} + + +bool copy_file(char *src_path, char *dest_path) +{ + + printf("copy_file: %s\n", src_path); + ext4_file dest_file; + FILE *src_file = fopen(src_path, "rb"); + if (!src_file) { + printf("fopen '%s' error.\n", src_path); + return EXIT_FAILURE; + } + fseek(src_file, 0, SEEK_END); + int src_len = ftell(src_file); + char * src_mem = malloc(src_len); + int err; + + fseek(src_file, 0, SEEK_SET); + if (src_len > 0) { + int read_len = fread(src_mem, src_len, 1, src_file); + fclose(src_file); + if (read_len < 1) { + printf("src fread error file: '%s' read count: %d\n", src_path, read_len); + } + } + + err = ext4_fopen(&dest_file, dest_path, "wb"); + if (err != EOK) { + printf("ext4_open error: %d\n", err); + return EXIT_FAILURE; + } + + if (src_len > 0) { + err = ext4_fwrite(&dest_file, src_mem, src_len, 0); + if (err != EOK) { + printf("ext4_fwrite error: %d\n", err); + return EXIT_FAILURE; + } + } + + err = ext4_fclose(&dest_file); + if (err != EOK) { + printf("ext4_fclose error: %d\n", err); + return EXIT_FAILURE; + } + + free(src_mem); +} + +bool copy_file_list(char *file_list_path) +{ + char src_filename[FILENAME_LENGTH]; + char dst_filename[FILENAME_LENGTH]; + + FILE *file_list = fopen(file_list_path, "r"); + while(fgets(src_filename, FILENAME_LENGTH, file_list)) { + /* Skip comments */ + if (src_filename[0] == '#') { + continue; + } + src_filename[strlen(src_filename) - 1] = 0; /* strip newline */ + strcpy(dst_filename, "/mp"); + strcat(dst_filename, src_filename); + copy_file(src_filename, dst_filename); + } + fclose(file_list); +} + +int main(int argc, char **argv) +{ + int err; + + char zeros[BLOCK_SIZE]; + + unsigned int next_file_address; + + next_file_address = *((unsigned int *) 0x7F8D); + + printf("Starting fiwix.ext2 at addr 0x%08x\n", next_file_address); + + /* Create zeroed out disk image file */ + input_name = "/boot/fiwix.ext2"; + + memset(zeros, 0, BLOCK_SIZE); + FILE *ext2file = fopen(input_name, "w"); + int b; + for (b=0; b < (BLOCK_SIZE * INITRD_MB); b++) + fwrite(zeros, BLOCK_SIZE, 1, ext2file); + fclose(ext2file); + + if (!open_filedev()) { + printf("open_filedev error\n"); + return EXIT_FAILURE; + } + + /* ext4_dmask_set(DEBUG_ALL); */ + + err = ext4_mkfs(&fs, bd, &info, F_SET_EXT2_V0); + if (err != EOK) { + printf("ext4_mkfs error: %d\n", err); + return EXIT_FAILURE; + } + + memset(&info, 0, sizeof(struct ext4_mkfs_info)); + err = ext4_mkfs_read_info(bd, &info); + if (err != EOK) { + printf("ext4_mkfs_read_info error: %d\n", err); + return EXIT_FAILURE; + } + + printf("Created filesystem with parameters:\n"); + printf("Size: %"PRIu64"\n", info.len); + printf("Block size: %"PRIu32"\n", info.block_size); + printf("Blocks per group: %"PRIu32"\n", info.blocks_per_group); + printf("Inodes per group: %"PRIu32"\n", info.inodes_per_group); + printf("Inode size: %"PRIu32"\n", info.inode_size); + printf("Inodes: %"PRIu32"\n", info.inodes); + printf("Journal blocks: %"PRIu32"\n", info.journal_blocks); + printf("Features ro_compat: 0x%x\n", info.feat_ro_compat); + printf("Features compat: 0x%x\n", info.feat_compat); + printf("Features incompat: 0x%x\n", info.feat_incompat); + printf("BG desc reserve: %"PRIu32"\n", info.bg_desc_reserve_blocks); + printf("Descriptor size: %"PRIu32"\n",info.dsc_size); + printf("Label: %s\n", info.label); + + if (!lwext4_mount(bd, bc)) + return EXIT_FAILURE; + + puts("ext4_dir_mk /mp/dev"); + err = ext4_dir_mk("/mp/dev"); + if (err != EOK) { + printf("ext4_dir_mk error: %d\n", err); + } + puts("ext4_dir_mk /mp/tmp"); + err = ext4_dir_mk("/mp/tmp"); + if (err != EOK) { + printf("ext4_dir_mk error: %d\n", err); + } + + puts("ext4_mknod /mp/dev/console"); + err = ext4_mknod("/mp/dev/console", EXT4_DE_CHRDEV, MKDEV(5, 1)); + if (err != EOK) { + printf("ext4_mknod error: %d\n", err); + return EXIT_FAILURE; + } + puts("ext4_mknod /mp/dev/ram0"); + err = ext4_mknod("/mp/dev/ram0", EXT4_DE_BLKDEV, MKDEV(1, 0)); + if (err != EOK) { + printf("ext4_mknod error: %d\n", err); + return EXIT_FAILURE; + } + puts("ext4_mknod /mp/dev/ram1"); + err = ext4_mknod("/mp/dev/ram1", EXT4_DE_BLKDEV, MKDEV(1, 1)); + if (err != EOK) { + printf("ext4_mknod error: %d\n", err); + return EXIT_FAILURE; + } + + copy_file_list("/steps/lwext4-1.0.0-lb1/files/fiwix-file-list.txt"); + + if (!lwext4_umount()) + return EXIT_FAILURE; + + puts("Fiwix ext2 initrd created successfully."); + return EXIT_SUCCESS; +} diff --git a/steps/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums b/steps/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums @@ -0,0 +1 @@ +a07ed611ce6a0547063be9d5f8ba0f7d14a2ea4e23fa6ff3cbcb09974ece9527 /usr/bin/make_fiwix_initrd diff --git a/steps/lwext4-1.0.0-lb1/pass1.kaem b/steps/lwext4-1.0.0-lb1/pass1.kaem @@ -0,0 +1,61 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com> +# SPDX-License-Identifier: MIT + +set -ex + +mkdir build src +cd src +ungz --file ${DISTFILES}/${pkg}.tar.gz --output ${pkg}.tar +cd .. + +cd build +untar --file ../src/${pkg}.tar +cd ${pkg} + +mkdir -p build_generic/include/generated +catm build_generic/include/generated/ext4_config.h ../../config/ext4_config.h + +cd blockdev/linux +tcc -m32 -march=i386 -std=c89 -I../../include -I../../build_generic/include -I../../../tcc/tcc-0.9.27/include -DVERSION="\"1.0\"" -c file_dev.c + +cd ../../src +alias cc="tcc -m32 -march=i386 -std=c89 -I../include -I../build_generic/include -I../../tcc/tcc-0.9.27/include" +cc -c ext4.c +cc -c ext4_balloc.c +cc -c ext4_bcache.c +cc -c ext4_bitmap.c +cc -c ext4_block_group.c +cc -c ext4_blockdev.c +cc -c ext4_crc32.c +cc -c ext4_debug.c +cc -c ext4_dir.c +cc -c ext4_dir_idx.c +cc -c ext4_extent.c +cc -c ext4_fs.c +cc -c ext4_hash.c +cc -c ext4_ialloc.c +cc -c ext4_inode.c +cc -c ext4_journal.c +cc -c ext4_mbr.c +cc -c ext4_mkfs.c +cc -c ext4_super.c +cc -c ext4_trans.c +cc -c ext4_xattr.c + +cp ../../../files/make_fiwix_initrd.c make_fiwix_initrd.c +tcc -m32 -march=i386 -std=c89 -I../include -I../build_generic/include -I../../tcc/tcc-0.9.27/include -DVERSION="\"1.0\"" -c make_fiwix_initrd.c + +tcc -m32 -o ${BINDIR}/make_fiwix_initrd ext4.o ext4_balloc.o ext4_bcache.o ext4_bitmap.o ext4_block_group.o ext4_blockdev.o ext4_crc32.o ext4_debug.o ext4_dir.o ext4_dir_idx.o ext4_extent.o ext4_fs.o ext4_hash.o ext4_ialloc.o ext4_inode.o ext4_journal.o ext4_mbr.o ext4_mkfs.o ext4_super.o ext4_trans.o ext4_xattr.o ../blockdev/linux/file_dev.o make_fiwix_initrd.o + +cd ../../.. + +# Checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/make_fiwix_initrd + + cp ${pkg}.checksums ${SRCDIR} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/lwext4-1.0.0-lb1/sources b/steps/lwext4-1.0.0-lb1/sources diff --git a/sysa/m4-1.4.7/mk/main.mk b/steps/m4-1.4.7/mk/main.mk diff --git a/sysa/m4-1.4.7/sources b/steps/m4-1.4.7/sources diff --git a/sysa/make-3.82/files/putenv_stub.c b/steps/make-3.82/files/putenv_stub.c diff --git a/steps/make-3.82/make-3.82.checksums b/steps/make-3.82/make-3.82.checksums @@ -0,0 +1 @@ +b1345773131fa42c6b746482a0031037823fb772dd81b7b3771c51db9aeeb7f9 /usr/bin/make diff --git a/sysa/make-3.82/make-3.82.kaem b/steps/make-3.82/pass1.kaem diff --git a/sysa/make-3.82/make-3.82.sh b/steps/make-3.82/pass2.sh diff --git a/sysa/make-3.82/sources b/steps/make-3.82/sources diff --git a/sysc/make-4.2.1/make-4.2.1.sh b/steps/make-4.2.1/pass1.sh diff --git a/sysc/make-4.2.1/sources b/steps/make-4.2.1/sources diff --git a/steps/manifest b/steps/manifest @@ -0,0 +1,173 @@ +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file follows a very simple, human readable and machine parseable syntax. +# Each line is in the format: +# <directive>: <arguments> <predicate> +# +# The supported directives and arguments are: +# - build; simply builds a particular package. +# eg, build: make-3.82 +# - improve; runs a script that makes a distinct and logical improvement to the system. +# eg, improve: use_fhs +# - define: define a variable based upon other variables +# eg, define: BUILD_FIWIX = KERNEL_BOOTSTRAP == True || BUILD_KERNELS == True +# - jump: jump (usually) to a new kernel, executes a script with that name +# eg, jump: fiwix +# +# Other features: +# - predicate; based on variables set in bootstrap.cfg, require for something to execute +# must be enclosed in brackets with spaces padded +# eg, build: fiwix-1.4.0-lb3 ( BUILD_FIWIX == True ) + +build: checksum-transcriber-1.0 +build: simple-patch-1.0 +build: mes-0.25 +build: tcc-0.9.26 +build: tcc-0.9.27 +define: BUILD_FIWIX = ( KERNEL_BOOTSTRAP == True || BUILD_KERNELS == True ) +build: fiwix-1.4.0-lb3 ( BUILD_FIWIX == True ) +build: lwext4-1.0.0-lb1 ( BUILD_FIWIX == True ) +build: kexec-fiwix-1.0 ( BUILD_FIWIX == True ) +jump: fiwix ( KERNEL_BOOTSTRAP == True ) +define: JOBS = 1 ( KERNEL_BOOTSTRAP == True ) +build: make-3.82 +build: patch-2.5.9 +build: gzip-1.2.4 +build: tar-1.12 +build: sed-4.0.9 +build: bzip2-1.0.8 +build: coreutils-5.0 +build: heirloom-devtools-070527 +build: bash-2.05b +improve: setup_repo +improve: update_env +build: flex-2.5.11 +build: tcc-0.9.27 +improve: musl_libdir +build: musl-1.1.24 +build: tcc-0.9.27 +build: musl-1.1.24 +build: tcc-0.9.27 +build: sed-4.0.9 +build: bzip2-1.0.8 +build: m4-1.4.7 +build: flex-2.6.4 +build: bison-3.4.1 +build: bison-3.4.1 +build: bison-3.4.1 +build: grep-2.4 +build: diffutils-2.7 +build: coreutils-5.0 +build: coreutils-6.10 +build: gawk-3.0.4 +build: perl-5.000 +build: perl-5.003 +build: perl5.004-05 +build: perl5.005-03 +build: perl-5.6.2 +improve: populate_device_nodes +build: autoconf-2.52 +build: automake-1.6.3 +build: automake-1.6.3 +build: autoconf-2.53 +build: automake-1.7 +build: autoconf-2.54 +build: autoconf-2.55 +build: automake-1.7.8 +build: autoconf-2.57 +build: autoconf-2.59 +build: automake-1.8.5 +build: help2man-1.36.4 +build: autoconf-2.61 +build: automake-1.9.6 +build: automake-1.10.3 +build: autoconf-2.64 +build: automake-1.11.2 +build: autoconf-2.69 +build: libtool-2.2.4 +build: automake-1.15.1 +build: binutils-2.30 +build: musl-1.1.24 +build: tcc-0.9.27 +improve: populate_device_nodes +build: gcc-4.0.4 +build: findutils-4.2.33 +build: musl-1.2.4 +build: linux-headers-4.9.10 +build: gcc-4.0.4 +build: util-linux-2.19.1 +build: e2fsprogs-1.45.7 +build: dhcpcd-10.0.1 +build: kbd-1.15 +build: make-3.82 +build: ed-1.4 +build: bc-1.07.1 +define: BUILD_LINUX = ( CHROOT == False || BUILD_KERNELS == True ) +build: kexec-linux-1.0.0 ( BUILD_LINUX == True ) +build: kexec-tools-2.0.22 ( BUILD_LINUX == True ) +build: linux-4.9.10 ( BUILD_LINUX == True ) +jump: linux ( CHROOT == False ) +improve: finalize_fhs +build: musl-1.2.4 +build: curl-7.88.1 +improve: populate_device_nodes +jump: move_disk ( KERNEL_BOOTSTRAP == True ) +improve: get_network ( CHROOT == False ) +build: bash-5.2.15 +build: xz-5.4.1 +build: file-5.44 +build: libtool-2.4.7 +build: tar-1.34 +build: coreutils-8.32 +build: pkg-config-0.29.2 +build: make-4.2.1 +build: gmp-6.2.1 +build: autoconf-archive-2021.02.19 +build: mpfr-4.1.0 +build: mpc-1.2.1 +build: flex-2.5.33 +build: bison-2.3 +build: bison-3.4.2 +build: perl-5.10.1 +build: dist-3.5-236 +build: perl-5.32.1 +build: libarchive-3.5.2 +build: openssl-1.1.1l +build: ca-certificates-3.88.1 +build: curl-7.88.1 +build: zlib-1.2.13 +build: automake-1.16.3 +build: autoconf-2.71 +build: patch-2.7.6 +build: gettext-0.21 +build: texinfo-6.7 +build: gcc-4.7.4 +build: binutils-2.38 +build: gperf-3.1 +build: libunistring-0.9.10 +build: libffi-3.3 +build: libatomic_ops-7.6.10 +build: gc-8.0.4 +build: guile-3.0.9 +build: which-2.21 +build: grep-3.7 +build: sed-4.8 +build: autogen-5.18.16 +build: musl-1.2.4 +build: python-2.0.1 +build: python-2.0.1 +build: python-2.3.7 +build: python-2.3.7 +build: python-2.5.6 +build: python-3.1.5 +build: python-3.1.5 +build: python-3.3.7 +build: python-3.4.10 +build: python-3.8.16 +build: python-3.11.1 +build: gcc-10.4.0 +build: binutils-2.38 +build: gcc-13.1.0 +improve: null_time ( FORCE_TIMESTAMPS == True ) diff --git a/steps/mes-0.25/files/config.h b/steps/mes-0.25/files/config.h @@ -0,0 +1,7 @@ +// SPDX-FileCopyrightText: 2020 fosslinux <fosslinux@aussies.space> +// SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#undef SYSTEM_LIBC +#define MES_VERSION "0.25" diff --git a/sysa/mes-0.25/mes-0.25.amd64.checksums b/steps/mes-0.25/mes-0.25.amd64.checksums diff --git a/sysa/mes-0.25/mes-0.25.riscv64.checksums b/steps/mes-0.25/mes-0.25.riscv64.checksums diff --git a/steps/mes-0.25/mes-0.25.x86.checksums b/steps/mes-0.25/mes-0.25.x86.checksums @@ -0,0 +1,14 @@ +ab14556dd405debd1fc4aa18bffea9ee8c89bc8fa89f745e8fb20c9da83e5809 /usr/bin/mes +1e5ceedd062bfddab21ceb5f84f762eafa373d274ea82017b092e03bb24bb7bf /usr/bin/mes-m2 +834320264b245728c2270b2a60f1ceb5f63de8a79bcd99f5c6bba6be11ed7223 /usr/bin/mescc.scm +234c264965116a24583dd569050adc766d7cc2da83b1db38085210f26031b70c /usr/lib/x86-mes/crt1.s +494f184a87175abc485a898c250c3831b2b5dcf5aead46591e00b39d1c5529fc /usr/lib/x86-mes/crt1.o +8afe05c3e1e8848b6f3e8de751524de5f69818eb8524659827918e3fddde3e1e /usr/lib/x86-mes/x86.M1 +771988b1df0dfa04bf5f1ab72af18c32b1a8205a07f10e5235d79dac0a072b00 /usr/lib/x86-mes/libmescc.s +89024362827679beffb4a70287d66609d07a3cf4a1972c1c40797bfa0324a49e /usr/lib/x86-mes/libc+tcc.s +5ea659501bda293f9297b599b1385ed4d54bab0e6daf3207fc61429adc9abc78 /usr/lib/x86-mes/libc.s +52f697278ccdff5e457f27e10f465a91ab9858f0c6cee0683831cadb3109bbb7 /usr/lib/x86-mes/libmescc.a +7c737307c870d74a309cec58f6b67fa4961d582614f3ed0f39b5794e3705794a /usr/lib/x86-mes/libc+tcc.a +db62874a6cebeb0652945cb91cb91ade9783e631aaef5ec279e11aeca6adc421 /usr/lib/x86-mes/libc.a +82cac4353375a52efecc6fda1f8b37373988fe41ed197b63d8e906321b105d77 /usr/lib/linux/x86-mes/elf32-header.hex2 +f9873d9aab12e70f24d97f8319e17a1e698ca60779ae9a6ab3ede648cd60fc61 /usr/lib/linux/x86-mes/elf32-footer-single-main.hex2 diff --git a/sysa/mes-0.25/mes-0.25.kaem b/steps/mes-0.25/pass1.kaem diff --git a/sysa/mes-0.25/sources b/steps/mes-0.25/sources diff --git a/sysc/mpc-1.2.1/mpc-1.2.1.sh b/steps/mpc-1.2.1/pass1.sh diff --git a/sysc/mpc-1.2.1/sources b/steps/mpc-1.2.1/sources diff --git a/sysc/mpfr-4.1.0/files/mparam.h b/steps/mpfr-4.1.0/files/mparam.h diff --git a/sysc/mpfr-4.1.0/mpfr-4.1.0.sh b/steps/mpfr-4.1.0/pass1.sh diff --git a/sysc/mpfr-4.1.0/sources b/steps/mpfr-4.1.0/sources diff --git a/sysa/musl-1.1.24/musl-1.1.24.sh b/steps/musl-1.1.24/pass1.sh diff --git a/steps/musl-1.1.24/pass2.sh b/steps/musl-1.1.24/pass2.sh @@ -0,0 +1 @@ +pass1.sh +\ No newline at end of file diff --git a/sysa/musl-1.1.24/binutils-rebuild.sh b/steps/musl-1.1.24/pass3.sh diff --git a/steps/musl-1.1.24/patches-pass3/avoid_set_thread_area.patch b/steps/musl-1.1.24/patches-pass3/avoid_set_thread_area.patch @@ -0,0 +1 @@ +../patches/avoid_set_thread_area.patch +\ No newline at end of file diff --git a/steps/musl-1.1.24/patches-pass3/avoid_sys_clone.patch b/steps/musl-1.1.24/patches-pass3/avoid_sys_clone.patch @@ -0,0 +1 @@ +../patches/avoid_sys_clone.patch +\ No newline at end of file diff --git a/steps/musl-1.1.24/patches-pass3/set_thread_area.patch b/steps/musl-1.1.24/patches-pass3/set_thread_area.patch @@ -0,0 +1 @@ +../patches/set_thread_area.patch +\ No newline at end of file diff --git a/steps/musl-1.1.24/patches-pass3/va_list.patch b/steps/musl-1.1.24/patches-pass3/va_list.patch @@ -0,0 +1 @@ +../patches/va_list.patch +\ No newline at end of file diff --git a/sysa/musl-1.1.24/patches/avoid_set_thread_area.patch b/steps/musl-1.1.24/patches/avoid_set_thread_area.patch diff --git a/sysa/musl-1.1.24/patches/avoid_sys_clone.patch b/steps/musl-1.1.24/patches/avoid_sys_clone.patch diff --git a/sysa/musl-1.1.24/patches/fenv.patch b/steps/musl-1.1.24/patches/fenv.patch diff --git a/sysa/musl-1.1.24/patches/makefile.patch b/steps/musl-1.1.24/patches/makefile.patch diff --git a/sysa/musl-1.1.24/patches/musl_weak_symbols.patch b/steps/musl-1.1.24/patches/musl_weak_symbols.patch diff --git a/sysa/musl-1.1.24/patches/set_thread_area.patch b/steps/musl-1.1.24/patches/set_thread_area.patch diff --git a/sysa/musl-1.1.24/patches/sigsetjmp.patch b/steps/musl-1.1.24/patches/sigsetjmp.patch diff --git a/sysa/musl-1.1.24/patches/stdio_flush_on_exit.patch b/steps/musl-1.1.24/patches/stdio_flush_on_exit.patch diff --git a/sysa/musl-1.1.24/patches/va_list.patch b/steps/musl-1.1.24/patches/va_list.patch diff --git a/sysa/musl-1.1.24/sources b/steps/musl-1.1.24/sources diff --git a/sysc/musl-1.2.4/files/__stack_chk_fail_local.c b/steps/musl-1.2.4/files/__stack_chk_fail_local.c diff --git a/sysc/musl-1.2.4/files/ld-musl-i386.path b/steps/musl-1.2.4/files/ld-musl-i386.path diff --git a/sysc/musl-1.2.4/files/ld-musl-i386.path.license b/steps/musl-1.2.4/files/ld-musl-i386.path.license diff --git a/sysa/musl-1.2.4/musl-1.2.4.sh b/steps/musl-1.2.4/pass1.sh diff --git a/steps/musl-1.2.4/pass2.sh b/steps/musl-1.2.4/pass2.sh @@ -0,0 +1 @@ +pass1.sh +\ No newline at end of file diff --git a/steps/musl-1.2.4/pass3.sh b/steps/musl-1.2.4/pass3.sh @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com> +# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> +# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_configure() { + ./configure \ + --host=i386-unknown-linux-musl \ + --prefix="${PREFIX}" \ + --libdir="${LIBDIR}" \ + --includedir="${PREFIX}/include/" +} + +src_compile() { + make "${MAKEJOBS}" CROSS_COMPILE= +} + +src_install() { + default + + # Make dynamic linker symlink relative in ${PREFIX}/lib + rm "${DESTDIR}/lib/ld-musl-i386.so.1" + rmdir "${DESTDIR}/lib" + mkdir -p "${DESTDIR}${PREFIX}/lib" + ln -sr "${DESTDIR}${LIBDIR}/libc.so" "${DESTDIR}${PREFIX}/lib/ld-musl-i386.so.1" + + # Make startup objects available in /usr/lib + # Expected by GCC 10+ + for i in crt1.o crti.o crtn.o Scrt1.o rcrt1.o; do + ln -sr "${DESTDIR}${LIBDIR}/${i}" "${DESTDIR}${PREFIX}/lib/${i}" + done + + # Add symlink for ldd + mkdir -p "${DESTDIR}${PREFIX}/bin" + ln -s ../lib/ld-musl-i386.so.1 "${DESTDIR}${PREFIX}/bin/ldd" + + # Add library search path configurtion + mkdir -p "${DESTDIR}/etc" + cp ld-musl-i386.path "${DESTDIR}/etc" +} + +src_postprocess() { + # Stripping libc can cause some strange brokenness + : +} diff --git a/steps/musl-1.2.4/patches-pass2/.keep b/steps/musl-1.2.4/patches-pass2/.keep diff --git a/steps/musl-1.2.4/patches-pass3 b/steps/musl-1.2.4/patches-pass3 @@ -0,0 +1 @@ +patches-pass2 +\ No newline at end of file diff --git a/sysa/musl-1.2.4/patches/avoid_set_thread_area.patch b/steps/musl-1.2.4/patches/avoid_set_thread_area.patch diff --git a/sysa/musl-1.2.4/patches/avoid_sys_clone.patch b/steps/musl-1.2.4/patches/avoid_sys_clone.patch diff --git a/sysa/musl-1.2.4/sources b/steps/musl-1.2.4/sources diff --git a/sysc/openssl-1.1.1l/openssl-1.1.1l.sh b/steps/openssl-1.1.1l/pass1.sh diff --git a/sysc/openssl-1.1.1l/sources b/steps/openssl-1.1.1l/sources diff --git a/sysa/patch-2.5.9/mk/main.mk b/steps/patch-2.5.9/mk/main.mk diff --git a/sysa/patch-2.5.9/patch-2.5.9.kaem b/steps/patch-2.5.9/pass1.kaem diff --git a/sysa/patch-2.5.9/patch-2.5.9.checksums b/steps/patch-2.5.9/patch-2.5.9.checksums diff --git a/sysa/patch-2.5.9/sources b/steps/patch-2.5.9/sources diff --git a/sysc/patch-2.7.6/import-gnulib.sh b/steps/patch-2.7.6/import-gnulib.sh diff --git a/sysc/patch-2.7.6/patch-2.7.6.sh b/steps/patch-2.7.6/pass1.sh diff --git a/sysc/patch-2.7.6/sources b/steps/patch-2.7.6/sources diff --git a/sysa/perl-5.000/files/config.h b/steps/perl-5.000/files/config.h diff --git a/sysa/perl-5.000/files/keywords.sh b/steps/perl-5.000/files/keywords.sh diff --git a/sysa/perl-5.000/files/opcode.awk b/steps/perl-5.000/files/opcode.awk diff --git a/sysa/perl-5.000/files/opcode.sh b/steps/perl-5.000/files/opcode.sh diff --git a/sysa/perl-5.000/mk/main.mk b/steps/perl-5.000/mk/main.mk diff --git a/sysa/perl-5.000/perl-5.000.sh b/steps/perl-5.000/pass1.sh diff --git a/sysa/perl-5.000/sources b/steps/perl-5.000/sources diff --git a/sysa/perl-5.003/files/config.h b/steps/perl-5.003/files/config.h diff --git a/sysa/perl-5.003/mk/main.mk b/steps/perl-5.003/mk/main.mk diff --git a/sysa/perl-5.003/perl-5.003.sh b/steps/perl-5.003/pass1.sh diff --git a/sysa/perl-5.003/sources b/steps/perl-5.003/sources diff --git a/sysc/perl-5.10.1/files/config.h b/steps/perl-5.10.1/files/config.h diff --git a/sysc/perl-5.10.1/files/config.sh b/steps/perl-5.10.1/files/config.sh diff --git a/sysc/perl-5.10.1/mk/main.mk b/steps/perl-5.10.1/mk/main.mk diff --git a/sysc/perl-5.10.1/perl-5.10.1.sh b/steps/perl-5.10.1/pass1.sh diff --git a/sysc/perl-5.10.1/patches/undefined_hack.patch b/steps/perl-5.10.1/patches/undefined_hack.patch diff --git a/sysc/perl-5.10.1/sources b/steps/perl-5.10.1/sources diff --git a/sysc/perl-5.32.1/perl-5.32.1.sh b/steps/perl-5.32.1/pass1.sh diff --git a/sysc/perl-5.32.1/patches/reproducibility.patch b/steps/perl-5.32.1/patches/reproducibility.patch diff --git a/sysc/perl-5.32.1/patches/reproducibility2.patch b/steps/perl-5.32.1/patches/reproducibility2.patch diff --git a/sysc/perl-5.32.1/sources b/steps/perl-5.32.1/sources diff --git a/sysa/perl-5.6.2/files/config.h b/steps/perl-5.6.2/files/config.h diff --git a/sysa/perl-5.6.2/files/config.sh b/steps/perl-5.6.2/files/config.sh diff --git a/sysa/perl-5.6.2/mk/main.mk b/steps/perl-5.6.2/mk/main.mk diff --git a/sysa/perl-5.6.2/perl-5.6.2.sh b/steps/perl-5.6.2/pass1.sh diff --git a/sysa/perl-5.6.2/sources b/steps/perl-5.6.2/sources diff --git a/sysa/perl5.004-05/files/config.h b/steps/perl5.004-05/files/config.h diff --git a/sysa/perl5.004-05/mk/main.mk b/steps/perl5.004-05/mk/main.mk diff --git a/sysa/perl5.004-05/perl5.004-05.sh b/steps/perl5.004-05/pass1.sh diff --git a/sysa/perl5.004-05/sources b/steps/perl5.004-05/sources diff --git a/sysa/perl5.005-03/files/config.h b/steps/perl5.005-03/files/config.h diff --git a/sysa/perl5.005-03/mk/main.mk b/steps/perl5.005-03/mk/main.mk diff --git a/sysa/perl5.005-03/perl5.005-03.sh b/steps/perl5.005-03/pass1.sh diff --git a/sysa/perl5.005-03/sources b/steps/perl5.005-03/sources diff --git a/sysc/pkg-config-0.29.2/pkg-config-0.29.2.sh b/steps/pkg-config-0.29.2/pass1.sh diff --git a/sysc/pkg-config-0.29.2/sources b/steps/pkg-config-0.29.2/sources diff --git a/steps/pre-network-sources b/steps/pre-network-sources @@ -0,0 +1,86 @@ +mes-0.25.tar.gz +nyacc-1.00.2.tar.gz +tcc-0.9.26.tar.gz +tcc-0.9.27.tar.bz2 +fiwix-1.4.0-lb3.tar.gz +lwext4-1.0.0-lb1.tar.gz +make-3.82.tar.bz2 +patch-2.5.9.tar.gz +gzip-1.2.4.tar.gz +tar-1.12.tar.gz +sed-4.0.9.tar.gz +bzip2-1.0.8.tar.gz +coreutils-5.0.tar.bz2 +heirloom-devtools-070527.tar.bz2 +bash-2.05b.tar.gz +flex-2.5.11.tar.gz +tcc-0.9.27.tar.bz2 +musl-1.1.24.tar.gz +tcc-0.9.27.tar.bz2 +musl-1.1.24.tar.gz +tcc-0.9.27.tar.bz2 +sed-4.0.9.tar.gz +bzip2-1.0.8.tar.gz +m4-1.4.7.tar.gz +flex-2.6.4.tar.gz +bison-3.4.1.tar.gz +bison-3.4.1.tar.gz +bison-3.4.1.tar.gz +grep-2.4.tar.gz +diffutils-2.7.tar.gz +coreutils-5.0.tar.bz2 +coreutils-6.10.tar.gz +gawk-3.0.4.tar.gz +perl-5.000.tar.gz +perl-5.003.tar.gz +perl5.004_05.tar.gz +perl5.005_03.tar.gz +perl-5.6.2.tar.gz +autoconf-2.52.tar.bz2 +automake-1.6.3.tar.bz2 +automake-1.6.3.tar.bz2 +autoconf-2.53.tar.bz2 +automake-1.7.tar.bz2 +autoconf-2.54.tar.bz2 +autoconf-2.55.tar.bz2 +automake-1.7.8.tar.bz2 +autoconf-2.57.tar.bz2 +autoconf-2.59.tar.bz2 +automake-1.8.5.tar.bz2 +help2man-1.36.4.tar.gz +autoconf-2.61.tar.bz2 +automake-1.9.6.tar.bz2 +automake-1.10.3.tar.bz2 +autoconf-2.64.tar.bz2 +automake-1.11.2.tar.bz2 +autoconf-2.69.tar.gz +libtool-2.2.4.tar.bz2 +automake-1.15.1.tar.gz +binutils-2.30.tar.bz2 +musl-1.1.24.tar.gz +tcc-0.9.27.tar.bz2 +gcc-core-4.0.4.tar.bz2 +automake-1.16.3.tar.gz +findutils-4.2.33.tar.gz +gnulib-8e128e.tar.gz +musl-1.2.4.tar.gz +gcc-core-4.0.4.tar.bz2 +automake-1.16.3.tar.gz +util-linux-2.19.1.tar.gz +e2fsprogs-1.45.7.tar.gz +CaseFolding.txt +DerivedAge.txt +DerivedCombiningClass.txt +DerivedCoreProperties.txt +NormalizationCorrections.txt +NormalizationTest.txt +UnicodeData.txt +v10.0.1.tar.gz +kbd-1.15.tar.gz +make-3.82.tar.bz2 +ed-1.4.tar.gz +bc-1.07.1.tar.gz +v2.0.22.tar.gz +linux-4.9.10.tar.gz +deblob-4.9 +curl-7.88.1.tar.bz2 diff --git a/sysc/python-2.0.1/files/disable-unicode.patch b/steps/python-2.0.1/files/disable-unicode.patch diff --git a/sysc/python-2.0.1/files/keyword.c b/steps/python-2.0.1/files/keyword.c diff --git a/sysc/python-2.0.1/files/token.c b/steps/python-2.0.1/files/token.c diff --git a/sysc/python-2.0.1/stage1.sh b/steps/python-2.0.1/pass1.sh diff --git a/sysc/python-2.0.1/stage2.sh b/steps/python-2.0.1/pass2.sh diff --git a/sysc/python-2.0.1/patches/destdir.patch b/steps/python-2.0.1/patches/destdir.patch diff --git a/sysc/python-2.0.1/patches/posixmodule.patch b/steps/python-2.0.1/patches/posixmodule.patch diff --git a/sysc/python-2.0.1/patches/undefs.patch b/steps/python-2.0.1/patches/undefs.patch diff --git a/sysc/python-2.0.1/sources b/steps/python-2.0.1/sources diff --git a/sysc/python-2.3.7/files/disable-unicode.patch b/steps/python-2.3.7/files/disable-unicode.patch diff --git a/sysc/python-2.3.7/stage1.sh b/steps/python-2.3.7/pass1.sh diff --git a/sysc/python-2.3.7/stage2.sh b/steps/python-2.3.7/pass2.sh diff --git a/sysc/python-2.3.7/patches/posixmodule.patch b/steps/python-2.3.7/patches/posixmodule.patch diff --git a/sysc/python-2.3.7/sources b/steps/python-2.3.7/sources diff --git a/sysc/python-2.5.6/files/graminit-regen.patch b/steps/python-2.5.6/files/graminit-regen.patch diff --git a/sysc/python-2.5.6/python-2.5.6.sh b/steps/python-2.5.6/pass1.sh diff --git a/sysc/python-2.5.6/patches/keyword.patch b/steps/python-2.5.6/patches/keyword.patch diff --git a/sysc/python-2.5.6/patches/pgen-timestamp.patch b/steps/python-2.5.6/patches/pgen-timestamp.patch diff --git a/sysc/python-2.5.6/patches/posixmodule.patch b/steps/python-2.5.6/patches/posixmodule.patch diff --git a/sysc/python-2.5.6/patches/sorted.patch b/steps/python-2.5.6/patches/sorted.patch diff --git a/sysc/python-2.5.6/patches/sre_constants.patch b/steps/python-2.5.6/patches/sre_constants.patch diff --git a/sysc/python-2.5.6/sources b/steps/python-2.5.6/sources diff --git a/sysc/python-3.1.5/files/graminit-regen.patch b/steps/python-3.1.5/files/graminit-regen.patch diff --git a/sysc/python-3.1.5/files/py2.patch b/steps/python-3.1.5/files/py2.patch diff --git a/sysc/python-3.1.5/stage1.sh b/steps/python-3.1.5/pass1.sh diff --git a/sysc/python-3.1.5/stage2.sh b/steps/python-3.1.5/pass2.sh diff --git a/sysc/python-3.1.5/patches/install-perms.patch b/steps/python-3.1.5/patches/install-perms.patch diff --git a/sysc/python-3.1.5/patches/openssl.patch b/steps/python-3.1.5/patches/openssl.patch diff --git a/sysc/python-3.1.5/patches/posixmodule.patch b/steps/python-3.1.5/patches/posixmodule.patch diff --git a/sysc/python-3.1.5/sources b/steps/python-3.1.5/sources diff --git a/sysc/python-3.11.1/files/Setup.local b/steps/python-3.11.1/files/Setup.local diff --git a/sysc/python-3.11.1/python-3.11.1.sh b/steps/python-3.11.1/pass1.sh diff --git a/sysc/python-3.11.1/patches/empty-date.patch b/steps/python-3.11.1/patches/empty-date.patch diff --git a/sysc/python-3.11.1/patches/multiarch.patch b/steps/python-3.11.1/patches/multiarch.patch diff --git a/sysc/python-3.11.1/sources b/steps/python-3.11.1/sources diff --git a/sysc/python-3.3.7/python-3.3.7.sh b/steps/python-3.3.7/pass1.sh diff --git a/sysc/python-3.3.7/patches/install-perms.patch b/steps/python-3.3.7/patches/install-perms.patch diff --git a/sysc/python-3.3.7/patches/symbol.patch b/steps/python-3.3.7/patches/symbol.patch diff --git a/sysc/python-3.3.7/sources b/steps/python-3.3.7/sources diff --git a/sysc/python-3.4.10/python-3.4.10.sh b/steps/python-3.4.10/pass1.sh diff --git a/sysc/python-3.4.10/patches/install-perms.patch b/steps/python-3.4.10/patches/install-perms.patch diff --git a/sysc/python-3.4.10/patches/symbol.patch b/steps/python-3.4.10/patches/symbol.patch diff --git a/sysc/python-3.4.10/sources b/steps/python-3.4.10/sources diff --git a/sysc/python-3.8.16/python-3.8.16.sh b/steps/python-3.8.16/pass1.sh diff --git a/sysc/python-3.8.16/patches/empty-date.patch b/steps/python-3.8.16/patches/empty-date.patch diff --git a/sysc/python-3.8.16/patches/maxgroups.patch b/steps/python-3.8.16/patches/maxgroups.patch diff --git a/sysc/python-3.8.16/patches/refractor.patch b/steps/python-3.8.16/patches/refractor.patch diff --git a/sysc/python-3.8.16/sources b/steps/python-3.8.16/sources diff --git a/sysa/sed-4.0.9/mk/main.mk b/steps/sed-4.0.9/mk/main.mk diff --git a/sysa/sed-4.0.9/sed-4.0.9.kaem b/steps/sed-4.0.9/pass1.kaem diff --git a/sysa/sed-4.0.9/sed-4.0.9.sh b/steps/sed-4.0.9/pass2.sh diff --git a/sysa/sed-4.0.9/sed-4.0.9.checksums b/steps/sed-4.0.9/sed-4.0.9.checksums diff --git a/sysa/sed-4.0.9/sources b/steps/sed-4.0.9/sources diff --git a/sysc/sed-4.8/import-gnulib.sh b/steps/sed-4.8/import-gnulib.sh diff --git a/sysc/sed-4.8/sed-4.8.sh b/steps/sed-4.8/pass1.sh diff --git a/sysc/sed-4.8/sources b/steps/sed-4.8/sources diff --git a/sysa/simple-patch-1.0/simple-patch-1.0.kaem b/steps/simple-patch-1.0/pass1.kaem diff --git a/sysa/simple-patch-1.0/simple-patch-1.0.x86.checksums b/steps/simple-patch-1.0/simple-patch-1.0.x86.checksums diff --git a/sysa/simple-patch-1.0/src/simple-patch.c b/steps/simple-patch-1.0/src/simple-patch.c diff --git a/sysa/tar-1.12/files/getdate_stub.c b/steps/tar-1.12/files/getdate_stub.c diff --git a/sysa/tar-1.12/files/stat_override.c b/steps/tar-1.12/files/stat_override.c diff --git a/sysa/tar-1.12/mk/main.mk b/steps/tar-1.12/mk/main.mk diff --git a/sysa/tar-1.12/tar-1.12.kaem b/steps/tar-1.12/pass1.kaem diff --git a/sysa/tar-1.12/sources b/steps/tar-1.12/sources diff --git a/sysa/tar-1.12/tar-1.12.checksums b/steps/tar-1.12/tar-1.12.checksums diff --git a/sysc/tar-1.34/import-gnulib.sh b/steps/tar-1.34/import-gnulib.sh diff --git a/sysc/tar-1.34/tar-1.34.sh b/steps/tar-1.34/pass1.sh diff --git a/sysc/tar-1.34/sources b/steps/tar-1.34/sources diff --git a/steps/tcc-0.9.26/pass1.kaem b/steps/tcc-0.9.26/pass1.kaem @@ -0,0 +1,333 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +# Vars +MES_STACK=15000000 +MES_ARENA=30000000 +MES_MAX_ARENA=30000000 +MES_LIB=${MES_PREFIX}/lib +MES_SOURCE=${MES_PREFIX} +MES=${BINDIR}/mes + +TCC_TAR=tcc-0.9.26 +TCC_PKG=tcc-0.9.26-1147-gee75a10c + +# Check tarball checksums +checksum-transcriber sources +sha256sum -c sources.SHA256SUM + +# Unpack +mkdir src build + +cd src +ungz --file ${DISTFILES}/${TCC_TAR}.tar.gz --output ${TCC_TAR}.tar +ungz --file ${DISTFILES}/${MES_PKG}.tar.gz --output ${MES_PKG}.tar +cd .. + +cd build +untar --non-strict --file ../src/${TCC_TAR}.tar +simple-patch ${TCC_PKG}/tcctools.c \ + ../simple-patches/remove-fileopen.before ../simple-patches/remove-fileopen.after +simple-patch ${TCC_PKG}/tcctools.c \ + ../simple-patches/addback-fileopen.before ../simple-patches/addback-fileopen.after + +untar --non-strict --file ../src/${MES_PKG}.tar + +# Create config.h +catm ${MES_PKG}/include/mes/config.h +catm ${TCC_PKG}/config.h +cd ${TCC_PKG} + +if match ${ARCH} x86; then + MES_ARCH=x86 + TCC_TARGET_ARCH=I386 + MES_LIBC_SUFFIX=gcc + HAVE_LONG_LONG=0 +fi +if match ${ARCH} amd64; then + MES_ARCH=x86_64 + TCC_TARGET_ARCH=X86_64 + MES_LIBC_SUFFIX=gcc + HAVE_LONG_LONG=1 +fi +if match ${ARCH} riscv64; then + MES_ARCH=riscv64 + TCC_TARGET_ARCH=RISCV64 + MES_LIBC_SUFFIX=tcc + HAVE_LONG_LONG=1 +fi + + +${MES} --no-auto-compile -e main ${BINDIR}/mescc.scm -- \ + -S \ + -o tcc.s \ + -I ${INCDIR} \ + -D BOOTSTRAP=1 \ + -D HAVE_LONG_LONG=${HAVE_LONG_LONG} \ + -I . \ + -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ + -D inline= \ + -D CONFIG_TCCDIR=\"${LIBDIR}/tcc\" \ + -D CONFIG_SYSROOT=\"/\" \ + -D CONFIG_TCC_CRTPREFIX=\"${LIBDIR}\" \ + -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ + -D CONFIG_TCC_SYSINCLUDEPATHS=\"${PREFIX}/include/mes\" \ + -D TCC_LIBGCC=\"${LIBDIR}/libc.a\" \ + -D CONFIG_TCC_LIBTCC1_MES=0 \ + -D CONFIG_TCCBOOT=1 \ + -D CONFIG_TCC_STATIC=1 \ + -D CONFIG_USE_LIBGCC=1 \ + -D TCC_VERSION=\"0.9.26\" \ + -D ONE_SOURCE=1 \ + tcc.c +${MES} --no-auto-compile -e main ${BINDIR}/mescc.scm -- \ + --base-address 0x08048000 \ + -o tcc-mes \ + -L ${LIBDIR} \ + tcc.s \ + -l c+tcc +cp tcc-mes ${BINDIR}/ +chmod 755 ${BINDIR}/tcc-mes + +# test tcc-mes +tcc-mes -version + +# Recompile the mes C library +cd ../${MES_PKG} + +# Create unified libc file +cd lib +catm ../unified-libc.c ctype/isalnum.c ctype/isalpha.c ctype/isascii.c ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c ctype/islower.c ctype/isnumber.c ctype/isprint.c ctype/ispunct.c ctype/isspace.c ctype/isupper.c ctype/isxdigit.c ctype/tolower.c ctype/toupper.c dirent/closedir.c dirent/__getdirentries.c dirent/opendir.c dirent/readdir.c linux/access.c linux/brk.c linux/chdir.c linux/chmod.c linux/clock_gettime.c linux/close.c linux/dup2.c linux/dup.c linux/execve.c linux/fcntl.c linux/fork.c linux/fsync.c linux/fstat.c linux/_getcwd.c linux/getdents.c linux/getegid.c linux/geteuid.c linux/getgid.c linux/getpid.c linux/getppid.c linux/getrusage.c linux/gettimeofday.c linux/getuid.c linux/ioctl.c linux/ioctl3.c linux/kill.c linux/link.c linux/lseek.c linux/lstat.c linux/malloc.c linux/mkdir.c linux/mknod.c linux/nanosleep.c linux/_open3.c linux/pipe.c linux/_read.c linux/readlink.c linux/rename.c linux/rmdir.c linux/setgid.c linux/settimer.c linux/setuid.c linux/signal.c linux/sigprogmask.c linux/symlink.c linux/stat.c linux/time.c linux/unlink.c linux/waitpid.c linux/wait4.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/_exit.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/syscall.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/_write.c math/ceil.c math/fabs.c math/floor.c mes/abtod.c mes/abtol.c mes/__assert_fail.c mes/assert_msg.c mes/__buffered_read.c mes/__init_io.c mes/cast.c mes/dtoab.c mes/eputc.c mes/eputs.c mes/fdgetc.c mes/fdgets.c mes/fdputc.c mes/fdputs.c mes/fdungetc.c mes/globals.c mes/itoa.c mes/ltoab.c mes/ltoa.c mes/__mes_debug.c mes/mes_open.c mes/ntoab.c mes/oputc.c mes/oputs.c mes/search-path.c mes/ultoa.c mes/utoa.c posix/alarm.c posix/buffered-read.c posix/execl.c posix/execlp.c posix/execv.c posix/execvp.c posix/getcwd.c posix/getenv.c posix/isatty.c posix/mktemp.c posix/open.c posix/raise.c posix/sbrk.c posix/setenv.c posix/sleep.c posix/unsetenv.c posix/wait.c posix/write.c stdio/clearerr.c stdio/fclose.c stdio/fdopen.c stdio/feof.c stdio/ferror.c stdio/fflush.c stdio/fgetc.c stdio/fgets.c stdio/fileno.c stdio/fopen.c stdio/fprintf.c stdio/fputc.c stdio/fputs.c stdio/fread.c stdio/freopen.c stdio/fscanf.c stdio/fseek.c stdio/ftell.c stdio/fwrite.c stdio/getc.c stdio/getchar.c stdio/perror.c stdio/printf.c stdio/putc.c stdio/putchar.c stdio/remove.c stdio/snprintf.c stdio/sprintf.c stdio/sscanf.c stdio/ungetc.c stdio/vfprintf.c stdio/vfscanf.c stdio/vprintf.c stdio/vsnprintf.c stdio/vsprintf.c stdio/vsscanf.c stdlib/abort.c stdlib/abs.c stdlib/alloca.c stdlib/atexit.c stdlib/atof.c stdlib/atoi.c stdlib/atol.c stdlib/calloc.c stdlib/__exit.c stdlib/exit.c stdlib/free.c stdlib/mbstowcs.c stdlib/puts.c stdlib/qsort.c stdlib/realloc.c stdlib/strtod.c stdlib/strtof.c stdlib/strtol.c stdlib/strtold.c stdlib/strtoll.c stdlib/strtoul.c stdlib/strtoull.c string/bcmp.c string/bcopy.c string/bzero.c string/index.c string/memchr.c string/memcmp.c string/memcpy.c string/memmem.c string/memmove.c string/memset.c string/rindex.c string/strcat.c string/strchr.c string/strcmp.c string/strcpy.c string/strcspn.c string/strdup.c string/strerror.c string/strlen.c string/strlwr.c string/strncat.c string/strncmp.c string/strncpy.c string/strpbrk.c string/strrchr.c string/strspn.c string/strstr.c string/strupr.c stub/atan2.c stub/bsearch.c stub/chown.c stub/__cleanup.c stub/cos.c stub/ctime.c stub/exp.c stub/fpurge.c stub/freadahead.c stub/frexp.c stub/getgrgid.c stub/getgrnam.c stub/getlogin.c stub/getpgid.c stub/getpgrp.c stub/getpwnam.c stub/getpwuid.c stub/gmtime.c stub/ldexp.c stub/localtime.c stub/log.c stub/mktime.c stub/modf.c stub/mprotect.c stub/pclose.c stub/popen.c stub/pow.c stub/rand.c stub/rewind.c stub/setbuf.c stub/setgrent.c stub/setlocale.c stub/setvbuf.c stub/sigaction.c stub/sigaddset.c stub/sigblock.c stub/sigdelset.c stub/sigemptyset.c stub/sigsetmask.c stub/sin.c stub/sys_siglist.c stub/system.c stub/sqrt.c stub/strftime.c stub/times.c stub/ttyname.c stub/umask.c stub/utime.c ${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/setjmp.c +cd .. + +# crt1.o +tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c + +catm ${LIBDIR}/crtn.o +catm ${LIBDIR}/crti.o +if match ${ARCH} x86; then + # crtn.o + tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c + + # crti.o + tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c +fi + +# libc+gcc.a +tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c +tcc-mes -ar cr ${LIBDIR}/libc.a unified-libc.o + +# libtcc1.a +mkdir ${LIBDIR}/tcc +tcc-mes -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c +if match ${ARCH} riscv64; then + tcc-mes -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c + tcc-mes -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o lib-arm64.o +else + tcc-mes -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o +fi + +# libgetopt.a +tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} lib/posix/getopt.c +tcc-mes -ar cr ${LIBDIR}/libgetopt.a getopt.o + +cd ../${TCC_PKG} + +# boot0 (ref comments here for all boot*) +# compile +tcc-mes \ + -g \ + -v \ + -static \ + -o tcc-boot0 \ + -D BOOTSTRAP=1 \ + -D HAVE_FLOAT=1 \ + -D HAVE_BITFIELD=1 \ + -D HAVE_LONG_LONG=1 \ + -D HAVE_SETJMP=1 \ + -I . \ + -I ${PREFIX}/include/mes \ + -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ + -D CONFIG_TCCDIR=\"${LIBDIR}/tcc\" \ + -D CONFIG_TCC_CRTPREFIX=\"${LIBDIR}\" \ + -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ + -D CONFIG_TCC_LIBPATHS=\"${LIBDIR}:${LIBDIR}/tcc\" \ + -D CONFIG_TCC_SYSINCLUDEPATHS=\"${PREFIX}/include/mes\" \ + -D TCC_LIBGCC=\"${LIBDIR}/libc.a\" \ + -D TCC_LIBTCC1=\"libtcc1.a\" \ + -D CONFIG_TCCBOOT=1 \ + -D CONFIG_TCC_STATIC=1 \ + -D CONFIG_USE_LIBGCC=1 \ + -D TCC_VERSION=\"0.9.26\" \ + -D ONE_SOURCE=1 \ + -L . \ + -L ${LIBDIR} \ + tcc.c +# Install +cp tcc-boot0 ${BINDIR}/ +chmod 755 ${BINDIR}/tcc-boot0 +cd ../${MES_PKG} +# Recompile libc: crt{1,n,i}, libtcc.a, libc.a +tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c +if match ${ARCH} x86; then + tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c + tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c +fi + +tcc-boot0 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c +if match ${ARCH} riscv64; then + tcc-boot0 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c + tcc-boot0 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o lib-arm64.o +else + tcc-boot0 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o +fi + +tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c +tcc-boot0 -ar cr ${LIBDIR}/libc.a unified-libc.o +cd ../${TCC_PKG} + +# Test boot0 +tcc-boot0 -version + +# boot1 +tcc-boot0 \ + -g \ + -v \ + -static \ + -o tcc-boot1 \ + -D BOOTSTRAP=1 \ + -D HAVE_FLOAT=1 \ + -D HAVE_BITFIELD=1 \ + -D HAVE_LONG_LONG=1 \ + -D HAVE_SETJMP=1 \ + -I . \ + -I ${PREFIX}/include/mes \ + -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ + -D CONFIG_TCCDIR=\"${LIBDIR}/tcc\" \ + -D CONFIG_TCC_CRTPREFIX=\"${LIBDIR}\" \ + -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ + -D CONFIG_TCC_LIBPATHS=\"${LIBDIR}:${LIBDIR}/tcc\" \ + -D CONFIG_TCC_SYSINCLUDEPATHS=\"${PREFIX}/include/mes\" \ + -D TCC_LIBGCC=\"${LIBDIR}/libc.a\" \ + -D TCC_LIBTCC1=\"libtcc1.a\" \ + -D CONFIG_TCCBOOT=1 \ + -D CONFIG_TCC_STATIC=1 \ + -D CONFIG_USE_LIBGCC=1 \ + -D TCC_VERSION=\"0.9.26\" \ + -D ONE_SOURCE=1 \ + -L . \ + tcc.c +cp tcc-boot1 ${BINDIR} +chmod 755 ${BINDIR}/tcc-boot1 +cd ../${MES_PKG} +tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c +if match ${ARCH} x86; then + tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c + tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c +fi + +tcc-boot1 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c +if match ${ARCH} riscv64; then + tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c + tcc-boot1 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o lib-arm64.o +else + tcc-boot1 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o +fi + +tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c +tcc-boot1 -ar cr ${LIBDIR}/libc.a unified-libc.o +cd ../${TCC_PKG} + +# Test boot1 +tcc-boot1 -version + +# boot2 +tcc-boot1 \ + -g \ + -v \ + -static \ + -o tcc-boot2 \ + -D BOOTSTRAP=1 \ + -D HAVE_BITFIELD=1 \ + -D HAVE_FLOAT=1 \ + -D HAVE_LONG_LONG=1 \ + -D HAVE_SETJMP=1 \ + -I . \ + -I ${PREFIX}/include/mes \ + -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ + -D CONFIG_TCCDIR=\"${LIBDIR}/tcc\" \ + -D CONFIG_TCC_CRTPREFIX=\"${LIBDIR}\" \ + -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ + -D CONFIG_TCC_LIBPATHS=\"${LIBDIR}:${LIBDIR}/tcc\" \ + -D CONFIG_TCC_SYSINCLUDEPATHS=\"${PREFIX}/include/mes\" \ + -D TCC_LIBGCC=\"${LIBDIR}/libc.a\" \ + -D TCC_LIBTCC1=\"libtcc1.a\" \ + -D CONFIG_TCCBOOT=1 \ + -D CONFIG_TCC_STATIC=1 \ + -D CONFIG_USE_LIBGCC=1 \ + -D TCC_VERSION=\"0.9.26\" \ + -D ONE_SOURCE=1 \ + -L . \ + tcc.c +cp tcc-boot2 ${BINDIR} +chmod 755 ${BINDIR}/tcc-boot2 +cd ../${MES_PKG} +tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c +if match ${ARCH} x86; then + tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c + tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c +fi + +tcc-boot2 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c +if match ${ARCH} riscv64; then + tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c + tcc-boot2 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o lib-arm64.o +else + tcc-boot2 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o +fi + +tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c +tcc-boot2 -ar cr ${LIBDIR}/libc.a unified-libc.o +cd ../${TCC_PKG} + +# Test boot2 +tcc-boot2 -version + +# We have our final tcc 0.9.26! +cp ${BINDIR}/tcc-boot2 ${BINDIR}/tcc +chmod 755 ${BINDIR}/tcc +rm ${BINDIR}/tcc-boot2 +cp ${BINDIR}/tcc ${BINDIR}/tcc-0.9.26 +chmod 755 ${BINDIR}/tcc-0.9.26 + +# Also recompile getopt, we don't need to do this during the boot* stages +# because nothing is linked against it +cd ../${MES_PKG} +tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} lib/posix/getopt.c +tcc -ar cr ${LIBDIR}/libgetopt.a getopt.o + +cd ../.. + +# Checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/tcc-mes \ + /usr/bin/tcc-boot0 \ + /usr/bin/tcc-boot1 \ + /usr/bin/tcc \ + /usr/lib/mes/libc.a \ + /usr/lib/mes/libgetopt.a \ + /usr/lib/mes/crt1.o \ + /usr/lib/mes/crti.o \ + /usr/lib/mes/crtn.o \ + /usr/lib/mes/tcc/libtcc1.a + + cp ${pkg}.checksums ${SRCDIR} +else + sha256sum -c ${pkg}.${ARCH}.checksums +fi diff --git a/sysa/tcc-0.9.26/simple-patches/addback-fileopen.after b/steps/tcc-0.9.26/simple-patches/addback-fileopen.after diff --git a/sysa/tcc-0.9.26/simple-patches/addback-fileopen.before b/steps/tcc-0.9.26/simple-patches/addback-fileopen.before diff --git a/sysa/tcc-0.9.26/simple-patches/remove-fileopen.after b/steps/tcc-0.9.26/simple-patches/remove-fileopen.after diff --git a/sysa/tcc-0.9.26/simple-patches/remove-fileopen.before b/steps/tcc-0.9.26/simple-patches/remove-fileopen.before diff --git a/sysa/tcc-0.9.26/sources b/steps/tcc-0.9.26/sources diff --git a/sysa/tcc-0.9.26/tcc-0.9.26.riscv64.checksums b/steps/tcc-0.9.26/tcc-0.9.26.riscv64.checksums diff --git a/steps/tcc-0.9.26/tcc-0.9.26.x86.checksums b/steps/tcc-0.9.26/tcc-0.9.26.x86.checksums @@ -0,0 +1,10 @@ +f3c51ecb0e5d0865822dd0e83dc459ccfd2576ecad845bc888558ab010e2a609 /usr/bin/tcc-mes +b758fff28f3d03b057b0414eb92da0c46e22bc8e9da29af33fbe65b01047d25d /usr/bin/tcc-boot0 +56e267e3031f548ea155d61a97fc3e6e8fff277159d7ae3273820a8c0f4582a0 /usr/bin/tcc-boot1 +3404d1e8f61be09c1caeba03dcf99abae8881a485fe13160e6bb5fe44538d378 /usr/bin/tcc +3bfd10dfe347c4fb40fbf5f2f705cd806c77e0f80cf4ad1ecfd4beddada2937c /usr/lib/mes/libc.a +12c07ae103e7e3b390150a79e5c600d88de14e9bb73a066f6342582729ef5a3f /usr/lib/mes/libgetopt.a +76d280e0733f2c84aad180968167d789a825ac56526bddba4f100d6d74851027 /usr/lib/mes/crt1.o +09d4f9821a2566f7e56381a19259c41bd97f3c5ed83f490705acbfd1139a7736 /usr/lib/mes/crti.o +461ca1494737fab86fe1c1d3addeaf9d0ece413e353abcdea8674db3f700cda3 /usr/lib/mes/crtn.o +136f97c356445ef95c35ae1b6fb2f7a0546e3cf47b45cb4ee79d0a8f29cd04b4 /usr/lib/mes/tcc/libtcc1.a diff --git a/sysa/tcc-0.9.27/tcc-0.9.27.kaem b/steps/tcc-0.9.27/pass1.kaem diff --git a/sysa/tcc-0.9.27/tcc-mes-pass2.sh b/steps/tcc-0.9.27/pass2.sh diff --git a/sysa/tcc-0.9.27/tcc-musl-pass1.sh b/steps/tcc-0.9.27/pass3.sh diff --git a/sysa/tcc-0.9.27/tcc-musl-pass2.sh b/steps/tcc-0.9.27/pass4.sh diff --git a/sysa/tcc-0.9.27/tcc-musl-pass3.sh b/steps/tcc-0.9.27/pass5.sh diff --git a/steps/tcc-0.9.27/patches-pass5/ignore-static-inside-array.patch b/steps/tcc-0.9.27/patches-pass5/ignore-static-inside-array.patch @@ -0,0 +1 @@ +../patches/ignore-static-inside-array.patch +\ No newline at end of file diff --git a/steps/tcc-0.9.27/patches-pass5/static-link.patch b/steps/tcc-0.9.27/patches-pass5/static-link.patch @@ -0,0 +1 @@ +../patches/static-link.patch +\ No newline at end of file diff --git a/sysa/tcc-0.9.27/patches/ignore-duplicate-symbols.patch b/steps/tcc-0.9.27/patches/ignore-duplicate-symbols.patch diff --git a/sysa/tcc-0.9.27/patches/ignore-static-inside-array.patch b/steps/tcc-0.9.27/patches/ignore-static-inside-array.patch diff --git a/sysa/tcc-0.9.27/patches/static-link.patch b/steps/tcc-0.9.27/patches/static-link.patch diff --git a/sysa/tcc-0.9.27/simple-patches/addback-fileopen.after b/steps/tcc-0.9.27/simple-patches/addback-fileopen.after diff --git a/sysa/tcc-0.9.27/simple-patches/addback-fileopen.before b/steps/tcc-0.9.27/simple-patches/addback-fileopen.before diff --git a/sysa/tcc-0.9.27/simple-patches/check-reloc-null.after b/steps/tcc-0.9.27/simple-patches/check-reloc-null.after diff --git a/sysa/tcc-0.9.27/simple-patches/check-reloc-null.before b/steps/tcc-0.9.27/simple-patches/check-reloc-null.before diff --git a/sysa/tcc-0.9.27/simple-patches/fiwix-paddr.after b/steps/tcc-0.9.27/simple-patches/fiwix-paddr.after diff --git a/sysa/tcc-0.9.27/simple-patches/fiwix-paddr.before b/steps/tcc-0.9.27/simple-patches/fiwix-paddr.before diff --git a/sysa/tcc-0.9.27/simple-patches/remove-fileopen.after b/steps/tcc-0.9.27/simple-patches/remove-fileopen.after diff --git a/sysa/tcc-0.9.27/simple-patches/remove-fileopen.before b/steps/tcc-0.9.27/simple-patches/remove-fileopen.before diff --git a/sysa/tcc-0.9.27/sources b/steps/tcc-0.9.27/sources diff --git a/steps/tcc-0.9.27/tcc-0.9.27.checksums b/steps/tcc-0.9.27/tcc-0.9.27.checksums @@ -0,0 +1 @@ +f81f0cb4d77be9b724f6afcca966811fb347010b21aee6eb39dc2caf9f287e07 /usr/bin/tcc diff --git a/sysc/texinfo-6.7/import-gnulib.sh b/steps/texinfo-6.7/import-gnulib.sh diff --git a/sysc/texinfo-6.7/texinfo-6.7.sh b/steps/texinfo-6.7/pass1.sh diff --git a/sysc/texinfo-6.7/sources b/steps/texinfo-6.7/sources diff --git a/sysa/util-linux-2.19.1/util-linux-2.19.1.sh b/steps/util-linux-2.19.1/pass1.sh diff --git a/sysa/util-linux-2.19.1/patches/broken-programs.patch b/steps/util-linux-2.19.1/patches/broken-programs.patch diff --git a/sysa/util-linux-2.19.1/patches/disable-tests.patch b/steps/util-linux-2.19.1/patches/disable-tests.patch diff --git a/sysa/util-linux-2.19.1/patches/headers-bsd.patch b/steps/util-linux-2.19.1/patches/headers-bsd.patch diff --git a/sysa/util-linux-2.19.1/patches/headers-gpl2.patch b/steps/util-linux-2.19.1/patches/headers-gpl2.patch diff --git a/sysa/util-linux-2.19.1/patches/headers.patch b/steps/util-linux-2.19.1/patches/headers.patch diff --git a/sysa/util-linux-2.19.1/patches/pkg-config.patch b/steps/util-linux-2.19.1/patches/pkg-config.patch diff --git a/sysa/util-linux-2.19.1/sources b/steps/util-linux-2.19.1/sources diff --git a/sysc/which-2.21/which-2.21.sh b/steps/which-2.21/pass1.sh diff --git a/sysc/which-2.21/sources b/steps/which-2.21/sources diff --git a/sysc/xz-5.4.1/xz-5.4.1.sh b/steps/xz-5.4.1/pass1.sh diff --git a/sysc/xz-5.4.1/sources b/steps/xz-5.4.1/sources diff --git a/sysc/zlib-1.2.13/zlib-1.2.13.sh b/steps/zlib-1.2.13/pass1.sh diff --git a/sysc/zlib-1.2.13/sources b/steps/zlib-1.2.13/sources diff --git a/sysa.py b/sysa.py @@ -1,227 +0,0 @@ -#!/usr/bin/env python3 -"""System A""" -# SPDX-License-Identifier: GPL-3.0-or-later -# SPDX-FileCopyrightText: 2022-2023 Dor Askayo <dor.askayo@gmail.com> -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com> -# SPDX-FileCopyrightText: 2021-23 fosslinux <fosslinux@aussies.space> - -import os -# pylint: disable=deprecated-module -from distutils.dir_util import copy_tree -import shutil -import tarfile - -from lib.sysgeneral import SysGeneral, stage0_arch_map - -# pylint: disable=consider-using-with -# pylint: disable=too-many-instance-attributes -class SysA(SysGeneral): - """ - Class responsible for preparing sources for System A. - """ - - git_dir = os.path.dirname(os.path.join(__file__)) - sys_dir = os.path.join(git_dir, 'sysa') - sysb_dir = os.path.join(git_dir, 'sysb') - sysc_dir = os.path.join(git_dir, 'sysc') - cache_dir = os.path.join(sys_dir, 'distfiles') - - # pylint: disable=too-many-arguments - def __init__(self, tmpdir, arch, external_sources, - early_preseed, repo_path): - self.arch = arch - self.early_preseed = early_preseed - self.external_sources = external_sources - self.repo_path = repo_path - - self.tmp_dir = tmpdir.add_sys("sysa") - - def prepare(self, create_initramfs, kernel_bootstrap=False): - """ - Prepare directory structure for System A. - We create an empty tmp directory, unpack stage0-posix. - Rest of the files are unpacked into more structured directory /sysa - """ - if self.early_preseed: - # Extract tar containing preseed - with tarfile.open(self.early_preseed, "r") as seed: - seed.extractall(self.tmp_dir) - shutil.copy2(os.path.join(self.sys_dir, 'base-preseeded.kaem'), - os.path.join(self.tmp_dir, 'kaem.x86')) - else: - self.stage0_posix() - - self.sysa() - - # sysb must be added to sysa as it is another initramfs stage - self.sysb() - - self.sysc(create_initramfs) - - if kernel_bootstrap: - self.create_fiwix_file_list() - self.create_builder_hex0_disk_image(os.path.join(self.tmp_dir, 'sysa.img')) - return - - if self.repo_path: - repo_dir = os.path.join(self.tmp_dir, 'usr', 'src', 'repo-preseeded') - shutil.copytree(self.repo_path, repo_dir) - - if create_initramfs: - self.make_initramfs() - - def sysa(self): - """Copy in sysa files for sysa.""" - source_manifest = self.get_source_manifest() - self.get_packages(source_manifest) - - shutil.copytree(self.sys_dir, os.path.join(self.tmp_dir, 'sysa'), - ignore=shutil.ignore_patterns('tmp')) - - def sysb(self): - """Copy in sysb files for sysb.""" - shutil.copytree(self.sysb_dir, os.path.join(self.tmp_dir, 'sysb'), - ignore=shutil.ignore_patterns('tmp')) - - def sysc(self, create_initramfs): - """Copy in sysc files for sysc.""" - if create_initramfs or not self.external_sources: - ignore = shutil.ignore_patterns('tmp', 'distfiles') - else: - ignore = shutil.ignore_patterns('tmp') - shutil.copytree(self.sysc_dir, os.path.join(self.tmp_dir, 'sysc'), - ignore=ignore) - - def stage0_posix(self): - """Copy in all of the stage0-posix""" - stage0_posix_base_dir = os.path.join(self.sys_dir, 'stage0-posix', 'src') - copy_tree(stage0_posix_base_dir, self.tmp_dir) - - arch = stage0_arch_map.get(self.arch, self.arch) - kaem_optional_seed = os.path.join(self.sys_dir, 'stage0-posix', 'src', 'bootstrap-seeds', - 'POSIX', arch, 'kaem-optional-seed') - shutil.copy2(kaem_optional_seed, os.path.join(self.tmp_dir, 'init')) - - # stage0-posix hook to continue running live-bootstrap - shutil.copy2(os.path.join(self.sys_dir, 'after.kaem'), - os.path.join(self.tmp_dir, 'after.kaem')) - - def add_fiwix_files(self, file_list_path, dirpath): - """Add files to the list to populate Fiwix file system""" - for root, _, filepaths in os.walk(dirpath): - if 'stage0-posix' in root: - continue - if root == os.path.join('sysc', 'distfiles'): - continue - with open(file_list_path, 'a', encoding="utf-8") as file_list: - for filepath in filepaths: - file_list.write(f"/{os.path.join(root, filepath)}\n") - - def create_fiwix_file_list(self): - """Create a list of files to populate Fiwix file system""" - file_list_path = os.path.join(self.tmp_dir, 'sysa', 'lwext4-1.0.0-lb1', - 'files', 'fiwix-file-list.txt') - shutil.copyfile(os.path.join(self.tmp_dir, 'sysa', 'lwext4-1.0.0-lb1', - 'files', 'early-artifacts-needed-after-fiwix.txt'), - file_list_path) - - save_cwd = os.getcwd() - self.add_fiwix_files(file_list_path, 'sysa') - self.add_fiwix_files(file_list_path, 'sysb') - self.add_fiwix_files(file_list_path, 'sysc') - os.chdir(save_cwd) - - @staticmethod - def output_dir(srcfs_file, dirpath): - """Add a directory to srcfs file system""" - srcline = f"src 0 {dirpath}\n" - srcfs_file.write(srcline.encode()) - - @staticmethod - def output_file(srcfs_file, filepath): - """Add a file to srcfs file system""" - srcline = f"src {os.path.getsize(filepath)} {filepath}\n" - srcfs_file.write(srcline.encode()) - with open(filepath, 'rb') as srcfile: - srcfs_file.write(srcfile.read()) - - def output_tree(self, srcfs_file, treepath): - """Add a tree of files to srcfs file system""" - self.output_dir(srcfs_file, treepath) - for root, dirs, files in os.walk(treepath): - if ".git" in root: - continue - for dirpath in dirs: - if ".git" in dirpath: - continue - self.output_dir(srcfs_file, os.path.join(root, dirpath)) - - for filepath in files: - if ".git" in filepath: - continue - self.output_file(srcfs_file, os.path.join(root, filepath)) - - def append_srcfs(self, image_file): - """Append srcfs file system to sysa disk image""" - save_cwd = os.getcwd() - - os.chdir(os.path.join(self.tmp_dir, 'sysa', 'stage0-posix', 'src')) - self.output_tree(image_file, '.') - - os.chdir(self.tmp_dir) - shutil.move(os.path.join('sysa', 'stage0-posix'), '.') - self.output_tree(image_file, 'sysa') - self.output_tree(image_file, 'sysb') - self.output_tree(image_file, 'sysc') - shutil.move('stage0-posix', 'sysa') - shutil.copyfile(os.path.join('sysa', 'after.kaem'), 'after.kaem') - self.output_file(image_file, 'after.kaem') - - # Add commands to kick off stage0-posix - cmd = ' '.join(['hex0', - './bootstrap-seeds/POSIX/x86/hex0_x86.hex0', - './bootstrap-seeds/POSIX/x86/hex0-seed\n']) - image_file.write(cmd.encode()) - cmd = ' '.join(['hex0', - './bootstrap-seeds/POSIX/x86/kaem-minimal.hex0', - './bootstrap-seeds/POSIX/x86/kaem-optional-seed\n']) - image_file.write(cmd.encode()) - cmd = ' '.join(['./bootstrap-seeds/POSIX/x86/kaem-optional-seed', './kaem.x86\n']) - image_file.write(cmd.encode()) - - os.chdir(save_cwd) - - def create_builder_hex0_disk_image(self, image_file_name): - """Create builder-hex0 disk image""" - shutil.copyfile(os.path.join('sysa', 'stage0-posix', 'src', 'bootstrap-seeds', - 'NATIVE', 'x86', 'builder-hex0-x86-stage1.img'), - image_file_name) - - with open(image_file_name, 'ab') as image_file: - # Append stage2 hex0 source - with open(os.path.join('kernel-bootstrap', 'builder-hex0-x86-stage2.hex0'), - encoding="utf-8") as infile: - image_file.write(infile.read().encode()) - # Pad to next sector - current_size = os.stat(image_file_name).st_size - while current_size % 512 != 0: - image_file.write(b'\0') - current_size += 1 - self.append_srcfs(image_file) - - current_size = os.stat(image_file_name).st_size - - megabyte = 1024 * 1024 - # fill file with zeros up to next megabyte - extra = current_size % megabyte - round_up = megabyte - extra - with open(image_file_name, 'ab') as image_file: - image_file.write(b'\0' * round_up) - current_size += round_up - - # fill file with zeros up to desired size, one megabyte at a time - with open(image_file_name, 'ab') as image_file: - while current_size < 16384 * megabyte: - image_file.write(b'\0' * megabyte) - current_size += megabyte diff --git a/sysa/SHA256SUMS.pkgs b/sysa/SHA256SUMS.pkgs @@ -1,118 +0,0 @@ -2dac610769286171ca81e736d729f5227938596cf44a0a8a764009715c55d23b autoconf-2.52_0.tar.bz2 -7345a49227ed69774e01097c514f1ebd3abaeed0b2b9136b7f5ee1b0fe573390 autoconf-2.53_0.tar.bz2 -6acc512d0a0ea3a860f708893a157609b93947c257df25ae324230c5aeca405e autoconf-2.54_0.tar.bz2 -234e67c19653777fed7779c0c88c7592ca21d916b3e08eb366f85ed0f3ad6a9a autoconf-2.55_0.tar.bz2 -8881440a9d105ca313eaa2149e7eb89263284bd5cef7bbdd953da9ca79997879 autoconf-2.57_0.tar.bz2 -35925617e155087cc34bd71bd609d49098dedf7c051cac5c231eac19852d247f autoconf-2.59_0.tar.bz2 -8912ae2a24ea40a7cd3ccab5e97dd109db7be4a86f40458ac836568aa7437b6a autoconf-2.61_0.tar.bz2 -d5fcce4baea5e11f983a7e4b7148545ab6720bb4e010898c73387f6711be67f4 autoconf-2.64_0.tar.bz2 -298dcf17a439adb306237b308e3c4ed3d376cb863ae0f0f08bfdf1f3199a548b autoconf-2.69_0.tar.bz2 -8c2401edf1c68910005bbcb8b8e84727a46f7d9643d2ad1267bd0259078dadc4 autoconf-2.71_0.tar.bz2 -6ff691e3ddd4f3d1796d28b07a2a96691dbd9801844c99ccbe660da59dabd74b autoconf-archive-2021.02.19_0.tar.bz2 -6a5cc1eb9ebc7e0ace8365e4c4aad5607ad1878ec9a90b384b55f8399cdbcb14 autogen-5.18.16_0.tar.bz2 -02a426e82a52d4a2cd7e73fe3dc5a2c58b3ed100f24a92c57e42511fd86e247c automake-1.10.3_0.tar.bz2 -34925adeaa2876a5e068adeb17b71fe7c7105244c3cb5439d33f7406310674da automake-1.11.2_0.tar.bz2 -a7bd12bd0c639783ce1c0e9f640cf004a87460bbda8154bc550c5e6884457b48 automake-1.15.1_0.tar.bz2 -57100612d902537b72ee2fd3dfecc903f2ea3959f1a480af87c6a1ef9a9d7c03 automake-1.16.3_0.tar.bz2 -1c7e09ac08f156960420fca1f6e8560c1855bf01b001a0648b56153d6ceb9c28 automake-1.6.3_0.tar.bz2 -444131776779d1f27628088a817bfb8c9aa85f4b036b934794a71e484ec9bd70 automake-1.6.3_1.tar.bz2 -e8ff13753943e43972a8cf1672819f001718ed38e5497cf7b554c21a507ba22b automake-1.7.8_0.tar.bz2 -ef08694bf8e78ffcf56f9c8a63b0f189e301c06f02ab240e15e4c7fe354c2a0d automake-1.7_0.tar.bz2 -9922651b64ad2e29b944082f26db223008220155048f25d64df1f6d82071ff1c automake-1.8.5_0.tar.bz2 -c5807850a377e4bb9aa4121d9781d145bdd80327626a9419630a75ce2c8d9c71 automake-1.9.6_0.tar.bz2 -5078d40dbdf5910cf9e89853765342366c19d9f2638e103b8158facd5655b6f6 bash-5.2.15_0.tar.bz2 -f6e0a6d1a10c399101d2178063918750d271dab4da3db56955acf77ce11b6ba4 bc-1.07.1_0.tar.bz2 -7b8ea17311f22e987a39b814658c72b46201650c4dfbc707e8fd9eb42bf1ed28 binutils-2.30_0.tar.bz2 -abc76e210e1cae4a02b56686ed555ef6e5167deccdb96c021718e93fdb420ec4 binutils-2.38_0.tar.bz2 -d7aac3185d1b19193f535e2c5377e2e41be872d55a6ae9a3c3d14b488df88277 binutils-2.38_1.tar.bz2 -f0bb18831983493b82fde53917e8d16c6a380761ac5e71e14769a82193fee788 bison-2.3_0.tar.bz2 -df9539b52384757d927bca5a27b1b58325b6024b23b0470e557f135eb69bae30 bison-3.4.1_0.tar.bz2 -fed9e13409f6378f97e8cef61e6faac992f3b767dfdac22f32453ff57cf29e7b bison-3.4.1_1.tar.bz2 -44d143d9dcb4098138a8b8eee0e29de1c7e282b9582df153f75ae301336c0927 bison-3.4.1_2.tar.bz2 -6d5e4debdec03aee096dbcefcad878fb5c6a069f895ee7ade878d9eeb97fb83e bison-3.4.2_0.tar.bz2 -80e541fc4d3dfce4451318f26c31ccfe580848139672bd437131cdfd5e3664b2 bzip2-1.0.8_0.tar.bz2 -c511d571d24675a141258e0e198c5ed1bcfd4889ddd736ff8e25c0d97b44e2cf ca-certificates-3.88.1_0.tar.bz2 -acd3ba50a33ea0172c3ca59e341a48e4233be48ded26fa031fd2e9417a2dfb31 coreutils-5.0_0.tar.bz2 -09092e187588c5d33c023ac41671b367aef9f7ee967d2c7c03430b33cc03f251 coreutils-6.10_0.tar.bz2 -b19f9c44fa7711b93f62a6e7d7696219a819b7331c16662264acc43f7bd61251 coreutils-8.32_0.tar.bz2 -d65348e9abcb961b6d060acb875b6ca3d75c14b1519426075d4644c6196b0ef2 curl-7.88.1_0.tar.bz2 -93d5319fc83ea992f1db0fd163b4106b8bbb164475af40ce496244fed2a17422 curl-7.88.1_1.tar.bz2 -0a11416b8d49f4fdf81e05ba81cc43fa3f33504f2c493935a3a7e9dbcb10a035 dhcpcd-10.0.1_0.tar.bz2 -c4008ae6b168aee4120b0f3624a1875f9e413d8f0c637708b8b04a1fb5be173c diffutils-2.7_0.tar.bz2 -bda6afcd3a390a34a57443269a4857ccc470129f7a557981778c145fd841cbd1 dist-3.5-236_0.tar.bz2 -1219dc5ffb33251b3b8e5ee2d605f5a648acccbc593ad766004441e9904e350f e2fsprogs-1.45.7_0.tar.bz2 -dd2bc9708213816b752ea40cd7ff4d5b89336be47b3c76b2aff683708f9dcbbc ed-1.4_0.tar.bz2 -9a680b6aaabd7c301438579389c500cce72472af3d78d8ba8f88c99feb9cc721 file-5.44_0.tar.bz2 -5984d3f2d5513dd04dc97619e2809d634fc7e3692f36f770e0202a61b6b2921d findutils-4.2.33_0.tar.bz2 -41902ec0383ea977a8d008dee37150e022e0714cd99f54c37f29c153464b758a flex-2.5.11_0.tar.bz2 -b3a8d59229289ca5a1de6a24c9c828d2847144f6662e0d5b7f41e7ff6e57abaa flex-2.5.33_0.tar.bz2 -408131b1c033a5f8a6845997b049784be0b466cec107a71270e5a04dae2c1e6c flex-2.6.4_0.tar.bz2 -5ff7fbe16b55563719b108260bd6a34ebabab0465d758ca98cba522932532e45 gawk-3.0.4_0.tar.bz2 -6de1c1380026ef9948387e665610185b6014f47a80453177a6c81898c95cbbd3 gc-8.0.4_0.tar.bz2 -374b54f568d7c67eb91f68a95b09322c9f6dc9c55cc6d49803ca3f5a8a3f6dbc gcc-10.4.0_0.tar.bz2 -e2af44250ca4a29d505ddd7182db7f9c702d7dedcc0604d6f8ddac3872a0c057 gcc-13.1.0_0.tar.bz2 -b09580c3972ff4e5f6e624bdc83d5328ce017422e0b92a7c170b51b6f04a47d2 gcc-4.0.4_0.tar.bz2 -c16e9eaab6ac62df3a2a880f35c8da413be150fa00b66f992e37a1b411f32bcf gcc-4.0.4_1.tar.bz2 -ed1eadc2b40eb3716801eaeaff0dbbc28c79101cf7880753d150bc8f2a4439c6 gcc-4.7.4_0.tar.bz2 -dc67fc1b132fa3945349efe74c5b2197bd0b6babf4d29d2deddd04f09d9af680 gettext-0.21_0.tar.bz2 -309282ba840f80b5e10897b1221f3ff3329b9e05b982c788d03652f411974524 gmp-6.2.1_0.tar.bz2 -f5917ffad5dd282d5ea17e791b470455c328ea0ebc845ed5ec80937a8d0eb933 gperf-3.1_0.tar.bz2 -67d706423e079a9cd764fd9607027d296c0ff2380c1104006a2230a299eb2c1d grep-2.4_0.tar.bz2 -0939a34d58ff31e2c234f6f47f964633ceae4839de49ce368ad027c016850d58 grep-3.7_0.tar.bz2 -d4c6b39136bbdb4a213a4229c5c460a6abefcda76285e4019d63e61382fbb8e8 guile-3.0.9_0.tar.bz2 -8d2015b87337abbf287f7a39ee4cf53514120b5d3e90a93fe7d533dcc43f14fa help2man-1.36.4_0.tar.bz2 -72a0f7b561b6ef5dd29f9ddb1f4fd61a60230e41c6f18967afa8af40bfdf5473 kbd-1.15_0.tar.bz2 -fd35fc5e14e7cb3c018964c43bf24dec2b3575d8fea38da3a2ea93349806a33c kexec-linux-1.0.0_0.tar.bz2 -ca33ded1a8769dca42d6a1f9c05395e8da856fd9eecbb747cccb57d20b84459c kexec-tools-2.0.22_0.tar.bz2 -a3f47ec4d26387952b22791d4d7d6837b90d81515d0a5ffe2804cf492fb090e1 libarchive-3.5.2_0.tar.bz2 -36550df491767bb24d2ccab304ce70a3b4956e7c0c0e0c343d922fd57cdafbdd libatomic_ops-7.6.10_0.tar.bz2 -b39826742e236890f3562cdf19492e7ef4224b271f3e75ddeab1f07982b03ebe libffi-3.3_0.tar.bz2 -daae709e98d2df2190d1d13b4e86f7f3fe90fa7a975282fe0bb03289b6539f29 libtool-2.2.4_0.tar.bz2 -c1577cee0b82534699dc4385ecea9f521516303f773216d00bc30e4bf0053758 libtool-2.4.7_0.tar.bz2 -503007bbcddcf4e49d26514c59b4c9501f8b42f0c994a59dfdc388b1ae6b7900 libunistring-0.9.10_0.tar.bz2 -1d07aaf7049be45853fd409340cdb52bb3a1b6dfa4dbc8b69358c1ee966cd67f linux-4.9.10_0.tar.bz2 -2fd5bec0c086cb89596f14894cbf078b3d1e990d297ba02b6cc4135e7d64996b linux-headers-5.10.41_0.tar.bz2 -3864f2c66516fc4f5086f626f4da2b2a7635e21babca86ba478f866920868e2b m4-1.4.7_0.tar.bz2 -cc203f338771ed1a99df17310bbe3e4885638d42141af8d0b3e8ed987e0fccca make-3.82_0.tar.bz2 -6d24960d6a987f68a7e0e3abf6edb52d2e0fe4c86f6ba45327e9634dbf7d40b4 make-4.2.1_0.tar.bz2 -17cd976bc0f6e897c6fffe43dd7c55d93ce0adadf1b4dc72925b80e2d266519f mpc-1.2.1_0.tar.bz2 -98a9f55c01ed375fae21913284e7fa07ff434c0810f34d791f3fbaa1df221302 mpfr-4.1.0_0.tar.bz2 -a724c91a43e282c3d338a977e4eeac3b970df241db7872f9d5cf27984b609814 musl-1.1.24_0.tar.bz2 -2a03a3707593997a0e03ce3aa6b2ee647cf2e5bfe1deb028357a2dfab56e33e2 musl-1.1.24_1.tar.bz2 -b79e0f8a39ba8880d43aa27551b72915655c62af39125e1f4ac8f8e69e71aaca musl-1.1.24_2.tar.bz2 -81f79a0faf58e105c5f12d9f538d3ea7578a3b361e633ab8f47324ec23ec9de6 musl-1.2.4_0.tar.bz2 -6dc5e763b747b66f72692c6820d7f46b7f4cf2e2fe05229a1d01c03919c1c936 musl-1.2.4_1.tar.bz2 -538a65e8a55d476099f403ef4b3d13265022efb34d365124663f320262e04f3a musl-1.2.4_2.tar.bz2 -97351f0df3d08ffdbe728a4b7fb36f91b1d83396be13ef6005ce62b9b62a9e07 openssl-1.1.1l_0.tar.bz2 -61eedd6037ed342d069c48cf81792f9bd131ae2e9b937cd5c5e799f62d88c15c patch-2.7.6_0.tar.bz2 -914a7abf36a64723b6e9f9b0b6ccd19c8e544fa798896a2bb1151dc341890c22 perl-5.000_0.tar.bz2 -887d835562d471653bcda60e652fceb4b3ef58a83321a4eb5af0431dc182781b perl-5.003_0.tar.bz2 -74d64a8af080022432fa94dba449090419d25b103d247710dc0b6102a4ad86a6 perl-5.10.1_0.tar.bz2 -71ad3cadba5801cb19d4520825d4b3606713807b1eaa5eb3c49b3149bc2675ad perl-5.32.1_0.tar.bz2 -9fa8850897248d77d554caa2b3d52e7890308cbf28750ffc24c09f498aee563c perl-5.6.2_0.tar.bz2 -b86fc586d72a6d204d0b9017afe17aa2439529e13f43befc56648b78de17c8f8 perl5.004-05_0.tar.bz2 -451ae6bb6e996a1c857fe92ec379654413fadec180c6477cf5fd4b5d7a079e26 perl5.005-03_0.tar.bz2 -1b9d4260edf7b2241d10e4c4ad17d0f90047bd4bf42f2487a7133902529e9dfe pkg-config-0.29.2_0.tar.bz2 -5c4d4ff26c44b92caf08350f0e24f97b343961c4fd73f511f6bcef6a5e645b3f python-2.0.1_0.tar.bz2 -f0c7bb60faae8eaf6960dfaad43acc7e30d5487ae114e44ec3c184c946adbc6f python-2.0.1_1.tar.bz2 -5163e798e204b0e4ea1ab5d513ad618e11fb6dd01414991f7c7408dc74d54400 python-2.3.7_0.tar.bz2 -ce21de104f50a65012f42df46b53beaf1dc2d8c5bf8f09ad20f80f64a2eb4d68 python-2.3.7_1.tar.bz2 -2788ab6ae1c411898de035aadfdbed9b77812c73d9c68a79813390d6f1e3f87f python-2.5.6_0.tar.bz2 -eba41b855f378e004648b1b3453485d2d4401cd72cf7b993c1be06b7cebf71a2 python-3.1.5_0.tar.bz2 -e10a0eceb1fcb9ca80dfcaf53bfa0d311adbaccdaf6846a6c5abfbea1e7db879 python-3.1.5_1.tar.bz2 -bc87d4b8b0d2f26ed7d632c73ef9cd937bc9b6cb3bdcb57fdea78d29e38722bc python-3.11.1_0.tar.bz2 -be89de80f75679c07e59f72b8d3ee4f14edcaa306dccd9d8a2c8adbb83245a43 python-3.3.7_0.tar.bz2 -e4a6dd6ff78b4f46e17e2b867e1562e1fa3a6c75db890c136818382d31619b78 python-3.4.10_0.tar.bz2 -1e0c73270bec02c323981d75ce4c731677672719ea34abf06ba145b56aae178e python-3.8.16_0.tar.bz2 -6081832f1fc258df7dd927986821991b49fa78a71b76f4b37b5c34a8ebc9bc86 sed-4.0.9_0.tar.bz2 -e58d8ec46c5b31175de9598bf0da214b88ccbd4cca7a787f3d048c44edaf3ceb sed-4.8_0.tar.bz2 -912d8f344104f1322255d6210c7c7e1371413ab530b2c6796e6aa565c74bf647 tar-1.34_0.tar.bz2 -a297b20252833d5c7b95ca343c85e84f9e5262e71beab9176ccf542833b75b4e tcc-0.9.27_0.tar.bz2 -41a4b0fbf461dd26ecd31d77b300c979a4decae185c9e2d50c0470bc49d0b893 tcc-0.9.27_1.tar.bz2 -cbfc578c709f677ec3e9792a8620e4e2a88d13d93969fd54aac93e4a29c2604d tcc-0.9.27_2.tar.bz2 -2b503cd31d3326ac1ed0eb9f506ac93c93770da51164e152a812cd248961069c tcc-0.9.27_3.tar.bz2 -50ebaa1d8fcc4a03a43d431eb71e2f435cc8712ae47d400564df3716037d553a texinfo-6.7_0.tar.bz2 -a8e53f863b2ab7aa027ed5522702b451afd524b2c09d2f3d0daba1f460b26c91 util-linux-2.19.1_0.tar.bz2 -5a1fdd2b42080f3b4808ceb1bf80a95873e614a25524545e6803b7d9f1fd5605 which-2.21_0.tar.bz2 -17aa8a94450f3bb9fe6f2c6f59dde8aa6194f951bf3ab58249cb75ad472e864d xz-5.4.1_0.tar.bz2 -ca8ec9876a7334f5f87e1159e0efe343b8b497ffb0dea8b548223035ecd67f9e zlib-1.2.13_0.tar.bz2 diff --git a/sysa/after-preseeded.kaem b/sysa/after-preseeded.kaem @@ -1,25 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -ex - -# Set commonly used variables -sysa=/sysa -DISTFILES=/sysa/distfiles -PREFIX=/usr -BINDIR=${PREFIX}/bin -LIBDIR=${PREFIX}/lib/mes -INCDIR=${PREFIX}/include/mes -SRCDIR=${PREFIX}/src -TMPDIR=/tmp # tmpdir is needed for patch to work -PATH=${BINDIR} - -cd ${sysa} - -exec bash run.sh diff --git a/sysa/after.kaem b/sysa/after.kaem @@ -1,72 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -ex - -PATH=/${ARCH_DIR}/bin - -# Set commonly used variables -sysa=/sysa -DISTFILES=/sysa/distfiles -PREFIX=/usr -BINDIR=${PREFIX}/bin -LIBDIR=${PREFIX}/lib -INCDIR=${PREFIX}/include/mes -SRCDIR=${PREFIX}/src -TMPDIR=/tmp # tmpdir is needed for patch to work - -mkdir -p ${PREFIX} ${BINDIR} ${LIBDIR} ${INCDIR} ${SRCDIR} ${TMPDIR} - -# Remove remaining dependencies on /bin (stage0-posix directory) -cp /${ARCH_DIR}/bin/blood-elf ${BINDIR}/blood-elf -cp /${ARCH_DIR}/bin/catm ${BINDIR}/catm -cp /${ARCH_DIR}/bin/chmod ${BINDIR}/chmod -cp /${ARCH_DIR}/bin/get_machine ${BINDIR}/get_machine -cp /${ARCH_DIR}/bin/hex2 ${BINDIR}/hex2 -cp /${ARCH_DIR}/bin/kaem ${BINDIR}/kaem -cp /${ARCH_DIR}/bin/match ${BINDIR}/match -cp /${ARCH_DIR}/bin/M1 ${BINDIR}/M1 -cp /${ARCH_DIR}/bin/M2-Mesoplanet ${BINDIR}/M2-Mesoplanet -cp /${ARCH_DIR}/bin/M2-Planet ${BINDIR}/M2-Planet -cp /${ARCH_DIR}/bin/mkdir ${BINDIR}/mkdir -cp /${ARCH_DIR}/bin/sha256sum ${BINDIR}/sha256sum -cp /${ARCH_DIR}/bin/unbz2 ${BINDIR}/unbz2 -cp /${ARCH_DIR}/bin/ungz ${BINDIR}/ungz -cp /${ARCH_DIR}/bin/untar ${BINDIR}/untar -cp /${ARCH_DIR}/bin/cp ${BINDIR}/cp -cp /${ARCH_DIR}/bin/replace ${BINDIR}/replace -cp /${ARCH_DIR}/bin/rm ${BINDIR}/rm - -chmod 755 ${BINDIR}/blood-elf -chmod 755 ${BINDIR}/catm -chmod 755 ${BINDIR}/chmod -chmod 755 ${BINDIR}/cp -chmod 755 ${BINDIR}/get_machine -chmod 755 ${BINDIR}/hex2 -chmod 755 ${BINDIR}/kaem -chmod 755 ${BINDIR}/match -chmod 755 ${BINDIR}/M1 -chmod 755 ${BINDIR}/M2-Mesoplanet -chmod 755 ${BINDIR}/M2-Planet -chmod 755 ${BINDIR}/mkdir -chmod 755 ${BINDIR}/sha256sum -chmod 755 ${BINDIR}/unbz2 -chmod 755 ${BINDIR}/ungz -chmod 755 ${BINDIR}/untar -chmod 755 ${BINDIR}/replace -chmod 755 ${BINDIR}/rm - -PATH=${BINDIR} - -cd ${sysa} - -catm run2.kaem bootstrap.cfg run.kaem -chmod 755 run2.kaem - -kaem --file run2.kaem diff --git a/sysa/after2.kaem b/sysa/after2.kaem @@ -1,14 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com> -# SPDX-License-Identifier: MIT - -PREFIX=/usr -BINDIR=${PREFIX}/bin - -PATH=${BINDIR} - -cd sysa - -catm run2-after-fiwix.kaem bootstrap.cfg run-after-fiwix.kaem -chmod 755 run2-after-fiwix.kaem - -kaem --file run2-after-fiwix.kaem diff --git a/sysa/base-preseeded.kaem b/sysa/base-preseeded.kaem @@ -1,7 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -/usr/bin/kaem -f /sysa/after-preseeded.kaem diff --git a/sysa/bash-2.05b/bash-2.05b.checksums b/sysa/bash-2.05b/bash-2.05b.checksums @@ -1 +0,0 @@ -79d7f5e9f4f735575a6a163023150017587a97c5f911d81fc91380cea8bb4362 /usr/bin/bash diff --git a/sysa/bzip2-1.0.8/bzip2-1.0.8.checksums b/sysa/bzip2-1.0.8/bzip2-1.0.8.checksums @@ -1 +0,0 @@ -ce63f5ac31e9a0b9740df12d8c1ce1dd635aac270687e5ede2e32990f301ebe2 /usr/bin/bzip2 diff --git a/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums b/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums @@ -1 +0,0 @@ -216fe50dd8e70928f382d40ced1d9a2c167f7a5aafd555901194c5559af8c526 /usr/bin/checksum-transcriber diff --git a/sysa/coreutils-5.0/patches-musl/touch-dereference.patch b/sysa/coreutils-5.0/patches-musl/touch-dereference.patch @@ -1 +0,0 @@ -../patches/touch-dereference.patch -\ No newline at end of file diff --git a/sysa/coreutils-5.0/patches-musl/touch-getdate.patch b/sysa/coreutils-5.0/patches-musl/touch-getdate.patch @@ -1 +0,0 @@ -../patches/touch-getdate.patch -\ No newline at end of file diff --git a/sysa/flex-2.6.4/flex-2.6.4.sh b/sysa/flex-2.6.4/flex-2.6.4.sh @@ -1,27 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -src_prepare() { - default - - mv Makefile src/ - touch src/config.h - rm src/parse.c src/parse.h src/scan.c src/skel.c -} - -src_compile() { - cd src - make -j1 PREFIX="${PREFIX}" - cd .. -} - -src_install() { - cd src - default - cd .. - - # Remove yacc, we won't need it any longer - rm "${PREFIX}/bin/yacc" - rm /yaccpar -} diff --git a/sysa/heirloom-devtools-070527/heirloom-devtools-070527.checksums b/sysa/heirloom-devtools-070527/heirloom-devtools-070527.checksums @@ -1,5 +0,0 @@ -671a1b5f07f5c5facc7cf502d5471ceabd82927180b127fe61f9ada04dfb4de0 /usr/bin/yacc -c8c51b6f773d5d14deb73216181a2c3975376082d411cd044d7033b3b5553202 /usr/bin/lex -ffe696afc1bda32a5f4035e29b3275cab73a27df7635ccbe02ed49a30374ccdd /usr/lib/mes/libl.a -bf3fb293f1ff89ee3dbcb08166c64b7a6793b49a12673d7633e3353ebea80d4d /yaccpar -ee0f187b844f50d64c912bfcb5d73706662846d6d8a90b8b1fb20dda60464734 /lex/ncform diff --git a/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem b/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem @@ -1,62 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -ex - -# Check tarball checksums -checksum-transcriber sources -sha256sum -c sources.SHA256SUM - -mkdir build src -cd build - -lexdir=/lex - -# Extract -cp ${DISTFILES}/${pkg}.tar.bz2 ../src/ -bunzip2 -f ../src/${pkg}.tar.bz2 -tar xf ../src/${pkg}.tar ${pkg}/yacc ${pkg}/lex -rm -r ../src/ -cd ${pkg} - -# Prepare and patch -patch -Np0 -i ../../patches/yacc_remove_wchar.patch -patch -Np0 -i ../../patches/lex_remove_wchar.patch - -# Build yacc -cd yacc -make -f Makefile.mk CC=tcc AR=tcc\ -ar CFLAGS=-DMAXPATHLEN=100\ -DEILSEQ=84\ -DMB_LEN_MAX=100 LDFLAGS=-lgetopt\ -static RANLIB=true - -# Install yacc -install yacc ${BINDIR} -install -m 644 yaccpar ${LIBDIR} - -# Build lex -cd ../lex -make -f Makefile.mk CC=tcc AR=tcc\ -ar CFLAGS=-DEILSEQ=84\ -DMB_LEN_MAX=100 LDFLAGS=-lgetopt\ -static RANLIB=true - -# Install lex -mkdir ${LEXDIR} -install lex ${BINDIR} -install libl.a ${LIBDIR} -install -m 644 ncform ${LEXDIR} - -cd ../../.. - -# Checksums -if match x${UPDATE_CHECKSUMS} xTrue; then - sha256sum -o ${pkg}.checksums \ - /usr/bin/yacc \ - /usr/bin/lex \ - /usr/lib/mes/libl.a \ - /yaccpar \ - /lex/ncform - - install ${pkg}.checksums ${SRCDIR} -else - sha256sum -c ${pkg}.checksums -fi diff --git a/sysa/helpers.sh b/sysa/helpers.sh @@ -1,505 +0,0 @@ -#!/bin/bash -e - -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -# shellcheck source=/dev/null -. "${SOURCES}/bootstrap.cfg" - -# Get a list of files -get_files() { - echo "." - _get_files "${1}" -} - -_get_files() { - local prefix - prefix="${1}" - fs= - if [ -n "$(ls 2>/dev/null)" ]; then - # This can be removed once Debian 12 is stable - # shellcheck disable=SC2035 - fs=$(echo *) - fi - if [ -n "$(ls .[0-z]* 2>/dev/null)" ]; then - fs="${fs} $(echo .[0-z]*)" - fi - for f in ${fs}; do - # Archive symlinks to directories as symlinks - echo "${prefix}/${f}" - if [ -d "${f}" ] && ! [ -h "${f}" ]; then - cd "${f}" - _get_files "${prefix}/${f}" - cd .. - fi - done -} - -# Reset all timestamps to unix time 0 -reset_timestamp() { - if command -v find >/dev/null 2>&1; then - # find does not error out on exec error - find . -print0 | xargs -0 touch -h -t 197001010000.00 - else - # A rudimentary find implementation that does the trick - fs= - if [ -n "$(ls 2>/dev/null)" ]; then - fs=$(echo ./*) - fi - if [ -n "$(ls .[0-z]* 2>/dev/null)" ]; then - fs="${fs} $(echo .[0-z]*)" - fi - for f in ${fs}; do - touch -h -t 197001010000.00 "${f}" - if [ -d "${f}" ]; then - cd "${f}" - reset_timestamp - cd .. - fi - done - fi -} - -# Fake grep -_grep() { - local text="${1}" - local fname="${2}" - if command -v grep >/dev/null 2>&1; then - grep "${text}" "${fname}" - else - # shellcheck disable=SC2162 - while read line; do - case "${line}" in *"${text}"*) - echo "${line}" ;; - esac - done < "${fname}" - fi -} - -get_revision() { - local pkg=$1 - cd "${SRCDIR}/repo" - # Get revision (n time this package has been built) - revision=$( (ls -1 "${pkg}"* 2>/dev/null || true) | wc -l | sed 's/ *//g') -} - -# Installs binary packages from an earlier run -# This is useful to speed up development cycle -bin_preseed() { - if [ -d "${SRCDIR}/repo-preseeded" ]; then - get_revision "${pkg}" - cd "${SRCDIR}/repo-preseeded" - if [ "${UPDATE_CHECKSUMS}" = "True" ] || src_checksum "${pkg}" $((revision)); then - echo "${pkg}: installing prebuilt package." - mv "${pkg}_${revision}"* ../repo || return 1 - if [[ "${pkg}" == bash-* ]]; then - # tar does not like overwriting running bash - # shellcheck disable=SC2153 - rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh" - fi - # shellcheck disable=SC2144 - if [ -f *-repodata ]; then - mv -- *-repodata ../repo - fi - cd "${SRCDIR}/repo" - rm -f /tmp/filelist.txt - src_apply "${pkg}" $((revision)) - cd "${SOURCES}" - return 0 - fi - fi - return 1 -} - -# Common build steps -# Build function provides a few common stages with default implementation -# that can be overridden on per package basis in the build script. -# build takes three arguments: -# 1) name-version of the package -# 2) optionally specify build script. Default is name-version.sh -# 3) directory of patches. Default is patches -# 4) directory to cd into. Default is ${pkg} -build() { - pkg=$1 - script_name=${2:-${pkg}.sh} - dirname=${4:-${pkg}} - - # shellcheck disable=SC2015 - bin_preseed && return || true # Normal build if preseed fails - - cd "${SOURCES}/${pkg}" || (echo "Cannot cd into ${pkg}!"; kill $$) - echo "${pkg}: beginning build using script ${script_name}" - base_dir="${PWD}" - patch_dir="${base_dir}/${3:-patches}" - mk_dir="${base_dir}/mk" - files_dir="${base_dir}/files" - - rm -rf "build" - mkdir "build" - cd "build" - - build_script="${base_dir}/${script_name}" - if test -e "${build_script}"; then - # shellcheck source=/dev/null - . "${build_script}" - fi - - echo "${pkg}: getting sources." - build_stage=src_get - call $build_stage - - echo "${pkg}: unpacking source." - build_stage=src_unpack - call $build_stage - unset EXTRA_DISTFILES - - cd "${dirname}" || (echo "Cannot cd into build/${dirname}!"; kill $$) - - echo "${pkg}: preparing source." - build_stage=src_prepare - call $build_stage - - echo "${pkg}: configuring source." - build_stage=src_configure - call $build_stage - - echo "${pkg}: compiling source." - build_stage=src_compile - call $build_stage - - echo "${pkg}: install to fakeroot." - build_stage=src_install - call $build_stage - - echo "${pkg}: postprocess binaries." - build_stage=src_postprocess - call $build_stage - - echo "${pkg}: creating package." - get_revision "${pkg}" - cd "${DESTDIR}" - src_pkg - - src_checksum "${pkg}" "${revision}" - - echo "${pkg}: cleaning up." - rm -rf "${SOURCES}/${pkg}/build" - rm -rf "${DESTDIR}" - mkdir -p "${DESTDIR}" - - echo "${pkg}: installing package." - src_apply "${pkg}" "${revision}" - - echo "${pkg}: build successful" - - cd "${SOURCES}" - - unset -f src_unpack src_prepare src_configure src_compile src_install src_postprocess - unset extract -} - -interpret_source_line() { - url="${1}" - checksum="${2}" - fname="${3}" - # Default to basename of url if not given - fname="${fname:-$(basename "${url}")}" - if ! [ -e "${fname}" ]; then - curl --fail --location "${url}" --output "${fname}" - fi - echo "${checksum} ${fname}" > "${fname}.sum" - sha256sum -c "${fname}.sum" - rm "${fname}.sum" -} - -# Default get function that downloads source tarballs. -default_src_get() { - # shellcheck disable=SC2153 - cd "${DISTFILES}" - # shellcheck disable=SC2162 - while read line; do - # This is intentional - we want to split out ${line} into separate arguments. - # shellcheck disable=SC2086 - interpret_source_line ${line} - done < "${base_dir}/sources" - cd - -} - -# Intelligently extracts a file based upon its filetype. -extract_file() { - f="${3:-$(basename "${1}")}" - # shellcheck disable=SC2154 - case "${noextract}" in - *${f}*) - cp "${DISTFILES}/${f}" . - ;; - *) - case "${f}" in - *.tar* | *.tgz) - if test -e "${PREFIX}/libexec/rmt"; then - # Again, we want to split out into words. - # shellcheck disable=SC2086 - tar --no-same-owner -xf "${DISTFILES}/${f}" ${extract} - else - # shellcheck disable=SC2086 - case "${f}" in - *.tar.gz) tar -xzf "${DISTFILES}/${f}" ${extract} ;; - *.tar.bz2) - # Initial bzip2 built against meslibc has broken pipes - bzip2 -dc "${DISTFILES}/${f}" | tar -xf - ${extract} ;; - *.tar.xz) - tar -xf "${DISTFILES}/${f}" --use-compress-program=xz ${extract} ;; - esac - fi - ;; - *) - cp "${DISTFILES}/${f}" . - ;; - esac - ;; - esac -} - -# Default unpacking function that unpacks all sources. -default_src_unpack() { - # Handle the first one differently - first_line=$(head -n 1 ../sources) - # Again, we want to split out into words. - # shellcheck disable=SC2086 - extract_file ${first_line} - # This assumes there is only one directory in the tarball - # Get the dirname "smartly" - if ! [ -e "${dirname}" ]; then - for i in *; do - if [ -d "${i}" ]; then - dirname="${i}" - break - fi - done - fi - # shellcheck disable=SC2162 - tail -n +2 ../sources | while read line; do - # shellcheck disable=SC2086 - extract_file ${line} - done -} - -# Default function to prepare source code. -# It applies all patches from patch_dir (at the moment only -p0 patches are supported). -# Then it copies our custom makefile and any other custom files from files directory. -default_src_prepare() { - if test -d "${patch_dir}"; then - for p in "${patch_dir}"/*.patch; do - echo "Applying patch: ${p}" - patch -Np0 < "${p}" - done - fi - - makefile="${mk_dir}/main.mk" - if test -e "${makefile}"; then - cp "${makefile}" Makefile - fi - - if test -d "${files_dir}"; then - cp --no-preserve=mode "${files_dir}"/* "${PWD}/" - fi -} - -# Default function for configuring source. -default_src_configure() { - : -} - -# Default function for compiling source. It simply runs make without any parameters. -default_src_compile() { - make "${MAKEJOBS}" -f Makefile PREFIX="${PREFIX}" -} - -# Default installing function. PREFIX should be set by run.sh script. -# Note that upstream makefiles might ignore PREFIX and have to be configured in configure stage. -default_src_install() { - make -f Makefile install PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" -} - -# Default function for postprocessing binaries. -default_src_postprocess() { - if (command -v find && command -v file && command -v strip) >/dev/null 2>&1; then - # Logic largely taken from void linux 06-strip-and-debug-pkgs.sh - # shellcheck disable=SC2162 - find "${DESTDIR}" -type f | while read f; do - case "$(file -bi "${f}")" in - application/x-executable*) strip "${f}" ;; - application/x-sharedlib*|application/x-pie-executable*) - machine_set="$(file -b "${f}")" - case "${machine_set}" in - *no\ machine*) ;; # don't strip ELF container-only - *) strip --strip-unneeded "${f}" ;; - esac - ;; - application/x-archive*) strip --strip-debug "${f}" ;; - esac - done - fi -} - -src_pkg() { - touch -t 197001010000.00 . - reset_timestamp - - local tar_basename="${pkg}_${revision}.tar" - local dest_tar="/usr/src/repo/${tar_basename}" - local filelist=/tmp/filelist.txt - - cd /usr/src/repo - # If grep is unavailable, then tar --sort is unavailable. - # So this does not need a command -v grep. - if tar --help | grep ' \-\-sort' >/dev/null 2>&1; then - tar -C "${DESTDIR}" --sort=name --hard-dereference \ - --numeric-owner --owner=0 --group=0 --mode=go=rX,u+rw,a-s -cf "${dest_tar}" . - else - local olddir - olddir=$PWD - cd "${DESTDIR}" - local null - if command -v find >/dev/null 2>&1 && command -v sort >/dev/null 2>&1; then - find . -print0 | LC_ALL=C sort -z > "${filelist}" - null="--null" - elif command -v sort >/dev/null 2>&1; then - get_files . | LC_ALL=C sort > "${filelist}" - else - get_files . > ${filelist} - fi - tar --no-recursion ${null} --files-from "${filelist}" \ - --numeric-owner --owner=0 --group=0 --mode=go=rX,u+rw,a-s -cf "${dest_tar}" - rm -f "$filelist" - cd "$olddir" - fi - touch -t 197001010000.00 "${tar_basename}" - bzip2 --best "${tar_basename}" -} - -src_checksum() { - local pkg=$1 revision=$2 - local rval=0 - if ! [ "$UPDATE_CHECKSUMS" = True ] ; then - # We avoid using pipes as that is not supported by initial sha256sum from mescc-tools-extra - local checksum_file=/tmp/checksum - _grep "${pkg}_${revision}" "${SOURCES}/SHA256SUMS.pkgs" > "${checksum_file}" || true - # Check there is something in checksum_file - if ! [ -s "${checksum_file}" ]; then - echo "${pkg}: no checksum stored!" - false - fi - echo "${pkg}: checksumming created package." - sha256sum -c "${checksum_file}" || rval=$? - rm "${checksum_file}" - fi - return "${rval}" -} - -src_apply() { - local pkg="${1}" revision="${2}" - local TAR_PREFIX BZIP2_PREFIX - - # Make sure we have at least one copy of tar - if [[ "${pkg}" == tar-* ]]; then - mkdir -p /tmp - cp "${PREFIX}/bin/tar" "/tmp/tar" - TAR_PREFIX="/tmp/" - fi - - # Overwriting files is mega busted, so do it manually - # shellcheck disable=SC2162 - if [ -e /tmp/filelist.txt ]; then - while IFS= read -d $'\0' file; do - rm -f "/${file}" >/dev/null 2>&1 || true - done < /tmp/filelist.txt - fi - - # Bzip2 does not like to be overwritten - if [[ "${pkg}" == bzip2-* ]]; then - mkdir -p /tmp - mv "${PREFIX}/bin/bzip2" "/tmp/bzip2" - BZIP2_PREFIX="/tmp/" - fi - "${BZIP2_PREFIX}bzip2" -dc "/usr/src/repo/${pkg}_${revision}.tar.bz2" | \ - "${TAR_PREFIX}tar" -C / -xpf - - rm -f "/tmp/bzip2" "/tmp/tar" -} - -# Check if bash function exists -fn_exists() { - test "$(type -t "$1")" == 'function' -} - -# Call package specific function or default implementation. -call() { - if fn_exists "$1"; then - $1 - else - default_"${1}" - fi -} - -# Call default build stage function -default() { - "default_${build_stage}" -} - -# Set modified dates of all files to be 0 unix time. -# Should be called at the end of bootstrapping process. -# This function needs `touch` that supports --no-dereference -# (at least coreutils 8.1). -canonicalise_all_files_timestamp() { - find / -xdev -exec touch --no-dereference -t 197001010000.00 {} + -} - -populate_device_nodes() { - # http://www.linuxfromscratch.org/lfs/view/6.1/chapter06/devices.html - mkdir -p "/dev" - test -c "/dev/null" || (rm -f "/dev/null" && - mknod -m 666 "/dev/null" c 1 3) - test -c "/dev/zero" || mknod -m 666 "/dev/zero" c 1 5 - test -c "/dev/random" || mknod -m 444 "/dev/random" c 1 8 - test -c "/dev/urandom" || mknod -m 444 "/dev/urandom" c 1 9 - - test -c "/dev/ptmx" || mknod -m 666 "/dev/ptmx" c 5 2 - test -c "/dev/tty" || mknod -m 666 "/dev/tty" c 5 0 - - if command -v mount >/dev/null 2>&1; then - test -d "/dev/shm" || (mkdir /dev/shm && mount -t tmpfs tmpfs /dev/shm) - fi - - if [ "${CHROOT}" = False ]; then - test -c "/dev/console" || mknod -m 666 "/dev/console" c 5 1 - fi -} - -sys_transfer() { - local dest=$1 - local sys_sources=$2 - - mkdir -p "${dest}/${PREFIX}/bin" "${dest}/${PREFIX}/src" - - # Bash, Tar and Bzip2 are required to install packages - cp "${PREFIX}/bin/bash" "${PREFIX}/bin/tar" "${PREFIX}/bin/bzip2" "${dest}${PREFIX}/bin/" - - # Transfer misc files - cp "${SOURCES}/helpers.sh" "${SOURCES}/SHA256SUMS.pkgs" "${SOURCES}/bootstrap.cfg" "${dest}/${PREFIX}/src" - - cp -r "${sys_sources}/"* "${dest}/${PREFIX}/src" - cp -f "${sys_sources}/init" "${dest}/" - cp -r "${PREFIX}/src/repo" "${dest}/${PREFIX}/src" - if [ -e "${PREFIX}/src/repo-preseeded" ]; then - cp -r "${PREFIX}/src/repo-preseeded" "${dest}/${PREFIX}/src" - fi - - shift 2 - # Copy additional binaries - set -- "${@/#/${PREFIX}/bin/}" - cp "$@" "${dest}${PREFIX}/bin/" -} diff --git a/sysa/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums b/sysa/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums @@ -1 +0,0 @@ -6301eb2b25e777b464b5de79a1c6c453708a5f15de7a396e638eb51141a16440 /usr/bin/kexec-fiwix diff --git a/sysa/kexec-linux-1.0.0/files/kexec-linux.c b/sysa/kexec-linux-1.0.0/files/kexec-linux.c @@ -1,87 +0,0 @@ -/* SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com> */ -/* SPDX-License-Identifier: MIT */ -#include <stdio.h> -#include <stdlib.h> -#include <stdint.h> -#include <unistd.h> -#include <sys/reboot.h> -#include <sys/stat.h> -#include <time.h> - -int append_file(FILE *dst_file, char *src_file_name); - -int main(int argc, char **argv) { - char *ramdrive_file_name, *kernel_file_name, *initramfs_file_name; - FILE *ramdrive_file; - struct stat stats; - uint32_t size; - - if (argc < 3) { - puts("Usage: fiwix-kexec-linux <ram-drive-name> <kernel-file-name> <initramfs-file-name>"); - exit(1); - } - - ramdrive_file_name = argv[1]; - kernel_file_name = argv[2]; - initramfs_file_name = argv[3]; - - - ramdrive_file = fopen(ramdrive_file_name, "wb"); - - /* Move past where lengths go */ - int length_offset = 2 * sizeof(uint32_t); - fseek(ramdrive_file, length_offset, SEEK_SET); - uint32_t last_pos = ftell(ramdrive_file); - - if (append_file(ramdrive_file, kernel_file_name)) { - fprintf(stderr, "Cannot append kernel '%s'\n", kernel_file_name); - exit(1); - } - - uint32_t kernel_size = ftell(ramdrive_file) - last_pos; - last_pos = ftell(ramdrive_file); - - if (append_file(ramdrive_file, initramfs_file_name)) { - fprintf(stderr, "Cannot append initramfs '%s'\n", initramfs_file_name); - exit(1); - } - - uint32_t initramfs_size = ftell(ramdrive_file) - last_pos; - - /* Now write the lengths */ - fseek(ramdrive_file, 0, SEEK_SET); - fwrite(&kernel_size, sizeof(kernel_size), 1, ramdrive_file); - fwrite(&initramfs_size, sizeof(initramfs_size), 1, ramdrive_file); - - fclose(ramdrive_file); - - /* Flush ram drive writes to device */ - sync(); - - /* Perform syscall reboot to initiate kexec */ - reboot(RB_HALT_SYSTEM); -} - -int append_file(FILE *dst_file, char *src_file_name) { - FILE *src_file; - char buff[BUFSIZ]; - size_t n; - - if (*src_file_name == '!') { - src_file_name++; - src_file = popen(src_file_name, "r"); - } else { - src_file = fopen(src_file_name, "rb"); - } - - if (src_file) { - while ((n = fread(buff, 1, BUFSIZ, src_file)) != 0) { - fwrite(buff, 1, n, dst_file); - } - fclose(src_file); - return 0; - } else { - printf("Cannot open file '%s'\n", src_file_name); - return 1; - } -} diff --git a/sysa/linux-4.9.10/linux-4.9.10.sh b/sysa/linux-4.9.10/linux-4.9.10.sh @@ -1,64 +0,0 @@ -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -# XXX: Fix package after builder-hex0 - -src_unpack() { - mkdir "${pkg}" - mv "${DISTFILES}/deblob-4.9" "${pkg}/" - # Remove all previous source tarballs - mv "${DISTFILES}/${pkg}.tar.gz" . - rm -r "${DISTFILES:?}/"* - mv "${pkg}.tar.gz" "${DISTFILES}" - default || true # Predictable link errors - not a problem - rm -r "${DISTFILES}" # Clear storage space -} - -generate_autoconf_h() { - # generate include/linux/autoconf.h -- we do not have gperf rn to do it the normal way - mkdir -p include/generated - # Transform each of the CONFIG_* options that are =y into header - grep -E '=y$' .config | sed 's/=y$/ 1/' | sed 's/^/#define /' >> include/generated/autoconf.h - # Transform each of the CONFIG_* options that are unset into headers - grep -E ' is not set$' .config | sed 's/ is not set$//' | sed 's/#/#undef/' >> include/generated/autoconf.h - # Transform each of the non-boolean options into headers - grep -E '=.*$' .config | grep -v -E '=y$' | sed 's/=/ /' | sed 's/^/#define /' >> include/generated/autoconf.h -} - -src_prepare() { - default - - mv config .config - mkdir -p include/config - cp .config include/config/auto.conf - - generate_autoconf_h - - # Deblob the kernel - chmod +x deblob-4.9 - ./deblob-4.9 --force - - # Remove shipped files - find . -name "*_shipped*" -delete -} - -src_compile() { - cp .config include/config/auto.conf - rm include/generated/autoconf.h - generate_autoconf_h - - # Allow use of patched initramfs_list.sh (which is required anyway) - make "${MAKEJOBS}" ARCH=i386 prepare - PATH="${PWD}/usr:${PATH}" make "${MAKEJOBS}" ARCH=i386 - - # Clear up more space - find . -name '*.o' -delete -} - -src_install() { - install -D -m 644 arch/i386/boot/bzImage "/boot/linux-4.9.10" - install -D -m 755 usr/gen_init_cpio "${PREFIX}/bin/gen_init_cpio" - install -D -m 755 scripts/gen_initramfs_list.sh "${PREFIX}/bin/gen_initramfs_list.sh" -} diff --git a/sysa/lwext4-1.0.0-lb1/files/early-artifacts-needed-after-fiwix.txt b/sysa/lwext4-1.0.0-lb1/files/early-artifacts-needed-after-fiwix.txt @@ -1,95 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com> -# SPDX-License-Identifier: MIT -/usr/bin/blood-elf -/usr/bin/catm -/usr/bin/chmod -/usr/bin/get_machine -/usr/bin/hex2 -/usr/bin/kaem -/usr/bin/match -/usr/bin/M1 -/usr/bin/M2-Mesoplanet -/usr/bin/M2-Planet -/usr/bin/mkdir -/usr/bin/sha256sum -/usr/bin/unbz2 -/usr/bin/ungz -/usr/bin/untar -/usr/bin/cp -/usr/bin/replace -/usr/bin/rm -/usr/bin/checksum-transcriber -/usr/bin/tcc -/usr/bin/tcc-0.9.26 -/usr/bin/kexec-linux -/usr/lib/mes/libc.a -/usr/lib/mes/libgetopt.a -/usr/lib/mes/crt1.o -/usr/lib/mes/crti.o -/usr/lib/mes/crtn.o -/usr/lib/mes/tcc/libtcc1.a -/usr/include/mes/alloca.h -/usr/include/mes/argz.h -/usr/include/mes/ar.h -/usr/include/mes/assert.h -/usr/include/mes/ctype.h -/usr/include/mes/dirent.h -/usr/include/mes/dirstream.h -/usr/include/mes/dlfcn.h -/usr/include/mes/endian.h -/usr/include/mes/errno.h -/usr/include/mes/fcntl.h -/usr/include/mes/features.h -/usr/include/mes/float.h -/usr/include/mes/getopt.h -/usr/include/mes/grp.h -/usr/include/mes/inttypes.h -/usr/include/mes/libgen.h -/usr/include/mes/limits.h -/usr/include/mes/locale.h -/usr/include/mes/math.h -/usr/include/mes/memory.h -/usr/include/mes/pwd.h -/usr/include/mes/setjmp.h -/usr/include/mes/signal.h -/usr/include/mes/stdarg.h -/usr/include/mes/stdbool.h -/usr/include/mes/stddef.h -/usr/include/mes/stdint.h -/usr/include/mes/stdio.h -/usr/include/mes/stdlib.h -/usr/include/mes/stdnoreturn.h -/usr/include/mes/string.h -/usr/include/mes/strings.h -/usr/include/mes/termio.h -/usr/include/mes/time.h -/usr/include/mes/unistd.h -/usr/include/mes/arch/kernel-stat.h -/usr/include/mes/arch/syscall.h -/usr/include/mes/linux/syscall.h -/usr/include/mes/linux/x86/syscall.h -/usr/include/mes/mes/builtins.h -/usr/include/mes/mes/cc.h -/usr/include/mes/mes/config.h -/usr/include/mes/mes/constants.h -/usr/include/mes/mes/lib.h -/usr/include/mes/mes/lib-cc.h -/usr/include/mes/mes/lib-mini.h -/usr/include/mes/mes/mes.h -/usr/include/mes/mes/symbols.h -/usr/include/mes/sys/cdefs.h -/usr/include/mes/sys/dir.h -/usr/include/mes/sys/file.h -/usr/include/mes/sys/ioctl.h -/usr/include/mes/sys/mman.h -/usr/include/mes/sys/param.h -/usr/include/mes/sys/resource.h -/usr/include/mes/sys/select.h -/usr/include/mes/sys/stat.h -/usr/include/mes/sys/timeb.h -/usr/include/mes/sys/time.h -/usr/include/mes/sys/times.h -/usr/include/mes/sys/types.h -/usr/include/mes/sys/ucontext.h -/usr/include/mes/sys/user.h -/usr/include/mes/sys/wait.h diff --git a/sysa/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c b/sysa/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c @@ -1,298 +0,0 @@ -/* - * SPDX-FileCopyrightText: Copyright (c) 2015 Grzegorz Kostka (kostka.grzegorz@gmail.com) - * SPDX-License-Identifier: BSD-3-Clause - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Modifications: - * SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com> - * SPDX-License-Identifier: MIT - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <stdbool.h> -#include <inttypes.h> -#include <time.h> -#include <unistd.h> -#include <sys/time.h> - -#include <ext4.h> -#include <ext4_mkfs.h> -#include "../blockdev/linux/file_dev.h" -#include "../blockdev/windows/file_windows.h" - -#define BLOCK_SIZE 1024 -#define FILENAME_LENGTH 256 -#define INITRD_MB 1152 - -const char *input_name = NULL; -/**@brief Block device handle.*/ -static struct ext4_blockdev *bd; -/**@brief Block cache handle.*/ -static struct ext4_bcache *bc; -static struct ext4_fs fs; - - -static struct ext4_mkfs_info info = { - .block_size = BLOCK_SIZE, - .journal = false, - .inode_size = 128, -}; - -#define MKDEV(major, minor) (((major) << 8) | (minor)) - -static bool open_filedev(void) -{ - file_dev_name_set(input_name); - bd = file_dev_get(); - if (!bd) { - puts("open_filedev: fail"); - return false; - } - return true; -} - -bool lwext4_mount(struct ext4_blockdev *bdev, struct ext4_bcache *bcache) -{ - int r; - - bc = bcache; - bd = bdev; - - if (!bd) { - puts("lwext4_mount: no block device"); - return false; - } - - /* ext4_dmask_set(DEBUG_ALL); */ - - r = ext4_device_register(bd, "ext4_fs"); - if (r != EOK) { - printf("ext4_device_register: rc = %d\n", r); - return false; - } - - r = ext4_mount("ext4_fs", "/mp/", false); - if (r != EOK) { - printf("ext4_mount: rc = %d\n", r); - return false; - } - - r = ext4_recover("/mp/"); - if (r != EOK && r != ENOTSUP) { - printf("ext4_recover: rc = %d\n", r); - return false; - } - - /* ext4_cache_write_back("/mp/", 1); */ - - return true; -} - -bool lwext4_umount(void) -{ - int r; - - /* ext4_cache_write_back("/mp/", 0); */ - - r = ext4_umount("/mp/"); - if (r != EOK) { - printf("ext4_umount: fail %d", r); - return false; - } - return true; -} - - -bool copy_file(char *src_path, char *dest_path) -{ - - printf("copy_file: %s\n", src_path); - ext4_file dest_file; - FILE *src_file = fopen(src_path, "rb"); - if (!src_file) { - printf("fopen '%s' error.\n", src_path); - return EXIT_FAILURE; - } - fseek(src_file, 0, SEEK_END); - int src_len = ftell(src_file); - char * src_mem = malloc(src_len); - int err; - - fseek(src_file, 0, SEEK_SET); - if (src_len > 0) { - int read_len = fread(src_mem, src_len, 1, src_file); - fclose(src_file); - if (read_len < 1) { - printf("src fread error file: '%s' read count: %d\n", src_path, read_len); - } - } - - err = ext4_fopen(&dest_file, dest_path, "wb"); - if (err != EOK) { - printf("ext4_open error: %d\n", err); - return EXIT_FAILURE; - } - - if (src_len > 0) { - err = ext4_fwrite(&dest_file, src_mem, src_len, 0); - if (err != EOK) { - printf("ext4_fwrite error: %d\n", err); - return EXIT_FAILURE; - } - } - - err = ext4_fclose(&dest_file); - if (err != EOK) { - printf("ext4_fclose error: %d\n", err); - return EXIT_FAILURE; - } - - free(src_mem); -} - -bool copy_file_list(char *file_list_path) -{ - char src_filename[FILENAME_LENGTH]; - char dst_filename[FILENAME_LENGTH]; - - FILE *file_list = fopen(file_list_path, "r"); - while(fgets(src_filename, FILENAME_LENGTH, file_list)) { - /* Skip comments */ - if (src_filename[0] == '#') { - continue; - } - src_filename[strlen(src_filename) - 1] = 0; /* strip newline */ - strcpy(dst_filename, "/mp"); - strcat(dst_filename, src_filename); - copy_file(src_filename, dst_filename); - } - fclose(file_list); -} - -int main(int argc, char **argv) -{ - int err; - - char zeros[BLOCK_SIZE]; - - unsigned int next_file_address; - - next_file_address = *((unsigned int *) 0x7F8D); - - printf("Starting fiwix.ext2 at addr 0x%08x\n", next_file_address); - - /* Create zeroed out disk image file */ - input_name = "/boot/fiwix.ext2"; - - memset(zeros, 0, BLOCK_SIZE); - FILE *ext2file = fopen(input_name, "w"); - int b; - for (b=0; b < (BLOCK_SIZE * INITRD_MB); b++) - fwrite(zeros, BLOCK_SIZE, 1, ext2file); - fclose(ext2file); - - if (!open_filedev()) { - printf("open_filedev error\n"); - return EXIT_FAILURE; - } - - /* ext4_dmask_set(DEBUG_ALL); */ - - err = ext4_mkfs(&fs, bd, &info, F_SET_EXT2_V0); - if (err != EOK) { - printf("ext4_mkfs error: %d\n", err); - return EXIT_FAILURE; - } - - memset(&info, 0, sizeof(struct ext4_mkfs_info)); - err = ext4_mkfs_read_info(bd, &info); - if (err != EOK) { - printf("ext4_mkfs_read_info error: %d\n", err); - return EXIT_FAILURE; - } - - printf("Created filesystem with parameters:\n"); - printf("Size: %"PRIu64"\n", info.len); - printf("Block size: %"PRIu32"\n", info.block_size); - printf("Blocks per group: %"PRIu32"\n", info.blocks_per_group); - printf("Inodes per group: %"PRIu32"\n", info.inodes_per_group); - printf("Inode size: %"PRIu32"\n", info.inode_size); - printf("Inodes: %"PRIu32"\n", info.inodes); - printf("Journal blocks: %"PRIu32"\n", info.journal_blocks); - printf("Features ro_compat: 0x%x\n", info.feat_ro_compat); - printf("Features compat: 0x%x\n", info.feat_compat); - printf("Features incompat: 0x%x\n", info.feat_incompat); - printf("BG desc reserve: %"PRIu32"\n", info.bg_desc_reserve_blocks); - printf("Descriptor size: %"PRIu32"\n",info.dsc_size); - printf("Label: %s\n", info.label); - - if (!lwext4_mount(bd, bc)) - return EXIT_FAILURE; - - puts("ext4_dir_mk /mp/dev"); - err = ext4_dir_mk("/mp/dev"); - if (err != EOK) { - printf("ext4_dir_mk error: %d\n", err); - } - - puts("ext4_mknod /mp/dev/console"); - err = ext4_mknod("/mp/dev/console", EXT4_DE_CHRDEV, MKDEV(5, 1)); - if (err != EOK) { - printf("ext4_mknod error: %d\n", err); - return EXIT_FAILURE; - } - puts("ext4_mknod /mp/dev/ram0"); - err = ext4_mknod("/mp/dev/ram0", EXT4_DE_BLKDEV, MKDEV(1, 0)); - if (err != EOK) { - printf("ext4_mknod error: %d\n", err); - return EXIT_FAILURE; - } - puts("ext4_mknod /mp/dev/ram1"); - err = ext4_mknod("/mp/dev/ram1", EXT4_DE_BLKDEV, MKDEV(1, 1)); - if (err != EOK) { - printf("ext4_mknod error: %d\n", err); - return EXIT_FAILURE; - } - - copy_file("/usr/bin/kaem", "/mp/init"); - copy_file("/sysa/after2.kaem", "/mp/kaem.run"); - copy_file_list("/sysa/lwext4-1.0.0-lb1/files/fiwix-file-list.txt"); - puts("ext4_dir_mk /mp/tmp"); - ext4_dir_mk("/mp/tmp"); - puts("ext4_dir_mk /mp/usr"); - ext4_dir_mk("/mp/usr"); - puts("ext4_dir_mk /mp/usr/src"); - ext4_dir_mk("/mp/usr/src"); - - if (!lwext4_umount()) - return EXIT_FAILURE; - - puts("Fiwix ext2 initrd created successfully."); - return EXIT_SUCCESS; -} diff --git a/sysa/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums b/sysa/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums @@ -1 +0,0 @@ -a1c3fc496659b55e3600c06c76c374b76da5f19d153f44dbf5796fe7a0d8283d /usr/bin/make_fiwix_initrd diff --git a/sysa/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.kaem b/sysa/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.kaem @@ -1,61 +0,0 @@ -#!/bin/sh -# SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com> -# SPDX-License-Identifier: MIT - -set -ex - -mkdir build src -cd src -ungz --file ${DISTFILES}/${pkg}.tar.gz --output ${pkg}.tar -cd .. - -cd build -untar --file ../src/${pkg}.tar -cd ${pkg} - -mkdir -p build_generic/include/generated -catm build_generic/include/generated/ext4_config.h ../../config/ext4_config.h - -cd blockdev/linux -tcc -m32 -march=i386 -std=c89 -I../../include -I../../build_generic/include -I../../../tcc/tcc-0.9.27/include -DVERSION="\"1.0\"" -c file_dev.c - -cd ../../src -alias cc="tcc -m32 -march=i386 -std=c89 -I../include -I../build_generic/include -I../../tcc/tcc-0.9.27/include" -cc -c ext4.c -cc -c ext4_balloc.c -cc -c ext4_bcache.c -cc -c ext4_bitmap.c -cc -c ext4_block_group.c -cc -c ext4_blockdev.c -cc -c ext4_crc32.c -cc -c ext4_debug.c -cc -c ext4_dir.c -cc -c ext4_dir_idx.c -cc -c ext4_extent.c -cc -c ext4_fs.c -cc -c ext4_hash.c -cc -c ext4_ialloc.c -cc -c ext4_inode.c -cc -c ext4_journal.c -cc -c ext4_mbr.c -cc -c ext4_mkfs.c -cc -c ext4_super.c -cc -c ext4_trans.c -cc -c ext4_xattr.c - -catm make_fiwix_initrd.c ../../../files/make_fiwix_initrd.c -tcc -m32 -march=i386 -std=c89 -I../include -I../build_generic/include -I../../tcc/tcc-0.9.27/include -DVERSION="\"1.0\"" -c make_fiwix_initrd.c - -tcc -m32 -o ${BINDIR}/make_fiwix_initrd ext4.o ext4_balloc.o ext4_bcache.o ext4_bitmap.o ext4_block_group.o ext4_blockdev.o ext4_crc32.o ext4_debug.o ext4_dir.o ext4_dir_idx.o ext4_extent.o ext4_fs.o ext4_hash.o ext4_ialloc.o ext4_inode.o ext4_journal.o ext4_mbr.o ext4_mkfs.o ext4_super.o ext4_trans.o ext4_xattr.o ../blockdev/linux/file_dev.o make_fiwix_initrd.o - -cd ../../.. - -# Checksums -if match x${UPDATE_CHECKSUMS} xTrue; then - sha256sum -o ${pkg}.checksums \ - /usr/bin/make_fiwix_initrd - - cp ${pkg}.checksums ${SRCDIR} -else - sha256sum -c ${pkg}.checksums -fi diff --git a/sysa/make-3.82/make-3.82.checksums b/sysa/make-3.82/make-3.82.checksums @@ -1 +0,0 @@ -7dac94ec2651bb6ca9666c2234171ebe51278cbb7ff533ee84ab0fb1b3dd432e /usr/bin/make diff --git a/sysa/mes-0.25/files/config.h b/sysa/mes-0.25/files/config.h @@ -1,7 +0,0 @@ -// SPDX-FileCopyrightText: 2020 fosslinux <fosslinux@aussies.space> -// SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#undef SYSTEM_LIBC -#define MES_VERSION "0.24.2" diff --git a/sysa/mes-0.25/mes-0.25.x86.checksums b/sysa/mes-0.25/mes-0.25.x86.checksums @@ -1,14 +0,0 @@ -bd873a7b98939a9430c278755db485daaaa92f8fc8990b5dcad6895d0f714db1 /usr/bin/mes -6572d1298f3a25da5a3543b783ec8cb5798ccfe4b11dcaebffa633f47c246f84 /usr/bin/mes-m2 -5b158971c9bb6eceba00d438dc605fe186b46058b89e7118aca4037f5678834c /usr/bin/mescc.scm -234c264965116a24583dd569050adc766d7cc2da83b1db38085210f26031b70c /usr/lib/x86-mes/crt1.s -494f184a87175abc485a898c250c3831b2b5dcf5aead46591e00b39d1c5529fc /usr/lib/x86-mes/crt1.o -8afe05c3e1e8848b6f3e8de751524de5f69818eb8524659827918e3fddde3e1e /usr/lib/x86-mes/x86.M1 -771988b1df0dfa04bf5f1ab72af18c32b1a8205a07f10e5235d79dac0a072b00 /usr/lib/x86-mes/libmescc.s -89024362827679beffb4a70287d66609d07a3cf4a1972c1c40797bfa0324a49e /usr/lib/x86-mes/libc+tcc.s -5ea659501bda293f9297b599b1385ed4d54bab0e6daf3207fc61429adc9abc78 /usr/lib/x86-mes/libc.s -52f697278ccdff5e457f27e10f465a91ab9858f0c6cee0683831cadb3109bbb7 /usr/lib/x86-mes/libmescc.a -7c737307c870d74a309cec58f6b67fa4961d582614f3ed0f39b5794e3705794a /usr/lib/x86-mes/libc+tcc.a -db62874a6cebeb0652945cb91cb91ade9783e631aaef5ec279e11aeca6adc421 /usr/lib/x86-mes/libc.a -82cac4353375a52efecc6fda1f8b37373988fe41ed197b63d8e906321b105d77 /usr/lib/linux/x86-mes/elf32-header.hex2 -f9873d9aab12e70f24d97f8319e17a1e698ca60779ae9a6ab3ede648cd60fc61 /usr/lib/linux/x86-mes/elf32-footer-single-main.hex2 diff --git a/sysa/musl-1.1.24/patches-pass3/avoid_set_thread_area.patch b/sysa/musl-1.1.24/patches-pass3/avoid_set_thread_area.patch @@ -1 +0,0 @@ -../patches/avoid_set_thread_area.patch -\ No newline at end of file diff --git a/sysa/musl-1.1.24/patches-pass3/avoid_sys_clone.patch b/sysa/musl-1.1.24/patches-pass3/avoid_sys_clone.patch @@ -1 +0,0 @@ -../patches/avoid_sys_clone.patch -\ No newline at end of file diff --git a/sysa/musl-1.1.24/patches-pass3/set_thread_area.patch b/sysa/musl-1.1.24/patches-pass3/set_thread_area.patch @@ -1 +0,0 @@ -../patches/set_thread_area.patch -\ No newline at end of file diff --git a/sysa/musl-1.1.24/patches-pass3/va_list.patch b/sysa/musl-1.1.24/patches-pass3/va_list.patch @@ -1 +0,0 @@ -../patches/va_list.patch -\ No newline at end of file diff --git a/sysa/run-after-fiwix.kaem b/sysa/run-after-fiwix.kaem @@ -1,88 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -ex - -ARCH_DIR="x86" -ARCH="x86" -ARCH_DIR="x86" -M2LIBC="M2libc" -TOOLS="${ARCH_DIR}/bin" -BLOOD_FLAG=" " -BASE_ADDRESS="0x08048000" -ENDIAN_FLAG="--little-endian" -BINDIR="${ARCH_DIR}/bin" -BUILDDIR="${ARCH_DIR}/artifact" - -sysa=/sysa -DISTFILES=/sysa/distfiles -PREFIX=/usr -BINDIR=${PREFIX}/bin -LIBDIR=${PREFIX}/lib/mes -INCDIR=${PREFIX}/include/mes -SRCDIR=${PREFIX}/src -TMPDIR=/tmp # tmpdir is needed for patch to work - -PATH=/usr/bin - -# make -pkg="make-3.82" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# patch -pkg="patch-2.5.9" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# gzip -pkg="gzip-1.2.4" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# tar -pkg="tar-1.12" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# sed -pkg="sed-4.0.9" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# bzip2 -pkg="bzip2-1.0.8" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# coreutils -pkg="coreutils-5.0" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# heirloom-devtools -pkg="heirloom-devtools-070527" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# bash -pkg="bash-2.05b" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -exec bash run.sh diff --git a/sysa/run.kaem b/sysa/run.kaem @@ -1,92 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -ex - -M2LIBC_PATH=/M2libc - -# checksum-transcriber utility -pkg="checksum-transcriber-1.0" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# simple patch tool based on before and after chunks -pkg="simple-patch-1.0" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# Environmental variables needed for mes -NYACC_PKG=nyacc-1.00.2 -MES_VERSION=0.25 -MES_PKG=mes-${MES_VERSION} -MES_PKG_DIR=${MES_PKG} -MES_PREFIX=${sysa}/${MES_PKG}/build/${MES_PKG_DIR} -GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${sysa}/${MES_PKG}/build/${NYACC_PKG}/module - -# mes -pkg=${MES_PKG} -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# tcc 0.9.26 -pkg="tcc-0.9.26" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -LIBDIR=${LIBDIR}/mes - -# tcc 0.9.27 -pkg="tcc-0.9.27" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -BUILD_FIWIX=False - -if match x${KERNEL_BOOTSTRAP} xTrue; then - BUILD_FIWIX=True -fi - -if match x${BUILD_KERNELS} xTrue; then - BUILD_FIWIX=True -fi - -if match x${BUILD_FIWIX} xTrue; then - # The Fiwix kernel - pkg="fiwix-1.4.0-lb3" - cd ${pkg} - kaem --verbose --file ${pkg}.kaem - cd .. - - # ext2 file system library for Fiwix - pkg="lwext4-1.0.0-lb1" - cd ${pkg} - kaem --verbose --file ${pkg}.kaem - cd .. - - # Live boot loader for Fiwix - pkg="kexec-fiwix-1.0" - cd ${pkg} - kaem --verbose --file ${pkg}.kaem - cd .. -fi - -if match x${KERNEL_BOOTSTRAP} xTrue; then - # Build the ext2 image - make_fiwix_initrd - - # Boot Fiwix - kexec-fiwix -else - exec kaem --verbose --file run-after-fiwix.kaem -fi diff --git a/sysa/run.sh b/sysa/run.sh @@ -1,188 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -e - -# shellcheck disable=SC2153 -LIBDIR="${PREFIX}/lib/mes" -# shellcheck disable=SC2154 -SOURCES="${sysa}" -DISTFILES="${sysa}/distfiles" -DESTDIR=/tmp/destdir - -# shellcheck source=sysa/helpers.sh -. helpers.sh - -if [ "${KERNEL_BOOTSTRAP}" ]; then - # Fiwix does not support SMP - MAKEJOBS="-j1" -else - MAKEJOBS="-j${JOBS}" -fi - -# Ask some questions -echo -echo "Now that bash has been built, there are potentially some questions for you!" -echo "To give your answer, type your answer, press Enter, and then Control-D." -echo - -ask_chroot() { - read -r CHROOT_STRING - if [ "${CHROOT_STRING}" = "yes" ] || [ "${CHROOT_STRING}" = "y" ]; then - CHROOT=True - elif [ "${CHROOT_STRING}" = "no" ] || [ "${CHROOT_STRING}" = "n" ]; then - CHROOT=False - else - echo "Invalid response. Please give a yes/no answer." - ask_chroot - fi -} - -if [ -z "${CHROOT}" ]; then - echo "Currently, it is unknown if live-bootstrap is running in a chroot" - echo "or not. Is it? (yes/no answer)" - ask_chroot - echo - - echo "CHROOT=${CHROOT}" >> "${SOURCES}/bootstrap.cfg" -fi - -ask_timestamps() { - read -r TIMESTAMPS_STRING - if [ "${TIMESTAMPS_STRING}" = "yes" ] || [ "${TIMESTAMPS_STRING}" = "y" ]; then - FORCE_TIMESTAMPS=True - elif [ "${TIMESTAMPS_STRING}" = "no" ] || [ "${TIMESTAMPS_STRING}" = "n" ]; then - FORCE_TIMESTAMPS=False - else - echo "Invalid response. Please give a yes/no answer." - ask_timestamps - fi -} - -if [ -z "${FORCE_TIMESTAMPS}" ]; then - echo "Would you like all timestamps to be set to unix time 0" - echo "(Jan 1 1970 00:00) at the end of the bootstrap? This makes a" - echo "fully reproducible disk image. (yes/no answer)" - ask_timestamps - echo - - echo "FORCE_TIMESTAMPS=${FORCE_TIMESTAMPS}" >> "${SOURCES}/bootstrap.cfg" -fi - -echo "Thank you! All done." - -echo "ARCH=${ARCH}" >> "${SOURCES}/bootstrap.cfg" - -mkdir -p "${DESTDIR}" "${SRCDIR}/repo" /dev - -build flex-2.5.11 - -# Rebuild tcc with some patches -build tcc-0.9.27 tcc-mes-pass2.sh - -# shellcheck disable=SC2034 -LIBDIR="${PREFIX}/lib/i386-unknown-linux-musl" - -build musl-1.1.24 - -# Rebuild tcc using musl -build tcc-0.9.27 tcc-musl-pass1.sh - -# Rebuild musl using tcc-musl -build musl-1.1.24 - -# Rebuild tcc-musl using new musl -build tcc-0.9.27 tcc-musl-pass2.sh - -# Rebuild sed using musl -build sed-4.0.9 sed-4.0.9.sh - -# Rebuild bzip2 using musl -build bzip2-1.0.8 bzip2-1.0.8.sh - -build m4-1.4.7 - -build flex-2.6.4 - -build bison-3.4.1 stage1.sh -build bison-3.4.1 stage2.sh -build bison-3.4.1 stage3.sh - -build grep-2.4 - -build diffutils-2.7 - -# Rebuild coreutils using musl -build coreutils-5.0 coreutils-5.0.sh patches-musl - -# Build only date, mktemp and sha256sum -build coreutils-6.10 - -build gawk-3.0.4 - -build perl-5.000 - -build perl-5.003 - -build perl5.004-05 '' '' perl5.004_05 - -build perl5.005-03 '' '' perl5.005_03 - -build perl-5.6.2 - -populate_device_nodes - -build autoconf-2.52 - -build automake-1.6.3 stage1.sh -build automake-1.6.3 stage2.sh - -build autoconf-2.53 - -build automake-1.7 - -build autoconf-2.54 - -build autoconf-2.55 - -build automake-1.7.8 - -build autoconf-2.57 - -build autoconf-2.59 - -build automake-1.8.5 - -build help2man-1.36.4 - -build autoconf-2.61 - -build automake-1.9.6 - -build automake-1.10.3 - -build autoconf-2.64 - -build automake-1.11.2 - -build autoconf-2.69 - -build libtool-2.2.4 - -cat > .env <<- EOF -export PATH=${PATH} -PREFIX=${PREFIX} -LIBDIR=${LIBDIR} -SOURCES=${SOURCES} -DESTDIR=${DESTDIR} -DISTFILES=${DISTFILES} -SRCDIR=${SRCDIR} -MAKEJOBS=${MAKEJOBS} -EOF - -exec env -i bash run2.sh diff --git a/sysa/run2.sh b/sysa/run2.sh @@ -1,119 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -e - -# shellcheck source=/dev/null -. .env - -# shellcheck source=sysa/helpers.sh -. helpers.sh - -create_sysb() { - # Copy everything in - echo "Creating sysb rootfs" - sys_transfer /sysb_image /sysb gzip patch - cp -rl /sysc /sysb_image/sysc_src - echo "Creating sysb initramfs" - gen_initramfs_list.sh -o "/boot/initramfs-sysb.cpio.gz" /sysb_image - rm -rf /sysb /sysb_image # Cleanup -} - -go_sysb() { - if [ "${KERNEL_BOOTSTRAP}" = True ]; then - kexec-linux "/dev/ram1" "/boot/linux-4.9.10" "/boot/initramfs-sysb.cpio.gz" - else - # Mount proc for kexec - mkdir /proc /etc - mount -t proc proc /proc - # kexec time - echo "Loading kernel + sysb initramfs using kexec" - if [ "${BARE_METAL}" = True ]; then - kexec -l "/boot/linux-4.9.10" \ - --initrd="/boot/initramfs-sysb.cpio.gz" \ - --append="init=/init" - else - kexec -l "/boot/linux-4.9.10" --console-serial \ - --initrd="/boot/initramfs-sysb.cpio.gz" \ - --append="init=/init console=ttyS0" - fi - echo "kexecing into sysb" - kexec -e - fi -} - -build automake-1.15.1 - -build binutils-2.30 - -# Build musl with fewer patches -build musl-1.1.24 binutils-rebuild.sh patches-pass3 - -# Rebuild tcc-musl using new musl -build tcc-0.9.27 tcc-musl-pass3.sh patches-musl-pass3 - -populate_device_nodes - -build gcc-4.0.4 pass1.sh - -build findutils-4.2.33 - -build musl-1.2.4 - -build linux-headers-4.9.10 '' '' linux-4.9.10 - -build gcc-4.0.4 pass2.sh - -build util-linux-2.19.1 - -build e2fsprogs-1.45.7 - -build dhcpcd-10.0.1 - -build kbd-1.15 - -build make-3.82 - -build ed-1.4 - -build bc-1.07.1 - -if [ "${CHROOT}" = False ] || [ "${BUILD_KERNELS}" = True ]; then - # Save because linux deletes all distfiles to save space - cp "${DISTFILES}"/musl-1.2.4.tar.gz "${SOURCES}"/musl-1.2.4 -fi - -mkdir -p /sysc/distfiles -cp "${DISTFILES}"/curl-7.88.1.tar.bz2 /sysc/distfiles - -# Clear up some RAM space -grep --no-filename '^build' "${SOURCES}"/run*.sh | grep -v musl-1.2.4 | sed "s/build //" | sed "s/ .*$//" | while read -r p ; do - rm -rf "${SOURCES:?}/${p:?}" -done - -if [ "${CHROOT}" = False ] || [ "${BUILD_KERNELS}" = True ]; then - build kexec-linux-1.0.0 - - build kexec-tools-2.0.22 - - build linux-4.9.10 -fi - -build musl-1.2.4 '' no-patches - -if [ "${CHROOT}" = False ]; then - create_sysb - go_sysb -else - # In chroot mode transition directly into System C. - SYSC=/sysc_image - sys_transfer "${SYSC}" /sysc gzip patch - if [ "${CHROOT_ONLY_SYSA}" != True ]; then - exec chroot "${SYSC}" /init - fi -fi diff --git a/sysa/stage0-posix/src b/sysa/stage0-posix/src @@ -1 +0,0 @@ -Subproject commit a5c382e9ab5d070d192841122e453ca72754eec1 diff --git a/sysa/tcc-0.9.26/tcc-0.9.26.kaem b/sysa/tcc-0.9.26/tcc-0.9.26.kaem @@ -1,333 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -ex - -# Vars -MES_STACK=15000000 -MES_ARENA=30000000 -MES_MAX_ARENA=30000000 -MES_LIB=${MES_PREFIX}/lib -MES_SOURCE=${MES_PREFIX} -MES=${BINDIR}/mes - -TCC_TAR=tcc-0.9.26 -TCC_PKG=tcc-0.9.26-1147-gee75a10c - -# Check tarball checksums -checksum-transcriber sources -sha256sum -c sources.SHA256SUM - -# Unpack -mkdir src build - -cd src -ungz --file ${DISTFILES}/${TCC_TAR}.tar.gz --output ${TCC_TAR}.tar -ungz --file ${DISTFILES}/${MES_PKG}.tar.gz --output ${MES_PKG}.tar -cd .. - -cd build -untar --non-strict --file ../src/${TCC_TAR}.tar -simple-patch ${TCC_PKG}/tcctools.c \ - ../simple-patches/remove-fileopen.before ../simple-patches/remove-fileopen.after -simple-patch ${TCC_PKG}/tcctools.c \ - ../simple-patches/addback-fileopen.before ../simple-patches/addback-fileopen.after - -untar --non-strict --file ../src/${MES_PKG}.tar - -# Create config.h -catm ${MES_PKG_DIR}/include/mes/config.h -catm ${TCC_PKG}/config.h -cd ${TCC_PKG} - -if match ${ARCH} x86; then - MES_ARCH=x86 - TCC_TARGET_ARCH=I386 - MES_LIBC_SUFFIX=gcc - HAVE_LONG_LONG=0 -fi -if match ${ARCH} amd64; then - MES_ARCH=x86_64 - TCC_TARGET_ARCH=X86_64 - MES_LIBC_SUFFIX=gcc - HAVE_LONG_LONG=1 -fi -if match ${ARCH} riscv64; then - MES_ARCH=riscv64 - TCC_TARGET_ARCH=RISCV64 - MES_LIBC_SUFFIX=tcc - HAVE_LONG_LONG=1 -fi - - -${MES} --no-auto-compile -e main ${BINDIR}/mescc.scm -- \ - -S \ - -o tcc.s \ - -I ${INCDIR} \ - -D BOOTSTRAP=1 \ - -D HAVE_LONG_LONG=${HAVE_LONG_LONG} \ - -I . \ - -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ - -D inline= \ - -D CONFIG_TCCDIR=\"${LIBDIR}/tcc\" \ - -D CONFIG_SYSROOT=\"/\" \ - -D CONFIG_TCC_CRTPREFIX=\"${LIBDIR}\" \ - -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ - -D CONFIG_TCC_SYSINCLUDEPATHS=\"${PREFIX}/include/mes\" \ - -D TCC_LIBGCC=\"${LIBDIR}/libc.a\" \ - -D CONFIG_TCC_LIBTCC1_MES=0 \ - -D CONFIG_TCCBOOT=1 \ - -D CONFIG_TCC_STATIC=1 \ - -D CONFIG_USE_LIBGCC=1 \ - -D TCC_VERSION=\"0.9.26\" \ - -D ONE_SOURCE=1 \ - tcc.c -${MES} --no-auto-compile -e main ${BINDIR}/mescc.scm -- \ - --base-address 0x08048000 \ - -o tcc-mes \ - -L ${LIBDIR} \ - tcc.s \ - -l c+tcc -cp tcc-mes ${BINDIR}/ -chmod 755 ${BINDIR}/tcc-mes - -# test tcc-mes -tcc-mes -version - -# Recompile the mes C library -cd ../${MES_PKG} - -# Create unified libc file -cd lib -catm ../unified-libc.c ctype/isalnum.c ctype/isalpha.c ctype/isascii.c ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c ctype/islower.c ctype/isnumber.c ctype/isprint.c ctype/ispunct.c ctype/isspace.c ctype/isupper.c ctype/isxdigit.c ctype/tolower.c ctype/toupper.c dirent/closedir.c dirent/__getdirentries.c dirent/opendir.c dirent/readdir.c linux/access.c linux/brk.c linux/chdir.c linux/chmod.c linux/clock_gettime.c linux/close.c linux/dup2.c linux/dup.c linux/execve.c linux/fcntl.c linux/fork.c linux/fsync.c linux/fstat.c linux/_getcwd.c linux/getdents.c linux/getegid.c linux/geteuid.c linux/getgid.c linux/getpid.c linux/getppid.c linux/getrusage.c linux/gettimeofday.c linux/getuid.c linux/ioctl.c linux/ioctl3.c linux/kill.c linux/link.c linux/lseek.c linux/lstat.c linux/malloc.c linux/mkdir.c linux/mknod.c linux/nanosleep.c linux/_open3.c linux/pipe.c linux/_read.c linux/readlink.c linux/rename.c linux/rmdir.c linux/setgid.c linux/settimer.c linux/setuid.c linux/signal.c linux/sigprogmask.c linux/symlink.c linux/stat.c linux/time.c linux/unlink.c linux/waitpid.c linux/wait4.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/_exit.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/syscall.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/_write.c math/ceil.c math/fabs.c math/floor.c mes/abtod.c mes/abtol.c mes/__assert_fail.c mes/assert_msg.c mes/__buffered_read.c mes/__init_io.c mes/cast.c mes/dtoab.c mes/eputc.c mes/eputs.c mes/fdgetc.c mes/fdgets.c mes/fdputc.c mes/fdputs.c mes/fdungetc.c mes/globals.c mes/itoa.c mes/ltoab.c mes/ltoa.c mes/__mes_debug.c mes/mes_open.c mes/ntoab.c mes/oputc.c mes/oputs.c mes/search-path.c mes/ultoa.c mes/utoa.c posix/alarm.c posix/buffered-read.c posix/execl.c posix/execlp.c posix/execv.c posix/execvp.c posix/getcwd.c posix/getenv.c posix/isatty.c posix/mktemp.c posix/open.c posix/raise.c posix/sbrk.c posix/setenv.c posix/sleep.c posix/unsetenv.c posix/wait.c posix/write.c stdio/clearerr.c stdio/fclose.c stdio/fdopen.c stdio/feof.c stdio/ferror.c stdio/fflush.c stdio/fgetc.c stdio/fgets.c stdio/fileno.c stdio/fopen.c stdio/fprintf.c stdio/fputc.c stdio/fputs.c stdio/fread.c stdio/freopen.c stdio/fscanf.c stdio/fseek.c stdio/ftell.c stdio/fwrite.c stdio/getc.c stdio/getchar.c stdio/perror.c stdio/printf.c stdio/putc.c stdio/putchar.c stdio/remove.c stdio/snprintf.c stdio/sprintf.c stdio/sscanf.c stdio/ungetc.c stdio/vfprintf.c stdio/vfscanf.c stdio/vprintf.c stdio/vsnprintf.c stdio/vsprintf.c stdio/vsscanf.c stdlib/abort.c stdlib/abs.c stdlib/alloca.c stdlib/atexit.c stdlib/atof.c stdlib/atoi.c stdlib/atol.c stdlib/calloc.c stdlib/__exit.c stdlib/exit.c stdlib/free.c stdlib/mbstowcs.c stdlib/puts.c stdlib/qsort.c stdlib/realloc.c stdlib/strtod.c stdlib/strtof.c stdlib/strtol.c stdlib/strtold.c stdlib/strtoll.c stdlib/strtoul.c stdlib/strtoull.c string/bcmp.c string/bcopy.c string/bzero.c string/index.c string/memchr.c string/memcmp.c string/memcpy.c string/memmem.c string/memmove.c string/memset.c string/rindex.c string/strcat.c string/strchr.c string/strcmp.c string/strcpy.c string/strcspn.c string/strdup.c string/strerror.c string/strlen.c string/strlwr.c string/strncat.c string/strncmp.c string/strncpy.c string/strpbrk.c string/strrchr.c string/strspn.c string/strstr.c string/strupr.c stub/atan2.c stub/bsearch.c stub/chown.c stub/__cleanup.c stub/cos.c stub/ctime.c stub/exp.c stub/fpurge.c stub/freadahead.c stub/frexp.c stub/getgrgid.c stub/getgrnam.c stub/getlogin.c stub/getpgid.c stub/getpgrp.c stub/getpwnam.c stub/getpwuid.c stub/gmtime.c stub/ldexp.c stub/localtime.c stub/log.c stub/mktime.c stub/modf.c stub/mprotect.c stub/pclose.c stub/popen.c stub/pow.c stub/rand.c stub/rewind.c stub/setbuf.c stub/setgrent.c stub/setlocale.c stub/setvbuf.c stub/sigaction.c stub/sigaddset.c stub/sigblock.c stub/sigdelset.c stub/sigemptyset.c stub/sigsetmask.c stub/sin.c stub/sys_siglist.c stub/system.c stub/sqrt.c stub/strftime.c stub/times.c stub/ttyname.c stub/umask.c stub/utime.c ${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/setjmp.c -cd .. - -# crt1.o -tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c - -catm ${LIBDIR}/crtn.o -catm ${LIBDIR}/crti.o -if match ${ARCH} x86; then - # crtn.o - tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c - - # crti.o - tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c -fi - -# libc+gcc.a -tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c -tcc-mes -ar cr ${LIBDIR}/libc.a unified-libc.o - -# libtcc1.a -mkdir ${LIBDIR}/tcc -tcc-mes -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c -if match ${ARCH} riscv64; then - tcc-mes -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c - tcc-mes -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o lib-arm64.o -else - tcc-mes -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o -fi - -# libgetopt.a -tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} lib/posix/getopt.c -tcc-mes -ar cr ${LIBDIR}/libgetopt.a getopt.o - -cd ../${TCC_PKG} - -# boot0 (ref comments here for all boot*) -# compile -tcc-mes \ - -g \ - -v \ - -static \ - -o tcc-boot0 \ - -D BOOTSTRAP=1 \ - -D HAVE_FLOAT=1 \ - -D HAVE_BITFIELD=1 \ - -D HAVE_LONG_LONG=1 \ - -D HAVE_SETJMP=1 \ - -I . \ - -I ${PREFIX}/include/mes \ - -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ - -D CONFIG_TCCDIR=\"${LIBDIR}/tcc\" \ - -D CONFIG_TCC_CRTPREFIX=\"${LIBDIR}\" \ - -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ - -D CONFIG_TCC_LIBPATHS=\"${LIBDIR}:${LIBDIR}/tcc\" \ - -D CONFIG_TCC_SYSINCLUDEPATHS=\"${PREFIX}/include/mes\" \ - -D TCC_LIBGCC=\"${LIBDIR}/libc.a\" \ - -D TCC_LIBTCC1=\"libtcc1.a\" \ - -D CONFIG_TCCBOOT=1 \ - -D CONFIG_TCC_STATIC=1 \ - -D CONFIG_USE_LIBGCC=1 \ - -D TCC_VERSION=\"0.9.26\" \ - -D ONE_SOURCE=1 \ - -L . \ - -L ${LIBDIR} \ - tcc.c -# Install -cp tcc-boot0 ${BINDIR}/ -chmod 755 ${BINDIR}/tcc-boot0 -cd ../${MES_PKG_DIR} -# Recompile libc: crt{1,n,i}, libtcc.a, libc.a -tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c -if match ${ARCH} x86; then - tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c - tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c -fi - -tcc-boot0 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c -if match ${ARCH} riscv64; then - tcc-boot0 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c - tcc-boot0 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o lib-arm64.o -else - tcc-boot0 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o -fi - -tcc-boot0 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c -tcc-boot0 -ar cr ${LIBDIR}/libc.a unified-libc.o -cd ../${TCC_PKG} - -# Test boot0 -tcc-boot0 -version - -# boot1 -tcc-boot0 \ - -g \ - -v \ - -static \ - -o tcc-boot1 \ - -D BOOTSTRAP=1 \ - -D HAVE_FLOAT=1 \ - -D HAVE_BITFIELD=1 \ - -D HAVE_LONG_LONG=1 \ - -D HAVE_SETJMP=1 \ - -I . \ - -I ${PREFIX}/include/mes \ - -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ - -D CONFIG_TCCDIR=\"${LIBDIR}/tcc\" \ - -D CONFIG_TCC_CRTPREFIX=\"${LIBDIR}\" \ - -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ - -D CONFIG_TCC_LIBPATHS=\"${LIBDIR}:${LIBDIR}/tcc\" \ - -D CONFIG_TCC_SYSINCLUDEPATHS=\"${PREFIX}/include/mes\" \ - -D TCC_LIBGCC=\"${LIBDIR}/libc.a\" \ - -D TCC_LIBTCC1=\"libtcc1.a\" \ - -D CONFIG_TCCBOOT=1 \ - -D CONFIG_TCC_STATIC=1 \ - -D CONFIG_USE_LIBGCC=1 \ - -D TCC_VERSION=\"0.9.26\" \ - -D ONE_SOURCE=1 \ - -L . \ - tcc.c -cp tcc-boot1 ${BINDIR} -chmod 755 ${BINDIR}/tcc-boot1 -cd ../${MES_PKG_DIR} -tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c -if match ${ARCH} x86; then - tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c - tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c -fi - -tcc-boot1 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c -if match ${ARCH} riscv64; then - tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c - tcc-boot1 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o lib-arm64.o -else - tcc-boot1 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o -fi - -tcc-boot1 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c -tcc-boot1 -ar cr ${LIBDIR}/libc.a unified-libc.o -cd ../${TCC_PKG} - -# Test boot1 -tcc-boot1 -version - -# boot2 -tcc-boot1 \ - -g \ - -v \ - -static \ - -o tcc-boot2 \ - -D BOOTSTRAP=1 \ - -D HAVE_BITFIELD=1 \ - -D HAVE_FLOAT=1 \ - -D HAVE_LONG_LONG=1 \ - -D HAVE_SETJMP=1 \ - -I . \ - -I ${PREFIX}/include/mes \ - -D TCC_TARGET_${TCC_TARGET_ARCH}=1 \ - -D CONFIG_TCCDIR=\"${LIBDIR}/tcc\" \ - -D CONFIG_TCC_CRTPREFIX=\"${LIBDIR}\" \ - -D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \ - -D CONFIG_TCC_LIBPATHS=\"${LIBDIR}:${LIBDIR}/tcc\" \ - -D CONFIG_TCC_SYSINCLUDEPATHS=\"${PREFIX}/include/mes\" \ - -D TCC_LIBGCC=\"${LIBDIR}/libc.a\" \ - -D TCC_LIBTCC1=\"libtcc1.a\" \ - -D CONFIG_TCCBOOT=1 \ - -D CONFIG_TCC_STATIC=1 \ - -D CONFIG_USE_LIBGCC=1 \ - -D TCC_VERSION=\"0.9.26\" \ - -D ONE_SOURCE=1 \ - -L . \ - tcc.c -cp tcc-boot2 ${BINDIR} -chmod 755 ${BINDIR}/tcc-boot2 -cd ../${MES_PKG_DIR} -tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crt1.o lib/linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/crt1.c -if match ${ARCH} x86; then - tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crtn.o lib/linux/${MES_ARCH}-mes-gcc/crtn.c - tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o ${LIBDIR}/crti.o lib/linux/${MES_ARCH}-mes-gcc/crti.c -fi - -tcc-boot2 -c -D HAVE_CONFIG_H=1 -D HAVE_LONG_LONG=1 -D HAVE_FLOAT=1 -I include -I include/linux/${MES_ARCH} -o libtcc1.o lib/libtcc1.c -if match ${ARCH} riscv64; then - tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o lib-arm64.o ../${TCC_PKG}/lib/lib-arm64.c - tcc-boot2 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o lib-arm64.o -else - tcc-boot2 -ar cr ${LIBDIR}/tcc/libtcc1.a libtcc1.o -fi - -tcc-boot2 -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -o unified-libc.o unified-libc.c -tcc-boot2 -ar cr ${LIBDIR}/libc.a unified-libc.o -cd ../${TCC_PKG} - -# Test boot2 -tcc-boot2 -version - -# We have our final tcc 0.9.26! -cp ${BINDIR}/tcc-boot2 ${BINDIR}/tcc -chmod 755 ${BINDIR}/tcc -rm ${BINDIR}/tcc-boot2 -cp ${BINDIR}/tcc ${BINDIR}/tcc-0.9.26 -chmod 755 ${BINDIR}/tcc-0.9.26 - -# Also recompile getopt, we don't need to do this during the boot* stages -# because nothing is linked against it -cd ../${MES_PKG_DIR} -tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} lib/posix/getopt.c -tcc -ar cr ${LIBDIR}/libgetopt.a getopt.o - -cd ../.. - -# Checksums -if match x${UPDATE_CHECKSUMS} xTrue; then - sha256sum -o ${pkg}.checksums \ - /usr/bin/tcc-mes \ - /usr/bin/tcc-boot0 \ - /usr/bin/tcc-boot1 \ - /usr/bin/tcc \ - /usr/lib/mes/libc.a \ - /usr/lib/mes/libgetopt.a \ - /usr/lib/mes/crt1.o \ - /usr/lib/mes/crti.o \ - /usr/lib/mes/crtn.o \ - /usr/lib/mes/tcc/libtcc1.a - - cp ${pkg}.checksums ${SRCDIR} -else - sha256sum -c ${pkg}.${ARCH}.checksums -fi diff --git a/sysa/tcc-0.9.26/tcc-0.9.26.x86.checksums b/sysa/tcc-0.9.26/tcc-0.9.26.x86.checksums @@ -1,10 +0,0 @@ -df26fbd23970aabf234c4788079a48f12b6ca371edf35108d91b6a48df6123e1 /usr/bin/tcc-mes -bf1740e71fc255b9debb5dc8211ea640c7a7fcf46b20c81657dcfa4fb4de3d07 /usr/bin/tcc-boot0 -627e9263fb7746a0356937d514cf4eb2fb688b36c8a4101a35f62c55e246c3a1 /usr/bin/tcc-boot1 -dca963a46a4b9828bb279201486a90b2f6db8aa6ff2cbb270f2c9838f8af9fdd /usr/bin/tcc -3bfd10dfe347c4fb40fbf5f2f705cd806c77e0f80cf4ad1ecfd4beddada2937c /usr/lib/mes/libc.a -12c07ae103e7e3b390150a79e5c600d88de14e9bb73a066f6342582729ef5a3f /usr/lib/mes/libgetopt.a -76d280e0733f2c84aad180968167d789a825ac56526bddba4f100d6d74851027 /usr/lib/mes/crt1.o -09d4f9821a2566f7e56381a19259c41bd97f3c5ed83f490705acbfd1139a7736 /usr/lib/mes/crti.o -461ca1494737fab86fe1c1d3addeaf9d0ece413e353abcdea8674db3f700cda3 /usr/lib/mes/crtn.o -136f97c356445ef95c35ae1b6fb2f7a0546e3cf47b45cb4ee79d0a8f29cd04b4 /usr/lib/mes/tcc/libtcc1.a diff --git a/sysa/tcc-0.9.27/patches-musl-pass3/ignore-static-inside-array.patch b/sysa/tcc-0.9.27/patches-musl-pass3/ignore-static-inside-array.patch @@ -1 +0,0 @@ -../patches/ignore-static-inside-array.patch -\ No newline at end of file diff --git a/sysa/tcc-0.9.27/patches-musl-pass3/static-link.patch b/sysa/tcc-0.9.27/patches-musl-pass3/static-link.patch @@ -1 +0,0 @@ -../patches/static-link.patch -\ No newline at end of file diff --git a/sysa/tcc-0.9.27/tcc-0.9.27.checksums b/sysa/tcc-0.9.27/tcc-0.9.27.checksums @@ -1 +0,0 @@ -428251dc2b2de01b9cfe27b3bfd5c8fdc170e442027361e7070f3bc41841a4b7 /usr/bin/tcc diff --git a/sysb/init b/sysb/init @@ -1,46 +0,0 @@ -#!/usr/bin/bash - -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -e - -PREFIX=/usr -SOURCES="${PREFIX}/src" - -export PATH="${PREFIX}/bin" - -# shellcheck source=sysa/helpers.sh -. /usr/src/helpers.sh - -echo -echo "Installing packages into sysb" - -install_tar() { - echo "${1}: installing package" - src_apply "$@" -} - -# Install needed packages. -install_tar coreutils-5.0 0 -install_tar sed-4.0.9 0 - -install_tar bzip2-1.0.8 0 -install_tar coreutils-6.10 0 -install_tar e2fsprogs-1.45.7 0 -install_tar grep-2.4 0 -install_tar kexec-tools-2.0.22 0 -install_tar util-linux-2.19.1 0 - -# Begin sysb bootstrapping process -cd "${SOURCES}" - -cat > .env <<- EOF -export PATH=${PATH} -PREFIX=${PREFIX} -SOURCES=${SOURCES} -EOF - -exec env -i bash run.sh diff --git a/sysb/run.sh b/sysb/run.sh @@ -1,95 +0,0 @@ -#!/usr/bin/bash - -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -e - -# shellcheck source=/dev/null -. .env - -# shellcheck source=sysa/helpers.sh -. helpers.sh - -# Unload the current kernel before things go weird -kexec -u - -create_hdx() { - # Create all of the sd{a,b,c..} - minor=0 - alpha="a b c d e f g h i j k l m n o p" # 16 disks -- more than enough - # For each disk... - for a in ${alpha}; do - mknod -m 600 "/dev/sd${a}" b 8 "$((minor++))" - # For each partition... - for p in $(seq 15); do - mknod -m 600 "/dev/sd${a}${p}" b 8 "$((minor++))" - done - done -} - -# All the various structures that don't exist but needed to mount -mkdir -p /etc /dev -populate_device_nodes -create_hdx - -ask_disk() { - echo - echo "What disk would you like to use for live-bootstrap?" - echo "This disk may have pre-prepared sources on it." - echo "If there is no partition we will make one". - echo "Please provide in format sdxx (as you would find under /dev)," - echo "or sdx if it is a blank disk. An ext4 partition is expected on" - echo "existing disks." - echo "You can type 'list' to get a list of disks to help you figure" - echo "out which is the right disk." - echo "NO WARRANTY IS PROVIDED FOR BUGGY BEHAVIOUR, INCLUDING THAT" - echo "REGARDING DISKS & DATA." - echo - read -r DISK - - if [ "${DISK}" = "list" ]; then - fdisk -l - ask_disk - elif [ -z "${DISK}" ] || ! [ -e "/dev/${DISK}" ]; then - echo "Invalid." - ask_disk - fi -} - -if [ -z "${DISK}" ] || ! [ -e "/dev/${DISK}" ]; then - echo "You did not provide a valid disk in the configuration file." - ask_disk - - echo "DISK=${DISK}" >> /usr/src/bootstrap.cfg -fi - -# Is it a full disk, and not a partition? -# shellcheck disable=SC2012 -if [ $(($(ls -l "/dev/${DISK}" | sed "s/.*, *//" | sed "s/ .*//") % 8)) -eq 0 ]; then - echo "Creating partition table..." - echo ";" | sfdisk "/dev/${DISK}" - fdisk -l "/dev/${DISK}" - echo "Creating ext4 partition..." - mkfs.ext4 "/dev/${DISK}1" - DISK="${DISK}1" -fi -echo "DISK=${DISK}" >> /usr/src/bootstrap.cfg - -SYSC=/sysc - -# Otherwise, add stuff from sysa to sysb -echo "Mounting sysc" -mkdir /sysc -mount -t ext4 "/dev/${DISK}" /sysc - -# Copy over appropriate data -echo "Copying data into sysc" -sys_transfer "${SYSC}" /sysc_src gzip patch -sync - -# switch_root into sysc 1. for simplicity 2. to avoid kexecing again -# spouts a few errors because we don't have /proc /sys or /dev mounted -echo "Switching into sysc" -exec switch_root /sysc /init diff --git a/sysc.py b/sysc.py @@ -1,49 +0,0 @@ -#!/usr/bin/env python3 -"""System C""" -# SPDX-License-Identifier: GPL-3.0-or-later -# SPDX-FileCopyrightText: 2022-2023 Dor Askayo <dor.askayo@gmail.com> -# SPDX-FileCopyrightText: 2021-23 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> - -import os - -from lib.utils import copytree -from lib.sysgeneral import SysGeneral - -# pylint: disable=consider-using-with -# pylint: disable=too-many-instance-attributes -class SysC(SysGeneral): - """ - Class responsible for preparing sources for System C. - """ - - git_dir = os.path.dirname(os.path.join(__file__)) - sys_dir = os.path.join(git_dir, 'sysc') - cache_dir = os.path.join(sys_dir, 'distfiles') - - def __init__(self, tmpdir, arch, external_sources): - self.arch = arch - self.external_sources = external_sources - self._tmpdir = tmpdir - - self.tmp_dir = tmpdir.add_sys("sysc") - - def prepare(self, create_disk_image): - """ - Prepare directory structure for System C. - """ - if create_disk_image: - self._tmpdir.add_disk("sysc") - - if self.external_sources: - if create_disk_image: - rootfs_dir = self._tmpdir.mount_disk("sysc", size="16G") - else: - rootfs_dir = self.tmp_dir - source_manifest = self.get_source_manifest() - self.get_packages(source_manifest) - - copytree(self.cache_dir, os.path.join(rootfs_dir, "distfiles")) - - if create_disk_image: - self._tmpdir.umount_disk("sysc") diff --git a/sysc/after.sh b/sysc/after.sh @@ -1,38 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-License-Identifier: MIT - -# Replace this hook if you wish to do more -# Add Dev Nodes -# Disk Nodes -# 3 disks 3 partitions -major=0 -alpha="a b c" -# For each disk... -for a in ${alpha}; do - mknod -m 600 "/dev/sd${a}" b 8 "$((major*16))" - #For each partition do... - minor=1 - for p in $(seq 3); do - mknod -m 600 "/dev/sd${a}${p}" b 8 "$((major*16+minor++))" - done - ((major++)) -done -# NVME Nodes -# 3 NVME disk with 3 partitions -major=0 -# For each disk... -for a in $(seq 3); do - mknod -m 600 "/dev/nvme${a}" c 259 0 # NVME CHAR node - mknod -m 600 "/dev/nvme${a}n1" b 259 "$((major))" - ((major++)) - # For each partition... - for q in $(seq 3); do - mknod -m 600 "/dev/nvme${a}n1p${q}" b 259 "$((major++))" - done -done -# add cd-rom drive -mknod -m 600 /dev/sr0 b 11 0 -. /usr/src/.env -exec env - PATH="${PREFIX}/bin" PS1="\w # " bash -i diff --git a/sysc/curl-7.88.1/sources b/sysc/curl-7.88.1/sources @@ -1 +0,0 @@ -https://curl.se/download/curl-7.88.1.tar.bz2 8224b45cce12abde039c12dc0711b7ea85b104b9ad534d6e4c5b4e188a61c907 diff --git a/sysc/init b/sysc/init @@ -1,84 +0,0 @@ -#!/usr/bin/bash - -# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -e - -PREFIX=/usr -LIBDIR="${PREFIX}/lib/i386-unknown-linux-musl" -SOURCES="${PREFIX}/src" -DESTDIR=/tmp/destdir -DISTFILES=/distfiles -SRCDIR="${SOURCES}" - -export PATH="${PREFIX}/bin:${PREFIX}/sbin" -export HOME=/tmp -export SOURCE_DATE_EPOCH=0 - -# shellcheck source=sysa/helpers.sh -. "${SOURCES}/helpers.sh" - -MAKEJOBS="-j${JOBS}" - -echo -echo "Installing packages into sysc" - -install_tar() { - echo "${1}: installing package" - src_apply "$@" -} - -# Install packages. -# First two packages must be coreutils and sed - -install_tar coreutils-5.0 0 -install_tar sed-4.0.9 0 - -install_tar autoconf-2.64 0 -install_tar autoconf-2.69 0 -install_tar automake-1.11.2 0 -install_tar automake-1.15.1 0 -install_tar binutils-2.30 0 -install_tar bzip2-1.0.8 0 -install_tar bison-3.4.1 2 -install_tar coreutils-6.10 0 -install_tar dhcpcd-10.0.1 0 -install_tar diffutils-2.7 0 -install_tar findutils-4.2.33 0 -install_tar flex-2.6.4 0 -install_tar gawk-3.0.4 0 -install_tar gcc-4.0.4 1 -install_tar grep-2.4 0 -install_tar help2man-1.36.4 0 -install_tar libtool-2.2.4 0 -install_tar linux-headers-5.10.41 0 -install_tar m4-1.4.7 0 -install_tar make-3.82 0 -install_tar musl-1.2.4 1 -install_tar perl-5.6.2 0 -install_tar util-linux-2.19.1 0 - -# Fix invocation of bash from perl -ln -s /usr/bin/bash /usr/bin/sh - -# Begin sysc bootstrapping process -cd "${SOURCES}" - -cat > .env <<- EOF -export PATH=${PATH} -export HOME=${HOME} -export SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} -PREFIX=${PREFIX} -LIBDIR=${LIBDIR} -SOURCES=${SOURCES} -DESTDIR=${DESTDIR} -DISTFILES=${DISTFILES} -SRCDIR=${SRCDIR} -MAKEJOBS=${MAKEJOBS} -INTERNAL_CI=${INTERNAL_CI} -EOF - -exec env -i bash run.sh diff --git a/sysc/musl-1.2.4/musl-1.2.4.sh b/sysc/musl-1.2.4/musl-1.2.4.sh @@ -1,51 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com> -# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -src_configure() { - ./configure \ - --host=i386-unknown-linux-musl \ - --prefix="${PREFIX}" \ - --libdir="${LIBDIR}" \ - --includedir="${PREFIX}/include/" -} - -src_compile() { - make "${MAKEJOBS}" CROSS_COMPILE= -} - -src_install() { - default - - # Make dynamic linker symlink relative in ${PREFIX}/lib - rm "${DESTDIR}/lib/ld-musl-i386.so.1" - rmdir "${DESTDIR}/lib" - mkdir -p "${DESTDIR}${PREFIX}/lib" - ln -sr "${DESTDIR}${LIBDIR}/libc.so" "${DESTDIR}${PREFIX}/lib/ld-musl-i386.so.1" - - # Make startup objects available in /usr/lib - # Expected by GCC 10+ - for i in crt1.o crti.o crtn.o Scrt1.o rcrt1.o; do - ln -sr "${DESTDIR}${LIBDIR}/${i}" "${DESTDIR}${PREFIX}/lib/${i}" - done - - # Add symlink for ldd - mkdir -p "${DESTDIR}${PREFIX}/bin" - ln -s ../lib/ld-musl-i386.so.1 "${DESTDIR}${PREFIX}/bin/ldd" - - # Add library search path configurtion - mkdir -p "${DESTDIR}/etc" - cp ld-musl-i386.path "${DESTDIR}/etc" - - # Re-add /bin and /lib symlinks here so that binary package - # is self-contained and usable outside live-bootstrap - ln --symbolic --relative "${DESTDIR}/${PREFIX}/lib" "${DESTDIR}/lib" - ln --symbolic --relative "${DESTDIR}/${PREFIX}/bin" "${DESTDIR}/bin" -} - -src_postprocess() { - # Stripping libc can cause some strange brokenness - : -} diff --git a/sysc/musl-1.2.4/sources b/sysc/musl-1.2.4/sources @@ -1 +0,0 @@ -https://musl.libc.org/releases/musl-1.2.4.tar.gz 7a35eae33d5372a7c0da1188de798726f68825513b7ae3ebe97aaaa52114f039 diff --git a/sysc/run.sh b/sysc/run.sh @@ -1,65 +0,0 @@ -#!/usr/bin/bash - -# SPDX-FileCopyrightText: © 2023 fosslinux <fosslinux@aussies.space> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -e - -# shellcheck source=/dev/null -. .env - -trap bash EXIT - -# shellcheck source=sysa/helpers.sh -. helpers.sh - -umask 0022 - -create_fhs() { - # Add the rest of the FHS that we will use and is not created pre-boot - rm -rf /sbin /usr/sbin - ln -s bin /usr/sbin # Hack to fix xbps (alternatively need to install which) - for d in bin lib sbin; do - ln -s "usr/${d}" "/${d}" - done - mkdir -p /etc /run /var - test -d /proc || (mkdir /proc && mount -t proc proc /proc) - test -d /sys || (mkdir /sys && mount -t sysfs sysfs /sys) - # Make /tmp a ramdisk (speeds up configure etc significantly) - test -d /tmp || (mkdir /tmp && mount -t tmpfs tmpfs /tmp) - # Add /etc/resolv.conf - echo 'nameserver 1.1.1.1' > /etc/resolv.conf -} - -create_fhs - -populate_device_nodes - -if [ -e "${SOURCES}/distfiles" ]; then - mv "${SOURCES}/distfiles" / -else - mkdir -p "${DISTFILES}" -fi - -build curl-7.88.1 pass1.sh - -# Obtain network connection -if [ "${CHROOT}" = "False" ]; then - dhcpcd --waitip=4 - # Ensure network accessible - timeout=120 - while ! curl example.com >/dev/null 2>&1; do - sleep 1 - # shellcheck disable=SC2219 - let timeout-- - if [ "${timeout}" -le 0 ]; then - echo "Timeout reached for internet to become accessible" - false - fi - done -fi - -build bash-5.2.15 - -exec env -i bash run2.sh diff --git a/sysc/run2.sh b/sysc/run2.sh @@ -1,147 +0,0 @@ -#!/usr/bin/bash - -# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space> -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -e - -# shellcheck source=/dev/null -. .env - -# shellcheck disable=SC2153 -trap 'env - PATH=${PREFIX}/bin PS1="\w # " bash -i' EXIT - -# shellcheck source=sysa/helpers.sh -. helpers.sh - -build xz-5.4.1 - -build file-5.44 - -build libtool-2.4.7 - -build tar-1.34 - -build coreutils-8.32 - -build pkg-config-0.29.2 - -build make-4.2.1 - -build gmp-6.2.1 - -build autoconf-archive-2021.02.19 - -build mpfr-4.1.0 - -build mpc-1.2.1 - -build flex-2.5.33 - -build bison-2.3 - -build bison-3.4.2 - -build perl-5.10.1 - -build dist-3.5-236 - -build perl-5.32.1 - -build libarchive-3.5.2 - -build openssl-1.1.1l - -build ca-certificates-3.88.1 - -build curl-7.88.1 pass2.sh - -build zlib-1.2.13 - -build automake-1.16.3 - -build autoconf-2.71 - -build patch-2.7.6 - -build gettext-0.21 - -build texinfo-6.7 - -build gcc-4.7.4 - -build binutils-2.38 pass1.sh - -build gperf-3.1 - -build libunistring-0.9.10 - -build libffi-3.3 - -build libatomic_ops-7.6.10 - -build gc-8.0.4 - -build guile-3.0.9 - -build which-2.21 - -build grep-3.7 - -build sed-4.8 - -build autogen-5.18.16 autogen-5.18.16.sh - -build musl-1.2.4 - -build python-2.0.1 stage1.sh - -build python-2.0.1 stage2.sh - -build python-2.3.7 stage1.sh - -build python-2.3.7 stage2.sh - -build python-2.5.6 - -build python-3.1.5 stage1.sh - -build python-3.1.5 stage2.sh - -build python-3.3.7 - -build python-3.4.10 - -build python-3.8.16 - -build python-3.11.1 - -[ "${INTERNAL_CI}" = "pass2" ] && exit 0 - -build gcc-10.4.0 - -build binutils-2.38 pass2.sh - -build gcc-13.1.0 - -if [ "$FORCE_TIMESTAMPS" = True ] ; then - echo 'Forcing all files timestamps to be 0 unix time.' - canonicalise_all_files_timestamp -fi - -shopt -s extglob -if [ "$UPDATE_CHECKSUMS" = True ] ; then - pushd /usr/src/repo - sha256sum -- !(*-repodata) | tee "${SOURCES}/SHA256SUMS.pkgs" - popd -fi - -echo "Bootstrapping completed." - -cd "/" -exec env -i bash "${SOURCES}/after.sh" -