lede icon indicating copy to clipboard operation
lede copied to clipboard

编译报错,看不懂,求助

Open choushui007 opened this issue 8 years ago • 6 comments

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

choushui007 avatar Nov 13 '18 11:11 choushui007

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

  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 打不上了

xlighting2017 avatar Nov 13 '18 12:11 xlighting2017

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

hcym avatar Nov 13 '18 12:11 hcym

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

hcym avatar Nov 13 '18 13:11 hcym

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

r能否给个步骤?

choushui007 avatar Nov 13 '18 13:11 choushui007

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

hcym avatar Nov 13 '18 14:11 hcym

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

choushui007 avatar Nov 14 '18 01:11 choushui007