dual-image: Implement BMC update when running on secondary

Implement the BMC code update when it's running on the secondary image.
It will update the alt flash by obmc-flash-bmc-alt@.service and
wait for the completion.
After the update is done, it needs reboot to take effect.

Note if the BMC is running on the secondary, it requires a following
commit to reset the CS to make the SoC to boot from the primary flash.

This commit only flashes the alt image when it's running on the
secondary image, there will be future commits to support other cases,
e.g. flashing both images.

Tested: Verify the code update process is successful and it flashes the
        whole primary chip when the BMC is running on the secondary
        chip.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ifa849e55c28f17b46d7f999ff43a7ad7e73f2ea1
5 files changed