XEN 4.2.4 前后端驱动开发

本文介绍了如何在XEN 4.2.4环境中进行前后端驱动的开发,包括在dom0和domU中加载驱动,并通过dom0中的脚本来触发驱动的probe和changed函数执行。
摘要由CSDN通过智能技术生成

1.分别 编写后前端驱动,分别在dom0和domU中加载,可以采用 insmod 方式


2.通过在dom0中运行如下脚本,来触发后前端驱动的probe,以及changed函数例程

#!/bin/bash 

if [ $# != 2 ] 
then 
        echo "Usage: $0 <device name> <frontend-id>" 
else 
        # Write backend information into the location the frontend will look 
        # for it. 
        xenstore-write /local/domain/${2}/device/${1}/0/backend-id 0 
        xenstore-write /local/domain/${2}/device/${1}/0/backend \ 
                       /local/domain/0/backend/${1}/${2}/0 

        # Write frontend information into the location the backend will look 
        # for it. 
        xenstore-write /local/domain/0/backend/${1}/${2}/0/frontend-id ${2} 
        xenstore-write /local/domain/0/backend/${1}/${2}/0/frontend \ 
                       /local/domain/${2}/device/${1}/0 

        # Set the permissions on the backend so that the frontend can 
        # actually read i
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值