rmc-db: also install to /boot/

With the EFI image enhancements, installing to boot allows us to easily
use RMC with the new wic images.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
This commit is contained in:
California Sullivan 2018-03-21 15:22:48 -07:00
parent 3342d3715e
commit aab83c8235

View File

@ -17,6 +17,8 @@ inherit rmc-db
RMC_BOARD_DATA_DIRS ?= "${THISDIR}/boards/"
RMC_DB_DIR = "${WORKDIR}/db"
FILES_${PN} = "/boot/rmc.db"
# Let sstate be aware of change in any added board directories
do_generate_rmc_db[file-checksums] = "${@get_rmc_top_dirs_list(d)}"
@ -46,4 +48,15 @@ do_deploy () {
fi
}
do_install () {
install -d ${D}/boot
if [ -f ${RMC_DB_DIR}/rmc.db ]; then
install -m 0400 ${RMC_DB_DIR}/rmc.db ${D}/boot/
else
rm -f ${D}/rmc.db
echo "Warning: no RMC central database found, skip installation."
fi
}
do_install[depends] += "${PN}:do_generate_rmc_db"
addtask deploy after do_generate_rmc_db