file_type.inc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /* -*- mode:c -*-
  2. *
  3. * Copyright 2015 The Chromium OS Authors. All rights reserved.
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. *
  7. * This declares the file types that we can handle. Note that the order may be
  8. * important for types with recognizer functions, since we generally want to to
  9. * look for big things first.
  10. */
  11. /*
  12. * enum --type desc
  13. * recognizer function
  14. * show function
  15. * sign function
  16. */
  17. FILE_TYPE(BIOS_IMAGE, "bios", "Chrome OS BIOS image",
  18. R_(ft_recognize_bios_image),
  19. S_(ft_show_bios),
  20. S_(ft_sign_bios))
  21. FILE_TYPE(OLD_BIOS_IMAGE, "oldbios", "Cr-48 Chrome OS BIOS image",
  22. R_(ft_recognize_bios_image),
  23. S_(ft_show_bios),
  24. S_(ft_sign_bios))
  25. FILE_TYPE(GBB, "gbb", "GBB",
  26. R_(ft_recognize_gbb),
  27. S_(ft_show_gbb),
  28. NONE)
  29. FILE_TYPE(FW_PREAMBLE, "fw_pre", "firmware preamble (VBLOCK_A/B)",
  30. R_(ft_recognize_vblock1),
  31. S_(ft_show_fw_preamble),
  32. NONE)
  33. FILE_TYPE(KERN_PREAMBLE, "kernel", "kernel preamble/partition",
  34. R_(ft_recognize_vblock1),
  35. S_(ft_show_kernel_preamble),
  36. S_(ft_sign_kern_preamble))
  37. FILE_TYPE(KEYBLOCK, "keyblock", "keyblock (signed public key)",
  38. R_(ft_recognize_vblock1),
  39. S_(ft_show_keyblock),
  40. NONE)
  41. FILE_TYPE(PUBKEY, "pubkey", "vb1 packed public key (.vbpubk)",
  42. R_(ft_recognize_vb1_key),
  43. S_(ft_show_pubkey),
  44. S_(ft_sign_pubkey))
  45. FILE_TYPE(PRIVKEY, "prikey", "vb1 private key (.vbprivk)",
  46. R_(ft_recognize_vb1_key),
  47. S_(ft_show_privkey),
  48. NONE)
  49. FILE_TYPE(VB2_PUBKEY, "pubkey21", "vb21 public key (.vbpubk2)",
  50. R_(ft_recognize_vb21_key),
  51. S_(ft_show_vb21_pubkey),
  52. NONE)
  53. FILE_TYPE(VB2_PRIVKEY, "prikey21", "vb21 private key (.vbprik2)",
  54. R_(ft_recognize_vb21_key),
  55. S_(ft_show_vb21_privkey),
  56. NONE)
  57. FILE_TYPE(PEM, "pem", "RSA private key (.pem)",
  58. R_(ft_recognize_pem),
  59. S_(ft_show_pem),
  60. NONE)
  61. FILE_TYPE(RAW_FIRMWARE, "fwblob", "raw firmware blob (FW_MAIN_A/B)",
  62. NONE,
  63. NONE,
  64. S_(ft_sign_raw_firmware))
  65. FILE_TYPE(RAW_KERNEL, "vmlinuz", "raw linux kernel",
  66. NONE,
  67. NONE,
  68. S_(ft_sign_raw_kernel))
  69. FILE_TYPE(CHROMIUMOS_DISK, "disk_img", "chromiumos disk image",
  70. NONE,
  71. NONE,
  72. NONE)
  73. FILE_TYPE(RWSIG, "rwsig", "RW device image",
  74. R_(ft_recognize_rwsig),
  75. S_(ft_show_rwsig),
  76. S_(ft_sign_rwsig))
  77. /* Firmware for USB Type-C power adapters */
  78. FILE_TYPE(USBPD1, "usbpd1", "USB-PD charger image (v1.0)",
  79. R_(ft_recognize_usbpd1),
  80. S_(ft_show_usbpd1),
  81. S_(ft_sign_usbpd1))
  82. FILE_TYPE(BDB, "bdb", "Common Boot Flow Boot Descriptor Block",
  83. R_(ft_recognize_bdb),
  84. S_(ft_show_bdb),
  85. NONE)