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.

67 lines
2.0 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. # clean config to regenerate
  16. make savedefconfig
  17. if [ -s "$DOCKER_COREBOOT_DIR/defconfig" ]; then
  18. mv "$DOCKER_COREBOOT_DIR/defconfig" "$DOCKER_COREBOOT_CONFIG_DIR/"
  19. fi
  20. else
  21. if [ -f "$DOCKER_SCRIPT_DIR/defconfig-$COREBOOT_COMMIT" ]; then
  22. cp "$DOCKER_SCRIPT_DIR/defconfig-$COREBOOT_COMMIT" "$DOCKER_COREBOOT_CONFIG_DIR/defconfig"
  23. echo "Using config-$COREBOOT_COMMIT"
  24. elif [ -f "$DOCKER_SCRIPT_DIR/defconfig-$COREBOOT_TAG" ]; then
  25. cp "$DOCKER_SCRIPT_DIR/defconfig-$COREBOOT_TAG" "$DOCKER_COREBOOT_CONFIG_DIR/defconfig"
  26. echo "Using config-$COREBOOT_TAG"
  27. else
  28. cp "$DOCKER_SCRIPT_DIR/defconfig" "$DOCKER_COREBOOT_CONFIG_DIR/defconfig"
  29. echo "Using default config"
  30. fi
  31. fi
  32. #################################
  33. ## Copy in the X230 VGA BIOS ##
  34. #################################
  35. if [ -f "$DOCKER_SCRIPT_DIR/pci8086,0166.rom" ]; then
  36. cp "$DOCKER_SCRIPT_DIR/pci8086,0166.rom" "$DOCKER_COREBOOT_DIR/pci8086,0166.rom"
  37. fi
  38. ###############################
  39. ## Copy in bootsplash image ##
  40. ###############################
  41. if [ -f "$DOCKER_SCRIPT_DIR/bootsplash.jpg" ]; then
  42. cp "$DOCKER_SCRIPT_DIR/bootsplash.jpg" "$DOCKER_COREBOOT_DIR/bootsplash.jpg"
  43. fi
  44. cd "$DOCKER_COREBOOT_DIR" || exit;
  45. ################
  46. ## Config ##
  47. ###############
  48. make defconfig
  49. if [ "$COREBOOT_CONFIG" ]; then
  50. make nconfig
  51. fi
  52. ##############
  53. ## make ##
  54. ##############
  55. make
  56. }