commit | 1fa612cd3813cd5ffa7280bcf6f4648b88c71b3f | [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 | a3367fc637a1a998cbcdc7a56a9ee9038ead5828 | |
parent | 6b7e2de7914a62a317a34fb4890e34b444d34cd1 [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/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc b/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc index 9af24ac..c452225 100644 --- a/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc +++ b/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/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service b/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service index 3e4c15d..7c2a252 100644 --- a/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service +++ b/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