Backports Archive on
 help / color / Atom feed
From: Christian <>
Subject: Makefile patching error in backport from 5.3 to 4.9.214
Date: Wed, 18 Mar 2020 19:13:47 +0100
Message-ID: <> (raw)

Hi there,

I am just trying to backport wireless drivers from 5.3 to 4.9.214. I
thought I start with a clean kernel tree to see how all this works.
However when trying to integrate into a kernel-stable tree, I get an
error when the makefile is to be changed:

Modify Kconfig tree ...
Rewrite Makefiles and Kconfig files ...
Applying patches from integration-patches/ to /root/git/linux-stable/
Applying patch 001-enable-backports/0001-enable-backports-built-
> patching file Makefile
> Hunk #1 succeeded at 571 (offset 29 lines).
> Hunk #2 FAILED at 821.
> Hunk #3 FAILED at 838.
> 2 out of 3 hunks FAILED -- saving rejects to file Makefile.rej

What I did:
cloned linux-stable:
git clone git://
stable.git -b v4.9.194

cloned linux-next:
git clone git://

cloned linux-backports:
git clone
-b linux-5.3.y

Then used:
./ --copy-list ./copy-list --verbose --integrate --clean --
git-revision v5.3 ~/linux-next ~/linux-stable

Apparently the patch created by gentree does not fit to the makefile. I
can amend it by hand, however this seems to be an error in the used
Anyone know what to do?

Kind Regards

Makefile.rej content:

--- Makefile
+++ Makefile
@@ -821,13 +822,16 @@ core-y		+= kernel/ mm/ fs/ ipc/
security/ crypto/ block/

 vmlinux-dirs	:= $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
 		     $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
+		     $(backports-y) $(backports-m) \
 		     $(net-y) $(net-m) $(libs-y) $(libs-m)))

 vmlinux-alldirs	:= $(sort $(vmlinux-dirs) $(patsubst
%/,%,$(filter %/, \
 		     $(init-n) $(init-) \
 		     $(core-n) $(core-) $(drivers-n) $(drivers-) \
+		     $(backports-n) $(backports-) \
 		     $(net-n)  $(net-)  $(libs-n)    $(libs-))))

+backports-y	:= $(patsubst %/, %/built-in.o, $(backports-y))
 init-y		:= $(patsubst %/, %/built-in.o, $(init-y))
 core-y		:= $(patsubst %/, %/built-in.o, $(core-y))
 drivers-y	:= $(patsubst %/, %/built-in.o, $(drivers-y))
@@ -838,7 +842,7 @@ libs-y		:= $(libs-y1) $(libs-y2)

 # Externally visible symbols (used by
 export KBUILD_VMLINUX_INIT := $(head-y) $(init-y)
-export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-
+export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-
y) $(backports-y)
 export KBUILD_LDS          := arch/$(SRCARCH)/kernel/
 export LDFLAGS_vmlinux
 # used by scripts/pacmage/Makefile

To unsubscribe from this list: send the line "unsubscribe backports" in

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Backports Archive on

Archives are clonable:
	git clone --mirror backports/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 backports backports/ \
	public-inbox-index backports

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone