Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译报错,看不懂,求助 #808

Closed
choushui007 opened this issue Nov 13, 2018 · 6 comments
Closed

编译报错,看不懂,求助 #808

choushui007 opened this issue Nov 13, 2018 · 6 comments

Comments

@choushui007
Copy link

Applying /home/ce6093/lede/target/linux/ramips/patches-4.14/0040-nand-hack.patch using plaintext:
patching file drivers/mtd/nand/nand_base.c
Hunk #3 FAILED at 2765.
1 out of 3 hunks FAILED -- saving rejects to file drivers/mtd/nand/nand_base.c.rej
patching file include/linux/mtd/rawnand.h
Hunk #1 FAILED at 885.
Hunk #2 succeeded at 897 (offset 4 lines).
1 out of 2 hunks FAILED -- saving rejects to file include/linux/mtd/rawnand.h.rej
Patch failed! Please fix /home/ce6093/lede/target/linux/ramips/patches-4.14/0040-nand-hack.patch!
Makefile:26: recipe for target '/home/ce6093/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-4.14.78/.prepared_b1277342d9306c10636cd282065fd546' failed
make[4]: *** [/home/ce6093/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/linux-4.14.78/.prepared_b1277342d9306c10636cd282065fd546] Error 1
make[4]: Leaving directory '/home/ce6093/lede/target/linux/ramips'
Makefile:13: recipe for target 'compile' failed
make[3]: *** [compile] Error 2
make[3]: Leaving directory '/home/ce6093/lede/target/linux'
time: target/linux/compile#8.00#4.59#16.57
target/Makefile:23: recipe for target 'target/linux/compile' failed
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory '/home/ce6093/lede'
target/Makefile:18: recipe for target '/home/ce6093/lede/staging_dir/target-mipsel_24kc_musl/stamp/.target_compile' failed
make[1]: *** [/home/ce6093/lede/staging_dir/target-mipsel_24kc_musl/stamp/.target_compile] Error 2
make[1]: Leaving directory '/home/ce6093/lede'
/home/ce6093/lede/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

@xlighting2017
Copy link

编译报错看不懂,就别编译了,不然以后还有更多的坑等着你掉进去

  1. 0040-nand-hack.patch 是一个 patch,

  2. 需要在 linux kernel 的 drivers/mtd/nand/nand_base.c 文件基础上进行 patch,

  3. 它里面的内容是
    @@ -2761,9 +2765,14 @@ static int nand_do_write_ops(struct mtd_
    意思是 找到 2761行的 static int nand_do_write_ops(struct mtd_ 然后修改成 blablabla

  4. 这个错误的原因是, 在 linux-4.14.78 这个内核版本上,drivers/mtd/nand/nand_base.c 文件内容已经变了,2761行不再是对应的内容, 这个 patch 打不上了

@hcym
Copy link

hcym commented Nov 13, 2018

我靠,是不是刚才更新76驱动的?马上试试看看是不是锅

@hcym
Copy link

hcym commented Nov 13, 2018

哦,是出错,码盲就是悲哀,干脆用官方源加lean的插件编译过了,与时俱进,很好

@choushui007
Copy link
Author

哦,是出错,码盲就是悲哀,干脆用官方源加lean的插件编译过了,与时俱进,很好

r能否给个步骤?

@hcym
Copy link

hcym commented Nov 13, 2018

就是抓好官方的最新源码再把大佬的lean目录放到对应的(英文)包目录,其它都是正常编译了,今天的内核已经是80的,我编译的是友华7621,一切正常,v2要注意内核的什么参数一定要打开,其他地方就和官方一样

@choushui007
Copy link
Author

最新代码已经解决这个问题了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants