commit: c0fedeba6183059f45d0d17c0836c3e7ad64d7b8
parent ad54802f215995a6b7113a2373e4a9ae0cb3df56
Author: Paul Dersey <pdersey@gmail.com>
Date: Thu, 25 Feb 2021 14:52:05 -0500
bash-3.2.57: Build new package to replace bash 2.05b
Resulting build now works interactively
Diffstat:
7 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/README.rst b/README.rst
@@ -28,8 +28,9 @@ Get me started!
some other device and boot from bare metal.
5. Wait.
-6. If you can, observe the many binaries in ``/after/bin``! (Soon, you will
- also have an interactive bash shell to play around in).
+6. If you can, observe the many binaries in ``/after/bin``! When the
+ bootstrap is completed ``bash`` is launched providing a shell to
+ explore the system.
Background
----------
diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources
@@ -3,6 +3,7 @@ f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e autoconf-2.13.
534e99b61b81e79327b6d08f1a3edb0755ac246e1249009b0e1bf5887b60d7a9 autoconf-2.52.tar.gz
503cdc2b0992a4309545d17f462cb15f99bb57b7161dfc4082b2e7188f2bcc0f automake-1.4-p6.tar.gz
ba03d412998cc54bd0b0f2d6c32100967d3137098affdc2d32e6e7c11b163fe4 bash-2.05b.tar.gz
+3fa9daf85ebf35068f090ce51283ddeeb3c75eb5bc70b1a4a7cb05868bfe06a4 bash-3.2.57.tar.gz
e20bdd49a0fb317959b410c1fe81269a620ec21207045d8a37cadea621be4b59 binutils-2.14.tar.bz2
7007fc89c216fbfaff5525359b02a7e5b612694df5168c74673f67055f015095 bison-3.4.1.tar.gz
ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 bzip2-1.0.8.tar.gz
diff --git a/parts.rst b/parts.rst
@@ -419,3 +419,12 @@ tcc 0.9.27 (musl v3)
====================
We rebuild tcc against new musl and without a patch to ignore duplicate symbols.
+
+bash 3.2.57
+===========
+
+Up to this point, our build of ``bash`` could run scripts but could not be used
+interactively. This newer version of ``bash`` compiles without any patches,
+provides new features, and is built with GNU readline support so it can be used
+as an interactive shell. autoconf 2.52 is used to regenerate the configure
+script and bison is used to recreate some included generated files.
diff --git a/rootfs.sh b/rootfs.sh
@@ -219,6 +219,9 @@ get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.12.tar.gz
# binutils 2.14
get_file https://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2
+# bash 3.2.57
+get_file https://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz
+
# General cleanup
find tmp -name .git -exec rm -rf \;
diff --git a/sysa/bash-3.2.57/bash-3.2.57.sh b/sysa/bash-3.2.57/bash-3.2.57.sh
@@ -0,0 +1,24 @@
+# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+src_prepare() {
+ # Remove bison generated files
+ rm y.tab.c y.tab.h
+
+ # Rebuild configure script
+ # Ignore harmless error from autoconf for now
+ rm configure
+ autoconf-2.52 || true
+}
+
+src_configure() {
+ CC=tcc CPPFLAGS="-D HAVE_ALLOCA_H" \
+ ./configure --prefix=/after \
+ --without-bash-malloc \
+ --build=i386-unknown-linux
+}
+
+src_install() {
+ install bash ${bindir}
+}
diff --git a/sysa/bash-3.2.57/checksums b/sysa/bash-3.2.57/checksums
@@ -0,0 +1 @@
+0d6cbaa5f93fa4c2186ef40dd834b47841b3bf70f6183cfdb6ada38fdb835c5a /after/bin/bash
diff --git a/sysa/run.sh b/sysa/run.sh
@@ -91,4 +91,6 @@ populate_device_nodes
# Rebuild tcc-musl using new musl
build tcc-0.9.27 tcc-musl-pass3.sh checksums/tcc-musl-pass3
+build bash-3.2.57
+
echo "Bootstrapping completed."