【AGL】Automotive Grade Linux 如何远程 AGL 系统并使用afm-util命令安装.wgt

前言: 在学习AGL官网文档并实操的过程中,当做完Creating a New ServiceCreating a New Application后,官网提示将编译成功的hellocount.wgt文件拷贝到AGL System中安装:
AGL官网文档入口: https://docs.automotivelinux.org/en/lamprey/#3_Developer_Guides/2_Creating_a_New_Service/

在这里插入图片描述

1.远程 AGL 系统

(两种方式1.正常有界面的方式 2.无界面方式)

1.1 有界面方式:

1.1.1 AGL工程中打开终端执行:

$ runqemu qemux86-64

1.1.2 待qemu将工程打开成功后,新打开一个终端:

$ ssh root@<ip>

sample: $ ssh root@192.168.7.4

注:IP地址为执行runqemu qemux86-64时终端提示的AGL system的IP

例如:根据终端结果,我的IP为192.168.7.4

在这里插入图片描述

1.2无界面方式:

1.2.1 AGL工程中打开终端执行:

qemux86-64$ runqemu qemux86-64 nographic

1.2.2 待qemu将工程打开成功后,新打开一个终端(同上1.1.1):

$ ssh root@<ip>

以上两种方式在执行ssh root@<ip>后就会进入到AGL System中了。

在这里插入图片描述

2.拷贝.wgt并安装

2.1 拷贝annex.wgt到AGL System

$ scp ./annex.wgt root@192.168.7.4:/home/0

2.2 使用afm-util命令安装.wgt:

--------------------------------------------------------------
afm-util命令介绍(afm-util --help):
afm-util runnables: 列出可以运行的widget
afm-util install wgt :安装widget文件
afm-util uninstall id:卸载指定id的widget
afm-util detail id :打印指定id的widget信息
afm-util runners :列出运行实例
afm-util start id :启动指定id的widget
afm-util once id :run once指定id的widget
afm-util terminate rid :终止指定rid的应用程序
afm-util state rid :获取指定rid的运行实例的状态
----------------------------------------------------------------
2.2.1安装annex.wgt

qemux86-64:~# afm-util install annex.wgt

在这里插入图片描述
2.3 列出可运行的实例:

qemux86-64:~# afm-util list

在这里插入图片描述
Annex已经安装成功!

接下来可以运行一个实例并查看运行状态:

在这里插入图片描述

到此,Install the service/application 就完成了!

●afm-util运行时,通过afm-binding.c实现 afm-system-daemon 的绑定,完成安装、卸载、运行、列出应用程序的服务。
●afm-system-daemon和afm-user-daemon介绍等参照AGL官网。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值