Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/8] changes to allow boot/install from/to virtual raid disk
@ 2019-03-21  3:19 Liwei Song
  2019-03-21  3:19 ` [PATCH 1/8] mdadm: add mdmon service to support Intel VROC Liwei Song
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Liwei Song @ 2019-03-21  3:19 UTC (permalink / raw)
  To: oe-core

These series patches used to add support to install image to Intel
Virtual Raid disk and boot from it.
To boot from raid disk, mdadm is the necessory tools to initial it,
so it must run in initrd to make raid disk available, then rootfs
on it can be mounted to use, rootfs can be stored directly in
raid disk partition or LVM partition.

Liwei Song (8):
  mdadm: add mdmon service to support Intel VROC
  mdadm: add udev rules to create by-partuuid for MD devices
  udev-extraconf: move md* and dm* from mount blacklist
  initramfs-framework: mount efivarfs to make Intel VROC work well
  initramfs-framework: add lvm module
  init-install: add support for install image to Intel VROC raid disk
  init-install: fix a typo which will led delete section failed when use
    sed
  oe-core: add ledmon to support Intel VROC

 .../initrdscripts/files/init-install-efi.sh        | 25 +++++++++++++----
 .../initrdscripts/initramfs-framework/init         |  5 ++++
 .../initrdscripts/initramfs-framework/lvm          | 13 +++++++++
 .../initrdscripts/initramfs-framework_1.0.bb       |  9 ++++++
 .../udev/udev-extraconf/mount.blacklist            |  2 --
 meta/recipes-extended/ledmon/ledmon_git.bb         | 32 ++++++++++++++++++++++
 ...ev.rules-create-by-partuuid-for-md-device.patch | 29 ++++++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_4.1.bb           |  4 ++-
 8 files changed, 111 insertions(+), 8 deletions(-)
 create mode 100644 meta/recipes-core/initrdscripts/initramfs-framework/lvm
 create mode 100644 meta/recipes-extended/ledmon/ledmon_git.bb
 create mode 100644 meta/recipes-extended/mdadm/files/0001-udev.rules-create-by-partuuid-for-md-device.patch

-- 
2.7.4



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/8] mdadm: add mdmon service to support Intel VROC
  2019-03-21  3:19 [PATCH 0/8] changes to allow boot/install from/to virtual raid disk Liwei Song
@ 2019-03-21  3:19 ` Liwei Song
  2019-03-21  3:19 ` [PATCH 2/8] mdadm: add udev rules to create by-partuuid for MD devices Liwei Song
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Liwei Song @ 2019-03-21  3:19 UTC (permalink / raw)
  To: oe-core

Install mdmon@.service to make Intel VROC work well.

mdmon@.service called from udev is used to update Intel VROC metadata,
with it the VROC raid is operational to read or write under user space.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 meta/recipes-extended/mdadm/mdadm_4.1.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index d79c533f213a..6b32f08abee1 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -26,7 +26,7 @@ SRC_URI[sha256sum] = "ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1
 
 inherit autotools-brokensep ptest systemd
 
-SYSTEMD_SERVICE_${PN} = "mdmonitor.service"
+SYSTEMD_SERVICE_${PN} = "mdmonitor.service mdmon@.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
 CFLAGS_append_toolchain-clang = " -Wno-error=address-of-packed-member"
@@ -57,6 +57,7 @@ do_install_append() {
         install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
         install -d ${D}/${systemd_unitdir}/system
         install -m 644 ${WORKDIR}/mdmonitor.service ${D}/${systemd_unitdir}/system
+        install -m 644 ${S}/systemd/mdmon@.service ${D}/${systemd_unitdir}/system
         install -d ${D}/${sysconfdir}/init.d
         install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
 }
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/8] mdadm: add udev rules to create by-partuuid for MD devices
  2019-03-21  3:19 [PATCH 0/8] changes to allow boot/install from/to virtual raid disk Liwei Song
  2019-03-21  3:19 ` [PATCH 1/8] mdadm: add mdmon service to support Intel VROC Liwei Song
