mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 12:59:03 +02:00
rmc: Extend usages of RMC_BOARD_DATA_DIRS to specify board data
Use the variable RMC_BOARD_DATA_DIRS, to disable, append to, or override the default board data in meta-intel with boards' data provided by users. Ideally, users should get the updated database in the new built image after an incremental build. Examples of RMC database output (db): RMC_BOARD_DATA_DIRS = "" (disable db generation) RMC_BOARD_DATA_DIRS_append = " top_dir" (db of defaults & user's) RMC_BOARD_DATA_DIRS = "top_dir" (db for user's , no defaults) RMC_BOARD_DATA_DIRS = " " (same as "") Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
This commit is contained in:
parent
499b251ce6
commit
368673eab1
|
@ -9,5 +9,9 @@ inherit ${RMC_BOOTLOADER}
|
||||||
do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy"
|
do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy"
|
||||||
|
|
||||||
efi_populate_append() {
|
efi_populate_append() {
|
||||||
install -m 0400 ${DEPLOY_DIR_IMAGE}/rmc.db ${DEST}/rmc.db
|
if [ -f ${DEPLOY_DIR_IMAGE}/rmc.db ]; then
|
||||||
|
install -m 0400 ${DEPLOY_DIR_IMAGE}/rmc.db ${DEST}/rmc.db
|
||||||
|
else
|
||||||
|
rm -f ${DEST}/rmc.db
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ S = "${WORKDIR}"
|
||||||
|
|
||||||
inherit rmc-db
|
inherit rmc-db
|
||||||
|
|
||||||
RMC_BOARD_DATA_DIRS_append := " ${THISDIR}/boards/"
|
RMC_BOARD_DATA_DIRS ?= "${THISDIR}/boards/"
|
||||||
RMC_DB_DIR = "${WORKDIR}/db"
|
RMC_DB_DIR = "${WORKDIR}/db"
|
||||||
|
|
||||||
# Let sstate be aware of change in any added board directories
|
# Let sstate be aware of change in any added board directories
|
||||||
|
@ -41,6 +41,7 @@ do_deploy () {
|
||||||
if [ -f ${RMC_DB_DIR}/rmc.db ]; then
|
if [ -f ${RMC_DB_DIR}/rmc.db ]; then
|
||||||
install -m 0400 ${RMC_DB_DIR}/rmc.db ${DEPLOYDIR}
|
install -m 0400 ${RMC_DB_DIR}/rmc.db ${DEPLOYDIR}
|
||||||
else
|
else
|
||||||
|
rm -f ${DEPLOYDIR}/rmc.db
|
||||||
echo "Warning: no RMC central database found, skip deployment."
|
echo "Warning: no RMC central database found, skip deployment."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,15 +82,31 @@ following this example, so that RMC recipes can pick up them correctly in build.
|
||||||
|- ...more files
|
|- ...more files
|
||||||
|
|
||||||
Note 0:
|
Note 0:
|
||||||
To add your boards into RMC feature, simply put this line in your
|
Developers are expected to use variable RMC_BOARD_DATA_DIRS to specify data of
|
||||||
rmc-db.bbappend:
|
boards packed into RMC database file generated in a build. The default value of
|
||||||
|
the variable in meta-intel specifies a group of boards. They work as examples
|
||||||
|
and necessary quirks for these boards to function properly. Developers can
|
||||||
|
override, append to the default boards with data of their own boards in the
|
||||||
|
database file, or even disable the generation of the database file.
|
||||||
|
|
||||||
RMC_BOARD_DATA_DIRS_append := " ${THISDIR}/my_top_dir"
|
For example, in your local.conf file:
|
||||||
|
|
||||||
RMC db recipe takes all top directories specified in RMC_BOARD_DATA_DIRS to
|
This line adds your boards along with the default boards into RMC database file,
|
||||||
construct and deploy a central RMC database inside image. The bbclass of the
|
assuming you have a directory named "rmc" which has a subdirectory for each
|
||||||
bare RMC project also provide function for other components to construct their
|
board:
|
||||||
own RMC database file. Please refer to rmc-db.bbclass for more information.
|
|
||||||
|
RMC_BOARD_DATA_DIRS_append = " /path_of/rmc"
|
||||||
|
|
||||||
|
This line directs RMC to pack data of your boards only, without data of the
|
||||||
|
default boards in meta-intel:
|
||||||
|
|
||||||
|
RMC_BOARD_DATA_DIRS = "/path_of/rmc"
|
||||||
|
|
||||||
|
And this line disables database generation:
|
||||||
|
|
||||||
|
RMC_BOARD_DATA_DIRS = ""
|
||||||
|
|
||||||
|
Please also refer to the "Example 1" in this document.
|
||||||
|
|
||||||
Subdirectory is not supported in a board's directory.
|
Subdirectory is not supported in a board's directory.
|
||||||
|
|
||||||
|
@ -175,15 +191,8 @@ bootloader please overwrite the RMC_BOOTLOADER variable in your local.conf
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
Image could be still bootable if you only have either of two lines, but RMC
|
Image could be still bootable if you only have either of two lines, but RMC
|
||||||
feature won't be fully functional.
|
feature could not be fully functional, depending on the availability of the
|
||||||
|
database file, installer and the rmc tool.
|
||||||
To install only the RMC client with the systemd-boot bootloader without
|
|
||||||
including a default RMC database file, add the following lines to your
|
|
||||||
local.conf:
|
|
||||||
|
|
||||||
EFI_PROVIDER = "systemd-boot"
|
|
||||||
IMAGE_INSTALL_append = " rmc"
|
|
||||||
|
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user