diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb | 7 | ||||
-rwxr-xr-x | meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper | 25 |
2 files changed, 31 insertions, 1 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb index 372eebd886..2fc07669dd 100644 --- a/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb +++ b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb | |||
@@ -5,7 +5,10 @@ PR = "r1" | |||
5 | 5 | ||
6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999" | 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999" |
7 | 7 | ||
8 | SRC_URI = "file://tunctl.c" | 8 | SRC_URI = "\ |
9 | file://tunctl.c \ | ||
10 | file://qemu-oe-bridge-helper \ | ||
11 | " | ||
9 | 12 | ||
10 | S = "${WORKDIR}" | 13 | S = "${WORKDIR}" |
11 | 14 | ||
@@ -18,6 +21,8 @@ do_compile() { | |||
18 | do_install() { | 21 | do_install() { |
19 | install -d ${D}${bindir} | 22 | install -d ${D}${bindir} |
20 | install tunctl ${D}${bindir}/ | 23 | install tunctl ${D}${bindir}/ |
24 | |||
25 | install -m 755 ${WORKDIR}/qemu-oe-bridge-helper ${D}${bindir}/ | ||
21 | } | 26 | } |
22 | 27 | ||
23 | DEPENDS += "qemu-system-native" | 28 | DEPENDS += "qemu-system-native" |
diff --git a/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper b/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper new file mode 100755 index 0000000000..f057d4eef0 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-helper/qemu-oe-bridge-helper | |||
@@ -0,0 +1,25 @@ | |||
1 | #! /bin/sh | ||
2 | # Copyright 2020 Garmin Ltd. or its subsidiaries | ||
3 | # | ||
4 | # SPDX-License-Identifier: GPL-2.0 | ||
5 | # | ||
6 | # Attempts to find and exec the host qemu-bridge-helper program | ||
7 | |||
8 | # If the QEMU_BRIDGE_HELPER variable is set by the user, exec it. | ||
9 | if [ -n "$QEMU_BRIDGE_HELPER" ]; then | ||
10 | exec "$QEMU_BRIDGE_HELPER" "$@" | ||
11 | fi | ||
12 | |||
13 | # Search common paths for the helper program | ||
14 | BN="qemu-bridge-helper" | ||
15 | PATHS="/usr/libexec/ /usr/lib/qemu/" | ||
16 | |||
17 | for p in $PATHS; do | ||
18 | if [ -e "$p/$BN" ]; then | ||
19 | exec "$p/$BN" "$@" | ||
20 | fi | ||
21 | done | ||
22 | |||
23 | echo "$BN not found!" > /dev/stderr | ||
24 | exit 1 | ||
25 | |||