diff options
Diffstat (limited to 'recipes-bsp/rmc/rmc-db.bb')
-rw-r--r-- | recipes-bsp/rmc/rmc-db.bb | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/recipes-bsp/rmc/rmc-db.bb b/recipes-bsp/rmc/rmc-db.bb deleted file mode 100644 index 7ec824a8..00000000 --- a/recipes-bsp/rmc/rmc-db.bb +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | SUMMARY = "Central RMC Database" | ||
2 | DESCRIPTION = "Generate a centralized RMC database for RMC feature. \ | ||
3 | Fingerprints and data for all boards supported are specified by variable \ | ||
4 | RMC_BOARD_DATA_DIRS which is a list of top directories that contains \ | ||
5 | subdirectories for boards. Developers can add their top directories by appending \ | ||
6 | them to this variable in a rmc-db.bbappend.Refer to rmc-db bbclass for more \ | ||
7 | information." | ||
8 | |||
9 | LICENSE = "MIT" | ||
10 | |||
11 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
12 | |||
13 | S = "${WORKDIR}" | ||
14 | |||
15 | inherit rmc-db | ||
16 | |||
17 | RMC_BOARD_DATA_DIRS ?= "${THISDIR}/boards/" | ||
18 | RMC_DB_DIR = "${WORKDIR}/db" | ||
19 | |||
20 | FILES_${PN} = "/boot/rmc.db" | ||
21 | |||
22 | # Let sstate be aware of change in any added board directories | ||
23 | do_generate_rmc_db[file-checksums] = "${@get_rmc_top_dirs_list(d)}" | ||
24 | |||
25 | # derived from get_lic_checksum_file_list(d) in base.bbclass in OE | ||
26 | def get_rmc_top_dirs_list(d): | ||
27 | dirlist = [] | ||
28 | dirs = d.getVar("RMC_BOARD_DATA_DIRS", True) or '' | ||
29 | topdirs = dirs.split() | ||
30 | for each in topdirs: | ||
31 | dirlist.append(each + ":" + str(os.path.exists(each))) | ||
32 | return " ".join(dirlist) | ||
33 | |||
34 | do_generate_rmc_db () { | ||
35 | rmc_generate_db "${RMC_BOARD_DATA_DIRS}" "${RMC_DB_DIR}"/rmc.db | ||
36 | } | ||
37 | |||
38 | addtask generate_rmc_db after do_compile | ||
39 | |||
40 | inherit deploy | ||
41 | |||
42 | do_deploy () { | ||
43 | if [ -f ${RMC_DB_DIR}/rmc.db ]; then | ||
44 | install -m 0400 ${RMC_DB_DIR}/rmc.db ${DEPLOYDIR} | ||
45 | else | ||
46 | rm -f ${DEPLOYDIR}/rmc.db | ||
47 | echo "Warning: no RMC central database found, skip deployment." | ||
48 | fi | ||
49 | } | ||
50 | |||
51 | do_install () { | ||
52 | install -d ${D}/boot | ||
53 | if [ -f ${RMC_DB_DIR}/rmc.db ]; then | ||
54 | install -m 0400 ${RMC_DB_DIR}/rmc.db ${D}/boot/ | ||
55 | else | ||
56 | rm -f ${D}/rmc.db | ||
57 | echo "Warning: no RMC central database found, skip installation." | ||
58 | fi | ||
59 | } | ||
60 | do_install[depends] += "${PN}:do_generate_rmc_db" | ||
61 | |||
62 | addtask deploy after do_generate_rmc_db | ||