summaryrefslogtreecommitdiffstats
path: root/docs/quick-tutorial.md
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-11-08 13:31:50 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2016-11-08 13:58:37 +0100
commit011a41f695cbc7aa5deca2dcee77ccf9d21f5823 (patch)
tree69567629733384081bc02ab3eca1cd3a33f14ded /docs/quick-tutorial.md
parentd7890b93b8a0a9d0cd96b07f4b4e1326a52bc012 (diff)
renaming of verbs
The verbs 'stop' and 'continue' are now renamed as respectively 'pause' and 'resume'. Change-Id: I2f82105103884fc07f3c67e08c696e435aed28e1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'docs/quick-tutorial.md')
-rw-r--r--docs/quick-tutorial.md24
1 files changed, 12 insertions, 12 deletions
diff --git a/docs/quick-tutorial.md b/docs/quick-tutorial.md
index cd23c22..081dfe5 100644
--- a/docs/quick-tutorial.md
+++ b/docs/quick-tutorial.md
@@ -47,7 +47,7 @@ We can see that there are two daemons running:
* **afm-system-daemon** runs with a system user 'afm' and is responsible for installing/uninstalling packages
* **afm-user-daemon** runs as a user daemon (currently as root because it's the only real user on the target board) and is responsible for the whole lifecycle of the applications running inside the user session.
-The application framework has a tool running on the Command Line Interface (CLI). Using the **afm-util** command, you can install, uninstall, list, run, stop ... applications.
+The application framework has a tool running on the Command Line Interface (CLI). Using the **afm-util** command, you can install, uninstall, list, run, pause ... applications.
To begin, run '**afm-util help**' to get a quick help on commands:
@@ -75,16 +75,16 @@ To begin, run '**afm-util help**' to get a quick help on commands:
start id start an instance of the widget of id
kill rid
- terminate rid terminate the running instance rid
+ terminate rid terminate the running instance rid
stop rid
- pause rid stop the running instance rid
+ pause rid pause the running instance rid
resume rid
- continue rid continue the previously rid
+ continue rid resume the previously rid
status rid
- state rid get status of the running instance rid
+ state rid get status of the running instance rid
### Install an application
@@ -144,15 +144,15 @@ To check for running applications, just run:
root@porter:~# afm-util ps
[ { "runid": 1, "state": "running", "id": "webapps-annex@0.0" } ]
-The 'runid' is the application instance ID and is used as an argument for the subcommands controlling the application runtime state (kill/stop/resume/status)
+The 'runid' is the application instance ID and is used as an argument for the subcommands controlling the application runtime state (kill/pause/resume/status)
-### Stop application
-To stop the application that was just started (the one with RUNID 1), just run the stop command:
+### Pause application
+To pause the application that was just started (the one with RUNID 1), just run the pause command:
root@porter:~# afm-util terminate 1
true
-The application is now stopped, as confirmed by a list of running apps:
+The application is now paused, as confirmed by a list of running apps:
root@porter:~# afm-util ps
[ ]
@@ -172,7 +172,7 @@ Then list the installed apps to confirm the removal:
afm-client: a sample HTML5 'Homescreen'
---------------------------------------
-**afm-client** is a HTML5 UI that allows to install/uninstall applications as well as starting/stopping them as already demonstrated with afm-util.
+**afm-client** is a HTML5 UI that allows to install/uninstall applications as well as starting/pausing them as already demonstrated with afm-util.
The HTML5 UI is accessible remotely through this URL:
http://[board_ip]:1234/opa?token=132456789
@@ -193,9 +193,9 @@ In the toolbar, click on the button representing the Rabbit application. You'll
Click on the 'start' item: the application starts and should be visible as a webview on the target board display. Note that at this point, we could also run the application remotely, that is in the same browser as the Homescreen app. By default, the application framework is configured to run applications 'locally' on the board display.
-### Stopping an application
+### Pausing an application
-In the Homescreen application, click again on the Rabbit application button, then select 'stop': the application then stops.
+In the Homescreen application, click again on the Rabbit application button, then select 'pause': the application then pauses.
### Uninstalling an application
f0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
meta-netboot
============

This layer contains some recipes and configuration adjustments to allow network boot through NBD (network block device).

Content and usage
-----------------

This layer creates a new supplementary initrd image which can be downloaded through TFTP with the kernel.
At boot time, the init script will try to mount the rootfs based on the following kernel command line parameters:
* nbd.server: IP address to reach the NBD server
* nbd.port: TCP port on which server is listening (default: 10809)
* nbd.dev: nbd device to use (default: /dev/nbd0)
* nbd.debug: activate debug mode (init script is then interruptible)

The layer meta-netboot contains recipes for the following components:
* busybox: activate the built-in NBD client
* initramfs-netboot: contains the init script started by the kernel: basically, this script mounts the real root filesystem, then pivot_root on it and finally exec systemd.
* initramfs-netboot-image: image to specify for building the initrd

To enable the build of the netboot initrd and ext4 rootfs, add the following line in conf/local.conf:

INHERIT += "netboot"


Server side
-----------

On the server side (assuming that the build dir is stored in $BUILD) we can run:

* a TFTP server, for example tftpd-hpa started with $BUILD/tmp/deploy/images as the TFTP dir:

  /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure $BUILD/tmp/deploy/images

* a NBD server, for example xnbd-server, used to expose the whole ext4 rootfs as a network block device:

  xnbd-server --target --lport 10809 $BUILD/tmp/deploy/images/$MACHINE/agl-demo-platform-$MACHINE.ext4


Target side
-----------

On the target board, a specific setup should also be done. For example, for Renesas Porter board, the following U-boot environment could be used (adjust IP addresses !):

------------------------------------------------------------------
setenv 'bootkfile' 'uImage+dtb'
setenv 'bootkaddr' '0x40007fc0'
setenv 'bootifile' 'initramfs-netboot-image-porter.ext4.gz.u-boot'
setenv 'bootiaddr' '0x50000000'
setenv 'ipaddr' '<board_IP>'
setenv 'serverip' '<server_IP>'

setenv 'bootargs_console' 'console=ttySC6,38400 ignore_loglevel'
setenv 'bootargs_video' 'vmalloc=384M video=HDMI-A-1:1280x960-32@60'
setenv 'bootargs_extra' 'rw rootfstype=ext4 rootwait rootdelay=2'
setenv 'bootargs_root' 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp'
setenv 'bootkload_net' 'tftp ${bootkaddr} porter/${bootkfile}'
setenv 'bootiload_net' 'tftp ${bootiaddr} porter/${bootifile}'
setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run bootkload_net; run bootiload_net; bootm ${bootkaddr} ${bootiaddr}'

saveenv # optional: saves env in flash
run bootcmd # boots the board, executed automatically after power up
------------------------------------------------------------------

About Renesas Gen3 board, u-boot is updated and environment is more like :

------------------------------------------------------------------
setenv bootargs_console 'console=ttySC0,115200 ignore_loglevel'
setenv bootargs_extra 'rw rootfstype=ext4 rootwait rootdelay=2'
setenv bootargs_root 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp'
setenv bootargs_video 'vmalloc=384M video=HDMI-A-1:1920x1080-32@60'
setenv serverip '<your_serverip>'
setenv 'bootdaddr' '0x48000000'
setenv 'bootdfile' 'Image-r8a7795-h3ulcb.dtb'
setenv 'bootdload_net' 'tftp ${bootdaddr} h3ulcb/${bootdfile}'
setenv 'bootkaddr' '0x48080000'
setenv 'bootkfile' 'Image'
setenv 'bootkload_net' 'tftp ${bootkaddr} h3ulcb/${bootkfile}'
setenv 'bootiaddr' '0x5C3F9520'
setenv 'bootifile' 'initramfs-netboot-image-h3ulcb.ext4.gz'
setenv 'bootiload_net' 'tftp ${bootraddr} h3ulcb/${bootrfile}'
setenv 'load_net' 'run bootkload_net; run bootdload_net; run bootiload_net; setenv initrd_size ${filesize}'

setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run load_net; booti ${bootkaddr} ${bootiaddr}:${initrd_size} ${bootdaddr}'
------------------------------------------------------------------