@ 2019-03-21  3:19 ` Liwei Song
  2019-03-25 11:55   ` Richard Purdie
  2019-03-21  3:19 ` [PATCH 3/8] udev-extraconf: move md* and dm* from mount blacklist Liwei Song
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Liwei Song @ 2019-03-21  3:19 UTC (permalink / raw)
  To: oe-core

installer use partuuid for boot and swap partition,
But the udev rules for MD devices do not have rules to create
by-partuuid under /dev/disk/, this will take 90s to wait until failed
add the rules to create by-partuuid to support boot from raid
disk with "root=PARTUUID=XXX"

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 ...ev.rules-create-by-partuuid-for-md-device.patch | 29 ++++++++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_4.1.bb           |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta/recipes-extended/mdadm/files/0001-udev.rules-create-by-partuuid-for-md-device.patch

diff --git a/meta/recipes-extended/mdadm/files/0001-udev.rules-create-by-partuuid-for-md-device.patch b/meta/recipes-extended/mdadm/files/0001-udev.rules-create-by-partuuid-for-md-device.patch
new file mode 100644
index 000000000000..c1f7b1cf8736
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-udev.rules-create-by-partuuid-for-md-device.patch
@@ -0,0 +1,29 @@
+From 7d1fa6afba936edb3e211f0ccdb58b1472b4bbf4 Mon Sep 17 00:00:00 2001
+From: Liwei Song <liwei.song@windriver.com>
+Date: Tue, 26 Feb 2019 07:05:42 +0000
+Subject: [PATCH] udev.rules: create by-partuuid for md device
+
+Create by-partuuid for every md devices.
+
+Upstream-Status: sent to linux-raid@vger.kernel.org(https://www.spinics.net/lists/raid/msg62373.html)
+
+Signed-off-by: Liwei Song <liwei.song@windriver.com>
+---
+ udev-md-raid-arrays.rules | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
+index c95ec7b1e4a9..e326414efcbc 100644
+--- a/udev-md-raid-arrays.rules
++++ b/udev-md-raid-arrays.rules
+@@ -30,6 +30,7 @@ IMPORT{builtin}="blkid"
+ OPTIONS+="link_priority=100"
+ OPTIONS+="watch"
+ ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
++ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"
+ ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+ 
+ ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service"
+-- 
+2.11.0
+
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 6b32f08abee1..db2b0b3c7873 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -20,6 +20,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
 	   file://mdadm.init \
 	   file://mdmonitor.service \
            file://0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch \
+	   file://0001-udev.rules-create-by-partuuid-for-md-device.patch \
            "
 SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598"
 SRC_URI[sha256sum] = "ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/8] udev-extraconf: move md* and dm* from mount blacklist
  2019-03-21  3:19 [PATCH 0/8] changes to allow boot/install from/to virtual raid disk Liwei Song
  2019-03-21  3:19 ` [PATCH 1/8] mdadm: add mdmon service to support Intel VROC Liwei Song
  2019-03-21  3:19 ` [PATCH 2/8] mdadm: add udev rules to create by-partuuid for MD devices Liwei Song
@ 2019-03-21  3:19 ` Liwei Song
  2019-03-21  3:19 ` [PATCH 4/8] initramfs-framework: mount efivarfs to make Intel VROC work well Liwei Song
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Liwei Song @ 2019-03-21  3:19 UTC (permalink / raw)
  To: oe-core

When use rootfs.img as rootfs, root=/dev/ram0 was set, init will
search rootfs.img from all automount point, if deploy it to MD or DM
device, rootfs.img will not be found, then boot failed.

Do not black MD and DM device to allow boot from raid disk or raid
LVM volume.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 meta/recipes-core/udev/udev-extraconf/mount.blacklist | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.blacklist b/meta/recipes-core/udev/udev-extraconf/mount.blacklist
index e49349428bd3..d3ebb17176b1 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.blacklist
+++ b/meta/recipes-core/udev/udev-extraconf/mount.blacklist
@@ -1,5 +1,3 @@
 /dev/loop
 /dev/ram
 /dev/mtdblock
-/dev/md
-/dev/dm-*
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/8] initramfs-framework: mount efivarfs to make Intel VROC work well
  2019-03-21  3:19 [PATCH 0/8] changes to allow boot/install from/to virtual raid disk Liwei Song
                   ` (2 preceding siblings ...)
  2019-03-21  3:19 ` [PATCH 3/8] udev-extraconf: move md* and dm* from mount blacklist Liwei Song
@ 2019-03-21  3:19 ` Liwei Song
  2019-03-21  3:19 ` [PATCH 5/8] initramfs-framework: add lvm module Liwei Song
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Liwei Song @ 2019-03-21  3:19 UTC (permalink / raw)
  To: oe-core

efivafs contain some meta data about Intel VROC, which will be
used by mdadm to create raid device.

These are preparation work to support boot from Intel VROC RAID
disk.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 meta/recipes-core/initrdscripts/initramfs-framework/init | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init
index 3c7e09422de2..c71ce0ce8cce 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -72,6 +72,7 @@ ROOTFS_DIR="/rootfs" # where to do the switch root
 MODULE_PRE_HOOKS=""  # functions to call before running each module
 MODULE_POST_HOOKS="" # functions to call after running each module
 MODULES_DIR=/init.d  # place to look for modules
+EFI_DIR=/sys/firmware/efi  # place to store device firmware information
 
 # make mount stop complaining about missing /etc/fstab
 touch /etc/fstab
@@ -81,6 +82,10 @@ mkdir -p /proc /sys /run/lock /var/lock
 mount -t proc proc /proc
 mount -t sysfs sysfs /sys
 
+if [ -d $EFI_DIR ];then
+	mount -t efivarfs none /sys/firmware/efi/efivars
+fi
+
 # populate bootparam environment
 for p in `cat /proc/cmdline`; do
 	opt=`echo $p | cut -d'=' -f1`
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/8] initramfs-framework: add lvm module
  2019-03-21  3:19 [PATCH 0/8] changes to allow boot/install from/to virtual raid disk Liwei Song
                   ` (3 preceding siblings ...)
  2019-03-21  3:19 ` [PATCH 4/8] initramfs-framework: mount efivarfs to make Intel VROC work well Liwei Song
@ 2019-03-21  3:19 ` Liwei Song
  2019-03-21  3:19 ` [PATCH 6/8] init-install: add support for install image to Intel VROC raid disk Liwei Song
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Liwei Song @ 2019-03-21  3:19 UTC (permalink / raw)
  To: oe-core

lvm module will initial lvm volume to support boot from
Logical Volume.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 meta/recipes-core/initrdscripts/initramfs-framework/lvm    | 13 +++++++++++++
 meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb |  9 +++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 meta/recipes-core/initrdscripts/initramfs-framework/lvm

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/lvm b/meta/recipes-core/initrdscripts/initramfs-framework/lvm
new file mode 100644
index 000000000000..7deeccb9a29e
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/lvm
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+lvm_enabled() {
+	if ! lvscan |grep -i -w "inactive" &>/dev/null;then
+		return 1
+	fi
+	return 0
+}
+
+lvm_run() {
+	lvm pvscan --cache --activate ay
+	udevadm trigger --action=add
+}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 660343eafa23..c53a0c03ae6c 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -17,6 +17,7 @@ SRC_URI = "file://init \
            file://udev \
            file://e2fs \
            file://debug \
+           file://lvm \
           "
 
 S = "${WORKDIR}"
@@ -45,6 +46,9 @@ do_install() {
     # debug
     install -m 0755 ${WORKDIR}/debug ${D}/init.d/00-debug
 
+    # lvm
+    install -m 0755 ${WORKDIR}/lvm ${D}/init.d/09-lvm
+
     # Create device nodes expected by some kernels in initramfs
     # before even executing /init.
     install -d ${D}/dev
@@ -59,6 +63,7 @@ PACKAGES = "${PN}-base \
             initramfs-module-nfsrootfs \
             initramfs-module-rootfs \
             initramfs-module-debug \
+            initramfs-module-lvm \
            "
 
 FILES_${PN}-base = "/init /init.d/99-finish /dev"
@@ -98,3 +103,7 @@ FILES_initramfs-module-rootfs = "/init.d/90-rootfs"
 SUMMARY_initramfs-module-debug = "initramfs dynamic debug support"
 RDEPENDS_initramfs-module-debug = "${PN}-base"
 FILES_initramfs-module-debug = "/init.d/00-debug"
+
+SUMMARY_initramfs-module-lvm = "initramfs lvm rootfs support"
+RDEPENDS_initramfs-module-lvm = "${PN}-base"
+FILES_initramfs-module-lvm = "/init.d/09-lvm"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/8] init-install: add support for install image to Intel VROC raid disk
  2019-03-21  3:19 [PATCH 0/8] changes to allow boot/install from/to virtual raid disk Liwei Song
                   ` (4 preceding siblings ...)
  2019-03-21  3:19 ` [PATCH 5/8] initramfs-framework: add lvm module Liwei Song
@ 2019-03-21  3:19 ` Liwei Song
  2019-03-21  3:19 ` [PATCH 7/8] init-install: fix a typo which will led delete section failed when use sed Liwei Song
  2019-03-21  3:19 ` [PATCH 8/8] oe-core: add ledmon to support Intel VROC Liwei Song
  7 siblings, 0 replies; 13+ messages in thread
From: Liwei Song @ 2019-03-21  3:19 UTC (permalink / raw)
  To: oe-core

Intel VROC raid device named as /dev/mdXX, now it only can boot with
initramfs method because it need mdadm to do initial work in it, so do
not remove initrd for such kind device.

It also use "p" as partition prefix, adjust it to aviod use a wrong device name
durning install.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 .../initrdscripts/files/init-install-efi.sh        | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index b6855b5aac0f..c23132ae632d 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -44,9 +44,10 @@ echo "Searching for hard drives ..."
 
 # Some eMMC devices have special sub devices such as mmcblk0boot0 etc
 # we're currently only interested in the root device so pick them wisely
-devices=`ls /sys/block/ | grep -v mmcblk` || true
+devices=`ls /sys/block/ | grep -v "mmcblk\|md\|dm"` || true
 mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"` || true
-devices="$devices $mmc_devices"
+md_devices=`cat /proc/mdstat  |grep -w active |awk -F":" '{print $1}'` || true
+devices="$devices $mmc_devices $md_devices"
 
 for device in $devices; do
     case $device in
@@ -165,6 +166,14 @@ if [ ! "${device#/dev/mmcblk}" = "${device}" ] || \
     rootwait="rootwait"
 fi
 
+# MD raid device use partition prefix charater 'p'
+# and it need a larger capacity to store initrd,
+# considering some debug purpose, enlarge it to 1G.
+if [ ! "${device#/dev/md}" = "${device}" ]; then
+    part_prefix="p"
+    boot_size=1024
+fi
+
 # USB devices also require rootwait
 if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then
     rootwait="rootwait"
