cbfstool 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #!/bin/bash
  2. # Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
  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. download() {
  17. local repository="coreboot"
  18. git_project_prepare "$project" "$repository" "$@"
  19. }
  20. download_check() {
  21. local repository="coreboot"
  22. git_project_prepare_check "$project" "$repository" "$@"
  23. }
  24. extract() {
  25. local repository="coreboot"
  26. project_extract "$project" "$@"
  27. }
  28. extract_check() {
  29. local repository="coreboot"
  30. project_extract_check "$project" "$@"
  31. }
  32. update() {
  33. local repository="coreboot"
  34. project_update_git "$project" "$repository" "$@"
  35. }
  36. update_check() {
  37. local repository="coreboot"
  38. project_update_check_git "$project" "$repository" "$@"
  39. }
  40. build() {
  41. local repository="coreboot"
  42. project_sources_directory_missing_empty_error "$project" "$repository" "$@"
  43. local coreboot_sources_path=$( project_sources_path "$project" "$repository" "$@" )
  44. local sources_path="$coreboot_sources_path/util/cbfstool/"
  45. local build_path=$( project_build_path "$project" "$@" )
  46. local build_util_path=$( dirname "$build_path" )
  47. local vboot_sources_path=$( project_sources_path "vboot" "vboot" "devices" )
  48. if git_project_check "$repository"
  49. then
  50. git_project_checkout "$project" "$repository" "$@"
  51. fi
  52. project_action "checkout" "vboot" "devices"
  53. mkdir -p "$build_path"
  54. make -C "$sources_path" objutil="$build_util_path" VBOOT_SOURCE="$vboot_sources_path" -j$TASKS
  55. }
  56. build_check() {
  57. project_build_check "$project" "$@"
  58. }
  59. install() {
  60. project_install "$project" "$@"
  61. }
  62. install_check() {
  63. project_install_check "$project" "$@"
  64. }
  65. release() {
  66. local repository="coreboot"
  67. project_release_install_archive "$project" "$TOOLS" "$@"
  68. project_release_sources_git "$project" "$repository" "$@"
  69. }
  70. release_check() {
  71. local repository="coreboot"
  72. project_release_install_archive_check "$project" "$TOOLS" "$@"
  73. project_release_check_sources_git "$project" "$repository" "$@"
  74. }
  75. clean() {
  76. project_clean "$project" "$@"
  77. }