20151210编译高通的qca9531的wireless版本 修改版本4
2015/11/12 10:40
(1)、安装ubuntu(推荐安装的时候拔掉网线,这样装得快!有些库从国外的网站下载还是很花时间的!!!!)
已经验证过的系统:ubuntu-12.04.5-desktop-i386.iso
http://releases.ubuntu.com/releases/12.04.5/ubuntu-12.04.5-desktop-i386.iso
ubuntu的官方下载地址:
http://releases.ubuntu.com/releases/10.04/
http://cdimage.ubuntu.com/releases/
http://old-releases.ubuntu.com/releases/lucid/
安装Ubuntu的教程请参考:
http://digi.163.com/11/0127/18/6RE3LQL400162OUT.html
图文教程:手把手教你用U盘安装Ubuntu
http://www.linuxidc.com/Linux/2012-11/74695.htm
U盘安装Ubuntu 12.10
http://jingyan.baidu.com/article/a3761b2b66fe141577f9aa51.html
怎么用u盘安装ubuntu
手动分区的建议设置(十几分区容量大小请根据你的硬盘来做实际调整):
/boot 分配100M即可
swap 交换分区 4G
/home 剩下的容量 - 20G
/ 20G。注意这里需要设置为主分区!!!!
小知识:
查看ubuntu的版本:
rootroot@rootroot-virtual-machine:~$ cat /etc/issue
Ubuntu 12.04.5 LTS \n \l
rootroot@rootroot-virtual-machine:~$
查看ubuntu是32位还是64位(x86_64):
rootroot@rootroot-virtual-machine:~$ uname -a
Linux rootroot-virtual-machine 3.13.0-32-generic #57~precise1-Ubuntu SMP Tue Jul 15 03:50:54 UTC 2014 i686 i686 i386 GNU/Linux
rootroot@rootroot-virtual-machine:~$
http://www.360doc.com/content/13/0921/23/6496277_316103639.shtml
查看ubuntu是32位还是64位的方法及其版本号
http://www.cnblogs.com/zero1665/archive/2010/05/24/1742962.html
查看ubuntu版本号
(2)
建议:update Manager不要更新。
sudo apt-get install update
首先安装openssh-server,这样就可以在Windows下通过SSH软件连接Ubuntu的电脑操作了。
sudo apt-get install openssh-server
sudo apt-get install nautilus-open-terminal
sudo apt-get install meld
sudo apt-get install vim
开启ubuntu系统的root用户的方法:
sudo passwd root
[sudo] password for rootroot:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
安装samba:
sudo apt-get install samba
sudo smbpasswd -a rootroot
(输入密码2次:rootroot)
New SMB password:
Retype new SMB password:
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo gedit /etc/samba/smb.conf
(在最后面添加以下内容:)
[rootroot]
comment = Root Directories
path = /
public = yes
browseable = yes
writable = yes
valid users = rootroot
重启samba:
sudo /etc/init.d/smbd restart
获取当前电脑配置的IP地址:
sudo ifconfig
(3)、配置编译环境(4.1 Set up the build environment)
一次性安装:
sudo apt-get install gcc g++ binutils patch bzip2 flex make gettext \
pkg-config unzip zlib1g-dev libc6-dev subversion libncurses5-dev gawk \
sharutils curl libxml-parser-perl ocaml-nox
一个一个软件的安装(谨慎/保险起见,确保每个软件都安装成功):
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install binutils
sudo apt-get install patch
sudo apt-get install bzip2
sudo apt-get install flex
sudo apt-get install make
sudo apt-get install gettext
sudo apt-get install pkg-config
sudo apt-get install unzip
sudo apt-get install zlib1g-dev
sudo apt-get install libc6-dev
sudo apt-get install subversion
sudo apt-get install libncurses5-dev
sudo apt-get install gawk
sudo apt-get install sharutils
sudo apt-get install curl
sudo apt-get install libxml-parser-perl
sudo apt-get install ocaml-nox
tar xvzf git-1.8.1.2.tar.gz
cd git-1.8.1.2
./configure
make
sudo make install
http://blog.csdn.net/xinyuwuxian/article/details/9172863
Ubuntu10.10下通过下载git包安装git git-1.8.2.3.tar.gz
(3)、下载软件(4.2 Download the software)
mkdir ~/bin
PATH=$PATH:~/bin
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo"> ~/bin/repo
chmod 777 repo
(第一次使用repo需要设置email和用户名)
git config --global user.email
[email protected]
git config --global user.name wb4916
repo init -u git://codeaurora.org/quic/qsdk/releases/manifest/qstak -b release -m caf_AU_LINUX_QSDK_RELEASE_BANANA_SW_TARGET_ALL.2.7.029.xml
repo sync
mkdir -p qsdk/dl
拷贝到目录:X:\wyb\premium_qca9531
tar xjvf qsdk-qca-wifi-2.7.029.tar.bz2 -C qsdk
tar xjvf qsdk-qca-wlan-2.7.029.tar.bz2 -C qsdk
tar xjvf qsdk-qca-shortcut-fe-2.7.029.tar.bz2 -C qsdk
(4)、编译系统(4.3 Build the software)
rootroot@rootroot-Founder-PC:~/wyb/wireless_qca9531/qsdk$ make package/symlinks
make[1] package/symlinks
make[2] prepare-tmpinfo
rootroot@rootroot-Founder-PC:~/wyb/wireless_qca9531/qsdk$
rootroot@rootroot-Founder-PC:~/wyb/wireless_qca9531/qsdk$ cp qca/configs/qca955x.ln/ar71xx_wireless.config .config
rootroot@rootroot-Founder-PC:~/wyb/wireless_qca9531/qsdk$ make defconfig
rootroot@rootroot-Founder-PC:~/wyb/wireless_qca9531/qsdk$ make V=s
这个是 豪华版本(16M的flash+64M的DDR)的配置文件。
rootroot@rootroot-Founder-PC:~/wyb/premium_qca9531/qsdk$ diff ar71xx_premium.config .config
在qsdk/build_dir/linux-ar71xx_generic/linux-3.3.8/drivers/mtd/devices/m25p80.c 811行 添加 { "w25q8M", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) },
Q:\wyb\wireless_qca9531\qsdk\build_dir\linux-ar71xx_generic\linux-3.3.8\drivers\mtd\devices\m25p80.c 811行 添加 { "w25q8M", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) },
不然系统无法启动
烧录系统:
设置windows下的PC机器的IP地址为:192.168.1.10,将PC机的 以太网接口和AP147板子的中间的以太网接口 用网线 连接起来。
然后使用 ftp工具刷机:tftpd32.452.zip
下载链接:
http://download.csdn.net/detail/wb4916/9340875
tftpd32.452.zip
http://download.csdn.net/detail/wb4916/9340883
ha_ciscotftp11_jp.rar
调试串口的线序:(G在板子的右上角)黑绿白。
4.4.2.1 8M platforms
setenv bc AP147-8M
setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.10
setenv bootcmd 'bootm 0x9f680000'
tftp 0x80060000 openwrt-ar71xx-${bc}-qca-legacy-uboot.bin && erase 0x9f000000 +0x30000 && cp.b $fileaddr 0x9f000000 $filesize
setenv lok 'tftp 0x80060000 openwrt-ar71xx-generic-${bc}-kernel.bin && erase 0x9f680000 +${filesize} && cp.b $fileaddr 0x9f680000 0x160000'
setenv lof 'tftp 0x80060000 openwrt-ar71xx-generic-${bc}-rootfs-squashfs.bin && erase 0x9f050000 +${filesize} && cp.b $fileaddr 0x9f050000 $filesize'
setenv lqsdk 'run lof && run lok'
saveenv
run lqsdk
在驱动中加入printk信息(比较奇怪的是:如果存在驱动文件的副本也会报错!):
rootroot@rootroot-Founder-PC:~/wyb/wireless_qca9531/qsdk$ grep "PHY driver" . -R
./build_dir/linux-ar71xx_generic/qca-ssdk-ge424ca4/src/init/ssdk_init.c: printk("QCA PHY driver had been Registered\n");
./build_dir/linux-ar71xx_generic/qca-ssdk-ge424ca4/src/init/ssdk_init.c: printk("Register QCA PHY driver\n");
Q:\wyb\wireless_qca9531\qsdk\build_dir\linux-ar71xx_generic\qca-ssdk-ge424ca4\src\init\ssdk_init.c
printk("Register QCA PHY driver\n");
// printk("**** wyb 2015/11/13 17:33 Register QCA PHY driver\n");
printk("&&&& wyb f:%s l:%d f:%s Register QCA PHY driver 2015/11/13 17:21\n", __FILE__, __LINE__, __func__);
[ 9.570000] &&&& wyb f:ssdk_init.c l:1087 f:ssdk_plat_init Register QCA PHY driver 2015/11/13 17:21
登录系统之后,可以测试一下AP模式和STATION模式。