summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
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 /recipes-bsp
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 'recipes-bsp')
-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
58 files changed, 0 insertions, 801 deletions
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