crossgcc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. # helper script: downloads crossgcc, for building coreboot
  3. #
  4. # Copyright (C) 2016 Leah Woods <info@minifree.org>
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. # This script assumes that the working directory is the
  20. # root of libreboot_src or libreboot git.
  21. [ "x${DEBUG+set}" = 'xset' ] && set -v
  22. set -u -e
  23. if [ -f "version" ]; then
  24. # _src release archive is being used
  25. version="libreboot-$(cat version)"
  26. else
  27. # git repo is being used
  28. version="libreboot-$(git describe --tags HEAD)"
  29. fi
  30. # coreboot revisios used for crossgcc
  31. crossgccrevision="15fca66bf08db45937ce88b950491963654805b9"
  32. rm -Rf "crossgcc/"
  33. (
  34. git clone https://review.coreboot.org/coreboot crossgcc || git clone https://github.com/coreboot/coreboot.git crossgcc
  35. cd "crossgcc/"
  36. git reset --hard ${crossgccrevision}
  37. rm -Rf .git* */*/.git*
  38. rm -Rf "3rdparty/"
  39. )
  40. printf "Deblobbing coreboot\n"
  41. ./resources/utilities/coreboot-libre/deblob