Patch unexpectedly ends in middle of line?

I'm having problems building from the latest source for a custom target (wallys dr4029) i have built in the past but not since updating my build with files from master.

This is my below message with target world failed:

Applying /home/professor_jonny/pj_openwrt/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch using plaintext:
patching file arch/arm/boot/dts/Makefile
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 70:

Patch failed!  Please fix /home/professor_jonny/pj_openwrt/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch!

Here is a link to my repo and im not too sure what is the problem my patch is not malformed it as far as I am aware, it was working before I merged from the master branch and it added a few new dts files:

pj_openwrt/901-arm-boot-add-dts-files.patch at master · professor-jonny/pj_openwrt (github.com)

would any one be able to point me to my error ?

Wrong math.

You claim to add 48 lines, (59-11=48)
@@ -837,11 +837,59 @@ dtb-$(CONFIG_ARCH_QCOM) += \

but you add 49 lines :frowning:

  • lines 17-40 = 24 added lines.
  • lines 46-70 = 25 added lines.

Total 49 added lines.

Malformed patch, as patch line 70 should not start with "+", as that line should be an existing original context line. (after 48 added lines...)
70 + qcom-ipq40x9-dr40x9.dtb \

If you want to add those 49 lines, the section header should be
@@ -837,11 +837,60 @@ dtb-$(CONFIG_ARCH_QCOM) += \

2 Likes