libaio under MIPS architecture /在mips架构下使用的libaio
来源:互联网 发布:黑米软件官方吧 编辑:程序博客网 时间:2024/05/22 14:38
First, you can find libaio source in http://libaio.sourcearchive.com/
Second,download the libaio_0.3.109.orig.tar.gz version source,unzip it
Than you can find the real source in src directory.
But there is lack of mips architecture support.
So I just write some ugly patch about it.
The key is a .h file.You can name it syscall-mips.h
here is the code :
/****************END*************************/
That is All.They are the most important part. The rest is just relsove compile problem.
Like somewhere is missing the mips definition, somewhere is missing the .h name.
Remeber change the CC in Makefile, use mips-gcc.
Finally,just run make command,you will get a static lib which is named "libaio.a"
I use it to work with fio tools,it's work for me.Hope it's useful to you.
今天想用一下fio在mips架构下,修改fio代码,将mips相关的地方补全,主要是缺少mips定义,还有一些头文件方面的问题。
最后发现链接的时候提示找不到libaio库。搜索了一下,在http://libaio.sourcearchive.com/下载了libaio的代码。
然后解压准备编译一个mips版本,结果悲剧的发现libaio不支持mips架构,简单的分析了一下源码,发现原来就差一个头文件,用来
定义在mips架构下,用户态如何进入内核的翻译,这个是和架构强相关的。
简单开始google和stackoverflow了一把,没有什么有用的发现。分析了一下x86和x86_64架构的头文件,发现还算简单。
于是准备自己写一下,google一下mips的ABI接口,然后又搜索了一下系统调用的实现,然后就完成了上面的头文件的主要内容。
主要就是利用系统调用的接口,是linux内核支持的aio相关的调用,通过寄存器传入多个参数到内核。
剩下的就是解决libaio本身的编译问题,注意一下,这部分代码会有编译告警,分析一下,主要是类型转换方面的,我决定不管了^_^
编译得到了libaio.a。下一步是将libaio.a拷贝到库目录中去。编译通过后,到mips环境下试了一下,ok成功了。
- libaio under MIPS architecture /在mips架构下使用的libaio
- Linux下异步IO(libaio)的使用以及性能
- buildroot+mips under cygwin
- Linux下原生异步IO接口Libaio的用法
- ceph存储 Linux下libaio的一个简单例子
- mips下的syscall
- MIPS架构的简单讨论
- MIPS架构的传奇演化
- libaio简介
- MIPS
- MIPS
- MIPS
- MIPS
- MIPS
- MIPS体系下的汇编
- MIPS体系下的汇编
- MIPS体系下的汇编
- mips下的pppoe驱动
- mysql 基本知识
- What is NetApp's Cluster File System?
- 苹果iso开发:[10]CGContextSetLineWidth
- hadoop之单机伪分布式环境搭建
- android学习笔记(2)- 创建虚拟机AVD
- libaio under MIPS architecture /在mips架构下使用的libaio
- ripv1汇总问题
- 状态压缩DP基础题解题报告
- C++ 中通过GetAdaptersInfo获取网卡配置和Ip地址信息
- C#防止WebBrowser在新窗口中打开链接页面
- ORACLE数据库、表空间、表的容量相关查询--1
- A fast lock-free queue for C++
- 开始体验Kali Linux
- Struts2使用Interceptor实现权限控制的应用实例详解