K2T编译报错
详细叙述
K2T编译报错,提示信息如下: Patch failed! Please fix /home/gaoh/lede/target/linux/ath79/patches-6.6/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch!
重复 issue
- [x] 没有类似的 issue
具体型号
K2T
详细日志
Applying /home/gaoh/lede/target/linux/ath79/patches-6.6/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch using plaintext: patching file drivers/irqchip/Makefile The next patch would create the file drivers/irqchip/irq-ath79-intc.c, which already exists! Applying it anyway. patching file drivers/irqchip/irq-ath79-intc.c Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file drivers/irqchip/irq-ath79-intc.c.rej Patch failed! Please fix /home/gaoh/lede/target/linux/ath79/patches-6.6/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch! make[4]: *** [Makefile:30: /home/gaoh/lede/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-6.6.158/.prepared_0494fd2ee851374069e84abeae6f246a] Error 1 make[4]: Leaving directory '/home/gaoh/lede/target/linux/ath79' make[3]: *** [Makefile:11: compile] Error 2 make[3]: Leaving directory '/home/gaoh/lede/target/linux' time: target/linux/compile#3.16#17.16#16.06 ERROR: target/linux failed to build. make[2]: *** [target/Makefile:30: target/linux/compile] Error 1 make[2]: Leaving directory '/home/gaoh/lede' make[1]: *** [target/Makefile:23: /home/gaoh/lede/staging_dir/target-mips_24kc_musl/stamp/.target_compile] Error 2 make[1]: Leaving directory '/home/gaoh/lede' make: *** [/home/gaoh/lede/include/toplevel.mk:231: world] Error 2
已修复并推送。
根因是加入 Linux 6.18 测试支持时,irq-ath79-intc.c 和 leds-reset.c 已迁移到 ath79 公共 files/,但 5.4、6.6、6.12 的旧补丁仍尝试重复创建这些文件,因此 6.6.158 在准备内核源码时失败。
同时修复了继续构建时发现的几处关联兼容问题:
- 整理 5.4、6.6、6.12、6.18 的 irqchip/LED 补丁,只保留 Kconfig/Makefile 注册。
- 兼容 Linux 6.11 前后的
platform_driverremove 回调 API,保证默认 6.6 和测试 6.18 都可使用公共 ag71xx 源码。 - 移除 Linux 6.6.158 已原生采用
get_unaligned_be32()的重复 hunk。 - 按 Linux 6.6 自带 ath10k 的实现,将旧版 ath10k-ct coredump 字符串复制改为
strscpy(),修复 K2T 默认无线驱动的 fortify 编译错误。
修复提交:
- coolsnowwolf/lede@02629de756e75cff964a5b3c97acef784e0659a0
- coolsnowwolf/lede@27d57f45e01459e0d498efbf44532bfe0dfc1d40
已使用 ath79/generic/phicomm_k2t、Linux 6.6.158 验证:
make target/linux/compile -j30通过。make -j30整机编译通过。- 已生成 K2T initramfs 与 squashfs sysupgrade 镜像。