@@ -251,8 +260,14 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
     # Update grub config for the installed image
     # Delete the install entry
     sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG
-    # Delete the initrd lines
-    sed -i "/initrd /d" $GRUBCFG
+    # initrd is necessary to boot from MD device
+    if [ ! "${device#/dev/md}" = "${device}" ]; then
+       cp /run/media/$1/initrd /boot
+       cp /run/media/$1/startup.nsh /boot
+    else
+       # Delete the initrd lines
+       sed -i "/initrd /d" $GRUBCFG
+    fi
     # Delete any LABEL= strings
     sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
     # Replace root= and add additional standard boot options
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 7/8] init-install: fix a typo which will led delete section failed when use sed
  2019-03-21  3:19 [PATCH 0/8] changes to allow boot/install from/to virtual raid disk Liwei Song
                   ` (5 preceding siblings ...)
  2019-03-21  3:19 ` [PATCH 6/8] init-install: add support for install image to Intel VROC raid disk Liwei Song
@ 2019-03-21  3:19 ` Liwei Song
  2019-03-21  3:19 ` [PATCH 8/8] oe-core: add ledmon to support Intel VROC Liwei Song
  7 siblings, 0 replies; 13+ messages in thread
From: Liwei Song @ 2019-03-21  3:19 UTC (permalink / raw)
  To: oe-core

use sed to delete the install section may failed due to an typo
in installer routine.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index c23132ae632d..6e4f3aa03b58 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -259,7 +259,7 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
     cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG
     # Update grub config for the installed image
     # Delete the install entry
