summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward A. James <eajames@us.ibm.com>2017-07-14 12:32:44 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-08-18 15:17:17 +0000
commiteb77a8f6213c4be92b17f5603c33c4a81f6cf4df (patch)
treee25616333878732aa5f2492ccb7ea392ef46a0d7
parent4544df953bb19bceaf34e1a0611873ae7597fcac (diff)
downloadtalos-openbmc-eb77a8f6213c4be92b17f5603c33c4a81f6cf4df.tar.gz
talos-openbmc-eb77a8f6213c4be92b17f5603c33c4a81f6cf4df.zip
Remove initramfs workaround for u-boot environment.
Early in the dev-4.4 kernel lifetime a workaround was developed when the fw_setenv command was failing. That issue does not appear with the current kernel and the workaround can be removed. Change-Id: I2a0f01f274b7ce76fbd1e80fe901cc86087ee5d8 Signed-off-by: Edward A. James <eajames@us.ibm.com>
-rw-r--r--meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config2
-rw-r--r--meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-bsp/u-boot/files/fw_env.config2
-rw-r--r--meta-phosphor/common/recipes-bsp/u-boot/files/76-mtd-partitions.rules1
-rw-r--r--meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend6
-rw-r--r--meta-phosphor/common/recipes-phosphor/initfs/files/obmc-init.sh19
-rw-r--r--meta-phosphor/common/recipes-phosphor/initfs/files/obmc-shutdown.sh6
6 files changed, 17 insertions, 19 deletions
diff --git a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config
index 978e4d6e5..78c946699 100644
--- a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config
+++ b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config
@@ -13,7 +13,7 @@
# MTD SPI-dataflash example
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd2 0x00000 0x20000
-/run/fw_env 0x00000 0x20000
+/dev/mtd/u-boot-env 0x00000 0x20000
#/dev/mtd5 0x4200 0x4200
#/dev/mtd6 0x4200 0x4200
diff --git a/meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-bsp/u-boot/files/fw_env.config b/meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-bsp/u-boot/files/fw_env.config
index 978e4d6e5..78c946699 100644
--- a/meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-bsp/u-boot/files/fw_env.config
+++ b/meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-bsp/u-boot/files/fw_env.config
@@ -13,7 +13,7 @@
# MTD SPI-dataflash example
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd2 0x00000 0x20000
-/run/fw_env 0x00000 0x20000
+/dev/mtd/u-boot-env 0x00000 0x20000
#/dev/mtd5 0x4200 0x4200
#/dev/mtd6 0x4200 0x4200
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/76-mtd-partitions.rules b/meta-phosphor/common/recipes-bsp/u-boot/files/76-mtd-partitions.rules
new file mode 100644
index 000000000..16a7cfe93
--- /dev/null
+++ b/meta-phosphor/common/recipes-bsp/u-boot/files/76-mtd-partitions.rules
@@ -0,0 +1 @@
+SUBSYSTEM=="mtd", SYMLINK+="mtd/%s{name}"
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend
new file mode 100644
index 000000000..a460f4065
--- /dev/null
+++ b/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend
@@ -0,0 +1,6 @@
+SRC_URI += "file://76-mtd-partitions.rules"
+
+do_install_append() {
+ install -d ${D}/${base_libdir}/udev/rules.d/
+ install ${WORKDIR}/76-mtd-partitions.rules ${D}/${base_libdir}/udev/rules.d/
+}
diff --git a/meta-phosphor/common/recipes-phosphor/initfs/files/obmc-init.sh b/meta-phosphor/common/recipes-phosphor/initfs/files/obmc-init.sh
index 70af93d99..a402ecb31 100644
--- a/meta-phosphor/common/recipes-phosphor/initfs/files/obmc-init.sh
+++ b/meta-phosphor/common/recipes-phosphor/initfs/files/obmc-init.sh
@@ -64,10 +64,14 @@ get_fw_env_var() {
# double \0 at the end of the environment.
# * print the value of the variable name passed as argument
- cat /run/fw_env |
- tr '\n\000' '\r\n' |
- tail -c +5 | tail -c +${copies-1} |
- sed -ne '/^$/,$d' -e "s/^$1=//p"
+ envdev=$(findmtd u-boot-env)
+ if test -n $envdev
+ then
+ cat /dev/$envdev |
+ tr '\n\000' '\r\n' |
+ tail -c +5 | tail -c +${copies-1} |
+ sed -ne '/^$/,$d' -e "s/^$1=//p"
+ fi
}
setup_resolv() {
@@ -150,13 +154,6 @@ HERE
fi
}
-env=$(findmtd u-boot-env)
-if test -n $env
-then
- ln -s /dev/$env /run/mtd:u-boot-env
- cp /run/mtd:u-boot-env /run/fw_env
-fi
-
rofs=$(findmtd rofs)
rwfs=$(findmtd rwfs)
diff --git a/meta-phosphor/common/recipes-phosphor/initfs/files/obmc-shutdown.sh b/meta-phosphor/common/recipes-phosphor/initfs/files/obmc-shutdown.sh
index beebb6cb4..90e5dfbeb 100644
--- a/meta-phosphor/common/recipes-phosphor/initfs/files/obmc-shutdown.sh
+++ b/meta-phosphor/common/recipes-phosphor/initfs/files/obmc-shutdown.sh
@@ -33,12 +33,6 @@ set +x
update=/run/initramfs/update
image=/run/initramfs/image-
-if test -s /run/fw_env -a -c /run/mtd:u-boot-env -a ! -e ${image}u-boot-env &&
- ! cmp /run/mtd:u-boot-env /run/fw_env
-then
- ln -sn /run/fw_env ${image}u-boot-env
-fi
-
if ls $image* > /dev/null 2>&1
then
if test -x $update
OpenPOWER on IntegriCloud