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

  1. #!/bin/bash
  2. # SPDX-License-Identifier: GPL-3.0+
  3. # Copyright (C) 2018, Tom Hiller <thrilleratplay@gmail.com>
  4. # shellcheck disable=SC1091
  5. source /home/coreboot/common_scripts/variables.sh
  6. ################################################################################
  7. ## Copy config and run make
  8. ################################################################################
  9. function configAndMake() {
  10. ######################
  11. ## Copy config ##
  12. ######################
  13. if [ -f "$DOCKER_COREBOOT_DIR/.config" ]; then
  14. echo "Using existing config"
  15. else
  16. if [ -f "$DOCKER_SCRIPT_DIR/config-$COREBOOT_COMMIT" ]; then
  17. cp "$DOCKER_SCRIPT_DIR/config-$COREBOOT_COMMIT" "$DOCKER_COREBOOT_DIR/.config"
  18. echo "Using config-$COREBOOT_COMMIT"
  19. elif [ -f "$DOCKER_SCRIPT_DIR/config-$COREBOOT_TAG" ]; then
  20. cp "$DOCKER_SCRIPT_DIR/config-$COREBOOT_TAG" "$DOCKER_COREBOOT_DIR/.config"
  21. echo "Using config-$COREBOOT_TAG"
  22. else
  23. cp "$DOCKER_SCRIPT_DIR/config" "$DOCKER_COREBOOT_DIR/.config"
  24. echo "Using default config"
  25. fi
  26. fi
  27. #################################
  28. ## Copy in the X230 VGA BIOS ##
  29. #################################
  30. if [ -f "$DOCKER_SCRIPT_DIR/pci8086,0166.rom" ]; then
  31. cp "$DOCKER_SCRIPT_DIR/pci8086,0166.rom" "$DOCKER_COREBOOT_DIR/pci8086,0166.rom"
  32. fi
  33. ##############
  34. ## make ##
  35. ##############
  36. cd "$DOCKER_COREBOOT_DIR" || exit;
  37. if [ "$COREBOOT_CONFIG" ]; then
  38. make nconfig
  39. fi
  40. make
  41. }