Use of a Linux initramfs to fully automate the bootstrapping process
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.1 KiB

# SPDX-FileCopyrightText: 2021 Andrius Štikonas <>
# SPDX-FileCopyrightText: 2021 Paul Dersey <>
# SPDX-FileCopyrightText: 2021 fosslinux <>
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
mkdir build
cd build
# Extract
gunzip ../src/${pkg}.tar.gz
tar xf ../src/${pkg}.tar
cd ${pkg}
cp ../../mk/ Makefile
cp ../../mk/ builtins/Makefile
cp ../../mk/
# Create various .h files
touch config.h
touch include/version.h
touch include/pipesize.h
# Patch
patch -Np0 -i ../../patches/mes-libc.patch
patch -Np0 -i ../../patches/tinycc.patch
patch -Np0 -i ../../patches/missing-defines.patch
patch -Np0 -i ../../patches/locale.patch
patch -Np0 -i ../../patches/dev-tty.patch
# Compile
make mkbuiltins
cd builtins
make libbuiltins.a
cd ..
# 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
cd ../..
# Checksums
sha256sum -c checksums