From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hajime Tazaki Subject: [RFC v3 22/26] um lkl: add documentation Date: Wed, 5 Feb 2020 16:30:31 +0900 Message-ID: <0ea656300b51827b11416b4c2fd7f6ba320c8e37.1580882335.git.thehajime@gmail.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Received: from mail-pf1-f195.google.com ([209.85.210.195]:39457 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727924AbgBEHbh (ORCPT ); Wed, 5 Feb 2020 02:31:37 -0500 Received: by mail-pf1-f195.google.com with SMTP id 84so741818pfy.6 for ; Tue, 04 Feb 2020 23:31:36 -0800 (PST) In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-um@lists.infradead.org Cc: Octavian Purdila , Akira Moroo , linux-kernel-library@freelists.org, linux-arch@vger.kernel.org, Chenyang Zhong , Conrad Meyer , Gustavo Bittencourt , Motomu Utsumi , Patrick Collins , Thomas Liebetraut , Yuan Liu From: Octavian Purdila A document describing brief introduction of LKL, why it is needed, and how it is used is added. The document is located under uml/ directory. Cc: Chenyang Zhong Cc: Conrad Meyer Cc: Gustavo Bittencourt Cc: H.K. Jerry Chu Cc: Motomu Utsumi Cc: Patrick Collins Cc: Thomas Liebetraut Cc: Yuan Liu Signed-off-by: Octavian Purdila --- Documentation/virt/uml/lkl.txt | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/virt/uml/lkl.txt diff --git a/Documentation/virt/uml/lkl.txt b/Documentation/virt/uml/lkl.txt new file mode 100644 index 000000000000..f6d581092331 --- /dev/null +++ b/Documentation/virt/uml/lkl.txt @@ -0,0 +1,64 @@ + +Introduction +============ + +LKL (Linux Kernel Library) is aiming to allow reusing the Linux kernel code as +extensively as possible with minimal effort and reduced maintenance overhead. + +Examples of how LKL can be used are: creating userspace applications (running on +Linux and other operating systems) that can read or write Linux filesystems or +can use the Linux networking stack, creating kernel drivers for other operating +systems that can read Linux filesystems, bootloaders support for reading/writing +Linux filesystems, etc. + +With LKL, the kernel code is compiled into an object file that can be directly +linked by applications. The API offered by LKL is based on the Linux system call +interface. + +LKL is implemented as one of the mode of UML (arch/um). It uses host operations +defined by the application or a host library (tools/lkl/lib). + + +Supported hosts +=============== + +The supported host for now is Linux (x86 architecture) userspace applications. + + +Building LKL the host library and LKL applications +================================================== + + $ make -C tools/lkl + +will build LKL as a object file, it will install it in tools/lkl/lib together +with the headers files in tools/lkl/include then will build the host library, +tests and a few of application examples: + +* tests/boot - a simple applications that uses LKL and exercises the basic LKL + APIs + +* tests/net-test - a simple applications that uses network feature of LKL and + exercises the basic network-related APIs + +* fs2tar - a tool that converts a filesystem image to a tar archive + +* cptofs/cpfromfs - a tool that copies files to/from a filesystem image + +* lklfuse - a tool that can mount a filesystem image in userspace, + without root privileges, using FUSE + + +Building LKL on Ubuntu +----------------------- + + $ sudo apt-get install libfuse-dev libarchive-dev xfsprogs + + # Optional, if you would like to be able to run tests + $ sudo apt-get install btrfs-tools + $ pip install yamlish junit_xml + + $ make -C tools/lkl + + # To check that everything works: + $ cd tools/lkl + $ make run-tests -- 2.21.0 (Apple Git-122.2) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1izF9s-0008Lm-H6 for linux-um@lists.infradead.org; Wed, 05 Feb 2020 07:31:37 +0000 Received: by mail-pf1-x442.google.com with SMTP id 185so749987pfv.3 for ; Tue, 04 Feb 2020 23:31:36 -0800 (PST) From: Hajime Tazaki Subject: [RFC v3 22/26] um lkl: add documentation Date: Wed, 5 Feb 2020 16:30:31 +0900 Message-Id: <0ea656300b51827b11416b4c2fd7f6ba320c8e37.1580882335.git.thehajime@gmail.com> In-Reply-To: References: MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: linux-um@lists.infradead.org Cc: linux-arch@vger.kernel.org, Conrad Meyer , Octavian Purdila , Motomu Utsumi , Akira Moroo , Thomas Liebetraut , Patrick Collins , linux-kernel-library@freelists.org, Chenyang Zhong , Yuan Liu , Gustavo Bittencourt From: Octavian Purdila A document describing brief introduction of LKL, why it is needed, and how it is used is added. The document is located under uml/ directory. Cc: Chenyang Zhong Cc: Conrad Meyer Cc: Gustavo Bittencourt Cc: H.K. Jerry Chu Cc: Motomu Utsumi Cc: Patrick Collins Cc: Thomas Liebetraut Cc: Yuan Liu Signed-off-by: Octavian Purdila --- Documentation/virt/uml/lkl.txt | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/virt/uml/lkl.txt diff --git a/Documentation/virt/uml/lkl.txt b/Documentation/virt/uml/lkl.txt new file mode 100644 index 000000000000..f6d581092331 --- /dev/null +++ b/Documentation/virt/uml/lkl.txt @@ -0,0 +1,64 @@ + +Introduction +============ + +LKL (Linux Kernel Library) is aiming to allow reusing the Linux kernel code as +extensively as possible with minimal effort and reduced maintenance overhead. + +Examples of how LKL can be used are: creating userspace applications (running on +Linux and other operating systems) that can read or write Linux filesystems or +can use the Linux networking stack, creating kernel drivers for other operating +systems that can read Linux filesystems, bootloaders support for reading/writing +Linux filesystems, etc. + +With LKL, the kernel code is compiled into an object file that can be directly +linked by applications. The API offered by LKL is based on the Linux system call +interface. + +LKL is implemented as one of the mode of UML (arch/um). It uses host operations +defined by the application or a host library (tools/lkl/lib). + + +Supported hosts +=============== + +The supported host for now is Linux (x86 architecture) userspace applications. + + +Building LKL the host library and LKL applications +================================================== + + $ make -C tools/lkl + +will build LKL as a object file, it will install it in tools/lkl/lib together +with the headers files in tools/lkl/include then will build the host library, +tests and a few of application examples: + +* tests/boot - a simple applications that uses LKL and exercises the basic LKL + APIs + +* tests/net-test - a simple applications that uses network feature of LKL and + exercises the basic network-related APIs + +* fs2tar - a tool that converts a filesystem image to a tar archive + +* cptofs/cpfromfs - a tool that copies files to/from a filesystem image + +* lklfuse - a tool that can mount a filesystem image in userspace, + without root privileges, using FUSE + + +Building LKL on Ubuntu +----------------------- + + $ sudo apt-get install libfuse-dev libarchive-dev xfsprogs + + # Optional, if you would like to be able to run tests + $ sudo apt-get install btrfs-tools + $ pip install yamlish junit_xml + + $ make -C tools/lkl + + # To check that everything works: + $ cd tools/lkl + $ make run-tests -- 2.21.0 (Apple Git-122.2) _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um