summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-07-12 14:08:22 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2018-07-16 08:53:00 (GMT)
commitc12c16659203d677618871f660c1499152a555a8 (patch)
tree60967f8f17da1e5a6cef2908312a25b4c9514a07 /classes
parent7c469177e833a80443b948af63e40176c7dc6bee (diff)
downloadmeta-intel-c12c16659203d677618871f660c1499152a555a8.tar.gz
rmc: remove
It's not being maintained anymore and the scripts have not been kept in sync with upstream for quite some time. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/rmc-boot.bbclass17
-rw-r--r--classes/rmc-db.bbclass92
2 files changed, 0 insertions, 109 deletions
diff --git a/classes/rmc-boot.bbclass b/classes/rmc-boot.bbclass
deleted file mode 100644
index 37c3e30..0000000
--- a/classes/rmc-boot.bbclass
+++ /dev/null
@@ -1,17 +0,0 @@
1# rmc-boot bbclass
2# Deploy central RMC database file to ESP
3
4IMAGE_INSTALL_append = " rmc"
5RMC_BOOTLOADER ?= "systemd-boot"
6
7inherit ${RMC_BOOTLOADER}
8
9do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy"
10
11efi_populate_append() {
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
17}
diff --git a/classes/rmc-db.bbclass b/classes/rmc-db.bbclass
deleted file mode 100644
index 72594d6..0000000
--- a/classes/rmc-db.bbclass
+++ /dev/null
@@ -1,92 +0,0 @@
1# RMC database bbclass
2# provide functions to generate RMC database file on build host (native)
3
4DEPENDS += "rmc-native"
5
6# rmc_generate_db()
7# $1: a list of directories. Each directory holds directories for a group of
8# boards.
9# $2: path_name of rmc generates database file and records
10#
11# WARNING: content of directory of database file will be removed.
12#
13# Each board directory shall contain a fingerprint file (*.fp) at least, with
14# optional file blob(s) associated to the type of board. If a board directory
15# has no file blob, no record is created for that board.
16#
17# An example of two directories each of which contains two boards for RMC:
18# (All file and directory names are for illustration purpose.)
19#
20# dir_1/
21# board_1/
22# board_1_fingerprint.fp
23# file_1.blob
24# board_2/
25# board_2.fp
26# dir_2/
27# board_3/
28# b3.fp
29# file_1.blob
30# file_2.conf
31# board_4/
32# board_foo.fp
33# mylib.config
34#
35# To generate a RMC database "rmc.db" with data of all (actually 3) of boards in
36# a directory "deploy_dir":
37#
38# rmc_generate_db "dir_1 dir_2" "deploy_dir/rmc.db"
39#
40# The board_2 will be skipped. No record or any data for it is packed in
41# generated database because it only contains a fingerprint file.
42#
43
44rmc_generate_db () {
45 RMC_BOARD_DIRS=$1
46
47 if [ "$#" -ne 2 ]; then
48 echo "rmc_generate_db(): Wrong number of arguments: $#"
49 return 1
50 fi
51
52 RMC_DB_DIR=$(dirname "$2")
53 RMC_RECORDS=""
54
55 rm -rf ${RMC_DB_DIR}
56 mkdir -p ${RMC_DB_DIR}
57
58 # generate rmc database
59 for topdir in ${RMC_BOARD_DIRS}; do
60 # For all board dirs in a topdir:
61 CUR_BOARD_DIRS=$(find ${topdir}/* -type d)
62 for board_dir in ${CUR_BOARD_DIRS}; do
63 CUR_FINGERPRINT=$(find ${board_dir}/ -name "*.fp")
64
65 # disallow a board directory without any fingerprint file in it.
66 if [ -z "${CUR_FINGERPRINT}" ]; then
67 echo "Cannot find RMC fingerprint file in ${board_dir}"
68 return 1
69 fi
70
71 CUR_FILES=$(find ${board_dir}/ -type f |grep -v '\.fp$' || true)
72
73 # allow a directory only with fingerprint file. Developer may
74 # check in fingerprint for future use.
75 if [ -z "${CUR_FILES}" ]; then
76 continue
77 fi
78
79 for fp in ${CUR_FINGERPRINT}; do
80 fullname=$(basename ${fp})
81 CUR_TAG="${fullname%.*}"
82 CUR_RECORD=${RMC_DB_DIR}/${CUR_TAG}.rec
83 rmc -R -f ${fp} -b ${CUR_FILES} -o ${CUR_RECORD}
84 RMC_RECORDS="${RMC_RECORDS} ${CUR_RECORD}"
85 done
86 done
87 done
88
89 if [ ! -z "${RMC_RECORDS}" ]; then
90 rmc -D ${RMC_RECORDS} -o "$2"
91 fi
92}