summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--README4
-rw-r--r--classes/rmc-boot.bbclass17
-rw-r--r--classes/rmc-db.bbclass92
-rw-r--r--conf/include/maintainers.inc2
-rw-r--r--conf/machine/intel-core2-32.conf2
-rw-r--r--conf/machine/intel-corei7-64.conf2
-rw-r--r--documentation/rmc/README373
-rw-r--r--recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fpbin154 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh2
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fpbin149 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fpbin116 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/T100-32bit/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/T100-32bit/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG3
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh2
-rwxr-xr-xrecipes-bsp/rmc/boards/broxton-m/bm-1F1.fpbin83 -> 0 bytes
-rwxr-xr-xrecipes-bsp/rmc/boards/broxton-m/bm.fpbin83 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/joule-1F1.fpbin122 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/minnowmax/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/minnowmax/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/minnowmax/minnowmax.fpbin143 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/minnowmaxB3/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/minnowmaxB3/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fpbin148 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG3
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh3
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fpbin121 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG6
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh7
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/mylib.conf7
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/nuc6.fpbin149 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fpbin113 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fpbin113 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/rmc-db.bb62
-rw-r--r--recipes-bsp/rmc/rmc-efi.bb40
-rw-r--r--recipes-bsp/rmc/rmc.bb46
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch46
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch62
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch252
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch67
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch82
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc30
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot_%.bbappend3
-rw-r--r--recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh342
-rw-r--r--recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend2
67 files changed, 2 insertions, 1635 deletions
diff --git a/README b/README
index 0977e79..6482fe2 100644
--- a/README
+++ b/README
@@ -239,10 +239,6 @@ Other software
239the Intel power clamp driver. 239the Intel power clamp driver.
240(https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon) 240(https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon)
241 241
242 * RMC - Runtime Machine Configuration, which allows the bootload to determine
243board and CPU information in order to set specific kernel command line
244information at startup.
245
246The intel-common kernel package architecture 242The intel-common kernel package architecture
247-------------------------------------------- 243--------------------------------------------
248 244
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}
diff --git a/conf/include/maintainers.inc b/conf/include/maintainers.inc
index b90480e..4bd4581 100644
--- a/conf/include/maintainers.inc
+++ b/conf/include/maintainers.inc
@@ -14,8 +14,6 @@ RECIPE_MAINTAINER_pn-linux-intel = "Anuj Mittal <anuj.mittal@intel.com>"
14RECIPE_MAINTAINER_pn-linux-intel-rt = "Anuj Mittal <anuj.mittal@intel.com>" 14RECIPE_MAINTAINER_pn-linux-intel-rt = "Anuj Mittal <anuj.mittal@intel.com>"
15RECIPE_MAINTAINER_pn-lms7 = "Anuj Mittal <anuj.mittal@intel.com>" 15RECIPE_MAINTAINER_pn-lms7 = "Anuj Mittal <anuj.mittal@intel.com>"
16RECIPE_MAINTAINER_pn-lms8 = "Anuj Mittal <anuj.mittal@intel.com>" 16RECIPE_MAINTAINER_pn-lms8 = "Anuj Mittal <anuj.mittal@intel.com>"
17RECIPE_MAINTAINER_pn-rmc = "Anuj Mittal <anuj.mittal@intel.com>"
18RECIPE_MAINTAINER_pn-rmc-db = "Anuj Mittal <anuj.mittal@intel.com>"
19RECIPE_MAINTAINER_pn-thermald = "Anuj Mittal <anuj.mittal@intel.com>" 17RECIPE_MAINTAINER_pn-thermald = "Anuj Mittal <anuj.mittal@intel.com>"
20RECIPE_MAINTAINER_pn-va-intel = "Anuj Mittal <anuj.mittal@intel.com>" 18RECIPE_MAINTAINER_pn-va-intel = "Anuj Mittal <anuj.mittal@intel.com>"
21RECIPE_MAINTAINER_pn-xf86-video-ast = "Anuj Mittal <anuj.mittal@intel.com>" 19RECIPE_MAINTAINER_pn-xf86-video-ast = "Anuj Mittal <anuj.mittal@intel.com>"
diff --git a/conf/machine/intel-core2-32.conf b/conf/machine/intel-core2-32.conf
index 0e41699..9a83fdf 100644
--- a/conf/machine/intel-core2-32.conf
+++ b/conf/machine/intel-core2-32.conf
@@ -34,5 +34,5 @@ SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyPCH0"
34APPEND += "rootwait console=ttyS0,115200 console=ttyPCH0,115200 console=tty0" 34APPEND += "rootwait console=ttyS0,115200 console=ttyPCH0,115200 console=tty0"
35 35
36IMAGE_FSTYPES += "wic" 36IMAGE_FSTYPES += "wic"
37WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk-microcode.wks", "grub-bootdisk-microcode.wks", d)}" 37WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot", "systemd-bootdisk-microcode.wks", "grub-bootdisk-microcode.wks", d)}"
38WKS_FILE_DEPENDS_append = " intel-microcode" 38WKS_FILE_DEPENDS_append = " intel-microcode"
diff --git a/conf/machine/intel-corei7-64.conf b/conf/machine/intel-corei7-64.conf
index 4986993..16006d3 100644
--- a/conf/machine/intel-corei7-64.conf
+++ b/conf/machine/intel-corei7-64.conf
@@ -41,5 +41,5 @@ SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyS2"
41APPEND += "rootwait console=ttyS0,115200 console=tty0" 41APPEND += "rootwait console=ttyS0,115200 console=tty0"
42 42
43IMAGE_FSTYPES += "wic" 43IMAGE_FSTYPES += "wic"
44WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk-microcode.wks", "grub-bootdisk-microcode.wks", d)}" 44WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot", "systemd-bootdisk-microcode.wks", "grub-bootdisk-microcode.wks", d)}"
45WKS_FILE_DEPENDS_append = " intel-microcode" 45WKS_FILE_DEPENDS_append = " intel-microcode"
diff --git a/documentation/rmc/README b/documentation/rmc/README
deleted file mode 100644
index 2c352f2..0000000
--- a/documentation/rmc/README
+++ /dev/null
@@ -1,373 +0,0 @@
1Runtime Machine Configuration (RMC)
2--------------------------------------------------------------------------------
3Table of Contents
4
5Introduction
6Usage
7Enable RMC Feature
8Examples
9Troubleshooting
10When you (don't) need RMC feature
11
12
13Introduction:
14--------------------------------------------------------------------------------
15RMC Project - a light-weight project provide developers a mechanism to keep
16their software implementation board-type agnostic, yet still able to customize
17software behavior according to the type of a running board at runtime. Recipes
18and bbclasses are available for other components to reuse to construct their own
19RMC database.
20
21RMC Feature - An end-to-end solution based on RMC project to have a generic
22image capable to apply board-type-specific quirks and configurations for a board
23at runtime. It consists of a modified bootloader (systemd-boot), an updated EFI
24installer, recipes, bbclass and RMC project.
25
26RMC feature supports special customizations cannot be covered by conventional
27auto-detection features based on probing a hardware module because they happen
28at a board or a product level. For example:
29 - tty console for kernel log output in kernel cmdline
30 - default audio route configuration
31 - network configuration
32 - UI layout
33 - requirement to software driven by a mechanical design
34 - or static configuration bits for a physical bus that doesn't support to
35 identify devices or their presence at runtime
36
37An image with the feature has ability to configure supported boards with data
38associated only to a type of board to get full functionality of the target at
39runtime, yet still with a single image.
40
41Effect after installation is identical to what a conventional image specially
42customized for a type of board (depending on the way to deploy image).
43
44Main functions of RMC Feature:
45
46Show board-specific boot entries in boot menu and boot system with configuration
47(boot title, boot options, etc) in a selected boot entry.
48
49Support a "global" kernel boot command line fragment which is effective for all
50boot entries.
51
52Deploy file blobs and create directories specific to the type of running board.
53
54Beside from this document, you can also find several built-in examples in
55common/recipes-bsp/rmc/boards/. Refer to "Examples" section.
56
57You can also add new board types in your layer via a simple variable.
58
59
60
61Usage
62--------------------------------------------------------------------------------
63Developers are suggested to organize all board-specific files in their own layer
64following this example, so that RMC recipes can pick up them correctly in build.
65
66- my_top_dir/ Top directory of your board (Note 0)
67 |- rmc-db.bbappend bbappend file to rmc-db recipe at a lower level
68 |- rmc/
69 |- target_board_1/ subdirectory of a board.
70 | |- board1.fp fingerprint file must be provided (NOTE 1)
71 | |- BOOTENTRY.CONFIG optional config file for boot entries. (NOTE 2)
72 | |- INSTALLER.CONFIG optional config file for installer. (NOTE 3)
73 | |- POSTINSTALL.sh optional script hook for installer (NOTE 4)
74 | |- board_file_1 A file blob specific to the type of board
75 | |- board_file_2 An another file specific to the type of board
76 | |- ...more files
77 |- target_board_2/ subdirectory of another board.
78 |- board_2_v2.fp fingerprint file for board 2.
79 |- BOOTENTRY.CONFIG
80 |- INSTALLER.CONFIG
81 |- board_file_1
82 |- ...more files
83
84Note 0:
85Developers are expected to use variable RMC_BOARD_DATA_DIRS to specify data of
86boards packed into RMC database file generated in a build. The default value of
87the variable in meta-intel specifies a group of boards. They work as examples
88and necessary quirks for these boards to function properly. Developers can
89override, append to the default boards with data of their own boards in the
90database file, or even disable the generation of the database file.
91
92For example, in your local.conf file:
93
94This line adds your boards along with the default boards into RMC database file,
95assuming you have a directory named "rmc" which has a subdirectory for each
96board:
97
98RMC_BOARD_DATA_DIRS_append = " /path_of/rmc"
99
100This line directs RMC to pack data of your boards only, without data of the
101default boards in meta-intel:
102
103RMC_BOARD_DATA_DIRS = "/path_of/rmc"
104
105And this line disables database generation:
106
107RMC_BOARD_DATA_DIRS = ""
108
109Please also refer to the "Example 1" in this document.
110
111Subdirectory is not supported in a board's directory.
112
113Note 1:
114Fingerprint files must be provided and with ".fp" at the end of their names.
115Fingerprint can be obtained by running RMC tool on your board. An easy way is to
116live-boot USB stick flashed with any image enabled this feature on your board,
117then run this command:
118
119# rmc -F -o my_board.fp
120
121Or you will need to build RMC tool for the architecture of your board, 32 or
12264 bit x86, from RMC project.
123
124You can run RMC tool without any argument to get usage and examples.
125
126DO NOT NAME ANY FILE ENDING WITH '.fp' IF IT IS NOT A RMC FINGERPRINT FILE.
127
128If you do need a .fp file deployed onto target, please rename it in source and
129specify the real name of file on target in INSTALLER.CONFIG.
130
131Note 2:
132At runtime, RMC bootloader tries to fetch this file specific to the board at run
133time, then tries to fetch each boot entry file specified in BOOTENTRY.CONFIG and
134show them in boot menu options. The format of this file is very simple. Each
135line is the name of a boot entry file:
136
137boot.conf
138Install.conf
139myrmcboot.conf
140
141Name of a boot entry file is defined by developer so it can be anything. But the
142name of config file is what RMC bootloader looks up in RMC database, so it must
143be named BOOTENTRY.CONFIG.
144
145Bootloader skips loading entry conf files from disk once any entry is loaded
146from RMC database.
147
148Note 3:
149At runtime, RMC installer tries to fetch INSTALLER.CONFIG file specific to the
150board, then tries to fetch each file specified in this config file, and then
151deploy the file onto target with its permissions, UID, GID and other attributes
152also specified in this config file if file for the board can be retrieved from
153RMC database. The format of this file is (# is for comment line)
154
155# name:uid:gid:mode:path_on_target
156# to create a directory, add a “/” at the end of path_on_target:
157audio_policy:0:0:600:/etc/audio/
158audio_def_policy:0:0:600:/etc/audio/audio_policy
159
160The above example creates /etc/audio directory first, then fetch a file named
161“audio_def_policy” from RMC database for the board, then copy it to /etc/audio/
162with a new name “audio_policy”.
163
164If this config file is not provided, No data in RMC database is deployed to the
165target.
166
167Some steps defined by developers could not be supported on a filesystem.
168Installer simply ignores any errors in RMC deployment stage.
169
170The name of this config file is what installer looks up first, so it must be
171INSTALLER.CONFIG.
172
173Note 4:
174At the end of RMC deployment during installation, RMC installer queries a script
175file POSTINSTALL.sh from RMC database file, and execute it when query is
176successful on the running board. This hook provides developers almost ultimate
177flexibility to retouch what have been deployed on the target. There are some
178steps still can override results from this hook for boot entries and KBOOTPARAM.
179
180
181
182Enable RMC Feature
183--------------------------------------------------------------------------------
184To enable the RMC feature please add the following variables to your local.conf.
185
186DISTRO_FEATURES_append = " rmc"
187EFI_PROVIDER = "rmc-boot"
188
189The default EFI bootloader used with RMC is systemd-boot. To change the default
190bootloader please overwrite the RMC_BOOTLOADER variable in your local.conf
191
192Note:
193Image could be still bootable if you only have either of two lines, but RMC
194feature could not be fully functional, depending on the availability of the
195database file, installer and the rmc tool.
196
197Examples
198--------------------------------------------------------------------------------
199We checked in configuration data in common/recipes-bsp/rmc/boards/ for several
200boards, to help users to understand the RMC feature. These examples are also for
201validation. For any example you find not working as what this section depicts,
202it should be treated as a bug to be fixed.
203
204To test this feature with examples, enable it and build an image first, then
205boot the built image on supported boards. Examples are always built in when the
206feature is enabled, except for the EXAMPLE 1.
207
208EXAMPLE 1: Support a new board type:
209(1) enable the feature and do a build to get a live-boot image by adding these
210 lines in conf/local.conf:
211 DISTRO_FEATURES_append = " rmc"
212 EFI_PROVIDER = "rmc-boot"
213
214(2) flash the image to a USB stick and boot it on your board
215
216(3) in super user mode, run "rmc -F -o my_board.fp"
217
218(4) create directories in your host "mkdir -p my_top_dir/my_rmc/my_board"
219
220(5) copy my_board.fp from target to my_top_dir/my_rmc/my_board/ on host
221
222(6) create a file my_top_dir/my_rmc/my_board/KBOOTPARAM, put some fake
223 and harmless options in a single line, say, "loglevel=7"
224
225(7) create a file my_top_dir/rmc-db.bbappend, put this single line in it:
226 RMC_BOARD_DATA_DIRS_append := " ${THISDIR}/my_rmc"
227 From parent directory of my_top_dir, the tree should look like:
228 my_top_dir/
229 my_rmc/
230 my_board/
231 KBOOTPARAM
232 my_board.fp
233 rmc-db.bbappend
234 Later, you can add more board directories in my_rmc directory.
235
236(8) modify build configuration to add my_top_dir into build, for example, put
237 this line in a bblayers.conf:
238 BBFILES += "/full/path/of/my_top_dir/rmc-db.bbappend"
239
240(9) build image again then boot it on your board
241
242(10) Once you login to shell, new options should be effective, run this command
243 "cat /proc/cmdline" to verify the result.
244
245EXAMPLE 2: Board-specific boot entry
246MinnowBoard MAX and B3 version:
247common/recipes-bsp/rmc/boards/minnowmax
248common/recipes-bsp/rmc/boards/minnowmaxB3
249
250We have found two identities (type of board) exist for the "same" Minnow Max
251hardware, so they have to be treated as two different types of hardware. The two
252examples show you a boot entry specific to a type of board. Titles shown in boot
253menu have different names according to the type of running board, "Minnow Max
254boot" or "Minnow Max B3 boot". in /proc/cmdline, "console=ttyS0,115200n8" shall
255be there. Kernel prints logs from 6-pin FTDI serial port on Minnow Max(s). This
256console setting is in board-specific entries, so you won't see it effective if
257you select default "boot" entry to boot the device.
258
259EXAMPLE 3: Board-specific boot entry, global kernel cmdline and installer
260NUC Gen 6:
261common/recipes-bsp/rmc/boards/nucgen6
262This is a combo example with all supported configuration data for NUC Gen 6
263product. It shows two boot entries in bootloader menu when you boot image on NUC
264Gen 6 product, with "NUC Gen6" in entry titles. There shall no any "console=" in
265/proc/cmdline when you boot with either of two "NUC Gen6"entries. We designed it
266this way because there is no accessible tty port on NUC Gen 6 with housing. The
267post-install hook is also provided in this example.
268
269This example also includes a global kernel cmdline fragment KBOOTPARAM. Content
270of KBOOTPARAM shall be at the end of /proc/cmdline no matter which boot entry
271you selected to boot NUC Gen6.
272
273INSTALLER.CONFIG directs installer to create a directory and deploy a file in it
274when install the image on NUC Gen6.
275
276Choose "NUC Gen6 install" boot entry to boot shall start installation. Once
277the device reboots after installation, we can verify the configurations.
278
279The boot entry "NUC Gen6 boot" shall be shown in boot menu.
280
281The content of KBOOTPARAM shall be in /proc/cmdline too.
282
283A directory /etc/mylib/ is created and a file "mylib.conf" is there. The content
284of that file shall be what we put in mylib.conf in
285common/recipes-bsp/rmc/boards/nucgen6
286
287POSTINSTALL.sh shows how we get rid of an error message caused by no serial
288console available on NUC Gen 6, without creating another static board
289configuration.
290
291EXAMPLE 4: For validation only
292T100 (32bit):
293common/recipes-bsp/rmc/boards/T100-32bit
294This example is provided for validation on 32 bit X86 architecture. It doesn't
295provide any new function not mentioned in above examples.
296
297Troubleshooting
298--------------------------------------------------------------------------------
299Issue: Cannot obtain RMC fingerprint for a board
300
301RMC tool requires UEFI BIOS and SMBIOS support in firmware. It doesn't support
302other type of firmware, e.g. legacy BIOS. It also requires EFI driver enabled
303in Linux kernel.
304
305Issue: Configuration for a board seems not effective at runtime.
306
307Check if board is booted from the storage where the image or installation lives
308when you have multiple boot options in BIOS. On some old hardwares it is not
309that obvious as you assume. A build image can support boot from both of legacy
310and UEFI mode, but RMC only works with UEFI boot so far.
311
312Make sure configuration files (BOOTENTRY.CONFIG, INSTALLER.CONFIG and,
313KBOOTPARAM ...) are properly named in the board directory.
314
315Make sure configuration files have correct contents.
316
317Some file attributes could not be supported by targeted file system. Installer
318cannot setup file blobs as you wish. It simply move to the next step if a step
319fails.
320
321Kernel command line can be customized globally with KBOOTPARAM or just in a boot
322entry for the type of board. They have different effective scopes.
323
324If no any board-specific configuration becomes effective on your board but it
325works on other boards of same product, you can run rmc tool to obtain
326fingerprint file on your board and compare it with fingerprint of a working
327board. It is possible they have different firmware versions and unluckily, some
328information for fingerprint changes between two versions. You can update BIOS
329on every board to the same BIOS version if it is feasible. Otherwise you have
330to treat them as two different type of boards. We could extend rmc design to
331allow multiple fingerprints in a board directory as a workaround.
332
333Issue: RMC reports error because it cannot find fingerprint when building image.
334
335Make sure you have a fingerprint file. Its name must be ended with '.fp'. You
336can put a fingerprint file in a board directory and provide data later.
337
338Issue: Any problems the above troubleshooting cannot help
339
340Please report it to us. Extra information like the type of your board or a dump
341file from dmidecode tool is helpful. We will investigate the problem and keep
342improving this feature.
343
344
345
346
347When you (don't) need RMC feature
348--------------------------------------------------------------------------------
349RMC feature is designed to as generic as possible, in order to support a large
350number of types of boards. And it shall be designed not to break things when it
351is disabled. These considerations help users to decide if they really need or
352enable it.
353
354If you are satisfied with a dedicated build target and image for each board in
355your development cycle (source, build, validation, release, etc), you don't need
356this feature.
357
358If you have a generic build for multiple type of boards and features supported
359by that build meet your needs to functionality on all of boards, you don't need
360to have this feature or you can disable it until you need to check in the first
361board's data, in order to apply a quirk or customization only for that board.
362
363If you want this feature but have concerns to see more and more boards' finger-
364prints and data in a generic project, you can have another layer to hold all of
365board-specific data to split them from a generic layer at source level. Another
366suggestion is always seeking chances not to clone or copy a common configuration
367to each board's directory.
368
369
370
371Thanks
372
373Jianxun Zhang <jianxun.zhang@linux.intel.com>
diff --git a/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM b/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM
deleted file mode 100644
index 476b1fb..0000000
--- a/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1console=ttyS0,115200
diff --git a/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp b/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp
deleted file mode 100644
index 9aa145f..0000000
--- a/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe8..0000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG b/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG
deleted file mode 100644
index ca5f04b..0000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1efi_entry_dir:root:disk:770:/boot/loader/entries/
2boot.conf:root:disk:770:/boot/loader/entries/rmcboot.conf
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh b/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh
deleted file mode 100644
index 6694261..0000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh
+++ /dev/null
@@ -1,2 +0,0 @@
1# There is no tty device on this board.
2sed -i '/start_getty.\+ttyS.*/d' /tgt_root/etc/inittab
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf b/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf
deleted file mode 100644
index b29fa45..0000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title NUC5i5RYB boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot rootwait
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf b/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf
deleted file mode 100644
index 0dca3ca..0000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title NUC5i5RYB install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi rootwait
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp b/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp
deleted file mode 100644
index 5737477..0000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe8..0000000
--- a/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp b/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp
deleted file mode 100644
index 86ecea7..0000000
--- a/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/T100-32bit/boot.conf b/recipes-bsp/rmc/boards/T100-32bit/boot.conf
deleted file mode 100644
index f1578e0..0000000
--- a/recipes-bsp/rmc/boards/T100-32bit/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title T100T(32bit) boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot loglevel=8
diff --git a/recipes-bsp/rmc/boards/T100-32bit/install.conf b/recipes-bsp/rmc/boards/T100-32bit/install.conf
deleted file mode 100644
index 67e7eb1..0000000
--- a/recipes-bsp/rmc/boards/T100-32bit/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title T100T(32bit) install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi
diff --git a/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe8..0000000
--- a/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG b/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG
deleted file mode 100644
index ecd2060..0000000
--- a/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG
+++ /dev/null
@@ -1,3 +0,0 @@
1# Keep rmc Joule boot.conf instead of meta-intel default
2efi_entry_dir:root:disk:770:/boot/loader/entries/
3boot.conf:root:disk:770:/boot/loader/entries/boot.conf
diff --git a/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM b/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM
deleted file mode 100644
index 08be5df..0000000
--- a/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1video=efifb maxcpus=4 reboot=efi kmemleak=off console=tty0 console=ttyS2,115200
diff --git a/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh b/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh
deleted file mode 100644
index 30bbd28..0000000
--- a/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh
+++ /dev/null
@@ -1,2 +0,0 @@
1# Joule uses only S2 for serial, so remove S0
2sed -i '/start_getty.\+ttyS0/d' /tgt_root/etc/inittab
diff --git a/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp b/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp
deleted file mode 100755
index 1a15028..0000000
--- a/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/broxton-m/bm.fp b/recipes-bsp/rmc/boards/broxton-m/bm.fp
deleted file mode 100755
index 135a7a5..0000000
--- a/recipes-bsp/rmc/boards/broxton-m/bm.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/broxton-m/boot.conf b/recipes-bsp/rmc/boards/broxton-m/boot.conf
deleted file mode 100644
index caa00c5..0000000
--- a/recipes-bsp/rmc/boards/broxton-m/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Joule / Broxton-m
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot
diff --git a/recipes-bsp/rmc/boards/broxton-m/install.conf b/recipes-bsp/rmc/boards/broxton-m/install.conf
deleted file mode 100644
index 9cdd86b..0000000
--- a/recipes-bsp/rmc/boards/broxton-m/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Joule / Broxton-m Install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi rootwait
diff --git a/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp b/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp
deleted file mode 100644
index d757614..0000000
--- a/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe8..0000000
--- a/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/minnowmax/boot.conf b/recipes-bsp/rmc/boards/minnowmax/boot.conf
deleted file mode 100644
index 6e789cd..0000000
--- a/recipes-bsp/rmc/boards/minnowmax/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Minnow Max boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot console=ttyS0,115200n8
diff --git a/recipes-bsp/rmc/boards/minnowmax/install.conf b/recipes-bsp/rmc/boards/minnowmax/install.conf
deleted file mode 100644
index 1a493ae..0000000
--- a/recipes-bsp/rmc/boards/minnowmax/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Minnow Max install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi console=ttyS0,115200n8
diff --git a/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp b/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp
deleted file mode 100644
index 3c5a286..0000000
--- a/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe8..0000000
--- a/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf b/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf
deleted file mode 100644
index 577e5d6..0000000
--- a/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Minnow Max B3 boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot console=ttyS0,115200n8
diff --git a/recipes-bsp/rmc/boards/minnowmaxB3/install.conf b/recipes-bsp/rmc/boards/minnowmaxB3/install.conf
deleted file mode 100644
index cf500d6..0000000
--- a/recipes-bsp/rmc/boards/minnowmaxB3/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Minnow Max B3 install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi console=ttyS0,115200n8
diff --git a/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp b/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp
deleted file mode 100644
index ad3f0d6..0000000
--- a/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe8..0000000
--- a/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG b/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG
deleted file mode 100644
index 8c5a767..0000000
--- a/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG
+++ /dev/null
@@ -1,3 +0,0 @@
1# Keep rmc Mohonpeak boot.conf instead of meta-intel default
2efi_entry_dir:root:disk:770:/boot/loader/entries/
3boot.conf:root:disk:770:/boot/loader/entries/boot.conf
diff --git a/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM b/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM
deleted file mode 100644
index 169056e..0000000
--- a/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1console=ttyS1,115200 console=tty1
diff --git a/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh b/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh
deleted file mode 100644
index 5f440c3..0000000
--- a/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh
+++ /dev/null
@@ -1,3 +0,0 @@
1# Mohonpeak uses only S1 for serial, so remove S0 and S2
2sed -i '/start_getty.\+ttyS0/d' /tgt_root/etc/inittab
3sed -i '/start_getty.\+ttyS2/d' /tgt_root/etc/inittab
diff --git a/recipes-bsp/rmc/boards/mohonpeak/boot.conf b/recipes-bsp/rmc/boards/mohonpeak/boot.conf
deleted file mode 100644
index 5b7a0f6..0000000
--- a/recipes-bsp/rmc/boards/mohonpeak/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Mohon Peak boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot
diff --git a/recipes-bsp/rmc/boards/mohonpeak/install.conf b/recipes-bsp/rmc/boards/mohonpeak/install.conf
deleted file mode 100644
index dde3497..0000000
--- a/recipes-bsp/rmc/boards/mohonpeak/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Mohon Peak Install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi rootwait
diff --git a/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp b/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp
deleted file mode 100644
index bc4bdae..0000000
--- a/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe8..0000000
--- a/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG b/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG
deleted file mode 100644
index 7d5378b..0000000
--- a/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG
+++ /dev/null
@@ -1,6 +0,0 @@
1# This file specifies which file or dir RMC will install onto target.
2# Note the absolute path is referred from mount points in installation.
3efi_entry_dir:root:disk:770:/boot/loader/entries/
4boot.conf:root:disk:770:/boot/loader/entries/rmcboot.conf
5mylibdir:root:root:770:/tgt_root/etc/mylib/
6mylib.conf:root:root:660:/tgt_root/etc/mylib/mylib.conf
diff --git a/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM b/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM
deleted file mode 100644
index 27943b4..0000000
--- a/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1i915.preliminary_hw_support=1
diff --git a/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh b/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh
deleted file mode 100644
index bec3be4..0000000
--- a/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh
+++ /dev/null
@@ -1,7 +0,0 @@
1# NUC Gen 6 specific retouch after RMC deployment
2
3# The generated inittab from OE build causes error messages:
4# "auth.err getty[615]: tcgetattr: Input/output error"
5# in /var/log/messages because NUC Gen 6 doesn't have any
6# serial tty. We delete line(s) here on target.
7sed -i '/start_getty.\+ttyS.*/d' /tgt_root/etc/inittab
diff --git a/recipes-bsp/rmc/boards/nucgen6/boot.conf b/recipes-bsp/rmc/boards/nucgen6/boot.conf
deleted file mode 100644
index e6ecb02..0000000
--- a/recipes-bsp/rmc/boards/nucgen6/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title NUC Gen6 boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot
diff --git a/recipes-bsp/rmc/boards/nucgen6/install.conf b/recipes-bsp/rmc/boards/nucgen6/install.conf
deleted file mode 100644
index 916bb04..0000000
--- a/recipes-bsp/rmc/boards/nucgen6/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title NUC Gen6 install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi
diff --git a/recipes-bsp/rmc/boards/nucgen6/mylib.conf b/recipes-bsp/rmc/boards/nucgen6/mylib.conf
deleted file mode 100644
index fd8357c..0000000
--- a/recipes-bsp/rmc/boards/nucgen6/mylib.conf
+++ /dev/null
@@ -1,7 +0,0 @@
1# This is a demo conf file read by an imagined program or library
2# which reads this file at runtime to customize its behavior.
3# rmc will deploy it to the location specified in INSTALLER.CONFIG.
4
5lib.info = "V1.0 for rmc demo"
6lib.board = "NUC gen 6"
7prog.ui.layout = "minimal"
diff --git a/recipes-bsp/rmc/boards/nucgen6/nuc6.fp b/recipes-bsp/rmc/boards/nucgen6/nuc6.fp
deleted file mode 100644
index 834f800..0000000
--- a/recipes-bsp/rmc/boards/nucgen6/nuc6.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM b/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM
deleted file mode 100644
index 476b1fb..0000000
--- a/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1console=ttyS0,115200
diff --git a/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp b/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp
deleted file mode 100644
index e4c4165..0000000
--- a/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM b/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM
deleted file mode 100644
index 476b1fb..0000000
--- a/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1console=ttyS0,115200
diff --git a/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp b/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp
deleted file mode 100644
index 7f28f37..0000000
--- a/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/rmc-db.bb b/recipes-bsp/rmc/rmc-db.bb
deleted file mode 100644
index 7ec824a..0000000
--- a/recipes-bsp/rmc/rmc-db.bb
+++ /dev/null
@@ -1,62 +0,0 @@
1SUMMARY = "Central RMC Database"
2DESCRIPTION = "Generate a centralized RMC database for RMC feature. \
3Fingerprints and data for all boards supported are specified by variable \
4RMC_BOARD_DATA_DIRS which is a list of top directories that contains \
5subdirectories for boards. Developers can add their top directories by appending \
6them to this variable in a rmc-db.bbappend.Refer to rmc-db bbclass for more \
7information."
8
9LICENSE = "MIT"
10
11LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
12
13S = "${WORKDIR}"
14
15inherit rmc-db
16
17RMC_BOARD_DATA_DIRS ?= "${THISDIR}/boards/"
18RMC_DB_DIR = "${WORKDIR}/db"
19
20FILES_${PN} = "/boot/rmc.db"
21
22# Let sstate be aware of change in any added board directories
23do_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
26def 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
34do_generate_rmc_db () {
35 rmc_generate_db "${RMC_BOARD_DATA_DIRS}" "${RMC_DB_DIR}"/rmc.db
36}
37
38addtask generate_rmc_db after do_compile
39
40inherit deploy
41
42do_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
51do_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}
60do_install[depends] += "${PN}:do_generate_rmc_db"
61
62addtask deploy after do_generate_rmc_db
diff --git a/recipes-bsp/rmc/rmc-efi.bb b/recipes-bsp/rmc/rmc-efi.bb
deleted file mode 100644
index 2a1c9a9..0000000
--- a/recipes-bsp/rmc/rmc-efi.bb
+++ /dev/null
@@ -1,40 +0,0 @@
1SUMMARY = "RMC (Runtime Machine Configuration) EFI library"
2
3DESCRIPTION = "The RMC EFI library adds RMC support to existing EFI bootloaders"
4
5LICENSE = "MIT"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8"
8
9SRC_URI = "git://git.yoctoproject.org/rmc"
10
11SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9"
12
13S = "${WORKDIR}/git"
14
15COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*"
16
17TARGET_CFLAGS +="-Wl,--hash-style=both"
18
19EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \
20 RMC_INSTALL_LIB_PATH=${D}${libdir} \
21 RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc"
22
23SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong"
24SECURITY_CFLAGS_append_class-target = " -fno-stack-protector"
25
26python () {
27 ccargs = d.getVar('TUNE_CCARGS').split()
28 if '-mx32' in ccargs:
29 ccargs.remove('-mx32')
30 ccargs.append('-m64')
31 d.setVar('TUNE_CCARGS', ' '.join(ccargs))
32}
33
34do_compile() {
35 oe_runmake -f Makefile.efi
36}
37
38do_install() {
39 oe_runmake -f Makefile.efi install
40}
diff --git a/recipes-bsp/rmc/rmc.bb b/recipes-bsp/rmc/rmc.bb
deleted file mode 100644
index 8797644..0000000
--- a/recipes-bsp/rmc/rmc.bb
+++ /dev/null
@@ -1,46 +0,0 @@
1SUMMARY = "RMC (Runtime Machine Configuration)"
2
3DESCRIPTION = "RMC project provides a tool and libraries to identify types \
4of hardware boards and access any file-based data specific to the board's \
5type at runtime in a centralized way. Software (clients) can have a generic \
6logic to query board-specific data from RMC without knowing the type of board. \
7This make it possible to have a generic software work running on boards which \
8require any quirks or customizations at a board or product level. \
9"
10
11LICENSE = "MIT"
12
13LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8"
14
15SRC_URI = "git://git.yoctoproject.org/rmc"
16
17SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9"
18
19S = "${WORKDIR}/git"
20
21COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*"
22
23TARGET_CFLAGS +="-Wl,--hash-style=both"
24
25EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \
26 RMC_INSTALL_BIN_PATH=${D}${bindir} \
27 RMC_INSTALL_LIB_PATH=${D}${libdir} \
28 RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc"
29
30SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong"
31SECURITY_CFLAGS_append_class-target = " -fno-stack-protector"
32
33do_compile_class-target() {
34 oe_runmake
35}
36
37do_install() {
38 oe_runmake install
39}
40
41do_install_class-native() {
42 install -d ${D}${STAGING_BINDIR_NATIVE}
43 install -m 0755 ${S}/src/rmc ${D}${STAGING_BINDIR_NATIVE}
44}
45
46BBCLASSEXTEND = "native"
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch b/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch
deleted file mode 100644
index 6d7b144..0000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From beb095f41d458b7d684c0cd6cac1749e2fc3f29b Mon Sep 17 00:00:00 2001
2From: California Sullivan <california.l.sullivan@intel.com>
3Date: Wed, 21 Mar 2018 13:01:26 -0700
4Subject: [PATCH 1/5] partially revert "sd-boot: stub: Obtain PE section
5 offsets from RAM, not disk (#6250)"
6
7Only revert the section for finding the root_dir, as RMC needs this to
8find its database file.
9
10Upstream-Status: Inappropriate [upstream doesn't need the root_dir].
11
12Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
13---
14 src/boot/efi/stub.c | 9 +++++++++
15 1 file changed, 9 insertions(+)
16
17diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
18index ff45cebd4..540ca5985 100644
19--- a/src/boot/efi/stub.c
20+++ b/src/boot/efi/stub.c
21@@ -30,6 +30,8 @@ static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
22
23 EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
24 EFI_LOADED_IMAGE *loaded_image;
25+ EFI_FILE *root_dir;
26+ CHAR16 *loaded_image_path;
27 CHAR8 *b;
28 UINTN size;
29 BOOLEAN secure = FALSE;
30@@ -58,6 +60,13 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
31 return err;
32 }
33
34+ root_dir = LibOpenRoot(loaded_image->DeviceHandle);
35+ if (!root_dir) {
36+ Print(L"Unable to open root directory: %r ", err);
37+ uefi_call_wrapper(BS->Stall, 1, 3 * 1000 * 1000);
38+ return EFI_LOAD_ERROR;
39+ }
40+
41 if (efivar_get_raw(&global_guid, L"SecureBoot", &b, &size) == EFI_SUCCESS) {
42 if (*b > 0)
43 secure = TRUE;
44--
452.14.3
46
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch b/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch
deleted file mode 100644
index a3e496f..0000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1From af977853ab722194c4754e6693f430f50a42190f Mon Sep 17 00:00:00 2001
2From: California Sullivan <california.l.sullivan@intel.com>
3Date: Tue, 20 Mar 2018 10:08:14 -0700
4Subject: [PATCH 2/5] sd-boot: fix RMC compatibility with systemd-boot and
5 meson
6
7With autotools swapped out for meson a number of things need to be
8changed.
9
10Upstream-Status: Pending
11
12Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
13---
14 meson_options.txt | 2 ++
15 src/boot/efi/meson.build | 4 +++-
16 2 files changed, 5 insertions(+), 1 deletion(-)
17
18diff --git a/meson_options.txt b/meson_options.txt
19index 39822d6cd..d8a480401 100644
20--- a/meson_options.txt
21+++ b/meson_options.txt
22@@ -279,6 +279,8 @@ option('efi-ldsdir', type : 'string',
23 description : 'path to the EFI lds directory')
24 option('efi-includedir', type : 'string', value : '/usr/include/efi',
25 description : 'path to the EFI header directory')
26+option('rmc-includedir', type : 'string', value : '/usr/include/rmc',
27+ description : 'path to the RMC header directory')
28 option('tpm-pcrindex', type : 'string', value : '8',
29 description : 'TPM PCR register number to use')
30
31diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
32index 9f9ec4911..266ff928f 100644
33--- a/src/boot/efi/meson.build
34+++ b/src/boot/efi/meson.build
35@@ -83,6 +83,7 @@ if have_gnu_efi
36 efi_conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
37 efi_conf.set10('ENABLE_TPM', get_option('tpm'))
38 efi_conf.set('SD_TPM_PCR', get_option('tpm-pcrindex'))
39+ efi_conf.set('RMC_EFI', 'true')
40
41 efi_config_h = configure_file(
42 output : 'efi_config.h',
43@@ -121,6 +122,7 @@ if have_gnu_efi
44 '-Wsign-compare',
45 '-Wno-missing-field-initializers',
46 '-isystem', efi_incdir,
47+ '-isystem', get_option('rmc-includedir'),
48 '-isystem', join_paths(efi_incdir, gnu_efi_arch),
49 '-include', efi_config_h]
50 if efi_arch == 'x86_64'
51@@ -191,7 +193,7 @@ if have_gnu_efi
52 output : tuple[0],
53 command : efi_ld.split() + ['-o', '@OUTPUT@'] +
54 efi_ldflags + tuple[2] +
55- ['-lefi', '-lgnuefi', libgcc_file_name])
56+ ['-lefi', '-lgnuefi', '-lrmcefi', libgcc_file_name])
57
58 test('no-undefined-symbols-' + tuple[0],
59 no_undefined_symbols,
60--
612.14.3
62
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch b/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch
deleted file mode 100644
index cef934c..0000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch
+++ /dev/null
@@ -1,252 +0,0 @@
1From b780c67c780bae2f834d73017044680fabca4268 Mon Sep 17 00:00:00 2001
2From: Jianxun Zhang <jianxun.zhang@linux.intel.com>
3Date: Wed, 1 Jun 2016 16:32:22 -0700
4Subject: [PATCH 3/5] sd-boot: Load board-specific boot entries from RMC
5 database
6
7RMC provides a centralized database file on ESP. The DB contains
8fingerprints and any file blobs associated to physical boards.
9Callers can fetch board-specific data with fingerprint info
10collected from board at runtime if there is any record matched
11board's fingerprint.
12
13To let bootloader know which file blob in RMC should be queried,
14a special config file BOOTENTRY.CONFIG is defined as:
15
16boot.conf
17install.conf
18
19Bootloader calls RMC APIs and other functions to perform these
20tasks before it shows boot menu to user:
21
22(1) Load RMC database file from ESP
23(2) Collect fingerprint data from board
24(3) Query BOOTENTRY.CONFIG from RMC DB with fingerprint
25(4) Parse BOOTENTRY.CONFIG to know names of boot entry files
26(5) Query boot entry files one by one from RMC DB, and add
27 them into sd-boot config data.
28
29The final effect is that bootloader will show board-specific
30boot entries in boot menu to user. User then can choose one
31of them to boot system with the selected configuration.
32
33If any of these steps fails, bootloader simply skips loading
34RMC configs or any entry file not successfully fetched from
35RMC DB. Once any entry is loaded successfully from RMC DB,
36bootloader skips loading any boot entries from ESP.
37
38Upstream-Status: Pending
39
40Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
41Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
42---
43 src/boot/efi/boot.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++-
44 1 file changed, 146 insertions(+), 2 deletions(-)
45
46diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
47index b9c7c8394..93cfaf193 100644
48--- a/src/boot/efi/boot.c
49+++ b/src/boot/efi/boot.c
50@@ -16,6 +16,7 @@
51
52 #include <efi.h>
53 #include <efilib.h>
54+#include <rmc_api.h>
55
56 #include "console.h"
57 #include "disk.h"
58@@ -35,6 +36,9 @@ static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot
59
60 static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
61
62+static CHAR8* rmc_db;
63+static rmc_fingerprint_t *rmc_fp;
64+
65 enum loader_type {
66 LOADER_UNDEFINED,
67 LOADER_EFI,
68@@ -1684,6 +1688,136 @@ static VOID config_free(Config *config) {
69 FreePool(config->entry_oneshot);
70 }
71
72+/* Derived from line_get_key_value(), we could consolidate two functions later */
73+static CHAR8 *get_line(CHAR8 *content, UINT64 *pos) {
74+ CHAR8 *line;
75+ UINT64 linelen;
76+
77+skip:
78+ line = content + *pos;
79+ if (*line == '\0')
80+ return NULL;
81+
82+ linelen = 0;
83+ while (line[linelen] && !strchra((CHAR8 *)"\n\r", line[linelen]))
84+ linelen++;
85+
86+ /* move pos to next line */
87+ *pos += linelen;
88+ if (content[*pos])
89+ (*pos)++;
90+
91+ /* empty line */
92+ if (linelen == 0)
93+ goto skip;
94+
95+ /* terminate line */
96+ line[linelen] = '\0';
97+
98+ /* remove leading whitespace */
99+ while (strchra((CHAR8 *)" \t", *line)) {
100+ line++;
101+ linelen--;
102+ }
103+
104+ /* remove trailing whitespace */
105+ while (linelen > 0 && strchra((CHAR8 *)" \t", line[linelen-1]))
106+ linelen--;
107+ line[linelen] = '\0';
108+
109+ if (*line == '#')
110+ goto skip;
111+
112+ return line;
113+}
114+
115+/* load rmc database file from ESP and try to get fingerprint. These
116+ * are essential information indicating we could query rmc data for
117+ * this board at least
118+ * return 0 if both database file and fingerprint can be obtained, otherwise
119+ * non-zero value is returned.
120+ *
121+ * Note: db and fp hold valid values only when this function returns 0.
122+ * Caller is responsible to free allocated memory pointed by *db and *fp when
123+ * this function returns 0.
124+ */
125+
126+static UINTN rmc_initialize(EFI_FILE *root_dir, EFI_SYSTEM_TABLE *sys_table, CHAR8 **db, rmc_fingerprint_t **fp) {
127+ UINTN len;
128+ UINTN ret = 1;
129+
130+ if (!db || !fp)
131+ return ret;
132+
133+ *db = NULL;
134+ *fp = NULL;
135+
136+ /* load rmc database */
137+ len = file_read(root_dir, L"\\rmc.db", 0, 0, db);
138+
139+ if (len <= 0)
140+ goto done;
141+
142+ *fp = AllocateZeroPool(sizeof(rmc_fingerprint_t));
143+ /* call rmc to get fingerprint. We will use single-action rmc APIs to query multiple files.
144+ * This should bring a better performance than calling double-action rmc API every time.
145+ */
146+ if (rmc_get_fingerprint(sys_table, *fp))
147+ goto done;
148+
149+ ret = 0;
150+done:
151+ if (ret) {
152+ FreePool(*db);
153+ FreePool(*fp);
154+ }
155+
156+ return ret;
157+}
158+
159+/* load RMC entries
160+ * return TRUE when at least one entry is loaded, otherwise, return FALSE
161+ */
162+static BOOLEAN config_load_rmc_entries(Config *config, EFI_HANDLE *device, CHAR16 *loaded_image_path, CHAR8 *db, rmc_fingerprint_t *fp) {
163+ CHAR8 *boot_entry = NULL;
164+ CHAR8 *boot_config = NULL;
165+ rmc_file_t rp;
166+ CHAR8 *line;
167+ UINT64 pos = 0;
168+ BOOLEAN ret = FALSE;
169+
170+ if (!db || !fp)
171+ return ret;
172+
173+ /* query boot entry config file */
174+ if (rmc_query_file_by_fp(fp, db, "BOOTENTRY.CONFIG", &rp))
175+ return ret;
176+
177+ /* file blob read from rmc db is not necessarily null-terminated, and we
178+ * should keep mem where rmc db lives from change during parsing
179+ */
180+ boot_config = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1);
181+ CopyMem(boot_config, rp.blob, rp.blob_len);
182+ boot_config[rp.blob_len] = '\0';
183+ /* parse boot entry config */
184+ while ((line = get_line(boot_config, &pos))) {
185+ if (rmc_query_file_by_fp(fp, db, (char *)line, &rp))
186+ continue;
187+ if (rp.blob_len > 0) {
188+ boot_entry = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1);
189+ CopyMem(boot_entry, rp.blob, rp.blob_len);
190+ boot_entry[rp.blob_len] = '\0';
191+ config_entry_add_from_file(config, device,
192+ stra_to_str(line), boot_entry,
193+ loaded_image_path);
194+ /* tell caller success when a RMC entry is loaded */
195+ ret = TRUE;
196+ }
197+ }
198+
199+ return ret;
200+}
201+
202 EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
203 CHAR16 *s;
204 CHAR8 *b;
205@@ -1696,6 +1830,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
206 UINT64 init_usec;
207 BOOLEAN menu = FALSE;
208 CHAR16 uuid[37];
209+ BOOLEAN rmc_entry = FALSE;
210
211 InitializeLib(image, sys_table);
212 init_usec = time_usec();
213@@ -1736,6 +1871,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
214 }
215 }
216
217+ /* Initialize rmc before loading any config */
218+ rmc_initialize(root_dir, sys_table, &rmc_db, &rmc_fp);
219+
220 /* the filesystem path to this image, to prevent adding ourselves to the menu */
221 loaded_image_path = DevicePathToStr(loaded_image->FilePath);
222 efivar_set(L"LoaderImageIdentifier", loaded_image_path, FALSE);
223@@ -1743,11 +1881,15 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
224 ZeroMem(&config, sizeof(Config));
225 config_load_defaults(&config, root_dir);
226
227+ if (rmc_db && rmc_fp)
228+ rmc_entry = config_load_rmc_entries(&config, loaded_image->DeviceHandle, loaded_image_path, rmc_db, rmc_fp);
229+
230 /* scan /EFI/Linux/ directory */
231 config_entry_add_linux(&config, loaded_image, root_dir);
232
233- /* scan /loader/entries/\*.conf files */
234- config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path);
235+ /* scan /loader/entries/\*.conf files only when no RMC entry is loaded */
236+ if (rmc_entry == FALSE)
237+ config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path);
238
239 /* sort entries after version number */
240 config_sort_entries(&config);
241@@ -1841,6 +1983,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
242 out:
243 FreePool(loaded_image_path);
244 config_free(&config);
245+ FreePool(rmc_db);
246+ FreePool(rmc_fp);
247 uefi_call_wrapper(root_dir->Close, 1, root_dir);
248 uefi_call_wrapper(BS->CloseProtocol, 4, image, &LoadedImageProtocol, image, NULL);
249 return err;
250--
2512.14.3
252
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch b/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch
deleted file mode 100644
index b4dd9c4..0000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1From 159c8c54f92fb44d8abd2919fa83ad1cb640fac3 Mon Sep 17 00:00:00 2001
2From: Jianxun Zhang <jianxun.zhang@linux.intel.com>
3Date: Mon, 20 Jun 2016 13:08:20 -0700
4Subject: [PATCH 4/5] sd-boot: Support global kernel command line fragment
5
6Query file blob KBOOTPARAM from RMC. If it exists, we append
7it to the new linux boot entry's cmdline. A boot entry could
8be read from a .conf file on ESP, RMC database, or embedded
9linux image. content in KBOOTPARAM is effective in all of
10these cases.
11
12Upstream-Status: Pending
13
14Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
15Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
16---
17 src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++
18 1 file changed, 34 insertions(+)
19
20diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
21index 93cfaf193..2f400db3c 100644
22--- a/src/boot/efi/boot.c
23+++ b/src/boot/efi/boot.c
24@@ -851,6 +851,40 @@ static VOID config_add_entry(Config *config, ConfigEntry *entry) {
25 config->entries = ReallocatePool(config->entries,
26 sizeof(VOID *) * config->entry_count, sizeof(VOID *) * i);
27 }
28+
29+ /* rmc: a linux entry could be added from .conf file or an embedded linux image
30+ * we put appending global command line here to cover both of two cases.
31+ */
32+ if (entry->type == LOADER_LINUX && rmc_db && rmc_fp) {
33+ rmc_file_t rmc_kp;
34+
35+ if (!rmc_query_file_by_fp(rmc_fp, rmc_db, "KBOOTPARAM", &rmc_kp)) {
36+ CHAR8 *cmdline;
37+ CHAR16 *s;
38+ CHAR16 *t;
39+ CHAR16 *p;
40+
41+ cmdline = AllocatePool(rmc_kp.blob_len * sizeof(CHAR8) + 1);
42+ CopyMem(cmdline, rmc_kp.blob, rmc_kp.blob_len);
43+ cmdline[rmc_kp.blob_len] = '\0';
44+ p = stra_to_str(cmdline);
45+ t = p;
46+
47+ while (*t) {
48+ if (*t == '\n')
49+ *t = '\0';
50+ t++;
51+ }
52+
53+ s = PoolPrint(L"%s %s", entry->options, p);
54+ FreePool(entry->options);
55+ FreePool(p);
56+ FreePool(cmdline);
57+
58+ entry->options = s;
59+ }
60+ }
61+
62 config->entries[config->entry_count++] = entry;
63 }
64
65--
662.14.3
67
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch b/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch
deleted file mode 100644
index 60e93ca..0000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch
+++ /dev/null
@@ -1,82 +0,0 @@
1From 405a77233dde990fa7815d1546dc5a6b5a608479 Mon Sep 17 00:00:00 2001
2From: Mikko Ylinen <mikko.ylinen@intel.com>
3Date: Fri, 27 Jan 2017 13:31:45 +0200
4Subject: [PATCH 5/5] sd-boot: support global kernel command line in EFI stub
5
6This change integrates rmc into EFI stub and supports a
7global fragment (RMC KBOOTPARAM) that is appended to the
8cmdline at boot.
9
10The fragment is board-specific and read from the database.
11
12Implements [YOCTO #10924].
13
14Upstream-status: Pending
15
16Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
17Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
18---
19 src/boot/efi/stub.c | 33 +++++++++++++++++++++++++++++++++
20 1 file changed, 33 insertions(+)
21
22diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
23index 540ca5985..11047477b 100644
24--- a/src/boot/efi/stub.c
25+++ b/src/boot/efi/stub.c
26@@ -14,6 +14,7 @@
27
28 #include <efi.h>
29 #include <efilib.h>
30+#include <rmc_api.h>
31
32 #include "disk.h"
33 #include "graphics.h"
34@@ -49,6 +50,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
35 UINTN cmdline_len;
36 CHAR16 uuid[37];
37 EFI_STATUS err;
38+ INTN len;
39+ CHAR8 *rmc_db = NULL;
40+ rmc_file_t rmc_file;
41
42 InitializeLib(image, sys_table);
43
44@@ -109,6 +113,35 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
45 #endif
46 }
47
48+ len = file_read(root_dir, L"\\rmc.db", 0, 0, &rmc_db);
49+ if (len <= 0)
50+ rmc_db = NULL;
51+
52+ /* If the board has a fragment in rmc database, append it to the cmdline */
53+ if (rmc_db && !rmc_gimme_file(sys_table, rmc_db, "KBOOTPARAM", &rmc_file)) {
54+ CHAR8 *line;
55+ UINTN i = 0;
56+ UINTN j;
57+
58+ line = AllocatePool(rmc_file.blob_len + cmdline_len + 2);
59+
60+ while (i < cmdline_len && cmdline[i] != '\0') {
61+ line[i] = cmdline[i];
62+ i++;
63+ }
64+
65+ line[i++] = ' ';
66+
67+ for (j=0; j < rmc_file.blob_len; j++)
68+ line[i+j] = rmc_file.blob[j];
69+ line[i+j] = '\0';
70+
71+ cmdline = line;
72+ cmdline_len = i + j;
73+
74+ FreePool(rmc_db);
75+ }
76+
77 /* export the device path this image is started from */
78 if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS)
79 efivar_set(L"LoaderDevicePartUUID", uuid, FALSE);
80--
812.14.3
82
diff --git a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc b/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
deleted file mode 100644
index bbe3aea..0000000
--- a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
+++ /dev/null
@@ -1,30 +0,0 @@
1# This patchset contains hooks that allows systemd-boot to use RMC capablilities.
2python __anonymous () {
3 import re
4 target = d.getVar('TARGET_ARCH')
5 prefix = "" if d.getVar('EFI_PROVIDER') == "rmc-boot" else "systemd-"
6 if target == "x86_64":
7 systemdimage = prefix + "bootx64.efi"
8 else:
9 systemdimage = prefix + "bootia32.efi"
10 d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
11 prefix = "systemd-" if prefix == "" else ""
12 d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
13}
14
15DEPENDS_append_intel-x86-common = " rmc rmc-efi"
16RDEPENDS_${PN}_append_intel-x86-common = " rmc-db"
17
18EXTRA_OEMESON_append_intel-x86-common = ' \
19 -Drmc-includedir="${STAGING_INCDIR}/rmc" \
20 '
21
22SRC_URI_append_intel-x86-common = " \
23 file://0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch \
24 file://0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch \
25 file://0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch \
26 file://0004-sd-boot-Support-global-kernel-command-line-fragment.patch \
27 file://0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch \
28 "
29
30RPROVIDES_${PN} += "rmc-boot"
diff --git a/recipes-bsp/systemd-boot/systemd-boot_%.bbappend b/recipes-bsp/systemd-boot/systemd-boot_%.bbappend
index 46dd8a4..d46ef41 100644
--- a/recipes-bsp/systemd-boot/systemd-boot_%.bbappend
+++ b/recipes-bsp/systemd-boot/systemd-boot_%.bbappend
@@ -13,6 +13,3 @@ do_compile_append_intel-x86-common() {
13do_deploy_append_intel-x86-common() { 13do_deploy_append_intel-x86-common() {
14 install ${B}/src/boot/efi/linux*.efi.stub ${DEPLOYDIR} 14 install ${B}/src/boot/efi/linux*.efi.stub ${DEPLOYDIR}
15} 15}
16
17# includes rmc-boot.inc if rmc-boot is the EFI_PROVIDER
18include systemd-boot/${EFI_PROVIDER}.inc
diff --git a/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh b/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh
deleted file mode 100644
index a7a2ad4..0000000
--- a/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh
+++ /dev/null
@@ -1,342 +0,0 @@
1#!/bin/sh -e
2#
3# Copyright (c) 2016, Intel Corporation.
4# All rights reserved.
5#
6# install.sh [device_name] [rootfs_name]
7#
8# This file is a copy of file with same name in OE:
9# meta/recipes-core/initrdscripts/files/. We modify
10# it for RMC feature to deploy file blobs from RMC
11# database file to target.
12
13PATH=/sbin:/bin:/usr/sbin:/usr/bin
14
15# We need 20 Mb for the boot partition
16boot_size=20
17
18# 5% for swap
19swap_ratio=5
20
21# Get a list of hard drives
22hdnamelist=""
23live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
24live_dev_name=${live_dev_name#\/dev/}
25# Only strip the digit identifier if the device is not an mmc
26case $live_dev_name in
27 mmcblk*)
28 ;;
29 nvme*)
30 ;;
31 *)
32 live_dev_name=${live_dev_name%%[0-9]*}
33 ;;
34esac
35
36echo "Searching for hard drives ..."
37
38for device in `ls /sys/block/`; do
39 case $device in
40 loop*)
41 # skip loop device
42 ;;
43 sr*)
44 # skip CDROM device
45 ;;
46 ram*)
47 # skip ram device
48 ;;
49 *)
50 # skip the device LiveOS is on
51 # Add valid hard drive name to the list
52 case $device in
53 $live_dev_name*)
54 # skip the device we are running from
55 ;;
56 *)
57 hdnamelist="$hdnamelist $device"
58 ;;
59 esac
60 ;;
61 esac
62done
63
64if [ -z "${hdnamelist}" ]; then
65 echo "You need another device (besides the live device /dev/${live_dev_name}) to install the image. Installation aborted."
66 exit 1
67fi
68
69TARGET_DEVICE_NAME=""
70for hdname in $hdnamelist; do
71 # Display found hard drives and their basic info
72 echo "-------------------------------"
73 echo /dev/$hdname
74 if [ -r /sys/block/$hdname/device/vendor ]; then
75 echo -n "VENDOR="
76 cat /sys/block/$hdname/device/vendor
77 fi
78 if [ -r /sys/block/$hdname/device/model ]; then
79 echo -n "MODEL="
80 cat /sys/block/$hdname/device/model
81 fi
82 if [ -r /sys/block/$hdname/device/uevent ]; then
83 echo -n "UEVENT="
84 cat /sys/block/$hdname/device/uevent
85 fi
86 echo
87done
88
89# Get user choice
90while true; do
91 echo "Please select an install target or press n to exit ($hdnamelist ): "
92 read answer
93 if [ "$answer" = "n" ]; then
94 echo "Installation manually aborted."
95 exit 1
96 fi
97 for hdname in $hdnamelist; do
98 if [ "$answer" = "$hdname" ]; then
99 TARGET_DEVICE_NAME=$answer
100 break
101 fi
102 done
103 if [ -n "$TARGET_DEVICE_NAME" ]; then
104 break
105 fi
106done
107
108if [ -n "$TARGET_DEVICE_NAME" ]; then
109 echo "Installing image on /dev/$TARGET_DEVICE_NAME ..."
110else
111 echo "No hard drive selected. Installation aborted."
112 exit 1
113fi
114
115device=/dev/$TARGET_DEVICE_NAME
116
117#
118# The udev automounter can cause pain here, kill it
119#
120rm -f /etc/udev/rules.d/automount.rules
121rm -f /etc/udev/scripts/mount*
122
123#
124# Unmount anything the automounter had mounted
125#
126umount ${device}* 2> /dev/null || /bin/true
127
128mkdir -p /tmp
129
130# Create /etc/mtab if not present
131if [ ! -e /etc/mtab ]; then
132 cat /proc/mounts > /etc/mtab
133fi
134
135disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
136
137swap_size=$((disk_size*swap_ratio/100))
138rootfs_size=$((disk_size-boot_size-swap_size))
139
140rootfs_start=$((boot_size))
141rootfs_end=$((rootfs_start+rootfs_size))
142swap_start=$((rootfs_end))
143
144# MMC devices are special in a couple of ways
145# 1) they use a partition prefix character 'p'
146# 2) they are detected asynchronously (need rootwait)
147rootwait=""
148part_prefix=""
149if [ ! "${device#/dev/mmcblk}" = "${device}" ] || \
150[ ! "${device#/dev/nvme}" = "${device}" ]; then
151 part_prefix="p"
152 rootwait="rootwait"
153fi
154bootfs=${device}${part_prefix}1
155rootfs=${device}${part_prefix}2
156swap=${device}${part_prefix}3
157
158echo "*****************"
159echo "Boot partition size: $boot_size MB ($bootfs)"
160echo "Rootfs partition size: $rootfs_size MB ($rootfs)"
161echo "Swap partition size: $swap_size MB ($swap)"
162echo "*****************"
163echo "Deleting partition table on ${device} ..."
164dd if=/dev/zero of=${device} bs=512 count=35
165
166echo "Creating new partition table on ${device} ..."
167parted ${device} mklabel gpt
168
169echo "Creating boot partition on $bootfs"
170parted ${device} mkpart boot fat32 0% $boot_size
171parted ${device} set 1 boot on
172
173echo "Creating rootfs partition on $rootfs"
174parted ${device} mkpart root ext3 $rootfs_start $rootfs_end
175
176echo "Creating swap partition on $swap"
177parted ${device} mkpart swap linux-swap $swap_start 100%
178
179parted ${device} print
180
181echo "Formatting $bootfs to vfat..."
182mkfs.vfat $bootfs
183
184echo "Formatting $rootfs to ext3..."
185mkfs.ext3 $rootfs
186
187echo "Formatting swap partition...($swap)"
188mkswap $swap
189
190mkdir /tgt_root
191mkdir /src_root
192mkdir -p /boot
193
194# Handling of the target root partition
195mount $rootfs /tgt_root
196mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root
197echo "Copying rootfs files..."
198cp -a /src_root/* /tgt_root
199if [ -d /tgt_root/etc/ ] ; then
200 boot_uuid=$(blkid -o value -s UUID ${bootfs})
201 swap_part_uuid=$(blkid -o value -s PARTUUID ${swap})
202 echo "/dev/disk/by-partuuid/$swap_part_uuid swap swap defaults 0 0" >> /tgt_root/etc/fstab
203 echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab
204 # We dont want udev to mount our root device while we're booting...
205 if [ -d /tgt_root/etc/udev/ ] ; then
206 echo "${device}" >> /tgt_root/etc/udev/mount.blacklist
207 fi
208fi
209
210# Handling of the target boot partition
211mount $bootfs /boot
212echo "Preparing boot partition..."
213
214EFIDIR="/boot/EFI/BOOT"
215mkdir -p $EFIDIR
216# Copy the efi loader
217cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR
218
219# RMC deployment
220RMC_CMD=/src_root/usr/bin/rmc
221RMC_DB=/run/media/$1/rmc.db
222
223# We don't want to quit when a step failed. For example,
224# a file system could not support some operations.
225set +e
226
227if [ -f "${RMC_DB}" ] && [ -f "${RMC_CMD}" ]; then
228 echo "Found RMC database and tool, start RMC deployment"
229 # query INSTALLER.CONFIG from RMC DB
230 if ${RMC_CMD} -B INSTALLER.CONFIG -d "${RMC_DB}" -o /tmp/installer.config; then
231 while IFS=':' read -r NAME TGT_UID TGT_GID TGT_MODE TGT_PATH; do
232 # skip comment
233 # The regexp in grep works with busybox grep which doesn't
234 # seem to have a -P to recognize '\t'. But this expression could not
235 # work with gnu grep...
236 if echo "$NAME"|grep -q $'^[ \t]*#'; then
237 continue
238 fi
239 # check if we should create a directory (last char in target path is '/')
240 # or deploy a file
241 LAST_CHAR=$(echo "${TGT_PATH:$((${#TGT_PATH}-1)):1}")
242
243 # Do not bail out for failures but user should get stderr message
244 if [ ${LAST_CHAR} = "/" ]; then
245 # name field is skipped for directory
246 echo "DIR: ${TGT_UID}:${TGT_GID}:${TGT_MODE} => ${TGT_PATH}"
247 mkdir -p "$TGT_PATH"
248 chown "${TGT_UID}:${TGT_GID}" "$TGT_PATH"
249 chmod "${TGT_MODE}" "$TGT_PATH"
250 else
251 ${RMC_CMD} -B "${NAME}" -d "${RMC_DB}" -o "${TGT_PATH}"
252 echo "FILE: ${NAME}:${TGT_UID}:${TGT_GID}:${TGT_MODE} => ${TGT_PATH}"
253 chown "${TGT_UID}:${TGT_GID}" "$TGT_PATH"
254 chmod "${TGT_MODE}" "$TGT_PATH"
255 fi
256 done < /tmp/installer.config
257 rm -rf /tmp/installer.config
258
259 # remove rmc from target since we don't think it is a valid
260 # case to run rmc after installation.
261 rm -rf /tgt_root/usr/bin/rmc
262 echo "RMC deployment finished"
263 else
264 echo "INSTALLER.CONFIG is not found, skip RMC deployment"
265 fi
266
267 # Final retouching by calling post-install hook
268 if ${RMC_CMD} -B POSTINSTALL.sh -d "${RMC_DB}" -o /tmp/POSTINSTALL.sh; then
269 echo "Found POSTINSTALL.sh execute it..."
270 chmod 500 /tmp/POSTINSTALL.sh
271 /tmp/POSTINSTALL.sh
272 rm -rf /tmp/POSTINSTALL.sh
273 fi
274fi
275set -e
276
277if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
278 root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
279 GRUBCFG="$EFIDIR/grub.cfg"
280 cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG
281 # Update grub config for the installed image
282 # Delete the install entry
283 sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG
284 # Delete the initrd lines
285 sed -i "/initrd /d" $GRUBCFG
286 # Delete any LABEL= strings
287 sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
288 # Delete any root= strings
289 sed -i "s/ root=[^ ]*/ /g" $GRUBCFG
290 # Add the root= and other standard boot options
291 sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG
292fi
293
294if [ -d /run/media/$1/loader ]; then
295 rootuuid=$(blkid -o value -s PARTUUID ${rootfs})
296 GUMMIBOOT_CFGS="/boot/loader/entries/*.conf"
297 if [ -d /boot/loader ]; then
298 # Don't override loader.conf RMC already deployed
299 if [ ! -f /boot/loader/loader.conf ]; then
300 cp /run/media/$1/loader/loader.conf /boot/loader/
301 fi
302 # only copy built OE entries when RMC entries don't exist.
303 if [ ! -d /boot/loader/entries ] || [ ! ls /boot/loader/entries/*.conf &>/dev/null ]; then
304 cp -dr /run/media/$1/loader/entries /boot/loader
305 fi
306 else
307 # copy config files for gummiboot
308 cp -dr /run/media/$1/loader /boot
309 # delete the install entry
310 rm -f /boot/loader/entries/install.conf
311 fi
312 # delete the initrd lines
313 sed -i "/initrd /d" $GUMMIBOOT_CFGS
314 # delete any LABEL= strings
315 sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS
316 # delete any root= strings
317 sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS
318 # add the root= and other standard boot options
319 sed -i "s@options *@options root=PARTUUID=$rootuuid rw $rootwait quiet @" $GUMMIBOOT_CFGS
320 # if RMC feature presents, append global kernel command line fragment when it exists.
321 if [ -f "${RMC_DB}" ] && [ -f "${RMC_CMD}" ]; then
322 if ${RMC_CMD} -B KBOOTPARAM -d "${RMC_DB}" -o /tmp/kbootparam; then
323 sed -i "/^[ \t]*options/ s/$/ $(cat /tmp/kbootparam)/" $GUMMIBOOT_CFGS
324 rm /tmp/kbootparam
325 fi
326 fi
327fi
328
329cp /run/media/$1/vmlinuz /boot
330
331umount /src_root
332umount /tgt_root
333umount /boot
334
335sync
336
337echo "Remove your installation media, and press ENTER"
338
339read enter
340
341echo "Rebooting..."
342reboot -f
diff --git a/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend b/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend
deleted file mode 100644
index 0b3a1d3..0000000
--- a/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:"
2PACKAGE_ARCH_intel-x86-common = "${INTEL_COMMON_PACKAGE_ARCH}"