usb: Initialize USB Code Update
Compile the USB Code Update function after enabling `usb-code-update`,
and expect to pass in the name of the USB mount folder when calling
the process.
Also, the dependency of CLI11 has been added.
Tested: enabled `usb-code-update` and built `phosphor-bmc-code-mgmt`
successfully and check that there is a `phosphor-usb-code-update`
process in image-bmc.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Iedfb63c3866cc8542afef9b54bfeaaf5f7b40c6b
diff --git a/usb/usb_manager_main.cpp b/usb/usb_manager_main.cpp
new file mode 100644
index 0000000..b5a538d
--- /dev/null
+++ b/usb/usb_manager_main.cpp
@@ -0,0 +1,14 @@
+#include <CLI/CLI.hpp>
+
+int main(int argc, char** argv)
+{
+ std::string fileName{};
+
+ CLI::App app{"Update the firmware of OpenBMC via USB app"};
+ app.add_option("-f,--fileName", fileName,
+ "Get the name of the USB mount folder");
+
+ CLI11_PARSE(app, argc, argv);
+
+ return 0;
+}