From 819bbaa22430988a88999e283ceb02368ad0f7b3 Mon Sep 17 00:00:00 2001 From: James O'Shannessy Date: Mon, 8 Oct 2018 12:22:32 +1100 Subject: Committing usage document Updated usage document with loading/unloading, configuration information Signed-off-by: James O'Shannessy --- docs/3. Usage.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'docs') diff --git a/docs/3. Usage.md b/docs/3. Usage.md index e69de29..b5ec136 100644 --- a/docs/3. Usage.md +++ b/docs/3. Usage.md @@ -0,0 +1,70 @@ +Using AVIRT +=================================== + +## Introduction + +## Table of Contents +1. [Load/Unload AVIRT](#un-load-avirt) +2. [Configuring AVIRT](#configuring-avirt) + + + +## Loading and Unloading AVIRT + +To run, we must load the kernel modules using the `loadDrivers.sh` script, which contains sample module parameters to AVIRT: +```sh +$ ./loadDrivers.sh +``` +To unload the drivers use: +```sh +$ ./unload.sh +``` + + + +## Configuring AVIRT + +AVIRT is configured using configfs. +### Note: +A sample script for the following is supplied inside the ```scripts``` folder. + +First, verify the kernel supports the use of configfs. +```sh +fgrep configfs /proc/filesystems +``` + +the expected output is: +``` +nodev configfs +``` + +Once confirmed, we can mount the configfs at the conventional point: +```sh +#Check configfs is mounted on the system +mkdir -p /config +mount -t configfs none /config +``` + +Finally, we can configure AVIRT: + +```sh +# Set up each of the cards channels +mkdir /config/avirt/streams/playback_media +echo "2">/config/avirt/streams/playback_media/channels + +mkdir /config/avirt/streams/playback_navigation +echo "1">/config/avirt/streams/playback_navigation/channels + +mkdir /config/avirt/streams/playback_emergency +echo "1">/config/avirt/streams/playback_emergency/channels + +mkdir /config/avirt/streams/capture_voice +echo "1">/config/avirt/streams/capture_voice/channels + +# Finally, seal the card, and initiate configuration +echo "1">/config/avirt/streams/sealed +``` + +### Note: +A simplified helper library, libavirt, is available [here](https://github.com/fiberdyne/libavirt). +Please refer to the readme in libavirt for further details. -- cgit 1.2.3-korg