0

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
j.c.andle
  • 1
  • 1

1 Answers1

0

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.

Simon Doppler
  • 1,918
  • 8
  • 26