depthcharge 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/bash
  2. # helper script: downloads depthcharge and patches it
  3. #
  4. # Copyright (C) 2015 Paul Kocialkowski <contact@paulk.fr>
  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. # Get depthcharge and patch it
  24. printf "Downloading depthcharge\n"
  25. rm -Rf "depthcharge/"
  26. # Get depthcharge
  27. # ------------------------------------------------------------------------------
  28. # download depthcharge from git
  29. git clone https://chromium.googlesource.com/chromiumos/platform/depthcharge
  30. # enter the tree to patch it
  31. cd "depthcharge/"
  32. # reset to the latest previously tested revision
  33. git reset --hard 065ba14bc56c9044247fef6337d8f9e9a3055820
  34. # Patch depthcharge
  35. # ------------------------------------------------------------------------------
  36. printf "arm: armv7-a march abi flag for ARMv7 hardware\n"
  37. git am "../resources/depthcharge/patch/0001-arm-armv7-a-march-abi-flag-for-ARMv7-hardware.patch"
  38. printf "Coreboot image integration removal\n"
  39. git am "../resources/depthcharge/patch/0002-Coreboot-image-integration-removal.patch"
  40. printf "DOTCONFIG location correction\n"
  41. git am "../resources/depthcharge/patch/0003-DOTCONFIG-location-correction.patch"
  42. printf "Adaptation for a read-only boot path when no vboot handoff data is found\n"
  43. git am "../resources/depthcharge/patch/0004-Adaptation-for-a-read-only-boot-path-when-no-vboot-h.patch"
  44. printf "vboot: Only initialize cparams once\n"
  45. git am "../resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch"
  46. printf "Proper firmware index report for read-only boot path\n"
  47. git am "../resources/depthcharge/patch/0006-Proper-firmware-index-report-for-read-only-boot-path.patch"
  48. printf "fdt: nonvolatile-context-storage report to mkbp for EC NV storage\n"
  49. git am "../resources/depthcharge/patch/0007-fdt-nonvolatile-context-storage-report-to-mkbp-for-E.patch"
  50. printf "vboot: Display callbacks for developer and recovery mode screens\n"
  51. git am "../resources/depthcharge/patch/0008-vboot-Display-callbacks-for-developer-and-recovery-m.patch"
  52. # leave the tree
  53. cd "../"
  54. printf "\n\n"