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
diff --git a/meson.build b/meson.build
index f6f3f35..6ec94e1 100644
--- a/meson.build
+++ b/meson.build
@@ -97,6 +97,11 @@
     conf.set_quoted('BIOS_OBJPATH', get_option('bios-object-path'))
 endif
 
+if get_option('bmc-static-dual-image').enabled()
+  conf.set('BMC_STATIC_DUAL_IMAGE', get_option('bmc-static-dual-image').enabled())
+  conf.set_quoted('ALT_ROFS_DIR', get_option('alt-rofs-dir'))
+endif
+
 configure_file(output: 'config.h', configuration: conf)
 
 sdbusplus_dep = dependency('sdbusplus', required: false)
@@ -217,6 +222,10 @@
     unit_files += 'obmc-flash-host-bios@.service.in'
 endif
 
+if get_option('bmc-static-dual-image').enabled()
+    unit_files += 'static/obmc-flash-bmc-static-mount-alt.service.in'
+endif
+
 if get_option('sync-bmc-files').enabled()
     executable(
         'phosphor-sync-software-manager',