sis_create_and_sign.txt 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. Overview
  2. ========
  3. Raptor now ships a createsis FLM to support .sis generation and signing.
  4. This FLM is available as part of the "utility" grouping and runs as part
  5. of the main, .default, section of the build.
  6. General Syntax
  7. ==============
  8. bld.inf
  9. PRJ_EXTENSIONS (or PRJ_TESTEXTENSIONS)
  10. START EXTENSION utility.createsis
  11. OPTION PKG_FILE input_package_file.pkg
  12. OPTION PKG_PATH /path/to/pkg/file
  13. OPTION SIS_FILE output_sis_file.sis
  14. OPTION SIS_PATH /path/to/sis/file
  15. OPTION TARGET_FILE core_binary_to_be_packaged
  16. OPTION SEARCH_PATH /root/path/to/resolve/pkg/content
  17. OPTION BUILD_TYPE urel|udeb
  18. OPTION STUB_SIS true|false
  19. OPTION DEPEND_FILES additional_dependent_file[s]
  20. OPTION DEPEND_PATH /path/to/additional/dependencies
  21. OPTION CERTIFICATE_FILE signing_certificate_file.cer
  22. OPTION PRIVATE_KEY_FILE private_key_file.key
  23. OPTION PRIVATE_KEY_PASSPHRASE passphrase
  24. OPTION MAKESIS_ARGS additional_arguments_to_makesis
  25. OPTION SIGNSIS_ARGS additional_arguments_to_signsis
  26. END
  27. Option Breakdown
  28. ================
  29. Option Description Mandatory? Additional Info
  30. ------ ----------- ---------- ---------------
  31. PKG_FILE .pkg file input Yes
  32. PKG_PATH Path to .pkg file No default: bld.inf path
  33. SIS_FILE Output .sis file Yes
  34. SIS_PATH Path to .sis file No default: bld.inf path
  35. (into release tree
  36. if "STUB_SIS true")
  37. TARGET_FILE Core binary No Resolved with regard
  38. to release location
  39. SEARCH_PATH Root location for No default: $EPOCROOT
  40. locating .pkg content
  41. BUILD_TYPE urel or udeb Yes Restricts a createsis
  42. instance to a release
  43. or debug run
  44. STUB_SIS true or false No Generate a rom stub
  45. default: false
  46. DEPEND_FILES Additional build No
  47. files to track
  48. DEPEND_PATH Path to dependencies No default: $EPOCROOT
  49. MAKESIS_ARGS Additional arguments
  50. for makesis
  51. SIGNSIS_ARGS Additional arguments
  52. for signsis
  53. CERTIFICATE_FILE Certificate file No Relative to bld.inf
  54. PRIVATE_KEY_FILE Key file for signing No Relative to bld.inf
  55. PRIVATE_KEY_PASSPHRASE Key file passphrase No
  56. Option Notes
  57. ------------
  58. As with all bld.inf content, build platform/configuration preprocessor
  59. conditionals/substitutions are supported.
  60. $(PLATFORM) and $(TARGET) values in .pkg file are replaced by the FLM with
  61. the current build platform and BUILD_TYPE (respectively). This permits a more
  62. generic form of .pkg file, as generated by QMAKE for QT applications.
  63. TARGET_FILE values are resolved in relation to the following template:
  64. $EPOCROOT/epoc32/release/build-platform/BUILD_TYPE/TARGET_FILE
  65. Default SIS_FILE locations are resolved relative to the bld.inf file unless
  66. STUB_SIS is true. Stub .sis files are generated to
  67. $EPOCROOT/epoc32/data/z/system/install for target builds and using the
  68. following template for emulator builds:
  69. $(EPOCROOT)/epoc32/release/winscw/BUILD_TYPE/data/z/system/install/SIS_FILE
  70. The resolved TARGET_FILE, if listed, is always tracked as a dependency of the
  71. .sis file, as are any other resolved *_FILE option values.
  72. All *_PATH values support $(EPOCROOT), $(EXTENSION_ROOT) etc. if the default
  73. locations need to be overridden for a specific use case.
  74. DEPEND_FILES support is present to ensure the correct running of the FLM with
  75. regard to other files generated in the build. Not all additional files
  76. referenced in the .pkg file need to be present here, only those that:
  77. a) have the potential to be generated later in the build than the .sis file
  78. b) should be additionally acknowledged for the purpose of an incremental build
  79. Example
  80. =======
  81. /src/examples/helloworld/bld.inf
  82. PRJ_EXTENSIONS
  83. // release packaging
  84. START EXTENSION utility.createsis
  85. #ifdef WINSCW
  86. OPTION PKG_FILE sis/winscw_urel.pkg
  87. OPTION SIS_FILE sis/helloworld_winscw.sisx
  88. #else
  89. OPTION PKG_FILE sis/armv5_urel.pkg
  90. OPTION SIS_FILE sis/helloworld_armv5.sisx
  91. #endif
  92. OPTION TARGET_FILE helloworld.exe
  93. OPTION BUILD_TYPE urel
  94. OPTION CERTIFICATE_FILE sis/sign.cer
  95. OPTION PRIVATE_KEY_FILE sis/sign.key
  96. OPTION PRIVATE_KEY_PASSPHRASE velociraptor123
  97. OPTION SIGNSIS_ARGS -cd // Sign using RSA
  98. OPTION DEPEND_FILES epoc32/data/z/resource/apps/HelloWorld.rsc \
  99. epoc32/data/z/resource/apps/helloworld.mbm
  100. END
  101. // debug packaging
  102. START EXTENSION utility.createsis
  103. #ifdef WINSCW
  104. OPTION PKG_FILE sis/winscw_udeb.pkg
  105. OPTION SIS_FILE sis/helloworld_winscw_debug.sis
  106. #else
  107. OPTION PKG_FILE sis/armv5_udeb.pkg
  108. OPTION SIS_FILE sis/helloworld_armv5_debug.sis
  109. #endif
  110. OPTION TARGET_FILE helloworld.exe
  111. OPTION BUILD_TYPE udeb
  112. OPTION MAKESIS_ARGS -v
  113. OPTION DEPEND_FILES epoc32/data/z/resource/apps/HelloWorld.rsc \
  114. epoc32/data/z/resource/apps/helloworld.mbm
  115. END
  116. // custom release packaging
  117. // uses the optional overrides for default locations
  118. START EXTENSION utility.createsis
  119. OPTION PKG_PATH $(EXTENSION_ROOT)/sis
  120. OPTION SIS_PATH $(EPOCROOT)/epoc32/packaging/helloworld
  121. #ifdef WINSCW
  122. OPTION PKG_FILE winscw_urel_custom.pkg
  123. OPTION SIS_FILE helloworld_winscw_custom.sis
  124. #else
  125. OPTION PKG_FILE armv5_urel_custom.pkg
  126. OPTION SIS_FILE helloworld_armv5_custom.sis
  127. #endif
  128. OPTION TARGET_FILE helloworld.exe
  129. OPTION SEARCH_PATH $(EPOCROOT)/epoc32
  130. OPTION BUILD_TYPE urel
  131. OPTION DEPEND_PATH $(EPOCROOT)/epoc32/data/z/resource/apps
  132. OPTION DEPEND_FILES HelloWorld.rsc helloworld.mbm
  133. END
  134. // stub .sis file
  135. START EXTENSION utility.createsis
  136. OPTION PKG_FILE sis/stub.pkg
  137. OPTION SIS_FILE helloworld_stub.sis
  138. OPTION BUILD_TYPE urel
  139. OPTION STUB_SIS true
  140. END