meta-hpe: remove bash dependency
Images built for HPE machines become too large when bash is added as a dependency.
Change-Id: Ib6e49647c22f1d0345ef44ffc9140ac73ed999b1
Signed-off-by: Charles Kearney <charles.kearney@hpe.com>
diff --git a/meta-hpe/meta-common/recipes-hpe/host/host-boot-enable.bb b/meta-hpe/meta-common/recipes-hpe/host/host-boot-enable.bb
index c0f5d64..58cc921 100644
--- a/meta-hpe/meta-common/recipes-hpe/host/host-boot-enable.bb
+++ b/meta-hpe/meta-common/recipes-hpe/host/host-boot-enable.bb
@@ -14,8 +14,6 @@
SRC_URI += "file://host-boot-enable.service"
SRC_URI += "file://host-boot-enable.sh"
-RDEPENDS:${PN}:append = " bash"
-
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/host-boot-enable.sh ${D}${bindir}
diff --git a/meta-hpe/meta-common/recipes-hpe/host/host-boot-enable/host-boot-enable.sh b/meta-hpe/meta-common/recipes-hpe/host/host-boot-enable/host-boot-enable.sh
index c43ed34..06bfecd 100644
--- a/meta-hpe/meta-common/recipes-hpe/host/host-boot-enable/host-boot-enable.sh
+++ b/meta-hpe/meta-common/recipes-hpe/host/host-boot-enable/host-boot-enable.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
findmtd() {
m=$(grep -xl "$1" /sys/class/mtd/*/name)
@@ -7,10 +7,9 @@
echo "$m"
}
-rom_lists=(host-prime host-second vrom-prime vrom-second)
-rom_mtd_list=()
+set -- host-prime host-second vrom-prime vrom-second
-for f in "${rom_lists[@]}"
+for f in "$@"
do
image=$(findmtd "${f}")
if test -z "$image"
@@ -18,14 +17,13 @@
echo "Unable to find mtd partition for ${f}"
exit 1
fi
- rom_mtd_list+=("$image")
done
#enable vrom
# host-prime to vrom-prime
-dd if="/dev/${rom_mtd_list[0]}" of="/dev/${rom_mtd_list[2]}"
+dd if="/dev/$(findmtd host-prime)" of="/dev/$(findmtd vrom-prime)"
# host-second to vrom-second
-dd if="/dev/${rom_mtd_list[1]}" of="/dev/${rom_mtd_list[3]}"
+dd if="/dev/$(findmtd host-second)" of="/dev/$(findmtd vrom-second)"
echo 0x1800008a > /sys/class/soc/srom/vromoff