[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/PYTHON3 PATCH v3 14/14] README.md: Update with info about building and running


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Mon, 23 Sep 2019 12:58:52 +0300
  • Cc: felipe.huici@xxxxxxxxx, vlad_andrei.badoiu@xxxxxxxxxxxxxxx
  • Delivery-date: Mon, 23 Sep 2019 09:59:40 +0000
  • Ironport-phdr: 9a23:SRpPeRG3nrvbjQ/AOP0dxp1GYnF86YWxBRYc798ds5kLTJ7ypM+wAkXT6L1XgUPTWs2DsrQY0rGQ6fCrAzRIoc7Y9ixbKtoUD15NoP5VtjRoONSCB0z/IayiRA0BN+MGamVY+WqmO1NeAsf0ag6aiHSz6TkPBke3blItdaz6FYHIksu4yf259YHNbAVUnjq9Zq55IAmroQnLucQanIVvJrwvxhbKrXdEZfhazn5sKV6Pghrw/Mi98IN9/yhKp/4t68tMWrjmcqolSrBVEC4oOH0v6s3xshnDQwqP5n8CXWgTjxFFHQvL4gzkU5noqif1ufZz1yecPc3tULA7Qi+i4LtxSB/pkygIKTg0+3zKh8NqjaJbpBWhpwFjw4PRfYqYOuZycr/bcNgHQ2dKQ8RfWDFbAo6kb4UBEfcPM+hboYf6pVQOowCzCRWwCO711jNFnGP60bE83u88EQ/GxgsgH9cWvXnKq9X1L7sSUeGzzKLVyzvDcutW2Srg44XPbh8hpuqMXa5xccrX00UvEx7Fjk2NqYH+IzyVzf4Bs3CG7+V7T+6vkWknphh3rzOyxckskpHEip8ax1zZ7yl0w4Y4KcemREJlY9OoCpVduzmHO4Z5X88uWWJltSYgxrEYt5O2cjIGxIkoyhLBbfGMbpKG7Qj5VOmLJDd1nHdleLWiiBms6UWg0ej8VtWs0FZNsypFjsHAtnAT2BzX7ciKUuV9/kK71jaO0wDf8P1LIVsumarDNp4u2aQ8loAUsUjbHy/2nlv5jLOOe0k59eWk9v7rb7bmq5OGKYN4lAPzPr4gl8CnBOQ3KAkOX2yV+eSm073j+FX0T6lNjv0tjqnZsZbaKd4fpq6kGw9Vz50u5AqkDzu8yNQYgGIIIEhfeBKAl4TpIU3BIOjkDfejhFShiDJrx/HAPr3gBZXNNWHPn6r/crZj9UFczBE+zdRe55JPFrEBO+j/W0Dvu9zeFBM5NBa0w+n/AtVnyoweQX6PArOeMK7Kv1+H+OYvI+iUZIALojr9K+Ul5//ygn84glIde7em0ocTaH+iBftqOVuWYWf0iNcbDWgKphY+TPDtiFCaTz5TY2y9UL8k6T4hDoKpEJ3DSZ6sgLCbxyi0BIBZZmdHClCRCnrobJmEW+oRZy6IOMBujicEWaK8S485zh6irhX6y700ZtbTrygZs5Pkz5156vPekTk29CdoFIKN3mfLSHt7zU0SQDpj96dkvU17gnOeybUw1/dfDsBS4bVNTx8nHZXHifRnAZboXVSSLZ+yVF+6T4D+UnkKRdUrzopWbg==
  • Ironport-sdr: McSkXH398KbFdLoGY7GERmn6eQ2yUG8tci/oV1KtQ+CNYdeMLFQD7NNSfKSIsWC8tnYEmsnqQJ TEmnszg0HDiQ==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

From: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 README.md | 42 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 39 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index c9544d1..d2b4868 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,43 @@
-python3 for Unikraft
-=============================
-
+# python3 for Unikraft
 This is the port of python3 for Unikraft as external library.
 
+## Build
+Python 3 interpreter depends on the following libraries, that need to be added 
to `Makefile` in this order:
+* `pthreads`, e.g. `pthread-embedded`
+* `libc`, e.g. `newlib`
+* network stack, e.g. `lwip`
+* a SIMD library, e.g. `intel-intrinsics`
+* optional extensions: `openssl`, `zlib`, `libuuid`, etc
+
+## Root filesystem
+### Creating the filesystem
+Python 3 interpreter needs a filesystem which should contain its standard 
library. Therefore, the filesystem needs to be created before running the VM. 
You can do this by running the following command:
+
+```bash
+make python-rootfs path=<some directory>
+```
+
+It will create the filesystem in the directory you choose, by first creating a 
virtual Python environment. After that it will install the Python standard 
library into it. For this second step, the original code needs to be configured 
and build with paths relative to the provided root directory. These two steps 
are executed transparently, all you have to do is just running the above `make` 
command.
+
+### Using the filesystem
+Mounting the filesystem is a transparent operation. All you have to do is to 
provide the right Qemu parameters in order for Unikraft to mount the 
filesystem. We will use the 9pfs support for filesystems and for this you will 
need to use the following parameters:
+
+```bash
+-fsdev local,id=myid,path=<some directory>,security_model=none \
+-device 
virtio-9p-pci,fsdev=myid,mount_tag=test,disable-modern=on,disable-legacy=off
+```
+
+## Running modes
+Next step is to pick a running mode. We currently support 3 running modes:
+
+1. **Python shell**. No extra parameters are needed
+2. **Python script**. You can use any file available in the root filesystem. 
You should use Qemu's `-append` option to pass parameter to Python interpreter, 
e.g. `-append "-f <some file in rootfs>"`
+3. **Python unit testing**. With this mode you can check what functionality is 
completely supported by the Python 3 port. The unit testing mode itself does 
support several modes:
+    * **Running all the tests**. You have to use the following Qemu 
parameters: `-append "-B -c 'from test import autotest'"`
+    * Check the supported options of the test script, e.g. `-append "-B -c 
'from test import autotest' -h`.
+       * For example, you can run only one unit test with verbosity using 
`-append "-B -c 'from test import autotest' -v test_dict"`.
+       * Or you can run only the tests listed in a file using `-append "-B -c 
'from test import autotest' -f <file in rootfs>"`.
+
+## Further information
 Please refer to the `README.md` as well as the documentation in the `doc/`
 subdirectory of the main unikraft repository.
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.