mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-14 07:15:24 +01:00
Move bash rebuild to sysa.
This commit is contained in:
parent
58d1206c83
commit
da9a2c6c50
10 changed files with 250 additions and 221 deletions
|
|
@ -20,7 +20,7 @@ ef08694bf8e78ffcf56f9c8a63b0f189e301c06f02ab240e15e4c7fe354c2a0d automake-1.7_0
|
|||
e8ff13753943e43972a8cf1672819f001718ed38e5497cf7b554c21a507ba22b automake-1.7.8_0.tar.bz2
|
||||
9922651b64ad2e29b944082f26db223008220155048f25d64df1f6d82071ff1c automake-1.8.5_0.tar.bz2
|
||||
c5807850a377e4bb9aa4121d9781d145bdd80327626a9419630a75ce2c8d9c71 automake-1.9.6_0.tar.bz2
|
||||
6e9f4263f8a938e2bf62ae1507092a7d3679a018c2037e2eac9cf424ca20c19c bash-5.1_0.tar.bz2
|
||||
ca49c0338d6aed5131f907d375384bf42e70f2875f58973da0015b4fb73156cc bash-5.2.15_0.tar.bz2
|
||||
78c5e718510fcf0ab4296d5cfac114abb31af4a30aa5c9f2c0844d7ee5bae5c5 bc-1.07.1_0.tar.bz2
|
||||
b06a20417c7dadb007f3e6930b8385ad934651756a339d8a87e086b1139e62d8 binutils-2.24_0.tar.bz2
|
||||
aa910ea75172041b9285436c148f81b3a9fb205f61b88b5e5bbaab2c1cee9484 binutils-2.38_0.tar.bz2
|
||||
|
|
|
|||
53
sysa/bash-5.2.15/bash-5.2.15.sh
Executable file
53
sysa/bash-5.2.15/bash-5.2.15.sh
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
||||
# SPDX-FileCopyrightText: 2021 Bastian Bittorf <bb@npl.de>
|
||||
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
src_prepare() {
|
||||
# Remove bison generated files
|
||||
rm y.tab.c y.tab.h
|
||||
|
||||
# Remove prebuilt translation catalogs
|
||||
rm po/*.gmo
|
||||
|
||||
# Skip documentation
|
||||
mv doc/Makefile.in Makefile.in.doc
|
||||
rm doc/*
|
||||
mv Makefile.in.doc doc/Makefile.in
|
||||
|
||||
# Rebuild configure script
|
||||
rm configure
|
||||
autoconf-2.69
|
||||
|
||||
# avoid non-deterministic build:
|
||||
printf '%s\n%s\n' \
|
||||
'#!/bin/sh' \
|
||||
'echo "#define PIPESIZE 65536"' >builtins/psize.sh
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# --build argument needed for reproducibility
|
||||
# bash_cv_dev_stdin and bash_cv_dev_fd are also used to
|
||||
# improve reproducibility because they make configure
|
||||
# skip checking for /dev/{fd,stdin,stdout,stderr} (build
|
||||
# output is affected by their availability otherwise).
|
||||
# size is part of binutils and is not yet available.
|
||||
CC=tcc LD=tcc AR="tcc -ar" SIZE=true ./configure --prefix="${PREFIX}" \
|
||||
--without-bash-malloc \
|
||||
--disable-nls \
|
||||
--build=i386-unknown-linux-musl \
|
||||
--enable-static-link \
|
||||
bash_cv_dev_stdin=absent \
|
||||
bash_cv_dev_fd=whacky
|
||||
}
|
||||
|
||||
src_install() {
|
||||
install -D bash "${DESTDIR}${PREFIX}/bin/bash"
|
||||
# Work around weird symlink bug
|
||||
install bash "${DESTDIR}${PREFIX}/bin/sh"
|
||||
|
||||
# Needs special handling b/c is currently running - tar doesn't like this
|
||||
rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh"
|
||||
}
|
||||
1
sysa/bash-5.2.15/sources
Normal file
1
sysa/bash-5.2.15/sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
https://mirrors.kernel.org/gnu/bash/bash-5.2.15.tar.gz 13720965b5f4fc3a0d4b61dd37e7565c741da9a5be24edc2ae00182fc1b3588c
|
||||
60
sysa/run.sh
60
sysa/run.sh
|
|
@ -193,62 +193,6 @@ build autoconf-2.69
|
|||
|
||||
build libtool-2.2.4
|
||||
|
||||
build binutils-2.24
|
||||
build bash-5.2.15
|
||||
|
||||
# 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.3
|
||||
|
||||
# This hack fixes a strange bug in mes libc bash
|
||||
set -x
|
||||
build linux-headers-5.10.41 '' '' linux-5.10.41
|
||||
set +x
|
||||
|
||||
build gcc-4.0.4 pass2.sh
|
||||
|
||||
build util-linux-2.19.1
|
||||
|
||||
build e2fsprogs-1.45.7
|
||||
|
||||
build dhcpcd-9.4.1 '' '' dhcpcd-dhcpcd-9.4.1-1663155
|
||||
|
||||
build kbd-1.15
|
||||
|
||||
build make-3.82
|
||||
|
||||
build curl-7.83.0
|
||||
|
||||
build ed-1.4
|
||||
|
||||
build bc-1.07.1
|
||||
|
||||
# Clear up some RAM space
|
||||
grep '^build' "${SOURCES}/run.sh" | sed "s/build //" | sed "s/ .*$//" | while read -r p ; do
|
||||
rm -rf "${SOURCES:?}/${p:?}"
|
||||
done
|
||||
|
||||
if [ "${CHROOT}" = False ]; then
|
||||
build kexec-tools-2.0.22
|
||||
|
||||
build linux-4.9.10
|
||||
|
||||
create_sysb
|
||||
go_sysb
|
||||
fi
|
||||
|
||||
# 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
|
||||
exec env -i PATH="${PATH}" PREFIX="${PREFIX}" LIBDIR="${LIBDIR}" SOURCES="${SOURCES}" DISTFILES="${DISTFILES}" DESTDIR="${DESTDIR}" SRCDIR="${SRCDIR}" bash run2.sh
|
||||
|
|
|
|||
95
sysa/run2.sh
Executable file
95
sysa/run2.sh
Executable file
|
|
@ -0,0 +1,95 @@
|
|||
#!/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=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 "${PREFIX}/boot/initramfs-sysb.cpio.gz" /sysb_image
|
||||
rm -rf /sysb /sysb_image # Cleanup
|
||||
}
|
||||
|
||||
go_sysb() {
|
||||
# Mount proc for kexec
|
||||
mkdir /proc /etc
|
||||
mount -t proc proc /proc
|
||||
# kexec time
|
||||
echo "Loading kernel + sysb initramfs using kexec"
|
||||
kexec -l "${PREFIX}/boot/linux-4.9.10" --console-serial \
|
||||
--initrd="${PREFIX}/boot/initramfs-sysb.cpio.gz" \
|
||||
--append="init=/init console=ttyS0"
|
||||
echo "kexecing into sysb"
|
||||
kexec -e
|
||||
}
|
||||
|
||||
build binutils-2.24
|
||||
|
||||
# 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.3
|
||||
|
||||
# This hack fixes a strange bug in mes libc bash
|
||||
set -x
|
||||
build linux-headers-5.10.41 '' '' linux-5.10.41
|
||||
set +x
|
||||
|
||||
build gcc-4.0.4 pass2.sh
|
||||
|
||||
build util-linux-2.19.1
|
||||
|
||||
build e2fsprogs-1.45.7
|
||||
|
||||
build dhcpcd-9.4.1 '' '' dhcpcd-dhcpcd-9.4.1-1663155
|
||||
|
||||
build kbd-1.15
|
||||
|
||||
build make-3.82
|
||||
|
||||
build curl-7.83.0
|
||||
|
||||
build ed-1.4
|
||||
|
||||
build bc-1.07.1
|
||||
|
||||
# Clear up some RAM space
|
||||
grep '^build' "${SOURCES}/run.sh" | sed "s/build //" | sed "s/ .*$//" | while read -r p ; do
|
||||
rm -rf "${SOURCES:?}/${p:?}"
|
||||
done
|
||||
|
||||
if [ "${CHROOT}" = False ]; then
|
||||
build kexec-tools-2.0.22
|
||||
|
||||
build linux-4.9.10
|
||||
|
||||
create_sysb
|
||||
go_sysb
|
||||
fi
|
||||
|
||||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue