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.

46 lines
1.4 KiB

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