arm_linux_yaffs2文件系統(tǒng)移植到內(nèi)核GUN編譯錯誤問題處理_第1頁
arm_linux_yaffs2文件系統(tǒng)移植到內(nèi)核GUN編譯錯誤問題處理_第2頁
arm_linux_yaffs2文件系統(tǒng)移植到內(nèi)核GUN編譯錯誤問題處理_第3頁
arm_linux_yaffs2文件系統(tǒng)移植到內(nèi)核GUN編譯錯誤問題處理_第4頁
arm_linux_yaffs2文件系統(tǒng)移植到內(nèi)核GUN編譯錯誤問題處理_第5頁
免費預(yù)覽已結(jié)束,剩余6頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、yaffs2更新的比較慢,跟不上內(nèi)核的更新速度.所以只能自己做些修改firststep剛開始從官網(wǎng)下載下來的直接打補(bǔ)丁后會出現(xiàn)一系列的錯誤.如下:*fs/yaffs2/yaffs_vfs.c:Infunction'yaffs_readpage_nolock':fs/yaffs2/yaffs_vfs.c:286:34:error:'structfile'hasnomembernamed'f_dentry'obj=yaffs_dentry_to_obj(f->f_dentry);Afs/yaffs2/yaffs_vfs.c:Infunction

2、'yaffs_hold_space':fs/yaffs2/yaffs_vfs.c:484:34:error:'structfile'hasnomembernamed'f_dentry'obj=yaffs_dentry_to_obj(f->f_dentry);Afs/yaffs2/yaffs_vfs.c:Infunction'yaffs_release_space':fs/yaffs2/yaffs_vfs.c:502:34:error:'structfile'hasnomembernamed'f_den

3、try'obj=yaffs_dentry_to_obj(f->f_dentry);Afs/yaffs2/yaffs_vfs.c:Infunction'yaffs_file_write':fs/yaffs2/yaffs_vfs.c:594:34:error:'structfile'hasnomembernamed'f_dentry'obj=yaffs_dentry_to_obj(f->f_dentry);Afs/yaffs2/yaffs_vfs.c:606:11:error:'structfile'hasnome

4、mbernamed'f_dentry'inode=f->f_dentry->d_inode;Afs/yaffs2/yaffs_vfs.c:Infunction'yaffs_file_flush':fs/yaffs2/yaffs_vfs.c:730:55:error:'structfile'hasnomembernamed'f_dentry'structyaffs_obj*obj=yaffs_dentry_to_obj(file->f_dentry);fs/yaffs2/yaffs_vfs.c:Attoplevel

5、:fs/yaffs2/yaffs_vfs.c:780:10:error:'new_sync_read'undeclaredhere(notinafunction).read=new_sync_read,Afs/yaffs2/yaffs_vfs.c:781:11:error:'new_sync_write'undeclaredhere(notinafunction).write=new_sync_write,Afs/yaffs2/yaffs_vfs.c:Infunction'yaffs_follow_link':fs/yaffs2/yaffs_vf

6、s.c:1078:2:error:implicitdeclarationoffunction'nd_set_link'-Werror=implicit-function-declarationnd_set_link(nd,alias);Afs/yaffs2/yaffs_vfs.c:Attoplevel:fs/yaffs2/yaffs_vfs.c:1118:17:warning:initializationfromincompatiblepointertype.follow_link=yaffs_follow_link,Afs/yaffs2/yaffs_vfs.c:1118:17

7、:warning:(nearinitializationfor'yaffs_symlink_inode_operations.follow_link')fs/yaffs2/yaffs_vfs.c:1120:14:warning:initializationfromincompatiblepointertype.put_link=yaffs_put_link,Afs/yaffs2/yaffs_vfs.c:1120:14:warning:(nearinitializationfor'yaffs_symlink_inode_operations.put_link')f

