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.
 
 
 
 
 

47 lines
1.4 KiB

#!/bin/bash
# SPDX-License-Identifier: GPL-3.0+
# Copyright (C) 2018, Tom Hiller <thrilleratplay@gmail.com>
# shellcheck disable=SC1091
source /home/coreboot/common_scripts/variables.sh
################################################################################
## Copy config and run make
################################################################################
function configAndMake() {
######################
## Copy config ##
######################
if [ -f "$DOCKER_COREBOOT_DIR/.config" ]; then
echo "Using existing config"
else
if [ -f "$DOCKER_SCRIPT_DIR/config-$COREBOOT_COMMIT" ]; then
cp "$DOCKER_SCRIPT_DIR/config-$COREBOOT_COMMIT" "$DOCKER_COREBOOT_DIR/.config"
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"
echo "Using config-$COREBOOT_TAG"
else
cp "$DOCKER_SCRIPT_DIR/config" "$DOCKER_COREBOOT_DIR/.config"
echo "Using default config"
fi
fi
#################################
## Copy in the X230 VGA BIOS ##
#################################
if [ -f "$DOCKER_SCRIPT_DIR/pci8086,0166.rom" ]; then
cp "$DOCKER_SCRIPT_DIR/pci8086,0166.rom" "$DOCKER_COREBOOT_DIR/pci8086,0166.rom"
fi
##############
## make ##
##############
cd "$DOCKER_COREBOOT_DIR" || exit;
if [ "$COREBOOT_CONFIG" ]; then
make nconfig
fi
make
}