logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 6ed2e09f3a533a1efdd807a77a7c00a07bf984f1
parent 0907cfd07329805f68ae5c7976c021b95dce4f93
Author: fosslinux <fosslinux@aussies.space>
Date:   Tue,  7 Nov 2023 10:51:23 +1100

Remove the notion of "sys*"

- This idea originates from very early in the project and was, at the
  time, a very easy way to categorise things.
- Now, it doesn't really make much sense - it is fairly arbitary, often
  occuring when there is a change in kernel, but not from builder-hex0
  to fiwix, and sysb is in reality completely unnecessary.
- In short, the sys* stuff is a bit of a mess that makes the project
  more difficult to understand.
- This puts everything down into one folder and has a manifest file that
  is used to generate the build scripts on the fly rather than using
  coded scripts.
- This is created in the "seed" stage.

stage0-posix -- (calls) --> seed -- (generates) --> main steps

Alongside this change there are a variety of other smaller fixups to the
general structure of the live-bootstrap rootfs.

- Creating a rootfs has become much simpler and is defined as code in
  go.sh. The new structure, for an about-to-be booted system, is

/
-- /steps (direct copy of steps/)
-- /distfiles (direct copy of distfiles/)
-- all files from seed/*
-- all files from seed/stage0-posix/*

- There is no longer such a thing as /usr/include/musl, this didn't
  really make any sense, as musl is the final libc used. Rather, to
  separate musl and mes, we have /usr/include/mes, which is much easier
  to work with.
- This also makes mes easier to blow away later.
- A few things that weren't properly in packages have been changed;
  checksum-transcriber, simple-patch, kexec-fiwix have all been given
  fully qualified package names.
- Highly breaking change, scripts now exist in their package directory
  but NOT WITH THE packagename.sh. Rather, they use pass1.sh, pass2.sh,
  etc. This avoids manual definition of passes.
  - Ditto with patches; default directory is patches, but then any patch
    series specific to a pass are named patches-passX.

Diffstat:

M.gitignore5++---
M.gitmodules7+++----
Mdownload-distfiles.sh35+++++++++++++----------------------
Aseed/after.kaem15+++++++++++++++
Aseed/preseeded.kaem4++++
Rsysa/script-generator.c -> seed/script-generator.c0
Aseed/seed.kaem67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aseed/stage0-posix1+
Rsysa/SHA256SUMS.pkgs -> steps/SHA256SUMS.pkgs0
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
Rsysa/bash-2.05b/bash-2.05b.checksums -> steps/bash-2.05b/bash-2.05b.checksums0
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
Rsysa/bzip2-1.0.8/bzip2-1.0.8.checksums -> steps/bzip2-1.0.8/bzip2-1.0.8.checksums0
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
Rsysa/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums -> steps/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums0
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/env8++++++++
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
Rsysa/flex-2.6.4/flex-2.6.4.sh -> steps/flex-2.6.4/pass1.sh0
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
Rsysa/heirloom-devtools-070527/heirloom-devtools-070527.checksums -> steps/heirloom-devtools-070527/heirloom-devtools-070527.checksums0
Rsysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem -> steps/heirloom-devtools-070527/pass1.kaem0
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.sh11+++++++++++
Asteps/improve/finalize_fhs.sh13+++++++++++++
Asteps/improve/get_network.sh13+++++++++++++
Asteps/improve/musl_libdir.sh5+++++
Asteps/improve/null_time.sh6++++++
Asteps/improve/populate_device_nodes.sh36++++++++++++++++++++++++++++++++++++
Asteps/improve/setup_repo.sh2++
Asteps/improve/update_env.sh19+++++++++++++++++++
Asteps/jump/fiwix.sh9+++++++++
Asteps/jump/linux.sh28++++++++++++++++++++++++++++
Asteps/jump/move_disk.sh27+++++++++++++++++++++++++++
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
Rsysa/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums -> steps/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums0
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+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsysa/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums -> steps/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums0
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
Rsysa/make-3.82/make-3.82.checksums -> steps/make-3.82/make-3.82.checksums0
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/manifest169+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
Rsysa/mes-0.25/mes-0.25.x86.checksums -> steps/mes-0.25/mes-0.25.x86.checksums0
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
Rsysa/tcc-0.9.26/tcc-0.9.26.x86.checksums -> steps/tcc-0.9.26/tcc-0.9.26.x86.checksums0
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
Rsysa/tcc-0.9.27/tcc-0.9.27.checksums -> steps/tcc-0.9.27/tcc-0.9.27.checksums0
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/after-preseeded.kaem25-------------------------
Dsysa/after.kaem72------------------------------------------------------------------------
Dsysa/after2.kaem14--------------
Dsysa/base-preseeded.kaem7-------
Dsysa/coreutils-5.0/patches-musl/touch-dereference.patch2--
Dsysa/coreutils-5.0/patches-musl/touch-getdate.patch2--
Dsysa/helpers.sh505-------------------------------------------------------------------------------
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.kaem61-------------------------------------------------------------
Dsysa/mes-0.25/files/config.h7-------
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.27/patches-musl-pass3/ignore-static-inside-array.patch2--
Dsysa/tcc-0.9.27/patches-musl-pass3/static-link.patch2--
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-------------------------------------------------------------------------------
565 files changed, 2082 insertions(+), 2678 deletions(-)

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/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/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,4 @@ +#!/bin/sh + +/script-generator /steps/manifest +/usr/bin/kaem --file /preseed-jump.kaem diff --git a/sysa/script-generator.c b/seed/script-generator.c 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/sysa/SHA256SUMS.pkgs b/steps/SHA256SUMS.pkgs 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/sysa/bash-2.05b/bash-2.05b.checksums b/steps/bash-2.05b/bash-2.05b.checksums 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/sysa/bzip2-1.0.8/bzip2-1.0.8.checksums b/steps/bzip2-1.0.8/bzip2-1.0.8.checksums 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/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums b/steps/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums 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,8 @@ +DISTFILES=/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/sysa/flex-2.6.4/flex-2.6.4.sh b/steps/flex-2.6.4/pass1.sh 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/sysa/heirloom-devtools-070527/heirloom-devtools-070527.checksums b/steps/heirloom-devtools-070527/heirloom-devtools-070527.checksums diff --git a/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem b/steps/heirloom-devtools-070527/pass1.kaem 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 2>&1 >/dev/null; 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,11 @@ +# 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,13 @@ +#!/bin/sh +# 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,13 @@ +#!/bin/sh +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,5 @@ +#!/bin/sh + +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,6 @@ +#!/bin/sh + +# 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,36 @@ +#!/bin/sh + +# 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,2 @@ +#!/bin/sh +mkdir -p /external/repo diff --git a/steps/improve/update_env.sh b/steps/improve/update_env.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +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,9 @@ +#!/bin/sh + +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,28 @@ +#!/bin/bash + +. /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,27 @@ +#!/bin/sh + +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/sysa/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums b/steps/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums 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 "/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/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/sysa/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums b/steps/lwext4-1.0.0-lb1/lwext4-1.0.0-lb1.checksums 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/sysa/make-3.82/make-3.82.checksums b/steps/make-3.82/make-3.82.checksums 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,169 @@ +# 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/sysa/mes-0.25/mes-0.25.x86.checksums b/steps/mes-0.25/mes-0.25.x86.checksums 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/sysa/tcc-0.9.26/tcc-0.9.26.x86.checksums b/steps/tcc-0.9.26/tcc-0.9.26.x86.checksums 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/sysa/tcc-0.9.27/tcc-0.9.27.checksums b/steps/tcc-0.9.27/tcc-0.9.27.checksums 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/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/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/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-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.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/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/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.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/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" -