-    sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG
+    sed -i "/menuentry 'install/,/^}/d" $GRUBCFG
     # initrd is necessary to boot from MD device
     if [ ! "${device#/dev/md}" = "${device}" ]; then
        cp /run/media/$1/initrd /boot
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 8/8] oe-core: add ledmon to support Intel VROC
  2019-03-21  3:19 [PATCH 0/8] changes to allow boot/install from/to virtual raid disk Liwei Song
                   ` (6 preceding siblings ...)
  2019-03-21  3:19 ` [PATCH 7/8] init-install: fix a typo which will led delete section failed when use sed Liwei Song
@ 2019-03-21  3:19 ` Liwei Song
  2019-03-21 23:32   ` Richard Purdie
  7 siblings, 1 reply; 13+ messages in thread
From: Liwei Song @ 2019-03-21  3:19 UTC (permalink / raw)
  To: oe-core

This add ledmon demon to control Intel VROC's SSD disk led.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 meta/recipes-extended/ledmon/ledmon_git.bb | 32 ++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 meta/recipes-extended/ledmon/ledmon_git.bb

diff --git a/meta/recipes-extended/ledmon/ledmon_git.bb b/meta/recipes-extended/ledmon/ledmon_git.bb
new file mode 100644
index 000000000000..77a620860cab
--- /dev/null
+++ b/meta/recipes-extended/ledmon/ledmon_git.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Intel(R) Enclosure LED Utilities"
+
+DESCRIPTION = "The utilities are designed primarily to be used on storage servers \
+ utilizing MD devices (aka Linux Software RAID) for RAID arrays.\
+"
+HOMEPAGE = "https://github.com/intel/ledmon"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+"
+
+DEPENDS = " udev sg3-utils"
+
+PARALLEL_MAKE = ""
+
+SRC_URI = "git://github.com/intel/ledmon;branch=master"
+SRCREV = "8a5d9526e5666e75625427b85a2586436651e89c"
+
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+
+S = "${WORKDIR}/git"
+EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}'"
+
+do_compile() {
+        oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
+}
+
+do_install() {
+	oe_runmake install DESTDIR=${D}
+	cd ${S}/systemd
+	oe_runmake install DESTDIR=${D}
+}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 8/8] oe-core: add ledmon to support Intel VROC
  2019-03-21  3:19 ` [PATCH 8/8] oe-core: add ledmon to support Intel VROC Liwei Song
@ 2019-03-21 23:32   ` Richard Purdie
  2019-03-22  1:44     ` Liwei Song
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Purdie @ 2019-03-21 23:32 UTC (permalink / raw)
  To: Liwei Song, oe-core

On Wed, 2019-03-20 at 23:19 -0400, Liwei Song wrote:
> This add ledmon demon to control Intel VROC's SSD disk led.
> 
> Signed-off-by: Liwei Song <liwei.song@windriver.com>
> ---
>  meta/recipes-extended/ledmon/ledmon_git.bb | 32 ++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 meta/recipes-extended/ledmon/ledmon_git.bb
> 
> diff --git a/meta/recipes-extended/ledmon/ledmon_git.bb b/meta/recipes-extended/ledmon/ledmon_git.bb
> new file mode 100644
> index 000000000000..77a620860cab
> --- /dev/null
> +++ b/meta/recipes-extended/ledmon/ledmon_git.bb
> @@ -0,0 +1,32 @@
> +SUMMARY = "Intel(R) Enclosure LED Utilities"
> +
> +DESCRIPTION = "The utilities are designed primarily to be used on storage servers \
> + utilizing MD devices (aka Linux Software RAID) for RAID arrays.\
> +"
> +HOMEPAGE = "https://github.com/intel/ledmon"
> 

I'm not sure many of our systems have this. Would this not be more
appropriate in meta-intel or in some other layer? it does seem a bit of
a specialist use case?

Cheers,

Richard



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 8/8] oe-core: add ledmon to support Intel VROC
  2019-03-21 23:32   ` Richard Purdie
