您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/bash
  2. set -e
  3. ##############################################################
  4. #### Image Settings
  5. export PISDR_RELEASE="focal"
  6. export PISDR_USER="pi"
  7. export PISDR_PASS="raspberry"
  8. export PISDR_IMG_NAME="$(date '+%Y-%m-%d')-PiSDR-$PISDR_ARCH"
  9. #### Build Settings
  10. BUILD_BOARD_TEGRA_NANO=true
  11. BUILD_BOARD_TEGRA_AGX=false
  12. BUILD_BOARD_RPI=false
  13. BUILD_BOARD_GRUB=false
  14. #### Compiler Settings
  15. export TARGET="/target"
  16. export BUILD="/build/$PISDR_ARCH"
  17. export BASE_DIR="$TARGET$BUILD/base"
  18. export DESKTOP_DIR="$TARGET$BUILD/desktop"
  19. export HEADLESS_DIR="$TARGET$BUILD/headless"
  20. export EXPORT_DIR="$TARGET/export"
  21. ##############################################################
  22. printf "Validating pipeline configuration... "
  23. if [ "$PISDR_ARCH" != "amd64" ] && [ "$PISDR_ARCH" != "arm64" ]; then
  24. printf "(NOK)\n"
  25. echo "Invalid PISDR_ARCH environment variable. Choose between amd64 and arm64."
  26. exit
  27. fi
  28. printf "(OK)\n"
  29. printf "Re-seeding export directory... "
  30. rm -fr $EXPORT_DIR
  31. mkdir -p $EXPORT_DIR
  32. printf "(OK)\n"
  33. ##############################################################
  34. #### Phase 00
  35. ( $TARGET/build_base.sh )
  36. #### Phase 01
  37. ( $TARGET/build_headless.sh )
  38. #### Phase 02
  39. ( $TARGET/build_desktop.sh )
  40. #### Phase 03
  41. if [[ "$PISDR_ARCH" == "arm64" ]]; then
  42. if [[ "$BUILD_BOARD_TEGRA_AGX" == true ]]; then
  43. ( $TARGET/build_tegra.sh $HEADLESS_DIR "AGX" )
  44. ( $TARGET/build_tegra.sh $DESKTOP_DIR "AGX" )
  45. fi
  46. if [[ "$BUILD_BOARD_TEGRA_NANO" == true ]]; then
  47. ( $TARGET/build_tegra.sh $HEADLESS_DIR "NANO" )
  48. ( $TARGET/build_tegra.sh $DESKTOP_DIR "NANO" )
  49. fi
  50. if [[ "$BUILD_BOARD_RPI" == true ]]; then
  51. ( $TARGET/build_rpi.sh $HEADLESS_DIR )
  52. ( $TARGET/build_rpi.sh $DESKTOP_DIR )
  53. fi
  54. fi
  55. if [[ "$PISDR_ARCH" == "amd64" ]]; then
  56. if [[ "$BUILD_BOARD_GRUB" == true ]]; then
  57. ( $TARGET/build_grub.sh $HEADLESS_DIR )
  58. ( $TARGET/build_grub.sh $DESKTOP_DIR )
  59. fi
  60. fi