forked from libguestfs/libguestfs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add LKL (Linux Kernel as a Library) backend.
Check out the LKL sources (https://github.com/lkl/linux) and compile them by following the instructions in Documentation/lkl.txt. Then add the following to the libguestfs configure command: ./configure --with-lkl=/path/to/linux To use it, eg. from guestfish: export LIBGUESTFS_BACKEND=lkl export LIBGUESTFS_HV=$(pwd)/daemon/guestfsd-lkl ./run guestfish To do: - Documentation. - Pass per-disk flags from library to daemon (on the command line). Currently all disks are opened for write, even if you specify the readonly flag. - Pass g->memsize from library to daemon. - Pass g->append from library to daemon. - Disable unsafe APIs. Many APIs could never be supported by LKL, and are completely unsafe to use. eg. guestfs_sh. These must be disabled when HAVE_LKL=1 so the user cannot accidentally damage their host.
- Loading branch information
Showing
11 changed files
with
629 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# libguestfs | ||
# Copyright (C) 2009-2015 Red Hat Inc. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
|
||
dnl LKL (Linux Kernel compiled as a Library). | ||
dnl | ||
dnl You have to use --with-lkl=/path/to/linux | ||
dnl | ||
dnl where '/path/to/linux' is the absolute path to the Linux sources | ||
dnl (https://github.com/lkl/linux), compiled. See Documentation/lkl.txt | ||
dnl for how to build LKL. | ||
|
||
AC_MSG_CHECKING([for LKL (Linux Kernel Library)]) | ||
AC_ARG_WITH([lkl], | ||
[AS_HELP_STRING([--with-lkl=/path/to/linux], | ||
[build the LKL (Linux Kernel Library) backend])], | ||
[ | ||
LKL_PATH="$withval" | ||
# Does it contain the compiled static library? | ||
if ! test -f "$LKL_PATH/tools/lkl/lib/liblkl.a"; then | ||
AC_MSG_FAILURE([--with-lkl parameter does not point to compiled LKL]) | ||
fi | ||
# Does it contain the header file? | ||
if ! test -f "$LKL_PATH/tools/lkl/include/lkl.h"; then | ||
AC_MSG_FAILURE([--with-lkl parameter does not point to LKL header file]) | ||
fi | ||
], | ||
[LKL_PATH=no]) | ||
AC_MSG_RESULT([$LKL_PATH]) | ||
|
||
AC_SUBST([LKL_PATH]) | ||
|
||
AM_CONDITIONAL([HAVE_LKL], [test "x$LKL_PATH" != "xno"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.