#
dedcb9a6 |
| 02-Jun-2023 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Don't remove hostfw if it's not being updated
The image-hostfw is optional, therefore don't delete it unless it's going to be updated, to prevent ending up with a system that doesn't have a bio
mmc: Don't remove hostfw if it's not being updated
The image-hostfw is optional, therefore don't delete it unless it's going to be updated, to prevent ending up with a system that doesn't have a bios image to boot with.
Tested: Verify the hostfw image doesn't get deleted unless the tarball contains an image-hostfw file.
Change-Id: Ifd48988d1a499eb8a3539701f12ca43efcb56f6d Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
dcfadad5 |
| 23-May-2023 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Run fsck on the alternate image and hostfw
Before mounting the alternate image, run fsck on it to determine if the filesystem is corrupted, this could happen if the BMC rebooted in the middle o
mmc: Run fsck on the alternate image and hostfw
Before mounting the alternate image, run fsck on it to determine if the filesystem is corrupted, this could happen if the BMC rebooted in the middle of a code update for example. Invalidate the image if it's found to be corrupted.
Run fsck on the hostfw partition too, this is a writable partition that can benefit from autocorrection. The mmc initramfs runs fsck on the rwfs partition already. It's a good practice to run fsck on writable partitions. Do not fail if fsck fails on the hostfw partition, if it's corrupted, an error would occur during the power on.
Tested: Verified there were no errors with this change. This change adds about 1s to the execution of the mount service, from 5s to 6s to start:
May 24 19:07:27 p10bmc systemd[1]: Starting Mount BMC rofs volumes after a reboot... May 24 19:07:27 p10bmc obmc-flash-bmc[328]: /dev/disk/by-partlabel/rofs-a: clean, 6430/68816 files, 192421/275012 blocks May 24 19:07:27 p10bmc kernel: EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Quota mode: disabled. May 24 19:07:33 p10bmc fsck.ext4[474]: hostfw: clean, 247/655360 files, 196363/1310720 blocks May 24 19:07:34 p10bmc kernel: EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Quota mode: disabled. May 24 19:07:34 p10bmc systemd[1]: obmc-flash-mmc-mount.service: Deactivated successfully. May 24 19:07:34 p10bmc systemd[1]: Finished Mount BMC rofs volumes after a reboot.
Change-Id: I0efedb6d72e1d0d6018974598c4b361eafe7441b Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
87c5b5bd |
| 15-Nov-2022 |
Lakshmi Yadlapati <lakshmiy@us.ibm.com> |
u-boot mirroring support
Design is at the link below. https://gerrit.openbmc.org/c/openbmc/docs/+/58025
Tested: Tested all "Test Scenarios" specified in the design.
Signed-off-by: Lakshmi Yadlap
u-boot mirroring support
Design is at the link below. https://gerrit.openbmc.org/c/openbmc/docs/+/58025
Tested: Tested all "Test Scenarios" specified in the design.
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com> Change-Id: I064115ee1e966a0a1b3ce7ec246c1f88f0bd87f7
show more ...
|
#
780c930e |
| 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
beautysh: re-format
beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh files to have a consistent formatting. Re-run the formatter on the whole repository.
Signed-off-by: Patric
beautysh: re-format
beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh files to have a consistent formatting. Re-run the formatter on the whole repository.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3e5a9d1fc03aeecd9a305a5270a0ed757ea0c591
show more ...
|
#
7b1b4cb8 |
| 24-May-2022 |
Lei YU <yulei.sh@bytedance.com> |
obmc-flash-bmc: Ignore SC2295
With the updated openbmc-build-scripts shellcheck reports SC2295 error. Ignore this error to make CI pass.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I7
obmc-flash-bmc: Ignore SC2295
With the updated openbmc-build-scripts shellcheck reports SC2295 error. Ignore this error to make CI pass.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I7b532aa9ba477bad8169e15b51bc2d19a2a066b6
show more ...
|
#
c53fccac |
| 02-Feb-2022 |
Isaac Kurth <blisaac91@gmail.com> |
obmc-flash-bmc: fix shellcheck warnings
Tested: Built the ubi.mtd.tar file and loaded it onto a witherspoon machine, verified ubi volumes were updated and mounted after reboot as expected. Performed
obmc-flash-bmc: fix shellcheck warnings
Tested: Built the ubi.mtd.tar file and loaded it onto a witherspoon machine, verified ubi volumes were updated and mounted after reboot as expected. Performed a code update on mmc system, verified it booted as expected.
Signed-off-by: Isaac Kurth <blisaac91@gmail.com> Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Change-Id: I69cde49626c0a7f8cf8d0028b2c24d2c3ca4458e
show more ...
|
#
b5171acd |
| 16-Dec-2021 |
Lei YU <yulei.sh@bytedance.com> |
dual-image: remount alt partitions during update
When the BMC is to updating the alt image, it needs to stop the sync manager, umount the rofs/rwfs-alt partitions before the flashing, mount them aft
dual-image: remount alt partitions during update
When the BMC is to updating the alt image, it needs to stop the sync manager, umount the rofs/rwfs-alt partitions before the flashing, mount them after it's done, and restart the sync manager.
Otherwise the mount point of rofs/rwfs-alt will get error because the content is updated.
Tested: Verify the rofs/rwfs-alt are umounted during the alt flashing, and are mounted again after the flashing is done, and the sync manager is restarted.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I21e2bd8e0616cf529b9b4e5245d5da1ea4dfb51e
show more ...
|
#
6376964e |
| 10-Dec-2021 |
Lei YU <yulei.sh@bytedance.com> |
dual-image: Mount alt dirs
To support dual image in static layout, it needs to mount secondary's rofs/rwfs.
Update obmc-flash-bmc tool to support mounting 'alt-xxx' directories in /run/media/alt-xx
dual-image: Mount alt dirs
To support dual image in static layout, it needs to mount secondary's rofs/rwfs.
Update obmc-flash-bmc tool to support mounting 'alt-xxx' directories in /run/media/alt-xxx, and try to mount the alt-rofs, alt-rwfs before xyz.openbmc_project.Software.BMC.Updater.service starts.
The ExecStart command is prepended with `-` so that it does not matter if the mount fails, because the alt chip may be empty or contain invalid data.
Tested: Verify the obmc-flash-bmc-static-mount-alt.service starts before xyz.openbmc_project.Software.BMC.Updater.service, and verify it mounts alt-rofs for dual image systems. The alt-rwfs will be mounted by the needed service in future commits.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I2133a99d5324a1008c3508154f865ae54a716219
show more ...
|
#
1e81f23c |
| 18-Jan-2022 |
Adriana Kobylak <anoo@us.ibm.com> |
Determine functional versions from mount directory
In order to support the same version on the primary and backup flash locations, the version string is not enough to determine which version is func
Determine functional versions from mount directory
In order to support the same version on the primary and backup flash locations, the version string is not enough to determine which version is functional. Therefore add a functional suffix to the mount directory of the functional and use that to set the Version as functional.
Tested: The mount directories indicate which version is functional, associations look correct.
- static: root@romulus:~# ls -l /run/media/rofs-79139bc0-functional/etc/ lrwxrwxrwx 1 root root 15 Jan 22 20:11 os-release -> /etc/os-release
root@romulus:~# busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/software/functional org.freedesktop.DBus.Properties Get ss xyz.openbmc_project.Association endpoints v as 1 "/xyz/openbmc_project/software/79139bc0"
- ubi root@witherspoon:~# df /dev/ubiblock0_0 18816 18816 0 100% /media/rofs-cfb85943-functional /dev/ubiblock4_0 18816 18816 0 100% /media/rofs-26085328
- mmc: Verified functional association is correct, the rofs directories are still unmounted after the bmc updater starts.
Change-Id: I8114a86b36ca1c6b1634b01fcce3cef0a2369eca Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
25773a7e |
| 21-Jan-2022 |
Adriana Kobylak <anoo@us.ibm.com> |
Use flash id to write image to flash
Update the item updater helper functions to take the flash id instead of the version id since flash id is the name of the volumes/partitions.
The flash id was b
Use flash id to write image to flash
Update the item updater helper functions to take the flash id instead of the version id since flash id is the name of the volumes/partitions.
The flash id was being persisted for the mmc layout with the name of "partlabel". This is not needed anymore since the flash id is now being passed by the service files.
The write functions/service files still use the version id to know where the image files are located in /tmp/. They then set the value of flash id (Path property) which is then used by the other functions such as Delete and setting the u-boot environment variables.
Tested: Code update and Delete functions work on ubi and mmc.
Change-Id: I87c5b8ae2e24af30256dc3b436859835f14cda05 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
a84f06d2 |
| 18-Jan-2022 |
Adriana Kobylak <anoo@us.ibm.com> |
updater: Introduce the concept of flash id
There is a desire to be able to upload and update the same image to the BMC. This would require to generate different version ids for each, not tied to the
updater: Introduce the concept of flash id
There is a desire to be able to upload and update the same image to the BMC. This would require to generate different version ids for each, not tied to the version string. In order to correlate a version with the persistent data on flash, introduce the concept of flash id.
Flash id is the name or id of the flash location where the image was flashed, it could be a volume name, partition name, mtd device name, etc.
Use the updater version Path property for the flash id value. A d-bus property is needed so that obmc-flash-bmc can save the value once it determines the location to flash the new image. The version Path property is empty when the BMC boots up, and it's set to the image path in /tmp/ when an image is uploaded. This change will set the Path property to the location where the image resides when the BMC boots up, and it'll update the Path property from /tmp/ to the location on flash for an uploaded image once that image was successfully written to flash.
The ubi volume names are based on the uploaded version id, keep this the same for simplicity, the flash id would then be the version id of the uploaded image (which would eventually be a random number). The mmc partitions are named rofs-a/rofs-b, so the flash id would be "a" or "b".
Tested: Verified the Path property was set to the version id on ubi and to "a" or "b" on mmc.
Change-Id: I11ccdb829c3c5204a58f24f3383db0045d8687ea Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
9b8816f5 |
| 02-Dec-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
obmc-flash-bmc: Specify full path for mktemp Some eMMC systems report the following error when updating u-boot: Dec 02 18:14:40 openbmc systemd[1]: Starting Write image 3ca0afa1 to
obmc-flash-bmc: Specify full path for mktemp Some eMMC systems report the following error when updating u-boot: Dec 02 18:14:40 openbmc systemd[1]: Starting Write image 3ca0afa1 to BMC storage... Dec 02 18:14:41 openbmc obmc-flash-bmc[507]: mktemp: (null): Read-only file system Dec 02 18:14:41 openbmc obmc-flash-bmc[508]: dd: can't open '': No such file or directory Dec 02 18:14:41 openbmc obmc-flash-bmc[510]: /usr/bin/obmc-flash-bmc: line 462: : No such file or directory It appears that the TMPDIR variable is not set in that environment, even though that a manual mktemp command works, so may be tied to the script running in a bash shell. In any case, specify the full path for the mktemp directory so that it creates the file in /tmp/ and doesn't attempt to create it in the running rootfs directory which is read-only. Tested: Error was not seeing in the failing system and u-boot was updated. Change-Id: I407a1e4f0d185d8fbb1e4f939bf8283246299a2d Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
62f3820b |
| 29-Sep-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Update u-boot if needed Calculate a hash over the u-boot image file and the mmc device where u-boot is stored to determine if it needs to be updated. Tested: Verified that
mmc: Update u-boot if needed Calculate a hash over the u-boot image file and the mmc device where u-boot is stored to determine if it needs to be updated. Tested: Verified that after the mmc device is updated, an update to the same image does not rewrite the device where u-boot is. Change-Id: I9f3cb8cc639512c02030b7be34845a67f3e15319 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
d148b4f0 |
| 27-Aug-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Remove hostfw patches on update Remove the hostfw patch for the alternate side during code update since that's the side that's been updated and the patches may not be compatible
mmc: Remove hostfw patches on update Remove the hostfw patch for the alternate side during code update since that's the side that's been updated and the patches may not be compatible with the new firmware level. Change-Id: I95eda772334673890b772587bfc89698fefbd4c6 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
5312d854 |
| 18-Jul-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Enhance get running partition label function The mount -l command may not show the filesystem label after a code update since the this filesystem label is part of the image when it
mmc: Enhance get running partition label function The mount -l command may not show the filesystem label after a code update since the this filesystem label is part of the image when it gets built. Therefore determine the running partition via the device then map it to the partition label (partlabel) which doesn't change. Also return the label only if found, don't assume that because 'a' didn't match that the device should be 'b'. Tested: Verified the right label was found. Change-Id: Id50223e21e9c6cc280f98f2b928d37a36de48cc9 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
8c5209d3 |
| 12-Jul-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Add support for update/delete hostfw The hostfw image file can be delivered in the code update tarball. If it is, then update it (copy the file to the hostfw partition directory
mmc: Add support for update/delete hostfw The hostfw image file can be delivered in the code update tarball. If it is, then update it (copy the file to the hostfw partition directory. To delete it, need to first unmount the secondary (non- running) hostfw mount, then delete the file. Change-Id: I352dd017114d58b79f9e624983841eafce5badf1 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
34124351 |
| 22-May-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Set updated version to primary Once the update is successful, mark the version as primary so that it boots from the updated version upon BMC reboot. Add a sleep to wait for
mmc: Set updated version to primary Once the update is successful, mark the version as primary so that it boots from the updated version upon BMC reboot. Add a sleep to wait for the service file to complete setting the primary version. Otherwise, the BMC could mark a Delete or Priority value change as complete and the service is not done yet, and if the BMC is rebooted it could try to boot from a non-existent version. As backgroung, reference issue openbmc/openbmc#2857 that attempted to create a 'wait for service' function but was not successful. This could be investigated further at a later time, which would benefit other functions like Factory Reset that are also using sleep as a workaround to wait for systemd service files. Tested: Verified the version was set to primary during code update and delete, and that 3s passed (service file finished in about 1s) before the delete/update continued. Change-Id: I4f9afdb020d8cc7c18cfdafe468dbff2dc8046c1 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
70f5bc04 |
| 13-May-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Update and remove functions for the kernel and rootfs Add support for update and remove of eMMC images. The code update tarball contains an image-kernel and image-rofs file
mmc: Update and remove functions for the kernel and rootfs Add support for update and remove of eMMC images. The code update tarball contains an image-kernel and image-rofs files. These can be flashed directly to the eMMC partitions since they're filesystem files compressed with zstd: https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/30781 https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/34334 The image-rofs contains the BMC rootfs files, and the image-kernel contains the fitImage file which is loaded by U-Boot. Tested: Verified the non-running rofs and kernel partitions were updated. Change-Id: Ic983dec1df389d56f11f12dc2e82589d1a2b9dcc Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
9cbfa2ef |
| 25-Apr-2019 |
Adriana Kobylak <anoo@us.ibm.com> |
Move script, systemd conf, service files into repo Move the common scripts, systemd configuration and service files from openbmc/openbmc to the local one. Tested: The moved file
Move script, systemd conf, service files into repo Move the common scripts, systemd configuration and service files from openbmc/openbmc to the local one. Tested: The moved files are installed in their respective locations and code update on Witherspoon is successful. Change-Id: I2dc435db49dfbaf6e0a97cb58a9678c3462d1528 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|