8、s/yaffs2/yaffs_vfs.c:Infunction'yaffs_iterate':fs/yaffs2/yaffs_vfs.c:1730:34:error:'structfile'hasnomembernamed'f_dentry'obj=yaffs_dentry_to_obj(f->f_dentry);Acc1:somewarningsbeingtreatedaserrorsmake4:*fs/yaffs2/yaffs_vfs.oError1make3:*fs/yaffs2Error2make2:*fsError2make2:*

9、Waitingforunfinishedjobs.make1:*/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/.stamp_builtError2make:*_allError2*上面有三個問題要解決 1:error:"structfile'hasnomembernamed'f_dentry' 2:error:'new_sync_read/write'undeclaredhere 3:error:implicitdeclarationoffunction

10、'nd_set_link'1 'structfile'hasnomembernamed'f_dentry'第一個是由于新內(nèi)核的lie結(jié)構(gòu)體發(fā)生了變化,把dentry這個成員放到了path結(jié)構(gòu)體里,這里只要更改下就行.structfileunionstructllist_nodefu_llist;structrcu_headfu_rcuhead;f_u;structpathf_path;structpathstructvfsmount*mnt;structdentry*dentry;直接在yaffs_vfs.c里加上下列定義就行,或者全部替換#de

11、finef_dentryf_path.dentry#definef_vfsmntf_path.mnt2 "new_sync_read/write'undeclaredhere對于第2個問題是由于新內(nèi)核沒有"new_sync_read/write”這兩個導(dǎo)出函數(shù)了改成.read=_vfs_read,/new_sync_read.write=_vfs_write,/new_sync_write3 error:implicitdeclarationoffunction'nd_set_link'到linux官網(wǎng)查詢發(fā)現(xiàn)4.4.16內(nèi)核里已經(jīng)不用nd_set_

12、link這個函數(shù)了,因此要修改用到這個函數(shù)的地方.主要就是yaffs_follow_link這個函數(shù)啦,yaffs_follow_link的定義主要參考你的include/Linux/fs.h里的structinode_operations.follow_link來定義.以前的alias是保存在nd->saved_names里,現(xiàn)在這個成員已經(jīng)被刪除了,直接通過函數(shù)返回值返回,并且保存在*cookie中-1053,7+1062,11# if(YAFFS_NEW_FOLLOW_LINK=1)+#ifLINUX_VERSION_CODE<KERNEL_VERSION(4,4,16)st

13、aticvoid*yaffs_follow_link(structdentry*dentry,structnameidata*nd)+#else+staticconstchar*yaffs_follow_link(structdentry*dentry,void*cookie)+#endifvoid*ret;#else-1075,7+1088,11gotoout;# if(YAFFS_NEW_FOLLOW_LINK=1)+#ifLINUX_VERSION_CODE<KERNEL_VERSION(4,4,16)nd_set_link(nd,alias);+#else+*cookie=ali

14、as;+#endifret=alias;out:if(ret_int)-1107,10+1124,17#endif# if(YAFFS_NEW_FOLLOW_LINK=1)+#ifLINUX_VERSION_CODE<KERNEL_VERSION(4,4,16)voidyaffs_put_link(structdentry*dentry,structnameidata*nd,void*alias)kfree(alias);+#else+voidyaffs_put_link(structinode*inode,void*alias)+kfree(alias);+#endif#endifst

15、aticconststructinode_operationsyaffs_symlink_inode_operations=secondstep以上修改完后在編譯時還會出現(xiàn)下列的錯誤Infileincludedfromfs/yaffs2/yaffs_nameval.c:28:0:fs/yaffs2/yaffs_nameval.h:21:21:warning:'structyaffs_dev'declaredinsideparameterlistintnval_del(structyaffs_dev*dev,char*xb,intxb_size,constYCHAR*name);

16、Afs/yaffs2/yaffs_nameval.h:21:21:warning:itsscopeisonlythisdefinitionordeclaration,whichisprobablynotwhatyouwantfs/yaffs2/yaffs_nameval.h:24:7:warning:'structyaffs_dev'declaredinsideparameterlistintbsize,intflags);Afs/yaffs2/yaffs_nameval.h:27:7:warning:'structyaffs_dev'declaredinsid

17、eparameterlistintbsize);Afs/yaffs2/yaffs_nameval.h:29:8:warning:'structyaffs_dev'declaredinsideparameterlistconstchar*xb,intxb_size,char*buf,intbsize);Afs/yaffs2/yaffs_nameval.h:30:27:warning:'structyaffs_dev'declaredinsideparameterlistintnval_hasvalues(structyaffs_dev*dev,constchar*

18、xb,intxb_size);Afs/yaffs2/yaffs_nameval.c:82:5:error:conflictingtypesfor'nval_del'intnval_del(structyaffs_dev*dev,char*xb,intxb_size,constYCHAR*name)AInfileincludedfromfs/yaffs2/yaffs_nameval.c:28:0:fs/yaffs2/yaffs_nameval.h:21:5:note:previousdeclarationof'nval_del'washereintnval_del

19、(structyaffs_dev*dev,char*xb,intxb_size,constYCHAR*name);Afs/yaffs2/yaffs_nameval.c:100:5:error:conflictingtypesfor'nval_set'intnval_set(structyaffs_dev*dev,AInfileincludedfromfs/yaffs2/yaffs_nameval.c:28:0:fs/yaffs2/yaffs_nameval.h:22:5:note:previousdeclarationof'nval_set'washereint

20、nval_set(structyaffs_dev*dev,fs/yaffs2/yaffs_nameval.c:145:5:error:conflictingtypesfor'nval_get'intnval_get(structyaffs_dev*dev,Infileincludedfromfs/yaffs2/yaffs_nameval.c:28:0:fs/yaffs2/yaffs_nameval.h:25:5:note:previousdeclarationof'nval_get'washereintnval_get(structyaffs_dev*dev,A

21、fs/yaffs2/yaffs_nameval.c:185:5:error:conflictingtypesfor'nval_list'intnval_list(structyaffs_dev*dev,constchar*xb,intxb_size,char*buf,intbsize)AInfileincludedfromfs/yaffs2/yaffs_nameval.c:28:0:fs/yaffs2/yaffs_nameval.h:28:5:note:previousdeclarationof'nval_list'washereintnval_list(str

22、uctyaffs_dev*dev,Afs/yaffs2/yaffs_nameval.c:227:5:error:conflictingtypesfor'nval_hasvalues'intnval_hasvalues(structyaffs_dev*dev,constchar*xb,intxb_size)AInfileincludedfromfs/yaffs2/yaffs_nameval.c:28:0:fs/yaffs2/yaffs_nameval.h:30:5:note:previousdeclarationof'nval_hasvalues'washerei

23、ntnval_hasvalues(structyaffs_dev*dev,constchar*xb,intxb_size);Amake4:*fs/yaffs2/yaffs_nameval.oError1make3:*fs/yaffs2Error2make2:*fsError2make2:*Waitingforunfinishedjobs.make1:*/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/.stamp_builtError2make:*_allError2解釋:error:conflicting

24、typesfor'nval_del',查看nval_del幾個函數(shù),這里我看不出有什么類型沖突錯誤,網(wǎng)上搜了卡主要是第一個WARNING里引起的.在yaffs_nameval.h中,結(jié)構(gòu)體structyaffs_dev的定義出現(xiàn)在參數(shù)列表中,而在此之前沒有定義,這樣會導(dǎo)致函數(shù)不識別這個結(jié)構(gòu)體引發(fā)上面的錯誤,查詢了下structyaffs_dev在“yaffs_guts.h”中被定義,因止匕在yaffs_nameval.h文件中include下"yaffs_guts.h”就OK了thirdstep通過上兩個修改后可能還會遇到下面的兩個錯誤:error:unknownty

25、pename'Y_LOFF_TInfileincludedfromfs/yaffs2/yaffs_guts.c:18:0:fs/yaffs2/yaffs_endian.h:32:86:error:unknowntypename'Y_LOFF_T'staticinlineY_LOFF_Tswap_loff_t(Y_LOFF_Tlval)fs/yaffs2/yaffs_endian.h:32:107:error:unknowntypename'Y_LOFF_T'staticinlineY_LOFF_Tswap_loff_t(Y_LOFF_Tlval)make

26、4:*fs/yaffs2/yaffs_guts.oError1make3:*fs/yaffs2Error2make2:*fsError2make2:*Waitingforunfinishedjobsmake1:*/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/.stamp_builtError2make:*_allError2這個好解決,在yaffs_endian.h中加上如下定義:#ifndefY_LOFF_T#defineY_LOFF_Tloff_t#endifyaffs_guts.c:line:un

27、definedreferencetofunctionfs/built-in.o:Infunction'yaffs_check_obj_details_loaded':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_guts.c:3254:undefinedreferenceto'yaffs_do_endian_oh'fs/built-in.o:Infunction'yaffs_oh_size_load':/home/anzye

28、lay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_guts.c:5165:undefinedreferenceto'yaffs_do_endian_u32'/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_guts.c:5166:undefinedreferenceto'yaffs_do_endian_u32'fs/built-in.o:Infun

29、ction'yaffs_update_oh':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_guts.c:3401:undefinedreferenceto'yaffs_do_endian_oh'fs/built-in.o:Infunction'yaffs_guts_initialise':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16

30、/fs/yaffs2/yaffs_guts.c:4912:undefinedreferenceto'yaffs_endian_config'fs/built-in.o:Infunction'yaffs_oh_size_load':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_guts.c:5165:undefinedreferenceto'yaffs_do_endian_u32'/home/anzyelay/Download

31、s/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_guts.c:5166:undefinedreferenceto'yaffs_do_endian_u32'fs/built-in.o:Infunction'yaffs_oh_to_size':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_guts.c:5181:undefinedreferenceto'yaff

32、s_do_endian_u32'/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_guts.c:5182:undefinedreferenceto'yaffs_do_endian_u32'/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_guts.c:5190:undefinedreferenceto'yaffs_do_end

33、ian_u32'fs/built-in.o:Infunction'yaffs_pack_tags2_tags_only':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_packedtags2.c:111:undefinedreferenceto'yaffs_do_endian_packed_tags2'/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.

34、16/fs/yaffs2/yaffs_packedtags2.c:111:undefinedreferenceto'yaffs_do_endian_packed_tags2'fs/built-in.o:Infunction'yaffs_unpack_tags2_tags_only':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_packedtags2.c:137:undefinedreferenceto'yaffs_do_endia

35、n_packed_tags2'fs/built-in.o:Infunction'yaffs_load_tags_to_spare':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_tagscompat.c:92:undefinedreferenceto'yaffs_do_endian_u32'/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/

36、yaffs2/yaffs_tagscompat.c:93:undefinedreferenceto'yaffs_do_endian_u32'fs/built-in.o:Infunction'yaffs_get_tags_from_spare':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_tagscompat.c:122:undefinedreferenceto'yaffs_do_endian_u32'/home/anzye

37、lay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_tagscompat.c:123:undefinedreferenceto'yaffs_do_endian_u32'fs/built-in.o:Infunction'nval_used':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_nameval.c:69:undefinedreference

38、to'yaffs_do_endian_s32'/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_nameval.c:75:undefinedreferenceto'yaffs_do_endian_s32'fs/built-in.o:Infunction'nval_find':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2

39、/yaffs_nameval.c:41:undefinedreferenceto'yaffs_do_endian_s32'/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_nameval.c:53:undefinedreferenceto'yaffs_do_endian_s32'fs/built-in.o:Infunction'nval_del':/home/anzyelay/Downloads/buildroot-2016.0

40、5/output/build/linux-4.4.16/fs/yaffs2/yaffs_nameval.c:93:undefinedreferenceto'yaffs_do_endian_s32'fs/built-in.o:/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_nameval.c:136:moreundefinedreferencesto'yaffs_do_endian_s32'followfs/built-in.o:Infunct

41、ion'yaffs2_checkpt_tnode_worker':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_yaffs2.c:599:undefinedreferenceto'yaffs_do_endian_u32'fs/built-in.o:Infunction'yaffs2_wr_checkpt_sum':/home/anzyelay/Downloads/buildroot-2016.05/output/build/

42、linux-4.4.16/fs/yaffs2/yaffs_yaffs2.c:811:undefinedreferenceto'yaffs_do_endian_u32'fs/built-in.o:Infunction'yaffs2_rd_checkpt_tnodes':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_yaffs2.c:647:undefinedreferenceto'yaffs_do_endian_u32'/ho

43、me/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_yaffs2.c:671:undefinedreferenceto'yaffs_do_endian_u32'fs/built-in.o:Infunction'yaffs2_rd_checkpt_sum':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_yaffs2.c:835:un

44、definedreferenceto'yaffs_do_endian_u32'fs/built-in.o:Infunction'yaffs2_scan_chunk':/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/fs/yaffs2/yaffs_yaffs2.c:1302:undefinedreferenceto'yaffs_do_endian_oh'/home/anzyelay/Downloads/buildroot-2016.05/output/buil

45、d/linux-4.4.16/fs/yaffs2/yaffs_yaffs2.c:1302:undefinedreferenceto'yaffs_do_endian_oh'make2:*vmlinuxError1make1:*/home/anzyelay/Downloads/buildroot-2016.05/output/build/linux-4.4.16/.stamp_builtError2make:*_allError2anzyelayubuntu:buildroot-2016.05$這個看了下明明這些函數(shù)都有定義有實現(xiàn)怎么就是不識別呢??頭文件這些也包函了,網(wǎng)上找了下說

46、編譯器沒有編譯到文件可有導(dǎo)致其它函數(shù)引用時無法識別我看了下編譯情況,其它的.c文件都編譯成.o了,然后打開Makefile一看果然沒有加進(jìn)來,yaffs真的不省心,在Make巾le.kernel里增加如下:yaffs-y+=yaffs_endian.o這回萬惡的錯誤都沒了吧.編譯后是OK的了,至于啟動后有沒有其它原因?qū)е碌腻e誤就不得而知了.yaffs的補(bǔ)丁文件如下:diff-Nuryaffs2/Makefile.kernelyaffs2.anzyelay/Makefile.kernel-yaffs2/Makefile.kernel2016-07-2914:01:01.778572877+080

47、0+yaffs2.anzyelay/Makefile.kernel2016-08-0310:29:07.361276458+0800-15,4+15,5yaffs-y+=yaffs_bitmap.oyaffs-y+=yaffs_summary.oyaffs-y+=yaffs_verify.o+yaffs-y+=yaffs_endian.odiff-Nuryaffs2/yaffs_endian.hyaffs2.anzyelay/yaffs_endian.h-yaffs2/yaffs_endian.h2016-07-2914:01:01.814572879+0800+yaffs2.anzyelay

48、/yaffs_endian.h2016-08-0311:18:12.633411085+0800-29,6+29,9#defineswap_s32(val)(s32)(swap_u32(u32)(val)+#ifndefY_LOFF_T+#defineY_LOFF_Tloff_t+#endifstaticinlineY_LOFF_Tswap_loff_t(Y_LOFF_Tlval)u32vall=swap_u32(u32)(lval&0xffffffff);diff-Nuryaffs2/yaffs_nameval.hyaffs2.anzyelay/yaffs_nameval.h-yaf

49、fs2/yaffs_nameval.h2016-07-2914:01:01.818572879+0800+yaffs2.anzyelay/yaffs_nameval.h2016-08-0311:22:07.409421602+0800-17,6+17,7#define_NAMEVAL_H_#include"yportenv.h"+#include"yaffs_guts.h"intnval_del(structyaffs_dev*dev,char*xb,intxb_size,constYCHAR*name);intnval_set(structyaffs_dev*dev,diff-Nuryaffs2/y

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論