From 3d2d0aa3625c6937158a84484110c344a21c6879 Mon Sep 17 00:00:00 2001 From: Tom Hiller Date: Fri, 1 Feb 2019 23:37:28 -0500 Subject: [PATCH] feat(common): use defconfig instead of full configs --- common/config_and_make.sh | 29 +++++++++++++++++++++-------- common/variables.sh | 1 + 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/common/config_and_make.sh b/common/config_and_make.sh index 07a6b1f..22746db 100755 --- a/common/config_and_make.sh +++ b/common/config_and_make.sh @@ -14,15 +14,22 @@ function configAndMake() { ###################### if [ -f "$DOCKER_COREBOOT_DIR/.config" ]; then echo "Using existing config" + + # clean config to regenerate + make savedefconfig + + if [ -s "$DOCKER_COREBOOT_DIR/defconfig" ]; then + mv "$DOCKER_COREBOOT_DIR/defconfig" "$DOCKER_COREBOOT_CONFIG_DIR/" + fi else - if [ -f "$DOCKER_SCRIPT_DIR/config-$COREBOOT_COMMIT" ]; then - cp "$DOCKER_SCRIPT_DIR/config-$COREBOOT_COMMIT" "$DOCKER_COREBOOT_DIR/.config" + if [ -f "$DOCKER_SCRIPT_DIR/defconfig-$COREBOOT_COMMIT" ]; then + cp "$DOCKER_SCRIPT_DIR/defconfig-$COREBOOT_COMMIT" "$DOCKER_COREBOOT_CONFIG_DIR/defconfig" echo "Using config-$COREBOOT_COMMIT" - elif [ -f "$DOCKER_SCRIPT_DIR/config-$COREBOOT_TAG" ]; then - cp "$DOCKER_SCRIPT_DIR/config-$COREBOOT_TAG" "$DOCKER_COREBOOT_DIR/.config" + elif [ -f "$DOCKER_SCRIPT_DIR/defconfig-$COREBOOT_TAG" ]; then + cp "$DOCKER_SCRIPT_DIR/defconfig-$COREBOOT_TAG" "$DOCKER_COREBOOT_CONFIG_DIR/defconfig" echo "Using config-$COREBOOT_TAG" else - cp "$DOCKER_SCRIPT_DIR/config" "$DOCKER_COREBOOT_DIR/.config" + cp "$DOCKER_SCRIPT_DIR/defconfig" "$DOCKER_COREBOOT_CONFIG_DIR/defconfig" echo "Using default config" fi fi @@ -41,14 +48,20 @@ function configAndMake() { cp "$DOCKER_SCRIPT_DIR/bootsplash.jpg" "$DOCKER_COREBOOT_DIR/bootsplash.jpg" fi - ############## - ## make ## - ############## + cd "$DOCKER_COREBOOT_DIR" || exit; + ################ + ## Config ## + ############### + make defconfig + if [ "$COREBOOT_CONFIG" ]; then make nconfig fi + ############## + ## make ## + ############## make } diff --git a/common/variables.sh b/common/variables.sh index d2b32d2..dc3828d 100755 --- a/common/variables.sh +++ b/common/variables.sh @@ -11,3 +11,4 @@ export DOCKER_ROOT_DIR="/home/coreboot" export DOCKER_SCRIPT_DIR="$DOCKER_ROOT_DIR/scripts" export DOCKER_COMMON_SCRIPT_DIR="$DOCKER_ROOT_DIR/common_scripts" export DOCKER_COREBOOT_DIR="$DOCKER_ROOT_DIR/cb_build" +export DOCKER_COREBOOT_CONFIG_DIR="$DOCKER_COREBOOT_DIR/configs"