check-reqs.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/bash
  2. RET=0
  3. if ! which python3 >/dev/null; then
  4. echo "python3 is required to run build tools - 3.6 is recommended as it is needed to cross-compile itself"
  5. RET=1
  6. fi
  7. if ! which mkfs.fat >/dev/null; then
  8. echo "mkfs.fat is required (and should be in your PATH) to build EFI file systems"
  9. RET=1
  10. fi
  11. if ! which mcopy >/dev/null; then
  12. echo "mtools is required to build FAT images for EFI / hybrid ISOs"
  13. RET=1
  14. fi
  15. if ! which xorriso >/dev/null; then
  16. echo "xorriso is required to build ISO CD images"
  17. RET=1
  18. fi
  19. if ! which autoconf >/dev/null; then
  20. echo "autoconf is required to build GCC cross-compiler"
  21. RET=1
  22. fi
  23. if ! which automake >/dev/null; then
  24. echo "automake is required to build GCC cross-compiler"
  25. RET=1
  26. fi
  27. if ! which wget >/dev/null; then
  28. echo "wget is required to build GCC cross-compiler"
  29. RET=1
  30. fi
  31. if [ ! -e /usr/lib32/crt0-efi-ia32.o ]; then
  32. echo "gnu-efi is required to build EFI loaders"
  33. RET=1
  34. fi
  35. if ! cpp <(echo "#include \"gmp.h\"") >/dev/null 2>/dev/null; then
  36. echo "GMP headers are required to build GCC cross-compiler"
  37. RET=1
  38. fi
  39. if ! cpp <(echo "#include \"mpfr.h\"") >/dev/null 2>/dev/null; then
  40. echo "MPFR headers are required to build GCC cross-compiler"
  41. RET=1
  42. fi
  43. if ! cpp <(echo "#include \"mpc.h\"") >/dev/null 2>/dev/null; then
  44. echo "MPC headers are required to build GCC cross-compiler"
  45. RET=1
  46. fi
  47. exit $RET