aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-09-14 13:42:36 +0200
committerGerd Hoffmann <kraxel@redhat.com>2017-09-26 13:05:32 +0200
commit3d5eecab4a5a00df897253dda5792411a1872732 (patch)
tree3b7857390475fa77e03372909194c349e849bbcd /vl.c
parent2a1cce9058698d384b7c1b6c6b744d928d32dfba (diff)
Add --firmwarepath to configure
Add a firmware path config option to configure. Multiple directories are accepted, with the usual colon as separator. Default value is ${prefix}/share/qemu-firmware. The path is searched in addition to the current search path (typically ${prefix}/share/qemu). This prepares qemu for the planned split of the prebuilt firmware blobs into a separate project. Distributions can also use this to get rid of the firmware symlink farm and add -- for example -- /usr/share/seabios to the firmware path instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170914114236.25343-3-kraxel@redhat.com
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 19633423aa..3fed457921 100644
--- a/vl.c
+++ b/vl.c
@@ -3125,6 +3125,7 @@ int main(int argc, char **argv, char **envp)
Error *main_loop_err = NULL;
Error *err = NULL;
bool list_data_dirs = false;
+ char **dirs;
typedef struct BlockdevOptions_queue {
BlockdevOptions *bdo;
Location loc;
@@ -4309,11 +4310,16 @@ int main(int argc, char **argv, char **envp)
qemu_set_log(0);
}
- /* If no data_dir is specified then try to find it relative to the
- executable path. */
+ /* add configured firmware directories */
+ dirs = g_strsplit(CONFIG_QEMU_FIRMWAREPATH, G_SEARCHPATH_SEPARATOR_S, 0);
+ for (i = 0; dirs[i] != NULL; i++) {
+ qemu_add_data_dir(dirs[i]);
+ }
+
+ /* try to find datadir relative to the executable path */
qemu_add_data_dir(os_find_datadir());
- /* If all else fails use the install path specified when building. */
+ /* add the datadir specified when building */
qemu_add_data_dir(CONFIG_QEMU_DATADIR);
/* -L help lists the data directories and exits. */