ich9m 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/usr/bin/env sh
  2. # Copyright (C) 2020 Leah Rowe <info@minifree.org>
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. #
  17. # This script assumes that the current working directory is the root
  18. # of libreboot_src or libreboot git
  19. [ "x${DEBUG+set}" = 'xset' ] && set -v
  20. set -u -e
  21. if [ ! -d ich9utils ]; then
  22. ./download ich9utils
  23. fi
  24. if [ ! -d ich9utils ]; then
  25. printf "build/descriptors/ich9m: no ich9utils directory. Exiting\n"
  26. exit 1
  27. fi
  28. if [ ! -f "ich9utils/ich9gen" ]; then
  29. (
  30. cd ich9utils/
  31. make clean
  32. make -j$(nproc)
  33. )
  34. fi
  35. if [ ! -f "ich9utils/ich9gen" ]; then
  36. printf "build/descriptors/ich9m: ich9gen wasn't compiled. Exiting\n"
  37. exit 1
  38. fi
  39. [ -d "descriptors/" ] || mkdir -p "descriptors/"
  40. [ -d "descriptors/ich9m/" ] || mkdir -p "descriptors/ich9m/"
  41. rm -f descriptors/ich9m/*
  42. (
  43. cd descriptors/ich9m/
  44. ../../ich9utils/ich9gen
  45. )