buildroot 2011.11.1 内核 4.19.231 补丁失败
背景故事 - 很久以前,供应商为我们提供了带有 Linux 4.4.49 的 buildroot 2017.08.2。我们从未更新过 Ubuntu 14.x 构建机器。从 Ubuntu 20 开始,新的 GCC 对旧的软件包和内核造成了严重破坏。
我尝试跳转到最长的 LTS 5.15 内核,但太多硬件特定补丁无法让我在学习和使用时从那里开始。记住。我在 2021 年 11 月 1 日投入了一些精力构建 4.4.49 内核,但警告/错误比我想要做出的有根据的猜测要多,以此作为更新内核的方法。
我选择 4.19.231 作为“足够新但足够接近”。我不明白为什么下面的大佬无法修补 Makefile。
Applying 0001-add-am33x-firmware.patch using patch:
patching file firmware/am335x-bone-scale-data.bin
patching file firmware/am335x-evm-scale-data.bin
patching file firmware/am335x-pm-firmware.bin
patching file firmware/am335x-pm-firmware.elf
patching file firmware/am43x-evm-scale-data.bin
patching file firmware/.gitignore
Applying 0002-add-8250-serial-tx-hooks.patch using patch:
patching file drivers/tty/serial/8250/8250_port.c
Hunk #1 succeeded at 1516 with fuzz 1 (offset 236 lines).
Hunk #2 succeeded at 1590 with fuzz 2 (offset 296 lines).
Hunk #3 succeeded at 1649 with fuzz 2 (offset 329 lines).
Hunk #4 succeeded at 3377 (offset 439 lines).
Applying 0003-add-tty-tx-en-driver.patch using patch:
**patching file drivers/misc/Makefile
Hunk #1 FAILED at 53.**
1 out of 1 hunk FAILED -- saving rejects to file drivers/misc/Makefile.rej
patching file drivers/misc/Kconfig
Hunk #1 succeeded at 513 with fuzz 2 (offset -12 lines).
patching file drivers/misc/tty_tx_en.c
make[1]: *** [package/pkg-generic.mk:251: /home/dobleadmin/Buildroot2021/buildroot-2021.11.1/output/build/linux-4.19.231/.stamp_patched] Error 1
make: *** [Makefile:84: _all] Error 2
The Makefile section:
obj-$(CONFIG_GENWQE) += genwqe/
obj-$(CONFIG_ECHO) += echo/
obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o
obj-$(CONFIG_CXL_BASE) += cxl/
obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o
obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
The patch hunk:
Index: linux-custom/drivers/misc/Makefile
===================================================================
--- linux-custom.orig/drivers/misc/Makefile
+++ linux-custom/drivers/misc/Makefile @@ -52,3 +52,4 @@ obj-$(CONFIG_GENWQE) += genwqe/
obj-$(CONFIG_ECHO) += echo/
obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o
obj-$(CONFIG_CXL_BASE) += cxl/
+obj-$(CONFIG_TTY_TX_EN) += tty_tx_en.o
Back story - a vendor gave us buildroot 2017.08.2 with Linux 4.4.49 a long time ago. We never updated the Ubuntu 14.x build machine. Starting over with Ubuntu 20 and the newer GCC is wreaking havoc on the older packages and kernel.
I tried jumping to the longest LTS 5.15 kernel but too many hardware specific patches failed for me to start there while learning & remembering. I put some effort into building 4.4.49 kernel in 2021.11.1 but there are more warnings/errors than I want to make educated guesses at as a way-stop to then updating the kernel.
I selected 4.19.231 as 'recent enough but close enough'. I cannot see why the hunk below is failing to patch the Makefile.
Applying 0001-add-am33x-firmware.patch using patch:
patching file firmware/am335x-bone-scale-data.bin
patching file firmware/am335x-evm-scale-data.bin
patching file firmware/am335x-pm-firmware.bin
patching file firmware/am335x-pm-firmware.elf
patching file firmware/am43x-evm-scale-data.bin
patching file firmware/.gitignore
Applying 0002-add-8250-serial-tx-hooks.patch using patch:
patching file drivers/tty/serial/8250/8250_port.c
Hunk #1 succeeded at 1516 with fuzz 1 (offset 236 lines).
Hunk #2 succeeded at 1590 with fuzz 2 (offset 296 lines).
Hunk #3 succeeded at 1649 with fuzz 2 (offset 329 lines).
Hunk #4 succeeded at 3377 (offset 439 lines).
Applying 0003-add-tty-tx-en-driver.patch using patch:
**patching file drivers/misc/Makefile
Hunk #1 FAILED at 53.**
1 out of 1 hunk FAILED -- saving rejects to file drivers/misc/Makefile.rej
patching file drivers/misc/Kconfig
Hunk #1 succeeded at 513 with fuzz 2 (offset -12 lines).
patching file drivers/misc/tty_tx_en.c
make[1]: *** [package/pkg-generic.mk:251: /home/dobleadmin/Buildroot2021/buildroot-2021.11.1/output/build/linux-4.19.231/.stamp_patched] Error 1
make: *** [Makefile:84: _all] Error 2
The Makefile section:
obj-$(CONFIG_GENWQE) += genwqe/
obj-$(CONFIG_ECHO) += echo/
obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o
obj-$(CONFIG_CXL_BASE) += cxl/
obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o
obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
The patch hunk:
Index: linux-custom/drivers/misc/Makefile
===================================================================
--- linux-custom.orig/drivers/misc/Makefile
+++ linux-custom/drivers/misc/Makefile @@ -52,3 +52,4 @@ obj-$(CONFIG_GENWQE) += genwqe/
obj-$(CONFIG_ECHO) += echo/
obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o
obj-$(CONFIG_CXL_BASE) += cxl/
+obj-$(CONFIG_TTY_TX_EN) += tty_tx_en.o
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的补丁无法应用:在 4.4 中,它应用在 文件末尾,包含
CONFIG_CXL_BASE
的行之后。这一行不再是 v4.19 中的最后一行。然而,考虑到这一变化,更新补丁应该是微不足道的。Your patch can not be applied: in 4.4 it was applied at the end of the file, after the line containing
CONFIG_CXL_BASE
. This line is no longer the last one in v4.19. Given the change, it should however be trivial to update the patch.