diff options
-rw-r--r-- | classes/rmc-boot.bbclass | 6 | ||||
-rw-r--r-- | common/recipes-bsp/rmc/rmc-db.bb | 3 | ||||
-rw-r--r-- | documentation/rmc/README | 41 |
3 files changed, 32 insertions, 18 deletions
diff --git a/classes/rmc-boot.bbclass b/classes/rmc-boot.bbclass index a1f2093f..37c3e30c 100644 --- a/classes/rmc-boot.bbclass +++ b/classes/rmc-boot.bbclass | |||
@@ -9,5 +9,9 @@ inherit ${RMC_BOOTLOADER} | |||
9 | do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy" | 9 | do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy" |
10 | 10 | ||
11 | efi_populate_append() { | 11 | efi_populate_append() { |
12 | install -m 0400 ${DEPLOY_DIR_IMAGE}/rmc.db ${DEST}/rmc.db | 12 | if [ -f ${DEPLOY_DIR_IMAGE}/rmc.db ]; then |
13 | install -m 0400 ${DEPLOY_DIR_IMAGE}/rmc.db ${DEST}/rmc.db | ||
14 | else | ||
15 | rm -f ${DEST}/rmc.db | ||
16 | fi | ||
13 | } | 17 | } |
diff --git a/common/recipes-bsp/rmc/rmc-db.bb b/common/recipes-bsp/rmc/rmc-db.bb index 14553af0..99565fdd 100644 --- a/common/recipes-bsp/rmc/rmc-db.bb +++ b/common/recipes-bsp/rmc/rmc-db.bb | |||
@@ -14,7 +14,7 @@ S = "${WORKDIR}" | |||
14 | 14 | ||
15 | inherit rmc-db | 15 | inherit rmc-db |
16 | 16 | ||
17 | RMC_BOARD_DATA_DIRS_append := " ${THISDIR}/boards/" | 17 | RMC_BOARD_DATA_DIRS ?= "${THISDIR}/boards/" |
18 | RMC_DB_DIR = "${WORKDIR}/db" | 18 | RMC_DB_DIR = "${WORKDIR}/db" |
19 | 19 | ||
20 | # Let sstate be aware of change in any added board directories | 20 | # Let sstate be aware of change in any added board directories |
@@ -41,6 +41,7 @@ do_deploy () { | |||
41 | if [ -f ${RMC_DB_DIR}/rmc.db ]; then | 41 | if [ -f ${RMC_DB_DIR}/rmc.db ]; then |
42 | install -m 0400 ${RMC_DB_DIR}/rmc.db ${DEPLOYDIR} | 42 | install -m 0400 ${RMC_DB_DIR}/rmc.db ${DEPLOYDIR} |
43 | else | 43 | else |
44 | rm -f ${DEPLOYDIR}/rmc.db | ||
44 | echo "Warning: no RMC central database found, skip deployment." | 45 | echo "Warning: no RMC central database found, skip deployment." |
45 | fi | 46 | fi |
46 | } | 47 | } |
diff --git a/documentation/rmc/README b/documentation/rmc/README index dbee6b6d..eaa763e1 100644 --- a/documentation/rmc/README +++ b/documentation/rmc/README | |||
@@ -82,15 +82,31 @@ following this example, so that RMC recipes can pick up them correctly in build. | |||
82 | |- ...more files | 82 | |- ...more files |
83 | 83 | ||
84 | Note 0: | 84 | Note 0: |
85 | To add your boards into RMC feature, simply put this line in your | 85 | Developers are expected to use variable RMC_BOARD_DATA_DIRS to specify data of |
86 | rmc-db.bbappend: | 86 | boards packed into RMC database file generated in a build. The default value of |
87 | the variable in meta-intel specifies a group of boards. They work as examples | ||
88 | and necessary quirks for these boards to function properly. Developers can | ||
89 | override, append to the default boards with data of their own boards in the | ||
90 | database file, or even disable the generation of the database file. | ||
87 | 91 | ||
88 | RMC_BOARD_DATA_DIRS_append := " ${THISDIR}/my_top_dir" | 92 | For example, in your local.conf file: |
89 | 93 | ||
90 | RMC db recipe takes all top directories specified in RMC_BOARD_DATA_DIRS to | 94 | This line adds your boards along with the default boards into RMC database file, |
91 | construct and deploy a central RMC database inside image. The bbclass of the | 95 | assuming you have a directory named "rmc" which has a subdirectory for each |
92 | bare RMC project also provide function for other components to construct their | 96 | board: |
93 | own RMC database file. Please refer to rmc-db.bbclass for more information. | 97 | |
98 | RMC_BOARD_DATA_DIRS_append = " /path_of/rmc" | ||
99 | |||
100 | This line directs RMC to pack data of your boards only, without data of the | ||
101 | default boards in meta-intel: | ||
102 | |||
103 | RMC_BOARD_DATA_DIRS = "/path_of/rmc" | ||
104 | |||
105 | And this line disables database generation: | ||
106 | |||
107 | RMC_BOARD_DATA_DIRS = "" | ||
108 | |||
109 | Please also refer to the "Example 1" in this document. | ||
94 | 110 | ||
95 | Subdirectory is not supported in a board's directory. | 111 | Subdirectory is not supported in a board's directory. |
96 | 112 | ||
@@ -175,15 +191,8 @@ bootloader please overwrite the RMC_BOOTLOADER variable in your local.conf | |||
175 | 191 | ||
176 | Note: | 192 | Note: |
177 | Image could be still bootable if you only have either of two lines, but RMC | 193 | Image could be still bootable if you only have either of two lines, but RMC |
178 | feature won't be fully functional. | 194 | feature could not be fully functional, depending on the availability of the |
179 | 195 | database file, installer and the rmc tool. | |
180 | To install only the RMC client with the systemd-boot bootloader without | ||
181 | including a default RMC database file, add the following lines to your | ||
182 | local.conf: | ||
183 | |||
184 | EFI_PROVIDER = "systemd-boot" | ||
185 | IMAGE_INSTALL_append = " rmc" | ||
186 | |||
187 | 196 | ||
188 | Examples | 197 | Examples |
189 | -------------------------------------------------------------------------------- | 198 | -------------------------------------------------------------------------------- |