由于我這邊kernel用的是比較老的,有些接口不支持,所以需要做一些處理
int rtw_is_dir_readable(const char *path)
//#define CL_IPV6_PASS 1
struct rtw_ieee80211_hdr {u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN];
u16 seq_ctrl;
u8 addr4[ETH_ALEN];
} __attribute__((packed));
struct ieee80211_hdr {u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN];
u16 seq_ctrl;
u8 addr4[ETH_ALEN];
} __attribute__((packed));
//#define CONFIG_P2P 1
void rtw_dump_cur_efuse(PADAPTER padapter)
{//原來是 int mapsize =0;
u16 mapsize =0;
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(padapter);
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN , (void *)&mapsize, _FALSE);
if (mapsize<= 0 || mapsize >EEPROM_MAX_SIZE) {RTW_ERR("wrong map size %d\n", mapsize);
return;
}
#ifdef CONFIG_RTW_DEBUG
if (hal_data->efuse_file_status == EFUSE_FILE_LOADED)
RTW_MAP_DUMP_SEL(RTW_DBGDUMP, "EFUSE FILE", hal_data->efuse_eeprom_data, mapsize);
else
RTW_MAP_DUMP_SEL(RTW_DBGDUMP, "HW EFUSE", hal_data->efuse_eeprom_data, mapsize);
#endif
}
#define IW_ENCODE_ALG_AES_CMAC 5
代碼修改完畢后
安裝前置工具sudo apt-get -y install flex
sudo apt-get -y install bison
編譯openssl下載openssl-1.1.1a
./Configure linux-ppc shared no-asm --prefix=/home/lsy/work/tools/openssl CROSS_COMPILE=powerpc-e300c3-linux-
make
異常,出現(xiàn)錯(cuò)誤:PTHREAD_MUTEX_RECURSIVE未聲明
vim Makefile
CNF_CPPFLAGS=-DNDEBUG -D_GNU_SOURCE
編譯libnlwget http://www.infradead.org/~tgr/libnl/files/libnl-3.2.0.tar.gz
tar xvf libnl-3.2.0.tar.gz
cd libnl-3.2.0
./configure --host=powerpc-e300c3-linux --prefix=/home/lisuyang/work/tools/libnl CFLAGS=-I/home/lisuyang/work/code/kz_linux-2.6.20/include
make
make install
解決報(bào)錯(cuò)cp ../kz_linux-2.6.20/include/linux/tc_ematch/tc_em_text.h include/linux/tc_ematch/
編譯wpa_supplicantexport PKG_CONFIG_PATH=/home/lisuyang/work/tools/libnl/lib/pkgconfig
tar xvf wpa_supplicant-2.7.tar.gz
cd wpa_supplicant-2.7/wpa_supplicant
cp deconfig .config
vim .config
CC = powerpc-e300c3-linux-gcc
#openssl 庫和頭文件路徑
CFLAGS += -I/home/lsy/work/tools/openssl/include
LIBS += -L/home/lsy/work/tools/openssl/lib -lssl -lcrypto
#libnl 庫和頭文件路徑
CFLAGS += -I/home/lsy/work/tools/libnl/libnl3
LIBS += -L/home/lsy/work/tools/libnl/lib
make
make install
解決報(bào)錯(cuò)cp linux-2.6.20/include/linux/netfilter/nfnetlink.h /home/lsy/work/tools/libnl/include/libnl3/netlink/netfilter/
vim /home/lsy/work/tools/libnl/include/libnl3/netlink/netlink.h
//#include#include
#include
/home/lsy/work/tools/libnl/include/libnl3/netlink/netlink-kernel.h:18: error: redefinition of 'struct sockaddr_nl'
/home/lsy/work/tools/libnl/include/libnl3/netlink/netlink-kernel.h:42: error: redefinition of 'struct nlmsghdr'
/home/lsy/work/tools/libnl/include/libnl3/netlink/netlink-kernel.h:182: error: redefinition of 'struct nlmsgerr'
將netlink-kernel.h代碼中的這三個(gè)結(jié)構(gòu)體刪除
拷貝kernel源碼中的頭文件信息到編譯鏈頭文件路徑
抱歉,由于距離我做這個(gè)任務(wù)時(shí)間有些長,我不記得我將那些文件拷貝過去了,這里主要是編譯過程中缺少某個(gè)結(jié)構(gòu)體定義,那就去kernel源碼/libnl輸出路徑中搜索哪個(gè)文件包含這個(gè)變量,將之復(fù)制到編譯鏈的頭文件中,該目錄位于
/opt/freescale/usr/local/gcc-4.0.2-glibc-2.3.6-nptl-2/powerpc-e300c3-linux/powerpc-e300c3-linux/sys-include
編譯hostapd我這邊下載的是hostapd-0.6.9
export PKG_CONFIG_PATH=/home/lisuyang/work/tools/libnl/lib/pkgconfig
tar xvf hostapd-0.6.9.tar.gz
cd hostapd-0.6.9/hostapd
cp deconfig .config
vim .config
CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_NL80211=y
CFLAGS += -I/home/lsy/work/tools/libnl/include/libnl3
LIBS += -L/home/lsy/work/tools/libnl/lib
CONFIG_LIBNL20=y
CC = powerpc-e300c3-linux-gcc
CONFIG_TLS = internal
CONFIG_INTERNAL_LIBTOMMATH = y
CFLAGS += -I/home/lsy/work/tools/openssl/include
LIBS += -L/home/lsy/work/tools/openssl/lib -lssl -lcrypto
make
移植入嵌入式需要拷貝過去的文件如下
hostapd
wpa_supplicant
libnl/lib/.so
openssl/.so
你是否還在尋找穩(wěn)定的海外服務(wù)器提供商?創(chuàng)新互聯(lián)www.cdcxhl.cn海外機(jī)房具備T級(jí)流量清洗系統(tǒng)配攻擊溯源,準(zhǔn)確流量調(diào)度確保服務(wù)器高可用性,企業(yè)級(jí)服務(wù)器適合批量采購,新人活動(dòng)首月15元起,快前往官網(wǎng)查看詳情吧
文章名稱:PowerPC平臺(tái)移植RTL8822BU-創(chuàng)新互聯(lián)
轉(zhuǎn)載來于:http://vcdvsql.cn/article14/dsdige.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航、網(wǎng)站營銷、企業(yè)網(wǎng)站制作、企業(yè)建站、網(wǎng)站導(dǎo)航、用戶體驗(yàn)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容