Browse Source

Update stage0-posix.

master
Andrius Štikonas 2 months ago
parent
commit
e3d0191949
  1. 32
      SHA256SUMS.sources
  2. 9
      lib/sysgeneral.py
  3. 48
      sysa.py
  4. 30
      sysa/after.kaem
  5. 1
      sysa/bash-2.05b/bash-2.05b.kaem
  6. 2
      sysa/stage0-posix/src
  7. 1
      sysc/patch-2.7.6/checksums

32
SHA256SUMS.sources

@ -14,6 +14,7 @@ e98ab43bb839c31696a4202e5b6ff388b391659ef2387cf9365019fad17e1adc automake-1.10.
4f46d1f9380c8a3506280750f630e9fc915cb1a435b724be56b499d016368718 automake-1.11.2.tar.bz2
af6ba39142220687c500f79b4aa2f181d9b24e4f8d8ec497cea4ba26c64bedaf automake-1.15.1.tar.xz
ce010788b51f64511a1e9bb2a1ec626037c6d0e7ede32c1c103611b9d3cba65f automake-1.16.3.tar.gz
ff2bf7656c4d1c6fdda3b8bebb21f09153a736bcba169aaf65eab25fa113bf3a automake-1.16.3.tar.xz
503cdc2b0992a4309545d17f462cb15f99bb57b7161dfc4082b2e7188f2bcc0f automake-1.4-p6.tar.gz
0dbafacaf21e135cab35d357a14bdcd981d2f2d00e1387801be8091a31b7bb81 automake-1.6.3.tar.bz2
2dddc3b51506e702647ccc6757e15c05323fa67245d2d53e81ed36a832f9be42 automake-1.7.8.tar.bz2
@ -30,6 +31,8 @@ ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 bzip2-1.0.8.ta
c25b36b8af6e0ad2a875daf4d6196bd0df28a62be7dd252e5f99a4d5d7288d95 coreutils-5.0.tar.bz2
1d013547889f20576460249c4210632d5314531c8477378a2e046b13a8ebeb7e coreutils-6.10.tar.gz
6f7cfc0ac6717afb6ba1f41b0da43a713ba0dd97dec1227e32effc12d79f08c1 coreutils-8.32.tar.gz
af4214b851928a53ef470ed8729122b9db910a6c0769d5d46a5de0b3e96f74f3 deblob-4.9
185cfad468a033b6c69b882c3941440e50ac3e3b68617d3d93b4a8755357d65c deblob-check
d5f2489c4056a31528e3ada4adacc23d498532b0af1a980f2f76158162b139d6 diffutils-2.7.tar.gz
54437ae4211867de7ad55723f68b94c29cb2f08a23f431e0bbbc9f34ee384f47 dist-3.5-236.tar.gz
813cd9405aceec5cfecbe96400d01e90ddad7b512d3034487176ce5258ab0f78 findutils-4.2.33.tar.gz
@ -54,21 +57,26 @@ f9aad85de1f41d57c9368d304020ffbf354a5e56db1297f022c3d12181134e56 gnulib-901694b
a285dc300c3d9c25cc06e38827ef40f6073ec3b9b0fcb5bba433f943be92d8d4 gnulib-e017871.tar.gz
588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2 gperf-3.1.tar.gz
a32032bab36208509466654df12f507600dfe0313feebbcd218c32a70bf72a16 grep-2.4.tar.gz
14cda9c416506dfadf60c14fc623ff01ef99b87564a78d0a29c5d17143c97609 guile-psyntax-bootstrapping.tar.gz
f57d86c70620271bfceb7a9be0c81744a033f08adc7ceba832c9917ab3e691b7 guile-3.0.7.tar.xz
14cda9c416506dfadf60c14fc623ff01ef99b87564a78d0a29c5d17143c97609 guile-psyntax-bootstrapping.tar.gz
1ca41818a23c9c59ef1d5e1d00c0d5eaa2285d931c0fb059637d7c0cc02ad967 gzip-1.2.4.tar.gz
9f233d8b78e4351fe9dd2d50d83958a0e5af36f54e9818521458a08e058691ba heirloom-devtools-070527.tar.bz2
a4adadf76b496a6bc50795702253ecfcb6f0d159b68038f31a5362009340bca2 help2man-1.36.4.tar.gz
203c93e004ac7ad0e50423ff54d89e40fa99f45b207b2b892a4d70211feebe05 kbd-1.15.tar.gz
af618de7848142f204b57811f703de3ae7aa3f5bc5d52226db35800fa8fc4dff kexec-tools-2.0.22.tar.gz
587edf60817f56daf1e1ab38a4b3c729b8e846ff67b4f62a6157183708f099af libatomic_ops-7.6.10.tar.gz
72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056 libffi-3.3.tar.gz
8e8ce6175d435e7df8c9bbb0e5fd5357691cdc28c1a2d00fdd9b47b7643bec3a libtool-1.4.tar.gz
c4e63399b12f5858d11c44cea8e92f21cd564f8548e488dadc84046b424c80fc libtool-2.2.4.tar.bz2
eb8fb2c3e4b6e2d336608377050892b54c3c983b646c561836550863003c05d7 libunistring-0.9.10.tar.xz
97ff15f9550c6e85c25173b3cf5c7e89a2d39fb923112f2c8bc2729cf64bf6d8 linux-4.9.10.tar.gz
84d2079a20ba32f5e2d5bc79a5dcb1de94d0176c67d75d5a20d533ea6c90d691 linux-headers-5.10.41.tar.gz
093c993767f563a11e41c1cf887f4e9065247129679d4c1e213d0544d16d8303 m4-1.4.7.tar.gz
64b30b41fde2ebf669e6af489883fb1df6a06ac30555a96cfa3c39ecce7267dd make-3.80.tar.gz
3d991b33e604187c5881a0abc2e102d5b9776da5569640e73778f85d617242e7 make-3.82.tar.gz
e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7 make-4.2.1.tar.gz
7a140e43565181bb54bf416117ea0efff057922ed284db5fc98b3740a7f3d956 mes-0.23.tar.gz
f02cfe291e49fe44bc8712bf15536654fc643c0a02b3598237fb646884d9eb37 mes.tar.gz
59de3d0d09cedfd6889b8b3c35de9d15e0ce815f1ecb5bd8dcce1397e68ed32e mes.tar.gz
17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459 mpc-1.2.1.tar.gz
0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f mpfr-4.1.0.tar.xz
1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3 musl-1.1.24.tar.gz
@ -91,24 +99,6 @@ c6c37e888b136ccefab903c51149f4b7bd659d69d4aea21245f61053a57aa60a tar-1.12.tar.g
23cacd448cff2baf6ed76c2d1e2d654ff4e557046e311dfb6be7e1c631014ef8 tcc-0.9.26.tar.gz
de23af78fca90ce32dff2dd45b3432b2334740bb9bb7b05bf60fdbfc396ceb9c tcc-0.9.27.tar.bz2
988403c1542d15ad044600b909997ba3079b10e03224c61188117f3676b02caa texinfo-6.7.tar.xz
f694bee56099b8d72c3843d97e27f2306aa9946741e34a27391f6f6f19c7bcd0 util-linux-2.19.1.tar.gz
166c48d2842519bc4f96333bff9e265f8cdda44d38e40594ef3f9bbb52890490 xz-5.0.5.tar.bz2
4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066 zlib-1.2.11.tar.xz
c40385e142989c91989413f3c5a31282b2ffdca16b69cd3ecfde537b8a474921 flex-2.5.33.tar.gz
b10d7e9e354be72aee4e4911cf19dd27b5c527d4e7200857365b5fcdeea0dffb bison-2.3.tar.bz2
0190f28cb155fedd22bf8558c3e8705eed9eacfb7ae29e7508d025a68eb90899 gnulib-b28236b.tar.gz
9385f2c8c2ca8b1dc4a7c31903f1f8dc8f2ba867dc2a9e5c93012ed6b564e826 perl-5.10.1.tar.bz2
54437ae4211867de7ad55723f68b94c29cb2f08a23f431e0bbbc9f34ee384f47 dist-3.5-236.tar.gz
e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7 make-4.2.1.tar.gz
27d05534699735dc69e86add5b808d6cb35900ad3fd63fa82e3eb644336abfa0 bison-3.4.2.tar.xz
8cced51f89a950472473856f86e88f5daf97a2347756125ccdc8ee907deec570 gnulib-672663a.tar.gz
57cc47c735c8300a8ce2fa0643507b44c4ae59012bfdad0121313db639e02309 perl-5.32.1.tar.xz
3ec396d97debb6c1a112c1c6ff58b03a55866b75cd4fe06b74295ac9c5fc5ff2 perl-5f2dc80.tar.bz2
84d2079a20ba32f5e2d5bc79a5dcb1de94d0176c67d75d5a20d533ea6c90d691 linux-headers-5.10.41.tar.gz
af618de7848142f204b57811f703de3ae7aa3f5bc5d52226db35800fa8fc4dff kexec-tools-2.0.22.tar.gz
f694bee56099b8d72c3843d97e27f2306aa9946741e34a27391f6f6f19c7bcd0 util-linux-2.19.1.tar.gz
203c93e004ac7ad0e50423ff54d89e40fa99f45b207b2b892a4d70211feebe05 kbd-1.15.tar.gz
ff2bf7656c4d1c6fdda3b8bebb21f09153a736bcba169aaf65eab25fa113bf3a automake-1.16.3.tar.xz
3d991b33e604187c5881a0abc2e102d5b9776da5569640e73778f85d617242e7 make-3.82.tar.gz
97ff15f9550c6e85c25173b3cf5c7e89a2d39fb923112f2c8bc2729cf64bf6d8 linux-4.9.10.tar.gz
db316ba381e5a9916ace64acf822f0de70a724df06f73c18d79c5d16385a0cf1 deblob-4.9
62912c9e999cc25c8cf494533d5bab8c22d9e0ee081649d3c05197b3a096aa3b deblob-check