@ 2019-03-22  1:44     ` Liwei Song
  0 siblings, 0 replies; 13+ messages in thread
From: Liwei Song @ 2019-03-22  1:44 UTC (permalink / raw)
  To: Richard Purdie, oe-core



On 03/22/2019 07:32 AM, Richard Purdie wrote:
> On Wed, 2019-03-20 at 23:19 -0400, Liwei Song wrote:
>> This add ledmon demon to control Intel VROC's SSD disk led.
>>
>> Signed-off-by: Liwei Song <liwei.song@windriver.com>
>> ---
>>  meta/recipes-extended/ledmon/ledmon_git.bb | 32 ++++++++++++++++++++++++++++++
>>  1 file changed, 32 insertions(+)
>>  create mode 100644 meta/recipes-extended/ledmon/ledmon_git.bb
>>
>> diff --git a/meta/recipes-extended/ledmon/ledmon_git.bb b/meta/recipes-extended/ledmon/ledmon_git.bb
>> new file mode 100644
>> index 000000000000..77a620860cab
>> --- /dev/null
>> +++ b/meta/recipes-extended/ledmon/ledmon_git.bb
>> @@ -0,0 +1,32 @@
>> +SUMMARY = "Intel(R) Enclosure LED Utilities"
>> +
>> +DESCRIPTION = "The utilities are designed primarily to be used on storage servers \
>> + utilizing MD devices (aka Linux Software RAID) for RAID arrays.\
>> +"
>> +HOMEPAGE = "https://github.com/intel/ledmon"
>>
> 
> I'm not sure many of our systems have this. Would this not be more
> appropriate in meta-intel or in some other layer? it does seem a bit of
> a specialist use case?

OK, will try to send it to meta-intel, Thanks for your suggestion.

Liwei.


> 
> Cheers,
> 
> Richard
> 
> 
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/8] mdadm: add udev rules to create by-partuuid for MD devices
  2019-03-21  3:19 ` [PATCH 2/8] mdadm: add udev rules to create by-partuuid for MD devices Liwei Song
@ 2019-03-25 11:55   ` Richard Purdie
  2019-03-26  3:18     ` Liwei Song
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Purdie @ 2019-03-25 11:55 UTC (permalink / raw)
  To: Liwei Song, oe-core

On Wed, 2019-03-20 at 23:19 -0400, Liwei Song wrote:
> installer use partuuid for boot and swap partition,
> But the udev rules for MD devices do not have rules to create
> by-partuuid under /dev/disk/, this will take 90s to wait until failed
> add the rules to create by-partuuid to support boot from raid
> disk with "root=PARTUUID=XXX"
> 
> Signed-off-by: Liwei Song <liwei.song@windriver.com>
> ---
>  ...ev.rules-create-by-partuuid-for-md-device.patch | 29
> ++++++++++++++++++++++
>  meta/recipes-extended/mdadm/mdadm_4.1.bb           |  1 +
>  2 files changed, 30 insertions(+)
>  create mode 100644 meta/recipes-extended/mdadm/files/0001-
> udev.rules-create-by-partuuid-for-md-device.patch
> 
> diff --git a/meta/recipes-extended/mdadm/files/0001-udev.rules-
> create-by-partuuid-for-md-device.patch b/meta/recipes-
> extended/mdadm/files/0001-udev.rules-create-by-partuuid-for-md-
> device.patch
> new file mode 100644
> index 000000000000..c1f7b1cf8736
> --- /dev/null
> +++ b/meta/recipes-extended/mdadm/files/0001-udev.rules-create-by-
> partuuid-for-md-device.patch
> @@ -0,0 +1,29 @@
> +From 7d1fa6afba936edb3e211f0ccdb58b1472b4bbf4 Mon Sep 17 00:00:00
> 2001
> +From: Liwei Song <liwei.song@windriver.com>
> +Date: Tue, 26 Feb 2019 07:05:42 +0000
> +Subject: [PATCH] udev.rules: create by-partuuid for md device
> +
> +Create by-partuuid for every md devices.
> +
> +Upstream-Status: sent to linux-raid@vger.kernel.org(
> https://www.spinics.net/lists/raid/msg62373.html)
> +
> +Signed-off-by: Liwei Song <liwei.song@windriver.com>
> +---
> + udev-md-raid-arrays.rules | 1 +
> + 1 file changed, 1 insertion(+)

It looks like upstream had concerns about this so I'd like to hold off
on this until those are resolved.

https://www.spinics.net/lists/raid/msg62376.html

Cheers,

Richard



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/8] mdadm: add udev rules to create by-partuuid for MD devices
  2019-03-25 11:55   ` Richard Purdie
@ 2019-03-26  3:18     ` Liwei Song
  0 siblings, 0 replies; 13+ messages in thread
