ARM Fast Models support code for LAVA
Project description
Fast Model support for LAVA
===========================
This package contains low level code for managing fast models in LAVA.
Currently it is designed to manage NFS mounts, setting up the root filesystem
(exporting the provided tarball to the mount point and blessing it with
fast-model specific changes, if required). It also contains code for starting
the fast model runtime, monitoring execution and eventual shutdown (or forced
shutdown, if required).
Support for lava-serial plugin is being considered (to be able to get a
LAVA-Serial access to a running fast model emulation)
Requirements
============
* Working installation of FastModelsPortfolio 7.0 from ARM
* Root access on local machine (to manipulate NFS shares, gained
automatically via sudo)
* Bleeding edge version of json-document and more mature versions
of lava-tool and their dependencies (in the upcoming release also
a bleeding edge version of lava-serial)
Example
=======
(I made this up as that part does not work yet).
To start a fast model on your machine run the following command:
$ lava fast-model start --kernel=uImage --initrd=initrd --rootfs=roottfs.tar.gz
Unpacking rootfs... done
Setting up NFS share... done
Starting fast model... done
You can connect to the serial console with
$ lava serial console --network localhost:5001
Pressing CTRL-C will terminate this simulation
^C
Shutting down... done
Removing NFS share... done
Removing root filesystem... done
$
API
===
To use fast models in your code you can try the following example.
(I just made it up, it does not work yet)
import time
from lava.fastmodels.simulators import LinuxSimulator
from lava.fastmodels.models import ModelLibrary
class Handler(object):
def on_line(self, line):
print repr(line)
# Get a library, any path works (as long as you have models there)
library = ModelLibrary('/srv/lava/instances/dev/var/lib/lava/fastmodels/models')
# Get a model from the library
model = library['A15x1']
simulator = LinuxSimulator(model, rootfs="rootfs.tar.gz", uImage="uImage")
with simulator.start():
serial = simulator.serial_console
serial.attach_handler(Handler())
time.sleep(60)
===========================
This package contains low level code for managing fast models in LAVA.
Currently it is designed to manage NFS mounts, setting up the root filesystem
(exporting the provided tarball to the mount point and blessing it with
fast-model specific changes, if required). It also contains code for starting
the fast model runtime, monitoring execution and eventual shutdown (or forced
shutdown, if required).
Support for lava-serial plugin is being considered (to be able to get a
LAVA-Serial access to a running fast model emulation)
Requirements
============
* Working installation of FastModelsPortfolio 7.0 from ARM
* Root access on local machine (to manipulate NFS shares, gained
automatically via sudo)
* Bleeding edge version of json-document and more mature versions
of lava-tool and their dependencies (in the upcoming release also
a bleeding edge version of lava-serial)
Example
=======
(I made this up as that part does not work yet).
To start a fast model on your machine run the following command:
$ lava fast-model start --kernel=uImage --initrd=initrd --rootfs=roottfs.tar.gz
Unpacking rootfs... done
Setting up NFS share... done
Starting fast model... done
You can connect to the serial console with
$ lava serial console --network localhost:5001
Pressing CTRL-C will terminate this simulation
^C
Shutting down... done
Removing NFS share... done
Removing root filesystem... done
$
API
===
To use fast models in your code you can try the following example.
(I just made it up, it does not work yet)
import time
from lava.fastmodels.simulators import LinuxSimulator
from lava.fastmodels.models import ModelLibrary
class Handler(object):
def on_line(self, line):
print repr(line)
# Get a library, any path works (as long as you have models there)
library = ModelLibrary('/srv/lava/instances/dev/var/lib/lava/fastmodels/models')
# Get a model from the library
model = library['A15x1']
simulator = LinuxSimulator(model, rootfs="rootfs.tar.gz", uImage="uImage")
with simulator.start():
serial = simulator.serial_console
serial.attach_handler(Handler())
time.sleep(60)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lava-fastmodels-0.1.dev12.tar.gz
(13.8 kB
view details)
File details
Details for the file lava-fastmodels-0.1.dev12.tar.gz
.
File metadata
- Download URL: lava-fastmodels-0.1.dev12.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a07ac9b3810d051f70d29adacab27da705a2dc687cc063093586732c33b145a |
|
MD5 | ae019a301ce14f6e2d665e973d509610 |
|
BLAKE2b-256 | 831f9353b651a30df6d16843a4a7ef017a207a9e863564c59544daa5a471de88 |