build: Add meson build
Changes to note,
- `with_systemdsystemunitdir` and `with_tmpfilesdir` is removed since it
is not being documented nor used in OpenBMC.
- Removed the Code coverage feature with `-DDHAVE_GCOV`, since it is not
used and meson covers it.
- Removed `--enable-oe-sdk` for using the OpenBMC SDK. It should work
directly with no change required.
Tested:
```
Jan 01 00:01:54 ipmid[709]: Try loading blob from persistent data
Jan 01 00:01:54 ipmid[709]: Stale blob data, resetting internals...
Jan 01 00:01:56 ipmid[709]: config loaded: /flash/bios
Jan 01 00:01:56 ipmid[709]: config loaded: /flash/image
Jan 01 00:01:56 ipmid[709]: config loaded: /flash/dummy
...
```
```
$ ls /usr/lib/blob-ipmid/
libfirmwareblob.so
libfirmwarecleanupblob.so libversionblob.so
```
Testing the service,
```
$ echo "hello" > /tmp/test.txt
$ burn_my_bmc -command update -layout dummy -image /tmp/test.txt
Sending over the firmware image.
Opening the verification file
Committing to /flash/verify to trigger service
Calling stat on /flash/verify session to check status
running
success
Returned success
succeeded
```
On the BMC.
```
/run/initramfs$ cat dummy
hello
```
Change-Id: I21c7c33bd62c0ee40681cb40da90125c125bea2f
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..c348409
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,43 @@
+option('tests', type: 'feature', description: 'Build tests')
+
+# Build Options
+option('bmc-blob-handler', type: 'feature', description: 'Build the BMC BLOB handler')
+option('cleanup-delete', type: 'feature', description: 'Enable use of the delete files cleanup mechanism')
+option('host-tool', type: 'feature', description: 'Build the host tool')
+
+# BMC Blob Handler Options
+option('host-bios', type: 'boolean', value: false, description: 'Install default BIOS update configs')
+option('reboot-update', type: 'boolean', value: false, description: 'Enable use of reboot update mechanism')
+option('update-status', type: 'boolean', value: false, description: 'Enable use of update status file')
+
+option('update-type', type : 'combo', choices : ['none', 'static-layout', 'tarball-ubi'], description: 'Enable firmware update via Blobs')
+
+option('lpc-type', type : 'combo', choices : ['none', 'aspeed-lpc', 'nuvoton-lpc'], description: 'Enable external transfers using Aspeed/Nuvoton LPC')
+option('p2a-type', type : 'combo', choices : ['none', 'aspeed-p2a', 'nuvoton-p2a-vga', 'nuvoton-p2a-mbox'], description: 'Enable external transfers using Aspeed PCI-to-AHB, Nuvoton PCI-to-AHB via VGA, or Nuvoton PCI-to-AHB via MBOX')
+option('net-bridge', type: 'boolean', value: false, description: 'Enable external transfers using a TCP connection')
+
+# Host Tool Options
+option('ppc', type: 'boolean', value: false, description: 'Enable ppc host memory access')
+
+# Configuration Details
+
+# The address used for mapping P2A or LPC into the BMC's memory-space:
+# e.g. https://github.com/openbmc/linux/blob/1da2ce51886a3b2f5db2087f26c661e13ee13b84/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts#L26
+# or https://github.com/openbmc/linux/blob/1da2ce51886a3b2f5db2087f26c661e13ee13b84/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts#L166
+# for PCI, this address is passed back to the host and is used directly.
+option('mapped-address', type : 'string', value : '0', description : 'Value for memory region mapping')
+
+option('static-handler-staged-name', type : 'string', value : '/run/initramfs/bmc-image', description : 'The file to use for staging the firmware update')
+option('tarball-staged-name', type : 'string', value : '/tmp/image-update.tar', description : 'The file to use for staging the firmware update')
+option('hash-filename', type : 'string', value : '/tmp/bmc.sig', description : 'The file to use for the hash provided')
+option('verify-status-filename', type : 'string', value : '/tmp/bmc.verify', description : 'The file checked for the verification status.')
+option('update-status-filename', type : 'string', value : '/tmp/bmc.update', description : 'The file checked for the update status')
+option('bios-verify-status-filename', type : 'string', value : '/tmp/bios.verify', description : 'The file checked for the verification status')
+
+option('preparation-dbus-service', type : 'string', value : 'phosphor-ipmi-flash-bmc-prepare.target', description : 'The systemd target started when the host starts to send an update')
+option('verify-dbus-service', type : 'string', value : 'phosphor-ipmi-flash-bmc-verify.target', description : 'The systemd target started for verification')
+option('update-dbus-service', type : 'string', value : 'phosphor-ipmi-flash-bmc-update.target', description : 'The systemd target started for updating the BMC')
+option('bios-staged-name', type : 'string', value : 'bios-staged-name', description : 'The file to use for staging the bios firmware update')
+option('preparation-bios-target', type : 'string', value : 'phosphor-ipmi-flash-bios-prepare.target', description : 'The systemd target started when the host starts to send an update')
+option('verify-bios-target', type : 'string', value : 'phosphor-ipmi-flash-bios-verify.target', description : 'The systemd target started for verifying the BIOS image')
+option('update-bios-target', type : 'string', value : 'phosphor-ipmi-flash-bios-update.target', description : 'The systemd target started for updating the BIOS')
\ No newline at end of file