9
lib/sysgeneral.py

@ -81,9 +81,12 @@ class SysGeneral:
# Actually download the file
if not os.path.isfile(abs_file_name):
print(f"Downloading: {file_name}")
request = requests.get(url, allow_redirects=True)
# pylint: disable=consider-using-with
open(abs_file_name, 'wb').write(request.content)
response = requests.get(url, allow_redirects=True, stream=True)
if response.status_code == 200:
with open(abs_file_name, 'wb') as target_file:
target_file.write(response.raw.read())
else:
raise Exception("Download failed.")
# Check SHA256 hash
self.check_file(abs_file_name)

48
sysa.py

@ -9,7 +9,6 @@ import os
from distutils.dir_util import copy_tree
import shutil
from lib.utils import copytree
from lib.sysgeneral import SysGeneral
# pylint: disable=consider-using-with
@ -61,43 +60,16 @@ class SysA(SysGeneral):
def stage0_posix(self):
"""Copy in all of the stage0-posix"""
stage0_posix_base_dir = os.path.join(self.sys_dir, 'stage0-posix', 'src')
stage0_posix_arch_dir = os.path.join(stage0_posix_base_dir, self.arch)
copy_tree(stage0_posix_arch_dir, self.tmp_dir)
m2_planet_dir = os.path.join(stage0_posix_base_dir, 'M2-Planet')
copytree(m2_planet_dir, self.tmp_dir)
# M2libc
m2libc_dir = os.path.join(stage0_posix_base_dir, 'M2libc')
copytree(m2libc_dir, self.tmp_dir)
# mescc-tools
mescc_tools_dir = os.path.join(stage0_posix_base_dir, 'mescc-tools')
copytree(mescc_tools_dir, self.tmp_dir)
# mescc-tools-extra
# Some additional tools such as cp, chmod, untar and ungz
mescc_tools_extra_dir = os.path.join(stage0_posix_base_dir, 'mescc-tools-extra')
copytree(mescc_tools_extra_dir, self.tmp_dir)
# bootstrap seeds
bootstrap_seeds_dir = os.path.join(self.sys_dir, 'stage0-posix', 'src', 'bootstrap-seeds')
copytree(bootstrap_seeds_dir, self.tmp_dir)
kaem_optional_seed = os.path.join(bootstrap_seeds_dir, 'POSIX',
self.arch, 'kaem-optional-seed')
copy_tree(stage0_posix_base_dir, self.tmp_dir)
kaem_optional_seed = os.path.join(self.sys_dir, 'stage0-posix', 'src', 'bootstrap-seeds',
'POSIX', self.arch, 'kaem-optional-seed')
shutil.copy2(kaem_optional_seed, os.path.join(self.tmp_dir, 'init'))
# stage0-posix hook to continue running live-bootstrap
shutil.copy2(os.path.join(self.sys_dir, 'after.kaem'),
os.path.join(self.tmp_dir, 'after.kaem'))
# create directories needed
os.mkdir(os.path.join(self.tmp_dir, 'bin'))
# stage0-posix checksums
shutil.copy2(os.path.join(stage0_posix_base_dir, self.arch + '.answers'),
os.path.join(self.tmp_dir, self.arch + '.answers'))
def after(self):
"""
Prepare sources in /after directory.
@ -122,7 +94,7 @@ class SysA(SysGeneral):
"""Prepare remaining sources"""
# mes-0.22 snapshot with m2 fixes
self.get_file(["https://github.com/oriansj/mes-m2/archive/a7522f26ee020dc498219d0122ea1b7d345bcdd5.tar.gz",
self.get_file(["https://github.com/oriansj/mes-m2/archive/7fa2f99bf9bba2d79bd9d15c579be8905520d960.tar.gz",
"https://download.savannah.gnu.org/releases/nyacc/nyacc-1.00.2.tar.gz"],
output=["mes.tar.gz", "nyacc-1.00.2.tar.gz"])
@ -142,7 +114,7 @@ class SysA(SysGeneral):
self.get_file("https://mirrors.kernel.org/gnu/sed/sed-4.0.9.tar.gz")
# patch 2.5.9
self.get_file("https://ftp.gnu.org/pub/gnu/patch/patch-2.5.9.tar.gz")
self.get_file("https://mirrors.kernel.org/gnu/patch/patch-2.5.9.tar.gz")
# make 3.80
self.get_file("https://mirrors.kernel.org/gnu/make/make-3.80.tar.gz")
@ -160,7 +132,7 @@ class SysA(SysGeneral):
self.get_file("http://downloads.sourceforge.net/project/heirloom/heirloom-devtools/070527/heirloom-devtools-070527.tar.bz2")
# bash 2.05b
self.get_file("https://ftp.gnu.org/pub/gnu/bash/bash-2.05b.tar.gz")
self.get_file("https://mirrors.kernel.org/gnu/bash/bash-2.05b.tar.gz")
# flex 2.5.11
self.get_file("http://download.nust.na/pub2/openpkg1/sources/DST/flex/flex-2.5.11.tar.gz")
@ -294,9 +266,9 @@ class SysA(SysGeneral):
self.get_file("https://mirrors.edge.kernel.org/pub/linux/utils/kbd/kbd-1.15.tar.gz")
# make 3.82
self.get_file("http://ftp.gnu.org/gnu/make/make-3.82.tar.gz")
self.get_file("https://mirrors.kernel.org/gnu/make/make-3.82.tar.gz")
# linux kernel 2.6.16.62
self.get_file(["https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.10.tar.gz",
"http://linux-libre.fsfla.org/pub/linux-libre/releases/4.9.10-gnu/deblob-4.9",
"http://linux-libre.fsfla.org/pub/linux-libre/releases/4.9.10-gnu/deblob-check"])
"https://linux-libre.fsfla.org/pub/linux-libre/releases/old/gen6/4.9.10-gnu/deblob-4.9",
"https://linux-libre.fsfla.org/pub/linux-libre/releases/old/gen6/4.9.10-gnu/deblob-check"])

30
sysa/after.kaem

@ -8,7 +8,7 @@
set -ex
PATH=/bin
PATH=/x86/bin
# Set commonly used variables
sources=/after
@ -21,25 +21,25 @@ tmpdir=/tmp # tmpdir is needed for patch to work
# Environmental variables needed for mes
NYACC_PKG=nyacc-1.00.2
MES_PKG=mes
MES_PREFIX=${sources}/${MES_PKG}/src/mes-m2-a7522f26ee020dc498219d0122ea1b7d345bcdd5
MES_PREFIX=${sources}/${MES_PKG}/src/mes-m2-7fa2f99bf9bba2d79bd9d15c579be8905520d960
GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${sources}/${MES_PKG}/src/${NYACC_PKG}/module
mkdir ${prefix} ${bindir} ${libdir} ${incdir} ${tmpdir}
cd ${prefix}
# Remove remaining dependencies on /bin (stage0-posix directory)
cp /bin/blood-elf bin/blood-elf
cp /bin/catm bin/catm
cp /bin/chmod bin/chmod
cp /bin/get_machine bin/get_machine
cp /bin/hex2 bin/hex2
cp /bin/kaem ${bindir}/kaem
cp /bin/M1 bin/M1
cp /bin/M2-Planet bin/M2-Planet
cp /bin/mkdir bin/mkdir
cp /bin/sha256sum bin/sha256sum
cp /bin/ungz bin/ungz
cp /bin/untar bin/untar
cp /bin/cp bin/cp
cp /x86/bin/blood-elf bin/blood-elf
cp /x86/bin/catm bin/catm
cp /x86/bin/chmod bin/chmod
cp /x86/bin/get_machine bin/get_machine
cp /x86/bin/hex2 bin/hex2
cp /x86/bin/kaem ${bindir}/kaem
cp /x86/bin/M1 bin/M1
cp /x86/bin/M2-Planet bin/M2-Planet
cp /x86/bin/mkdir bin/mkdir
cp /x86/bin/sha256sum bin/sha256sum
cp /x86/bin/ungz bin/ungz
cp /x86/bin/untar bin/untar
cp /x86/bin/cp bin/cp
chmod 755 bin/blood-elf
chmod 755 bin/catm

1
sysa/bash-2.05b/bash-2.05b.kaem

@ -41,6 +41,7 @@ make
# Install
install bash ${prefix}/bin/
mkdir /bin/
ln -s ${prefix}/bin/bash /bin/bash
ln -s ${prefix}/bin/bash /bin/sh
ln -s ${prefix}/bin/bash ${prefix}/bin/sh

2
sysa/stage0-posix/src

@ -1 +1 @@
Subproject commit 15a783e18f0f04a1195133f1ae9a3e799ef78ebf
Subproject commit a7db957c939cc15cad7f692696824888b294d405

1
sysc/patch-2.7.6/checksums

@ -1,2 +1 @@
b0633c4f65ed67c545d7019e35b976bdc80c049c0be92f9d8f792067c13e3c58 /usr/bin/patch

Loading…
Cancel
Save