From: Liwei Song @ 2019-03-26  3:18 UTC (permalink / raw)
  To: Richard Purdie, oe-core



On 03/25/2019 07:55 PM, Richard Purdie wrote:
> On Wed, 2019-03-20 at 23:19 -0400, Liwei Song wrote:
>> installer use partuuid for boot and swap partition,
>> But the udev rules for MD devices do not have rules to create
>> by-partuuid under /dev/disk/, this will take 90s to wait until failed
>> add the rules to create by-partuuid to support boot from raid
>> disk with "root=PARTUUID=XXX"
>>
>> Signed-off-by: Liwei Song <liwei.song@windriver.com>
>> ---
>>  ...ev.rules-create-by-partuuid-for-md-device.patch | 29
>> ++++++++++++++++++++++
>>  meta/recipes-extended/mdadm/mdadm_4.1.bb           |  1 +
>>  2 files changed, 30 insertions(+)
>>  create mode 100644 meta/recipes-extended/mdadm/files/0001-
>> udev.rules-create-by-partuuid-for-md-device.patch
>>
>> diff --git a/meta/recipes-extended/mdadm/files/0001-udev.rules-
>> create-by-partuuid-for-md-device.patch b/meta/recipes-
>> extended/mdadm/files/0001-udev.rules-create-by-partuuid-for-md-
>> device.patch
>> new file mode 100644
>> index 000000000000..c1f7b1cf8736
>> --- /dev/null
>> +++ b/meta/recipes-extended/mdadm/files/0001-udev.rules-create-by-
>> partuuid-for-md-device.patch
>> @@ -0,0 +1,29 @@
>> +From 7d1fa6afba936edb3e211f0ccdb58b1472b4bbf4 Mon Sep 17 00:00:00
>> 2001
>> +From: Liwei Song <liwei.song@windriver.com>
>> +Date: Tue, 26 Feb 2019 07:05:42 +0000
>> +Subject: [PATCH] udev.rules: create by-partuuid for md device
>> +
>> +Create by-partuuid for every md devices.
>> +
>> +Upstream-Status: sent to linux-raid@vger.kernel.org(
>> https://www.spinics.net/lists/raid/msg62373.html)
>> +
>> +Signed-off-by: Liwei Song <liwei.song@windriver.com>
>> +---
>> + udev-md-raid-arrays.rules | 1 +
>> + 1 file changed, 1 insertion(+)
> 
> It looks like upstream had concerns about this so I'd like to hold off
> on this until those are resolved.

No problem, let's wait if other folks have more concern before it is applied.

https://www.spinics.net/lists/raid/msg62379.html

Thanks,
Liwei.


> 
> https://www.spinics.net/lists/raid/msg62376.html
> 
> Cheers,
> 
> Richard
> 
> 
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-03-26  3:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-21  3:19 [PATCH 0/8] changes to allow boot/install from/to virtual raid disk Liwei Song
2019-03-21  3:19 ` [PATCH 1/8] mdadm: add mdmon service to support Intel VROC Liwei Song
2019-03-21  3:19 ` [PATCH 2/8] mdadm: add udev rules to create by-partuuid for MD devices Liwei Song
2019-03-25 11:55   ` Richard Purdie
2019-03-26  3:18     ` Liwei Song
2019-03-21  3:19 ` [PATCH 3/8] udev-extraconf: move md* and dm* from mount blacklist Liwei Song
2019-03-21  3:19 ` [PATCH 4/8] initramfs-framework: mount efivarfs to make Intel VROC work well Liwei Song
2019-03-21  3:19 ` [PATCH 5/8] initramfs-framework: add lvm module Liwei Song
2019-03-21  3:19 ` [PATCH 6/8] init-install: add support for install image to Intel VROC raid disk Liwei Song
2019-03-21  3:19 ` [PATCH 7/8] init-install: fix a typo which will led delete section failed when use sed Liwei Song
2019-03-21  3:19 ` [PATCH 8/8] oe-core: add ledmon to support Intel VROC Liwei Song
2019-03-21 23:32   ` Richard Purdie
2019-03-22  1:44     ` Liwei Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox