使用系统:
Ubuntu 16.06 64位
斐讯K2T采用了高通的CPU QCA9558/9563,采用的SDK为高通的QSDK。
QSDK是一种在openwrt的基础上,加入了高通atheros芯片相关资料的一种环境。
QSDK与openwrt的区别主要在如下几个方面:
arch/mips/ath79/* – updated QCA base platform device support – GPLv2
sound/soc/ath79/* – new ALSA-compliant QCA soundcard driver – ISC
drivers/net/ethernet/atheros/ag71xx/* – updated QCA Ethernet switch driver – GPLv2
net/core/* – performance enhancement updates to Linux sk_buff management – GPL v2
drivers/spi – added modes to QCA spi driver – GPLv2
drivers/mtd/nand/ – new QCA NAND flash controller driver – ISC
1、安装git,设置用户参数
sudo apt-get install git
git config –global user.email “youremail@xxx.com”
git config –global user.name “Your Name”
2、安装编译环境
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
3、安装repo
mkdir ~/bin
PATH=$PATH:~/bin
sudo apt-get install curl
curl “http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo”> ~/bin/repo
4、下载qsdk
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
5、编译
cd qsdk
make package/symlinks
拷贝配置文件,目前qca/configs/qca955x.ln目录下有三个配置文件
ar71xx_open.config
ar71xx_premium.config : 生成16m flash使用的bin文件
ar71xx_wireless.config : 生成8m flash使用的bin文件
拷贝成缺省配置:
cp qca/configs/qca955x.ln/ar71xx_.config .config
新生成配置文件并build
make defconfig
make V=s
【错误解决】
make defconfig可能出现错误:
undefined reference to `kconf_id_lookup’
解决:修改qsdk/scripts/config/zconf.tab.c,增加:
extern struct kconf_id * kconf_id_lookup(register const char *str, register unsigned int len);