tianocore 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/bash
  2. #
  3. # Copyright (C) 2020 Leah Rowe <info@minifree.org>
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. #
  18. # This script assumes that the working directory is the
  19. # root of osboot_src or osboot git.
  20. [ "x${DEBUG+set}" = 'xset' ] && set -v
  21. set -u -e
  22. # Remove the old version that may still exist
  23. # ------------------------------------------------------------------------------
  24. printf "Downloading Tianocore\n"
  25. # Get latest SeaBIOS
  26. # ------------------------------------------------------------------------------
  27. # default is the boardname for the coreboot environment
  28. # used to build tianocore. a "dummy" coreboot ROM is
  29. # build, using the coreboot build system to build tianocore
  30. # and coreboot's build system is modified to not automatically download
  31. # tianocore, and coreboot's Tianocore makefile has some hardcoded stuf:wf
  32. # however, default configs aren't used. a dummy config is in
  33. # resources/tianocore/dummy.coreboot.config for building a coreboot ROM
  34. # with tianocore
  35. # This ROM is discarded, but then tianocore is in place, and fully built.
  36. # Coreboot ROMs in osboot's build system specify "no payload" and
  37. # osboot's build system inserts payloads manually, using cbfstool
  38. # To build the Tianocore payload, run: ./build payload tianocore
  39. if [ ! -d "coreboot/default/" ]; then
  40. ./download coreboot default
  41. fi
  42. (
  43. cd "coreboot/default/payloads/external/tianocore/"
  44. make download && make update
  45. # revisions are hardcoded in coreboot's Makefile for Tianocore,
  46. # as a custom patch for that board, when running ./download coreboot
  47. # yes, this is cursed as fuck. i'm well aware of that.
  48. # but so is tianocore
  49. )