Make MEDIA_DIR configurable

MEDIA_DIR was configured as "/media", it works on ubi-fs systems.

On static layout systems, "/media" is in rwfs, and thus is persistent
after BMC reboot or code update (if rwfs is not updated).
This makes the dirs/files in MEDIA_DIR persistent, and it causes an
issue that BMC uses the incorrect versionId of the image that is the
persistent one in MEDIA_DIR, while it should generate the versionID from
the functional BMC version.

Making MEDIA_DIR configurable, so static layout system could configure
it to a tmpfs, and the above issue is fixed.

Partly resolves openbmc/phosphor-bmc-code-mgmt#3

Tested: Verify that MEDIA_DIR could be configured via configure
        argument.

Change-Id: I10d46ea00b79677bec16ac69d2a3375597665f0c
Signed-off-by: Lei YU <mine260309@gmail.com>
2 files changed