commit | 1886b34114708c98e231b305ef9af9f3c7a18813 | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Thu Aug 17 21:56:14 2017 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Mon Aug 28 16:57:45 2017 +0000 |
tree | a3c5d72584c614a911d907a08308ba5ece8b1cb7 | |
parent | a7d2bde29f0cb4085e5f7848e3df1f5561f2e2d3 [diff] |
obmc-flash-bmc: Add u-boot update Add function to update the u-boot mtd by doing a direct flash write. Add it to the read-only function since u-boot is considered a non-writable partition. Change-Id: I73e76ba7153f18b03418ac9b181abc5d31f61f17 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc index 9af24ac..c452225 100644 --- a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc +++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc
@@ -145,7 +145,19 @@ fw_setenv "$varName" "$value" } +mtd_write() { + flashmtd="$(findmtd "${reqmtd}")" + img="/tmp/images/${version}/${imgfile}" + flashcp -v ${img} /dev/${flashmtd} +} + case "$1" in + mtduboot) + reqmtd="$2" + version="$3" + imgfile="image-u-boot" + mtd_write + ;; ubirw) reqmtd="$2" name="$3"
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service index 3e4c15d..7c2a252 100644 --- a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service +++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service
@@ -1,9 +1,10 @@ [Unit] -Description=Create read-only ubi volumes %I +Description=Store read-only images %I to BMC storage [Service] Type=oneshot RemainAfterExit=no ExecStart=/usr/bin/env obmc-flash-bmc ubiro {RO_MTD} rofs-%i %i ExecStart=/usr/bin/env obmc-flash-bmc ubikernel {KERNEL_MTD} kernel-%i %i +ExecStart=/usr/bin/env obmc-flash-bmc mtduboot u-boot %i SyslogIdentifier=obmc-flash-bmc