Chinaunix首页 | 论坛 | 博客
  • 博客访问: 131256
  • 博文数量: 14
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 633
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-05 11:44
文章存档

2014年(14)

我的朋友

分类: LINUX

2014-08-31 01:02:06

使用su root命令切换到root用户下

一、环境
ubuntu12.04 x64
arm-linux-gcc4.4.1

二、libnl移植
1、下载libnl源码
~tgr/libnl/

2、解压libnl源码
# tar -xvf libnl-3.2.25.tar.gz

3、进入libnl源码目录
# cd libnl-3.2.25

4、配置libnl安装目录
# ./configure --prefix=/home/work/outfile/libnl CC=arm-linux-gcc LD=arm-linux-ld --enable-shared --enable-static --host=arm-linux

5、编译libnl源码
# make

6、安装libnl库
# make install

7、复制libnl库到开发板
将/home/work/outfile/libnl/lib/libnl-3.so.200、libnl-genl-3.so.200文件复制到开发板的/lib目录

三、openssl移植
1、下载openssl源码


2、解压源码
# tar -xvf openssl-1.0.1g.tar.gz

3、进入openssl源码目录
# cd openssl-1.0.1g

4、执行配置命令
# ./Configure linux-elf-arm --prefix=/home/work/outfile/openssl CC=arm-linux-gcc AR=arm-linux-ar RANLIB=arm-linux-ranlib

5、修改makefile文件
INSTALL_PREFIX=/home/work/outfile/
INSTALLTOP=openssl
OPENSSLDIR=openssl
AR=arm-linux-ar $(ARFLAGS) r
CC= arm-linux-gcc
RANLIB= arm-linux-ranlib

6、编译openssl源码
# make

7、安装openssl库
# make install

8、输出文件的目录在/home/work/outfile/openssl

四、hostap驱动移植
linux3.0的内核已经自带了hostap的驱动源码,只需要修改hostap源码,并编译进内核,或使用其它无线网卡驱动

五、编译hostap
1、安装git-core
# apt-get install git-core 

2、获得hostap源码
# git clone git://w1.fi/srv/git/hostap.git

3、进入hostap源码目录
# cd hostap/hostapd

4、复制默认的配置文件
# cp defconfig .config

5、修改Makefile
修改第一行为CC=arm-linux-gcc

6、修改.config文件
在.config文件前添加以下内容
CONFIG_DRIVER_NL80211=y
CONFIG_LIBNL32=y
CFLAGS += -I/home/work/outfile/libnl/include/libnl3
LIBS += -L/home/work/outfile/libnl/lib
CFLAGS += -I/home/work/outfile/openssl/include
LIBS += -L/home/work/outfile/openssl/lib

7、编译hostap源码
# make

8、将hostapd复制到开发板的/usr/bin目录

9、修改hostapd.conf文件,将修改好的hostapd.conf文件复制到开发板的/etc目录下

10、在开发板中运行命令
./hostapd /etc/hostapd.conf












阅读(3450) | 评论(0) | 转发(0) |
1

上一篇:iptables移植

下一篇:samba移植

给主人留下些什么吧!~~