From c9df49ad20ee840b42094b25fb25400760601fb6 Mon Sep 17 00:00:00 2001 From: Jonathon Hall Date: Tue, 28 Feb 2023 15:39:32 -0500 Subject: [PATCH] modules/bash: Include bash in all builds, remove CONFIG_BASH Include bash in all builds. Remove CONFIG_BASH. Remove CONFIG_BASH_IS_ASH from busybox configuration and clean up hacks in modules/bash. Signed-off-by: Jonathon Hall --- Makefile | 2 +- .../qemu-coreboot-fbwhiptail-tpm1-hotp.config | 1 - .../qemu-coreboot-fbwhiptail-tpm1.config | 1 - .../qemu-coreboot-fbwhiptail-tpm2-hotp.config | 1 - .../qemu-coreboot-fbwhiptail-tpm2.config | 1 - .../qemu-coreboot-fbwhiptail.config | 1 - .../qemu-coreboot-whiptail-tpm1-hotp.config | 1 - .../qemu-coreboot-whiptail-tpm1.config | 1 - .../qemu-coreboot-whiptail-tpm2-hotp.config | 1 - .../qemu-coreboot-whiptail-tpm2.config | 1 - boards/qemu-coreboot/qemu-coreboot.config | 1 - config/busybox.config | 2 +- modules/bash | 15 +++------------ 13 files changed, 5 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 04c07f1f..8ab7080a 100644 --- a/Makefile +++ b/Makefile @@ -468,7 +468,7 @@ bin_modules-$(CONFIG_MSRTOOLS) += msrtools bin_modules-$(CONFIG_NKSTORECLI) += nkstorecli bin_modules-$(CONFIG_OPENSSL) += openssl bin_modules-$(CONFIG_TPM2_TOOLS) += tpm2-tools -bin_modules-$(CONFIG_BASH) += bash +bin_modules-y += bash $(foreach m, $(bin_modules-y), \ $(call map,initrd_bin_add,$(call bins,$m)) \ diff --git a/boards/qemu-coreboot-fbwhiptail-tpm1-hotp/qemu-coreboot-fbwhiptail-tpm1-hotp.config b/boards/qemu-coreboot-fbwhiptail-tpm1-hotp/qemu-coreboot-fbwhiptail-tpm1-hotp.config index 3d7a0585..971cecaf 100644 --- a/boards/qemu-coreboot-fbwhiptail-tpm1-hotp/qemu-coreboot-fbwhiptail-tpm1-hotp.config +++ b/boards/qemu-coreboot-fbwhiptail-tpm1-hotp/qemu-coreboot-fbwhiptail-tpm1-hotp.config @@ -62,7 +62,6 @@ export CONFIG_BOOT_KERNEL_ADD="console=ttyS0 console=tty systemd.zram=0" export CONFIG_BOOT_KERNEL_REMOVE="quiet rhgb splash" export CONFIG_TPM=y -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/vda1" export CONFIG_BOARD_NAME="qemu-coreboot-fbwhiptail-tpm1-hotp" diff --git a/boards/qemu-coreboot-fbwhiptail-tpm1/qemu-coreboot-fbwhiptail-tpm1.config b/boards/qemu-coreboot-fbwhiptail-tpm1/qemu-coreboot-fbwhiptail-tpm1.config index 02a45c79..819959af 100644 --- a/boards/qemu-coreboot-fbwhiptail-tpm1/qemu-coreboot-fbwhiptail-tpm1.config +++ b/boards/qemu-coreboot-fbwhiptail-tpm1/qemu-coreboot-fbwhiptail-tpm1.config @@ -60,7 +60,6 @@ export CONFIG_BOOT_KERNEL_ADD="console=ttyS0 console=tty systemd.zram=0" export CONFIG_BOOT_KERNEL_REMOVE="quiet rhgb splash" export CONFIG_TPM=y -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/vda1" export CONFIG_BOARD_NAME="qemu-coreboot-fbwhiptail-tpm1" diff --git a/boards/qemu-coreboot-fbwhiptail-tpm2-hotp/qemu-coreboot-fbwhiptail-tpm2-hotp.config b/boards/qemu-coreboot-fbwhiptail-tpm2-hotp/qemu-coreboot-fbwhiptail-tpm2-hotp.config index bef99417..9392fded 100644 --- a/boards/qemu-coreboot-fbwhiptail-tpm2-hotp/qemu-coreboot-fbwhiptail-tpm2-hotp.config +++ b/boards/qemu-coreboot-fbwhiptail-tpm2-hotp/qemu-coreboot-fbwhiptail-tpm2-hotp.config @@ -65,7 +65,6 @@ export CONFIG_TPM2_TOOLS=y export CONFIG_PRIMARY_KEY_TYPE=ecc CONFIG_TPM2_TSS=y CONFIG_OPENSSL=y -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/vda1" export CONFIG_BOARD_NAME="qemu-coreboot-fbwhiptail-tpm2-hotp" diff --git a/boards/qemu-coreboot-fbwhiptail-tpm2/qemu-coreboot-fbwhiptail-tpm2.config b/boards/qemu-coreboot-fbwhiptail-tpm2/qemu-coreboot-fbwhiptail-tpm2.config index d6dbb10c..147c6789 100644 --- a/boards/qemu-coreboot-fbwhiptail-tpm2/qemu-coreboot-fbwhiptail-tpm2.config +++ b/boards/qemu-coreboot-fbwhiptail-tpm2/qemu-coreboot-fbwhiptail-tpm2.config @@ -64,7 +64,6 @@ export CONFIG_TPM2_TOOLS=y export CONFIG_PRIMARY_KEY_TYPE=ecc CONFIG_TPM2_TSS=y CONFIG_OPENSSL=y -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/vda1" export CONFIG_BOARD_NAME="qemu-coreboot-fbwhiptail-tpm2" diff --git a/boards/qemu-coreboot-fbwhiptail/qemu-coreboot-fbwhiptail.config b/boards/qemu-coreboot-fbwhiptail/qemu-coreboot-fbwhiptail.config index 7a04813e..b065b2e2 100644 --- a/boards/qemu-coreboot-fbwhiptail/qemu-coreboot-fbwhiptail.config +++ b/boards/qemu-coreboot-fbwhiptail/qemu-coreboot-fbwhiptail.config @@ -50,7 +50,6 @@ export CONFIG_BOOTSCRIPT=/bin/gui-init #export CONFIG_BOOTSCRIPT=/bin/generic-init export CONFIG_TPM=n -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/sda1" export CONFIG_BOARD_NAME="qemu-coreboot-fbwhiptail" diff --git a/boards/qemu-coreboot-whiptail-tpm1-hotp/qemu-coreboot-whiptail-tpm1-hotp.config b/boards/qemu-coreboot-whiptail-tpm1-hotp/qemu-coreboot-whiptail-tpm1-hotp.config index eac561b7..c3e870ab 100644 --- a/boards/qemu-coreboot-whiptail-tpm1-hotp/qemu-coreboot-whiptail-tpm1-hotp.config +++ b/boards/qemu-coreboot-whiptail-tpm1-hotp/qemu-coreboot-whiptail-tpm1-hotp.config @@ -62,7 +62,6 @@ export CONFIG_BOOT_KERNEL_ADD="console=ttyS0 console=tty systemd.zram=0" export CONFIG_BOOT_KERNEL_REMOVE="quiet rhgb splash" export CONFIG_TPM=y -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/vda1" export CONFIG_BOARD_NAME="qemu-coreboot-whiptail-tpm1-hotp" diff --git a/boards/qemu-coreboot-whiptail-tpm1/qemu-coreboot-whiptail-tpm1.config b/boards/qemu-coreboot-whiptail-tpm1/qemu-coreboot-whiptail-tpm1.config index f70f2955..37ae90a5 100644 --- a/boards/qemu-coreboot-whiptail-tpm1/qemu-coreboot-whiptail-tpm1.config +++ b/boards/qemu-coreboot-whiptail-tpm1/qemu-coreboot-whiptail-tpm1.config @@ -60,7 +60,6 @@ export CONFIG_BOOT_KERNEL_ADD="console=ttyS0 console=tty systemd.zram=0" export CONFIG_BOOT_KERNEL_REMOVE="quiet rhgb splash" export CONFIG_TPM=y -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/vda1" export CONFIG_BOARD_NAME="qemu-coreboot-whiptail-tpm1" diff --git a/boards/qemu-coreboot-whiptail-tpm2-hotp/qemu-coreboot-whiptail-tpm2-hotp.config b/boards/qemu-coreboot-whiptail-tpm2-hotp/qemu-coreboot-whiptail-tpm2-hotp.config index 9813dfda..9a6ded72 100644 --- a/boards/qemu-coreboot-whiptail-tpm2-hotp/qemu-coreboot-whiptail-tpm2-hotp.config +++ b/boards/qemu-coreboot-whiptail-tpm2-hotp/qemu-coreboot-whiptail-tpm2-hotp.config @@ -65,7 +65,6 @@ export CONFIG_TPM2_TOOLS=y export CONFIG_PRIMARY_KEY_TYPE=ecc CONFIG_TPM2_TSS=y CONFIG_OPENSSL=y -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/vda1" export CONFIG_BOARD_NAME="qemu-coreboot-whiptail-tpm2-hotp" diff --git a/boards/qemu-coreboot-whiptail-tpm2/qemu-coreboot-whiptail-tpm2.config b/boards/qemu-coreboot-whiptail-tpm2/qemu-coreboot-whiptail-tpm2.config index 0f9edf0c..4e00818b 100644 --- a/boards/qemu-coreboot-whiptail-tpm2/qemu-coreboot-whiptail-tpm2.config +++ b/boards/qemu-coreboot-whiptail-tpm2/qemu-coreboot-whiptail-tpm2.config @@ -64,7 +64,6 @@ export CONFIG_TPM2_TOOLS=y export CONFIG_PRIMARY_KEY_TYPE=ecc CONFIG_TPM2_TSS=y CONFIG_OPENSSL=y -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/vda1" export CONFIG_BOARD_NAME="qemu-coreboot-whiptail-tpm2" diff --git a/boards/qemu-coreboot/qemu-coreboot.config b/boards/qemu-coreboot/qemu-coreboot.config index 2e6d9c35..d6e2341f 100644 --- a/boards/qemu-coreboot/qemu-coreboot.config +++ b/boards/qemu-coreboot/qemu-coreboot.config @@ -51,7 +51,6 @@ CONFIG_LINUX_E1000=y export CONFIG_BOOTSCRIPT=/bin/generic-init export CONFIG_TPM=n -CONFIG_BASH=y export CONFIG_BOOT_DEV="/dev/sda1" export CONFIG_BOARD_NAME="qemu-coreboot" diff --git a/config/busybox.config b/config/busybox.config index 00fb49b9..d9dbd318 100644 --- a/config/busybox.config +++ b/config/busybox.config @@ -1096,7 +1096,7 @@ CONFIG_SV_DEFAULT_SERVICE_DIR="" CONFIG_SH_IS_ASH=y # CONFIG_SH_IS_HUSH is not set # CONFIG_SH_IS_NONE is not set -CONFIG_BASH_IS_ASH=y +# CONFIG_BASH_IS_ASH is not set # CONFIG_BASH_IS_HUSH is not set # CONFIG_BASH_IS_NONE is not set CONFIG_SHELL_ASH=y diff --git a/modules/bash b/modules/bash index 44743787..b4609dc7 100644 --- a/modules/bash +++ b/modules/bash @@ -1,5 +1,5 @@ # GNU bash -modules-$(CONFIG_BASH) += bash +modules-y += bash bash_version := 5.1.16 bash_dir := bash-$(bash_version) @@ -27,15 +27,6 @@ bash_target := $(MAKE_JOBS) \ DESTDIR="$(INSTALL)" \ install \ -ifeq "$(CONFIG_BASH)" "y" -initrd_bins += $(initrd_tmp_dir)/bin/bash -endif +bash_output := bash -$(build)/$(bash_dir)/bash: $(build)/$(bash_dir)/.build - -# Replace /bin/bash linked to busybox -$(initrd_tmp_dir)/bin/bash: $(build)/$(bash_dir)/bash $(initrd_tmp_dir)/bin/busybox - install -Dm 755 "$<" "$@" - $(CROSS)strip --preserve-dates "$@" 2>&- - -bash_depends := $(musl_dep) busybox +bash_depends := $(musl_dep)