Skip to contentSkip to conversation

Resurrect Integration Mode v2

PATCH In review Thomas Pedersen 2 participants 17 messages May 13, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover Resurrect Integration Mode v2

Original submission here:

https://lore.kernel.org/all/[email protected]/T/

Changes since v1:

- Include Luis' patches to track kconfig as git subtree[1], since the original integration mode submission required updated kconfig anyway.
- Version integration patches per target kernel version supporting kernel 4.19 and 5.4
- Fixup skb list patch for builds against 4.19. This was not required by the series, but needed for build testing.

Tested generating and building an integrated backports of mac80211 from Linux 5.15.33 against 4.19 and 5.4.

[1]: https://lore.kernel.org/all/[email protected]/T/

Luis Chamberlain (4):
backport/kconf: remove our version of kconfig
Squashed 'backport/kconf/' content from commit 98bda615
kconfig: fix backport syntax to work with linux-next next-20220204 Makefile.subtrees: document how to update kconfig

Thomas Pedersen (11):
backport: define BACKPORT_DIR for Kconfig.integrate
gentree: update kconfig source var to new kconfig format
gentree: try to make patch operation idempotent in case of --clean
gentree: do not prefix Kernel.local symbols
lib/bpversion: calculate Kconfig.versions for next major version
backport: expose BP_MODULES in package mode only
kconfig: fix select conversion for BPAUTO_ symbols in integration mode
integration-patches: refresh integration patch
integration-patches: make patches per target kernel version
integration-patches: support 5.4 target kernel
patches: fixup skb list patch

 Makefile.subtrees                             |   10 +
 backport/Kconfig.integrate                    |    7 +-
 backport/Kconfig.package                      |   18 +-
 backport/Kconfig.package.hacks                |   10 +
 backport/Kconfig.sources                      |   22 +-
 backport/Makefile.real                        |   32 +-
 backport/compat/Kconfig                       |    9 -
 backport/kconf/.gitignore                     |   15 +-
 backport/kconf/GPL-2.0                        |  359 ++++
 backport/kconf/Kbuild.include                 |   73 +
 backport/kconf/Makefile                       |   69 +-
 backport/kconf/README.kconfig                 |   13 +
 backport/kconf/conf.c                         |  548 ++++--
 backport/kconf/confdata.c                     | 1139 ++++++------
 backport/kconf/expr.c                         |   28 +-
 backport/kconf/expr.h                         |   21 +-
 backport/kconf/internal.h                     |    9 +
 backport/kconf/kconf_id.c                     |    1 -
 backport/kconf/kconfig.Makefile               |   65 +
 backport/kconf/kconfig/.gitignore             |   16 +
 backport/kconf/{zconf.l => lexer.l}           |  288 ++-
 backport/kconf/lkc.h                          |  106 +-
 backport/kconf/lkc_proto.h                    |   37 +-
 backport/kconf/lxdialog/BIG.FAT.WARNING       |    2 +-
 backport/kconf/lxdialog/check-lxdialog.sh     |   93 -
 backport/kconf/lxdialog/checklist.c           |   19 +-
 backport/kconf/lxdialog/dialog.h              |   23 +-
 backport/kconf/lxdialog/inputbox.c            |   22 +-
 backport/kconf/lxdialog/menubox.c             |   25 +-
 backport/kconf/lxdialog/textbox.c             |   17 +-
 backport/kconf/lxdialog/util.c                |   19 +-
 backport/kconf/lxdialog/yesno.c               |   19 +-
 backport/kconf/mconf-cfg.sh                   |   52 +
 backport/kconf/mconf.c                        |  178 +-
 backport/kconf/menu.c                         |  256 +--
 backport/kconf/nconf-cfg.sh                   |   50 +
 backport/kconf/nconf.c                        | 1549 +++++++++++++++++
 backport/kconf/nconf.gui.c                    |  614 +++++++
 backport/kconf/nconf.h                        |   83 +
 backport/kconf/{zconf.y => parser.y}          |  374 ++--
 backport/kconf/preprocess.c                   |  574 ++++++
 backport/kconf/setlocalversion                |  118 ++
 backport/kconf/symbol.c                       |  286 +--
 backport/kconf/update-upstream-kconfig.sh     |   28 +
 backport/kconf/util.c                         |   64 +-
 gentree.py                                    |   65 +-
 .../0001-enable-backports-built-in.patch      |   40 -
 .../0001-enable-backports-built-in.patch      |   36 +
 .../0001-enable-backports-built-in.patch      |   40 +
 lib/bpversion.py                              |   11 +-
 lib/kconfig.py                                |    5 +-
 patches/0097-skb-list/mac80211-rx.patch       |    7 +-
 52 files changed, 5542 insertions(+), 2022 deletions(-)
 create mode 100644 Makefile.subtrees
 create mode 100644 backport/kconf/GPL-2.0
 create mode 100644 backport/kconf/Kbuild.include
 create mode 100644 backport/kconf/README.kconfig
 create mode 100644 backport/kconf/internal.h
 create mode 100644 backport/kconf/kconfig.Makefile
 create mode 100644 backport/kconf/kconfig/.gitignore
 rename backport/kconf/{zconf.l => lexer.l} (55%)
 delete mode 100755 backport/kconf/lxdialog/check-lxdialog.sh
 create mode 100755 backport/kconf/mconf-cfg.sh
 create mode 100755 backport/kconf/nconf-cfg.sh
 create mode 100644 backport/kconf/nconf.c
 create mode 100644 backport/kconf/nconf.gui.c
 create mode 100644 backport/kconf/nconf.h
 rename backport/kconf/{zconf.y => parser.y} (68%)
 create mode 100644 backport/kconf/preprocess.c
 create mode 100755 backport/kconf/setlocalversion
 create mode 100755 backport/kconf/update-upstream-kconfig.sh
 delete mode 100644 integration-patches/0001-enable-backports/0001-enable-backports-built-in.patch
 create mode 100644 integration-patches/4.19/0001-enable-backports/0001-enable-backports-built-in.patch
 create mode 100644 integration-patches/5.4/0001-enable-backports/0001-enable-backports-built-in.patch
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#1 lore raw

PATCH v2 1/15 backport/kconf: remove our version of kconfig

From: Luis Chamberlain <[email protected]>

Updating kconfig from upstream is today a manual process. Drop it, we'll soon replace it with a kconfig git subtree.

---
 backport/Makefile.real                    |   32 +-
 backport/kconf/.gitignore                 |   17 -
 backport/kconf/Makefile                   |   23 -
 backport/kconf/conf.c                     |  717 -----------
 backport/kconf/confdata.c                 | 1249 ------------------
 backport/kconf/expr.c                     | 1305 -------------------
 backport/kconf/expr.h                     |  329 -----
 backport/kconf/kconf_id.c                 |   53 -
 backport/kconf/list.h                     |  132 --
 backport/kconf/lkc.h                      |  188 ---
 backport/kconf/lkc_proto.h                |   53 -
 backport/kconf/lxdialog/.gitignore        |    4 -
 backport/kconf/lxdialog/BIG.FAT.WARNING   |    4 -
 backport/kconf/lxdialog/check-lxdialog.sh |   93 --
 backport/kconf/lxdialog/checklist.c       |  332 -----
 backport/kconf/lxdialog/dialog.h          |  257 ----
 backport/kconf/lxdialog/inputbox.c        |  301 -----
 backport/kconf/lxdialog/menubox.c         |  437 -------
 backport/kconf/lxdialog/textbox.c         |  408 ------
 backport/kconf/lxdialog/util.c            |  713 ----------
 backport/kconf/lxdialog/yesno.c           |  114 --
 backport/kconf/mconf.c                    | 1047 ---------------
 backport/kconf/menu.c                     |  873 -------------
 backport/kconf/symbol.c                   | 1432 ---------------------
 backport/kconf/util.c                     |  167 ---
 backport/kconf/zconf.l                    |  372 ------
 backport/kconf/zconf.y                    |  782 -----------
 27 files changed, 2 insertions(+), 11432 deletions(-)
 delete mode 100644 backport/kconf/.gitignore
 delete mode 100644 backport/kconf/Makefile
 delete mode 100644 backport/kconf/conf.c
 delete mode 100644 backport/kconf/confdata.c
 delete mode 100644 backport/kconf/expr.c
 delete mode 100644 backport/kconf/expr.h
 delete mode 100644 backport/kconf/kconf_id.c
 delete mode 100644 backport/kconf/list.h
 delete mode 100644 backport/kconf/lkc.h
 delete mode 100644 backport/kconf/lkc_proto.h
 delete mode 100644 backport/kconf/lxdialog/.gitignore
 delete mode 100644 backport/kconf/lxdialog/BIG.FAT.WARNING
 delete mode 100755 backport/kconf/lxdialog/check-lxdialog.sh
 delete mode 100644 backport/kconf/lxdialog/checklist.c
 delete mode 100644 backport/kconf/lxdialog/dialog.h
 delete mode 100644 backport/kconf/lxdialog/inputbox.c
 delete mode 100644 backport/kconf/lxdialog/menubox.c
 delete mode 100644 backport/kconf/lxdialog/textbox.c
 delete mode 100644 backport/kconf/lxdialog/util.c
 delete mode 100644 backport/kconf/lxdialog/yesno.c
 delete mode 100644 backport/kconf/mconf.c
 delete mode 100644 backport/kconf/menu.c
 delete mode 100644 backport/kconf/symbol.c
 delete mode 100644 backport/kconf/util.c
 delete mode 100644 backport/kconf/zconf.l
 delete mode 100644 backport/kconf/zconf.y
backport/Makefile.real +2 -30
index 65508028e47d..32c48d287438 100644
@@ -10,36 +10,8 @@ endif
 .SUFFIXES:
 
 export CONFIG_=CPTCFG_
-
-.PHONY: menuconfig
-menuconfig:
-	@$(MAKE) -C kconf mconf
-	@./kconf/mconf Kconfig
-
-.PHONY: listnewconfig oldaskconfig oldconfig \
-	silentoldconfig olddefconfig oldnoconfig \
-	allnoconfig allyesconfig allmodconfig \
-	alldefconfig randconfig
-listnewconfig oldaskconfig oldconfig \
-silentoldconfig olddefconfig oldnoconfig \
-allnoconfig allyesconfig allmodconfig \
-alldefconfig randconfig:
-	@$(MAKE) -C kconf conf
-	@./kconf/conf --$@ Kconfig
-
-.PHONY: usedefconfig
-usedefconfig:
-	@$(MAKE) -C kconf conf
-	@./kconf/conf --defconfig=defconfig Kconfig
-
-.PHONY: savedefconfig
-savedefconfig:
-	@$(MAKE) -C kconf conf
-	@./kconf/conf --savedefconfig=defconfig Kconfig
-
-defconfig-%::
-	@$(MAKE) -C kconf conf
-	@./kconf/conf --defconfig=defconfigs/$(@:defconfig-%=%) Kconfig
+export KCONFIG_DIR=$(CURDIR)/kconf
+include $(KCONFIG_DIR)/kconfig.Makefile
 
 .config:
 	@test -f defconfig && $(MAKE) usedefconfig || (			\
backport/kconf/.gitignore deleted +0 -17
deleted file mode 100644
index 2da579edcbaf..000000000000
@@ -1,17 +0,0 @@
-#
-# Generated files
-#
-*.moc
-gconf.glade.h
-*.pot
-*.mo
-
-#
-# configuration programs
-#
-conf
-mconf
-nconf
-qconf
-gconf
-kxgettext
backport/kconf/Makefile deleted +0 -23
deleted file mode 100644
index 2004c44fda46..000000000000
@@ -1,23 +0,0 @@
-CFLAGS=-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
-
-LXDIALOG := lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o
-
-conf: conf.o zconf.tab.o
-mconf_CFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ccflags) -DLOCALE
-mconf_LDFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
-mconf: CFLAGS += $(mconf_CFLAGS)
-
-mconf: mconf.o zconf.tab.o $(LXDIALOG)
-	$(CC) -o mconf $^ $(mconf_LDFLAGS)
-
-.PHONY: clean
-clean:
-	@rm -f mconf conf *.o lxdialog/*.o
-
-zconf.tab.c: zconf.lex.c
-
-%.tab.c: %.y
-	$(YACC) -o$@ -t -l $<
-
-%.lex.c: %.l
-	$(LEX) -o$@ -L $<
backport/kconf/conf.c deleted +0 -717

717 lines not on this page · raw message

backport/kconf/confdata.c deleted +0 -1249

1,249 lines not on this page · raw message

backport/kconf/expr.c deleted +0 -1305

956 lines not on this page · raw message

backport/kconf/expr.h deleted +0 -329

329 lines not on this page · raw message

backport/kconf/kconf_id.c deleted +0 -53

53 lines not on this page · raw message

backport/kconf/list.h deleted +0 -132

132 lines not on this page · raw message

backport/kconf/lkc.h deleted +0 -188

188 lines not on this page · raw message

backport/kconf/lkc_proto.h deleted +0 -53

53 lines not on this page · raw message

backport/kconf/lxdialog/.gitignore deleted +0 -4
deleted file mode 100644
index 90b08ff025a6..000000000000

Lines of this file are not shown. View the raw message.

backport/kconf/lxdialog/BIG.FAT.WARNING deleted +0 -4
deleted file mode 100644
index a8999d82bdb3..000000000000

Lines of this file are not shown. View the raw message.

backport/kconf/lxdialog/check-lxdialog.sh deleted +0 -93

93 lines not on this page · raw message

backport/kconf/lxdialog/checklist.c deleted +0 -332

332 lines not on this page · raw message

backport/kconf/lxdialog/dialog.h deleted +0 -257

257 lines not on this page · raw message

backport/kconf/lxdialog/inputbox.c deleted +0 -301

301 lines not on this page · raw message

backport/kconf/lxdialog/menubox.c deleted +0 -437

437 lines not on this page · raw message

backport/kconf/lxdialog/textbox.c deleted +0 -408

408 lines not on this page · raw message

backport/kconf/lxdialog/util.c deleted +0 -713

713 lines not on this page · raw message

backport/kconf/lxdialog/yesno.c deleted +0 -114

114 lines not on this page · raw message

backport/kconf/mconf.c deleted +0 -1047

1,047 lines not on this page · raw message

backport/kconf/menu.c deleted +0 -873

873 lines not on this page · raw message

backport/kconf/symbol.c deleted +0 -1432

1,432 lines not on this page · raw message

backport/kconf/util.c deleted +0 -167

167 lines not on this page · raw message

backport/kconf/zconf.l deleted +0 -372

372 lines not on this page · raw message

backport/kconf/zconf.y deleted +0 -782

782 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 5 lines
2.30.2


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

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH v2 2/15 Squashed 'backport/kconf/' content from commit 98bda615

In reply to Thomas Pedersen

From: Luis Chamberlain <[email protected]>

git-subtree-dir: backport/kconf
git-subtree-split: 98bda6156678fbc1c0930a85950418af81c0a25f

---
 backport/kconf/.gitignore                 |   24 +
 backport/kconf/GPL-2.0                    |  359 +++++
 backport/kconf/Kbuild.include             |   73 +
 backport/kconf/Makefile                   |   62 +
 backport/kconf/README.kconfig             |   13 +
 backport/kconf/conf.c                     |  921 ++++++++++++
 backport/kconf/confdata.c                 | 1262 +++++++++++++++++
 backport/kconf/expr.c                     | 1303 +++++++++++++++++
 backport/kconf/expr.h                     |  326 +++++
 backport/kconf/internal.h                 |    9 +
 backport/kconf/kconf_id.c                 |   52 +
 backport/kconf/kconfig.Makefile           |   65 +
 backport/kconf/kconfig/.gitignore         |   16 +
 backport/kconf/lexer.l                    |  468 +++++++
 backport/kconf/list.h                     |  132 ++
 backport/kconf/lkc.h                      |  156 +++
 backport/kconf/lkc_proto.h                |   52 +
 backport/kconf/lxdialog/.gitignore        |    4 +
 backport/kconf/lxdialog/BIG.FAT.WARNING   |    4 +
 backport/kconf/lxdialog/checklist.c       |  319 +++++
 backport/kconf/lxdialog/dialog.h          |  238 ++++
 backport/kconf/lxdialog/inputbox.c        |  289 ++++
 backport/kconf/lxdialog/menubox.c         |  424 ++++++
 backport/kconf/lxdialog/textbox.c         |  395 ++++++
 backport/kconf/lxdialog/util.c            |  700 ++++++++++
 backport/kconf/lxdialog/yesno.c           |  101 ++
 backport/kconf/mconf-cfg.sh               |   52 +
 backport/kconf/mconf.c                    | 1037 ++++++++++++++
 backport/kconf/menu.c                     |  881 ++++++++++++
 backport/kconf/nconf-cfg.sh               |   50 +
 backport/kconf/nconf.c                    | 1549 +++++++++++++++++++++
 backport/kconf/nconf.gui.c                |  614 ++++++++
 backport/kconf/nconf.h                    |   83 ++
 backport/kconf/parser.y                   |  716 ++++++++++
 backport/kconf/preprocess.c               |  574 ++++++++
 backport/kconf/setlocalversion            |  118 ++
 backport/kconf/symbol.c                   | 1270 +++++++++++++++++
 backport/kconf/update-upstream-kconfig.sh |   28 +
 backport/kconf/util.c                     |  129 ++
 39 files changed, 14868 insertions(+)
 create mode 100644 backport/kconf/.gitignore
 create mode 100644 backport/kconf/GPL-2.0
 create mode 100644 backport/kconf/Kbuild.include
 create mode 100644 backport/kconf/Makefile
 create mode 100644 backport/kconf/README.kconfig
 create mode 100644 backport/kconf/conf.c
 create mode 100644 backport/kconf/confdata.c
 create mode 100644 backport/kconf/expr.c
 create mode 100644 backport/kconf/expr.h
 create mode 100644 backport/kconf/internal.h
 create mode 100644 backport/kconf/kconf_id.c
 create mode 100644 backport/kconf/kconfig.Makefile
 create mode 100644 backport/kconf/kconfig/.gitignore
 create mode 100644 backport/kconf/lexer.l
 create mode 100644 backport/kconf/list.h
 create mode 100644 backport/kconf/lkc.h
 create mode 100644 backport/kconf/lkc_proto.h
 create mode 100644 backport/kconf/lxdialog/.gitignore
 create mode 100644 backport/kconf/lxdialog/BIG.FAT.WARNING
 create mode 100644 backport/kconf/lxdialog/checklist.c
 create mode 100644 backport/kconf/lxdialog/dialog.h
 create mode 100644 backport/kconf/lxdialog/inputbox.c
 create mode 100644 backport/kconf/lxdialog/menubox.c
 create mode 100644 backport/kconf/lxdialog/textbox.c
 create mode 100644 backport/kconf/lxdialog/util.c
 create mode 100644 backport/kconf/lxdialog/yesno.c
 create mode 100755 backport/kconf/mconf-cfg.sh
 create mode 100644 backport/kconf/mconf.c
 create mode 100644 backport/kconf/menu.c
 create mode 100755 backport/kconf/nconf-cfg.sh
 create mode 100644 backport/kconf/nconf.c
 create mode 100644 backport/kconf/nconf.gui.c
 create mode 100644 backport/kconf/nconf.h
 create mode 100644 backport/kconf/parser.y
 create mode 100644 backport/kconf/preprocess.c
 create mode 100755 backport/kconf/setlocalversion
 create mode 100644 backport/kconf/symbol.c
 create mode 100755 backport/kconf/update-upstream-kconfig.sh
 create mode 100644 backport/kconf/util.c
backport/kconf/.gitignore new file +24 -0
new file mode 100644
index 000000000000..5e7b6db65d4e
@@ -0,0 +1,24 @@
+#
+# Generated files
+#
+*.moc
+*.lex.c
+
+#
+# configuration programs
+#
+conf
+mconf
+nconf
+qconf
+gconf
+
+parser.tab.h
+parser.tab.c
+
+*.o
+*.o.cmd
+
+lxdialog/*.o.cmd
+lxdialog/*.o
+
backport/kconf/GPL-2.0 new file +359 -0

359 lines not on this page · raw message

backport/kconf/Kbuild.include new file +73 -0

73 lines not on this page · raw message

backport/kconf/Makefile new file +62 -0

62 lines not on this page · raw message

backport/kconf/README.kconfig new file +13 -0
new file mode 100644
index 000000000000..ccd70231c0a8
@@ -0,0 +1,13 @@
+This effort allows for independent projects to use the Linux kernel's
+kconfig on external projects, and make updates of config really easy
+to do. It does this by letting you use this tree as a git subtree.
+
+For more details and to keep this small please refer to a simple demo
+project which demonstrates how to use this and uses it itself:
+
+https://github.com/mcgrof/init-kconfig
+
+The following projects use this git tree as a git subtree as well:
+
+  * https://github.com/mcgrof/kdevops
+  * https://github.com/mcgrof/fio-tests
backport/kconf/conf.c new file +921 -0

921 lines not on this page · raw message

backport/kconf/confdata.c new file +1262 -0

1,262 lines not on this page · raw message

backport/kconf/expr.c new file +1303 -0

286 lines not on this page · raw message

backport/kconf/expr.h new file +326 -0

326 lines not on this page · raw message

backport/kconf/internal.h new file +9 -0
new file mode 100644
index 000000000000..2f7298c21b64

Lines of this file are not shown. View the raw message.

backport/kconf/kconf_id.c new file +52 -0

52 lines not on this page · raw message

backport/kconf/kconfig.Makefile new file +65 -0

65 lines not on this page · raw message

backport/kconf/kconfig/.gitignore new file +16 -0
new file mode 100644
index 000000000000..4adcb5a5fb6c

Lines of this file are not shown. View the raw message.

backport/kconf/lexer.l new file +468 -0

468 lines not on this page · raw message

backport/kconf/list.h new file +132 -0

132 lines not on this page · raw message

backport/kconf/lkc.h new file +156 -0

156 lines not on this page · raw message

backport/kconf/lkc_proto.h new file +52 -0

52 lines not on this page · raw message

backport/kconf/lxdialog/.gitignore new file +4 -0
new file mode 100644
index 000000000000..90b08ff025a6

Lines of this file are not shown. View the raw message.

backport/kconf/lxdialog/BIG.FAT.WARNING new file +4 -0
new file mode 100644
index 000000000000..7cb5a7ec93d2

Lines of this file are not shown. View the raw message.

backport/kconf/lxdialog/checklist.c new file +319 -0

319 lines not on this page · raw message

backport/kconf/lxdialog/dialog.h new file +238 -0

238 lines not on this page · raw message

backport/kconf/lxdialog/inputbox.c new file +289 -0

289 lines not on this page · raw message

backport/kconf/lxdialog/menubox.c new file +424 -0

424 lines not on this page · raw message

backport/kconf/lxdialog/textbox.c new file +395 -0

395 lines not on this page · raw message

backport/kconf/lxdialog/util.c new file +700 -0

700 lines not on this page · raw message

backport/kconf/lxdialog/yesno.c new file +101 -0

101 lines not on this page · raw message

backport/kconf/mconf-cfg.sh new file +52 -0

52 lines not on this page · raw message

backport/kconf/mconf.c new file +1037 -0

1,037 lines not on this page · raw message

backport/kconf/menu.c new file +881 -0

881 lines not on this page · raw message

backport/kconf/nconf-cfg.sh new file +50 -0

50 lines not on this page · raw message

backport/kconf/nconf.c new file +1549 -0

1,549 lines not on this page · raw message

backport/kconf/nconf.gui.c new file +614 -0

614 lines not on this page · raw message

backport/kconf/nconf.h new file +83 -0

83 lines not on this page · raw message

backport/kconf/parser.y new file +716 -0

716 lines not on this page · raw message

backport/kconf/preprocess.c new file +574 -0

574 lines not on this page · raw message

backport/kconf/setlocalversion new file +118 -0

118 lines not on this page · raw message

backport/kconf/symbol.c new file +1270 -0

1,270 lines not on this page · raw message

backport/kconf/update-upstream-kconfig.sh new file +28 -0
new file mode 100755
index 000000000000..6701919e890d

Lines of this file are not shown. View the raw message.

backport/kconf/util.c new file +129 -0

129 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 5 lines
2.30.2


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

Part of the diff is not shown here. View the raw message.

#3 lore raw

PATCH v2 3/15 kconfig: fix backport syntax to work with linux-next next-20220204

In reply to Thomas Pedersen

From: Luis Chamberlain <[email protected]>

kconfig on next-20220204 has a few changes. First the options stuff has been deprecated leaving only the modules option. For variables though we can just use shell. And if we use variables on source we just need to use parens like $(FOO).

Fix all this.

This was tested with a backport generated for v5.15.8.

---
 backport/Kconfig.integrate |  6 +++---
 backport/Kconfig.package   | 18 +++++++++---------
 backport/Kconfig.sources   | 22 +++++++++++-----------
 backport/compat/Kconfig    |  2 +-
 4 files changed, 24 insertions(+), 24 deletions(-)
backport/Kconfig.integrate +3 -3
index 45ab3ecd4d57..d98c371cd438 100644
@@ -30,8 +30,8 @@ menuconfig BACKPORT_LINUX
 
 if BACKPORT_LINUX
 
-source "$BACKPORT_DIR/Kconfig.versions"
-source "$BACKPORT_DIR/Kconfig.sources"
-source "$BACKPORT_DIR/Kconfig.local"
+source "$(BACKPORT_DIR)/Kconfig.versions"
+source "$(BACKPORT_DIR)/Kconfig.sources"
+source "$(BACKPORT_DIR)/Kconfig.local"
 
 endif # BACKPORT_LINUX
backport/Kconfig.package +9 -9
index 250cdf3e4278..a933ead4a025 100644
@@ -2,24 +2,24 @@ mainmenu "Backports from $BACKPORTED_KERNEL_NAME $BACKPORTED_KERNEL_VERSION (bac
 
 config BACKPORT_DIR
 	string
-	option env="BACKPORT_DIR"
+	default $(shell, echo $BACKPORT_DIR)
 config BACKPORTS_VERSION
 	string
-	option env="BACKPORTS_VERSION"
+	default $(shell, echo $BACKPORTS_VERSION)
 config BACKPORTED_KERNEL_VERSION
 	string
-	option env="BACKPORTED_KERNEL_VERSION"
+	default $(shell, echo $BACKPORTED_KERNEL_VERSION)
 config BACKPORTED_KERNEL_NAME
 	string
-	option env="BACKPORTED_KERNEL_NAME"
+	default $(shell, echo $BACKPORTED_KERNEL_NAME)
 
 # Packaging hacks
-source "$BACKPORT_DIR/Kconfig.package.hacks"
+source "$(BACKPORT_DIR)/Kconfig.package.hacks"
 
 # Code we backport
-source "$BACKPORT_DIR/Kconfig.sources"
+source "$(BACKPORT_DIR)/Kconfig.sources"
 
 # these will be generated
-source "$BACKPORT_DIR/Kconfig.kernel"
-source "$BACKPORT_DIR/Kconfig.versions"
-source "$BACKPORT_DIR/Kconfig.local"
+source "$(BACKPORT_DIR)/Kconfig.kernel"
+source "$(BACKPORT_DIR)/Kconfig.versions"
+source "$(BACKPORT_DIR)/Kconfig.local"
backport/Kconfig.sources +11 -11
index 87ffca94f7ec..c3b5ba64cc4b 100644
@@ -1,17 +1,17 @@
 # this has the configuration for the backport code
-source "$BACKPORT_DIR/compat/Kconfig"
+source "$(BACKPORT_DIR)/compat/Kconfig"
 
 # these are copied from the kernel
-source "$BACKPORT_DIR/net/wireless/Kconfig"
-source "$BACKPORT_DIR/net/mac80211/Kconfig"
-source "$BACKPORT_DIR/net/qrtr/Kconfig"
-source "$BACKPORT_DIR/drivers/bus/mhi/Kconfig"
-source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
-source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
+source "$(BACKPORT_DIR)/net/wireless/Kconfig"
+source "$(BACKPORT_DIR)/net/mac80211/Kconfig"
+source "$(BACKPORT_DIR)/net/qrtr/Kconfig"
+source "$(BACKPORT_DIR)/drivers/bus/mhi/Kconfig"
+source "$(BACKPORT_DIR)/drivers/net/wireless/Kconfig"
+source "$(BACKPORT_DIR)/drivers/net/usb/Kconfig"
 
-source "$BACKPORT_DIR/drivers/ssb/Kconfig"
-source "$BACKPORT_DIR/drivers/bcma/Kconfig"
+source "$(BACKPORT_DIR)/drivers/ssb/Kconfig"
+source "$(BACKPORT_DIR)/drivers/bcma/Kconfig"
 
-source "$BACKPORT_DIR/drivers/usb/class/Kconfig"
+source "$(BACKPORT_DIR)/drivers/usb/class/Kconfig"
 
-source "$BACKPORT_DIR/drivers/staging/Kconfig"
+source "$(BACKPORT_DIR)/drivers/staging/Kconfig"
backport/compat/Kconfig +1 -1
index 174322d8a340..1f690e009214 100644
@@ -54,7 +54,7 @@
 #
 
 config BP_MODULES
-	option modules
+	modules
 	bool
 	default MODULES
 
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#4 lore raw

PATCH v2 4/15 Makefile.subtrees: document how to update kconfig

In reply to Thomas Pedersen

From: Luis Chamberlain <[email protected]>

Now that kconfig is a git sub tree document what we need to do to update version of config. We use squash here so we don't carry the kconfig tree update logs in our commit log.

---
 Makefile.subtrees | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 Makefile.subtrees
Makefile.subtrees new file +10 -0
new file mode 100644
index 000000000000..49bb13b36060
@@ -0,0 +1,10 @@
+# If you need to use a git subtree, please add it here.
+add-kconfig-remote:
+	git remote add kconfig https://github.com/mcgrof/kconfig.git
+
+add-kconfig:
+	git subtree add --prefix=backport/kconf --squash kconfig master
+
+refresh-kconfig:
+	git fetch kconfig
+	git subtree pull --prefix=backport/kconf --squash kconfig master
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#5 lore raw

PATCH v2 5/15 backport: define BACKPORT_DIR for Kconfig.integrate

In reply to Thomas Pedersen

define BACKPORT_DIR in the integration Kconfig so we don't have to supply it in an environment variable (where it can probably only ever be "backports/" anyway).

---
 backport/Kconfig.integrate | 1 +
 1 file changed, 1 insertion(+)
backport/Kconfig.integrate +1 -0
index d98c371cd438..6c85cdc27568 100644
@@ -1,3 +1,4 @@
+BACKPORT_DIR:=%%BACKPORT_DIR%%
 config BACKPORT_INTEGRATE
 	bool
 	def_bool y
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#6 lore raw

PATCH v2 6/15 gentree: update kconfig source var to new kconfig format

In reply to Thomas Pedersen
---
 gentree.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
gentree.py +2 -2
index 05bb91b39291..4705ffa08fc4 100755
@@ -701,7 +701,7 @@ def _main():
                            project_dir = args.outdir,
                            target_dir = os.path.join(args.outdir, 'backports/'),
                            target_dir_name = 'backports/',
-                           kconfig_source_var = '$BACKPORT_DIR',
+                           kconfig_source_var = '$(BACKPORT_DIR)',
                            )
     else:
         bpid = Bp_Identity(integrate = args.integrate,
@@ -710,7 +710,7 @@ def _main():
                            project_dir = args.outdir,
                            target_dir = args.outdir,
                            target_dir_name = '',
-                           kconfig_source_var = '$BACKPORT_DIR',
+                           kconfig_source_var = '$(BACKPORT_DIR)',
                            )
 
     def logwrite(msg):
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#7 lore raw

PATCH v2 7/15 gentree: try to make patch operation idempotent in case of --clean

In reply to Thomas Pedersen

The patch utility will not just skip a patch if it has already been applied. In the case of --integrate --clean we may need to repatch the kernel Makefile, which wasn't removed along with backports/. To support reapplying patches without error, revert a failed patch with -R, then reapply it.

---
 gentree.py | 56 +++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 39 insertions(+), 17 deletions(-)
gentree.py +39 -17
index 4705ffa08fc4..0576e14d6fe5 100755
@@ -484,6 +484,31 @@ def upload_release(args, rel_prep, logwrite=lambda x:None):
         kup_cmd = "kup put /\n\t\t%s /\n\t\t%s /\n\t\t%s" % (gzip_name, tar_name + '.asc', korg_path)
         logwrite("kup-test: skipping cmd: %s" % kup_cmd)
 
+def do_patch(args, logwrite, pfile, target_dir, reverse=False):
+    cmd = 'patch -p1'.split()
+
+    if reverse:
+        cmd.append('-R')
+    process = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+                               stderr=subprocess.STDOUT, stdin=subprocess.PIPE,
+                               close_fds=True, universal_newlines=True,
+                               cwd=target_dir)
+    output = process.communicate(input=open(pfile, 'r').read())[0]
+    output = output.split('\n')
+    if output[-1] == '':
+        output = output[:-1]
+    if args.verbose:
+        for line in output:
+            logwrite('> %s' % line)
+    else:
+        logwrite("Failed to apply changes from %s" % print_name)
+        if not args.verbose:
+            for line in output:
+                logwrite('> %s' % line)
+
+    return process.returncode
+
+
 def apply_patches(args, desc, source_dir, patch_src, target_dir, logwrite=lambda x:None):
     """
     Given a path of a directories of patches and SmPL patches apply
@@ -539,23 +564,20 @@ def apply_patches(args, desc, source_dir, patch_src, target_dir, logwrite=lambda
                 fullfn = os.path.join(target_dir, patched_file)
                 shutil.copyfile(fullfn, fullfn + '.orig_file')
 
-        process = subprocess.Popen(['patch', '-p1'], stdout=subprocess.PIPE,
-                                   stderr=subprocess.STDOUT, stdin=subprocess.PIPE,
-                                   close_fds=True, universal_newlines=True,
-                                   cwd=target_dir)
-        output = process.communicate(input=open(pfile, 'r').read())[0]
-        output = output.split('\n')
-        if output[-1] == '':
-            output = output[:-1]
-        if args.verbose:
-            for line in output:
-                logwrite('> %s' % line)
-        if process.returncode != 0:
-            if not args.verbose:
-                logwrite("Failed to apply changes from %s" % print_name)
-                for line in output:
-                    logwrite('> %s' % line)
-            return 2
+        err = do_patch(args, logwrite, pfile, target_dir)
+        if err > 0:
+            if not args.clean or err == 2:
+                return 2
+
+            # in case of clean, try to make patch idempotent
+            # try the reverse
+            err = do_patch(args, logwrite, pfile, target_dir, reverse=True)
+            if err != 0:
+                return 2
+            # that worked, now reapply..
+            err = do_patch(args, logwrite, pfile, target_dir)
+            if err != 0:
+                return 2
 
         if args.refresh:
             pfilef = open(pfile + '.tmp', 'a')
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#8 lore raw

PATCH v2 8/15 gentree: do not prefix Kernel.local symbols

In reply to Thomas Pedersen

In package mode the prefix is empty, so the ignore list does not matter. In integration mode there is a nonzero prefix, so add Kconfig.local to the ignore list like elsewhere in gentree.py.

---
 gentree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
gentree.py +1 -1
index 0576e14d6fe5..9699ce0128d0 100755
@@ -235,7 +235,7 @@ def add_automatic_backports(args):
     export = re.compile(r'^EXPORT_SYMBOL(_GPL)?\((?P<sym>[^\)]*)\)')
     bpi = kconfig.get_backport_info(os.path.join(args.bpid.target_dir, 'compat', 'Kconfig'))
     configtree = kconfig.ConfigTree(os.path.join(args.bpid.target_dir, 'Kconfig'), args.bpid)
-    ignore=['Kconfig.kernel', 'Kconfig.versions']
+    ignore=['Kconfig.kernel', 'Kconfig.versions', 'Kconfig.local']
     configtree.verify_sources(ignore=ignore)
     git_debug_snapshot(args, "verify sources for automatic backports")
     all_selects = configtree.all_selects()
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#9 lore raw

PATCH v2 9/15 lib/bpversion: calculate Kconfig.versions for next major version

In reply to Thomas Pedersen
---
 lib/bpversion.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
lib/bpversion.py +8 -3
index aefdcf0ce3c9..1659823baaf4 100644
@@ -42,7 +42,12 @@ def kernelversion(tree):
 
 def genkconfig_versions(rel_specs):
     data = ''
-    for i in range(int(rel_specs['PATCHLEVEL']) + 1, 99):
-        data += "config BACKPORT_KERNEL_%s_%s\n" % (rel_specs['VERSION'], i)
-        data += "    def_bool y\n"
+    print(str(rel_specs))
+    version = int(rel_specs['VERSION'])
+    start_patchlevel = int(rel_specs['PATCHLEVEL']) + 1
+    for i in range(version, version + 2):
+        for j in range(start_patchlevel, 99):
+            data += "config BACKPORT_KERNEL_%s_%s\n" % (i, j)
+            data += "    def_bool y\n"
+        start_patchlevel = 0
     return data
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#10 lore raw

PATCH v2 10/15 backport: expose BP_MODULES in package mode only

In reply to Thomas Pedersen

Otherwise 'option modules' conflicts with the kernel namespace.

---
 backport/Kconfig.package.hacks | 10 ++++++++++
 backport/compat/Kconfig        |  9 ---------
 2 files changed, 10 insertions(+), 9 deletions(-)
backport/Kconfig.package.hacks +10 -0
index 6a429dd107fd..3c97304525c1 100644
@@ -6,3 +6,13 @@ config NET_CORE
 	def_bool y
 config EXPERT
 	def_bool y
+
+config BP_MODULES
+	modules
+	bool
+	default MODULES
+
+	help
+	This symbol is necessary for the newer kconf tool, it looks
+	for the "option modules" to control the 'm' state.
+
backport/compat/Kconfig +0 -9
index 1f690e009214..87df1f731a34 100644
@@ -53,15 +53,6 @@
 # Variations are obviously possible.
 #
 
-config BP_MODULES
-	modules
-	bool
-	default MODULES
-
-	help
-	This symbol is necessary for the newer kconf tool, it looks
-	for the "option modules" to control the 'm' state.
-
 config BPAUTO_BUILD_NLATTR
 	def_bool y
 	depends on KERNEL_5_2
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#11 lore raw

PATCH v2 11/15 kconfig: fix select conversion for BPAUTO_ symbols in integration mode

In reply to Thomas Pedersen

In integration mode, the bpid.project_prefix is nonzero and needs to be prepended to the expected symbol to get a match.

---
 lib/kconfig.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
lib/kconfig.py +3 -2
index a77f8a54eea7..0b5f8ebc1726 100644
@@ -228,9 +228,10 @@ class ConfigTree(object):
             out = ''
             for l in open(os.path.join(self.bpid.target_dir, nf), 'r'):
                 m = sel_line.match(l)
+                bpauto_prefix = self.bpid.project_prefix + 'BPAUTO_'
                 if m and not m.group('sym') in syms:
-                    if 'BPAUTO_' + m.group('sym') in syms:
-                        out += m.group('spc') + "select BPAUTO_" + m.group('sym') + '\n'
+                    if bpauto_prefix + m.group('sym') in syms:
+                        out += m.group('spc') + "select " + bpauto_prefix + m.group('sym') + '\n'
                     else:
                         out += m.group('spc') + "depends on " + m.group('sym') + '\n'
                 else:
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#12 lore raw

PATCH v2 12/15 integration-patches: refresh integration patch

In reply to Thomas Pedersen

From: Thomas Pedersen <[email protected]>

This was refreshed on Linux v4.19

---
 .../0001-enable-backports-built-in.patch      | 34 ++++++++-----------
 1 file changed, 15 insertions(+), 19 deletions(-)
integration-patches/0001-enable-backports/0001-enable-backports-built-in.patch +15 -19
index d66b203d0d07..35765ed113eb 100644
@@ -1,40 +1,36 @@
-Allow backports to be integrated into vmlinux.
-
 diff --git a/Makefile b/Makefile
-index 6d1e304..de26b18 100644
+index e5d41b6792d7..cdd600bda9d1 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -542,6 +542,7 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
- 	$(Q)$(MAKE) $(build)=$(@)
+@@ -594,6 +594,7 @@ export KBUILD_MODULES KBUILD_BUILTIN
  
+ ifeq ($(KBUILD_EXTMOD),)
  # Objects we will link into vmlinux / subdirs we need to visit
 +backports-y 	:= backports/
  init-y		:= init/
  drivers-y	:= drivers/ sound/ firmware/
  net-y		:= net/
-@@ -820,13 +821,16 @@ core-y		+= kernel/ mm/ fs/ ipc/ security/ crypto/ block/
+@@ -989,11 +990,13 @@ core-y		+= kernel/ certs/ 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)))
+ 		     $(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y)))
  
  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-))))
+-		     $(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-))))
++		     $(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-) $(backports))))
  
-+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))
-@@ -837,7 +841,7 @@ libs-y		:= $(libs-y1) $(libs-y2)
++backports-y	:= $(patsubst %/, %/built-in.a, $(backports-y))
+ init-y		:= $(patsubst %/, %/built-in.a, $(init-y))
+ core-y		:= $(patsubst %/, %/built-in.a, $(core-y))
+ drivers-y	:= $(patsubst %/, %/built-in.a, $(drivers-y))
+@@ -1004,7 +1007,7 @@ virt-y		:= $(patsubst %/, %/built-in.a, $(virt-y))
  
  # Externally visible symbols (used by link-vmlinux.sh)
  export KBUILD_VMLINUX_INIT := $(head-y) $(init-y)
--export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y)
-+export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(backports-y)
+-export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(net-y) $(virt-y)
++export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(net-y) $(virt-y) $(backports-y)
+ export KBUILD_VMLINUX_LIBS := $(libs-y1)
  export KBUILD_LDS          := arch/$(SRCARCH)/kernel/vmlinux.lds
  export LDFLAGS_vmlinux
- # used by scripts/pacmage/Makefile
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#13 lore raw

PATCH v2 13/15 integration-patches: make patches per target kernel version

In reply to Thomas Pedersen

The integration patches are applied to the target kernel, so really need to be versioned accordingly.

---
 gentree.py                                                     | 3 ++-
 .../0001-enable-backports/0001-enable-backports-built-in.patch | 0
 2 files changed, 2 insertions(+), 1 deletion(-)
 rename integration-patches/{ => 4.19}/0001-enable-backports/0001-enable-backports-built-in.patch (100%)
gentree.py +2 -1
index 9699ce0128d0..04e47c76e607 100755
@@ -1137,8 +1137,9 @@ def process(kerneldir, copy_list_file, git_revision=None,
         f.write('source "backports/Kconfig"\n')
         f.close()
         git_debug_snapshot(args, "hooked backport to top level Kconfig")
+        patchdir = 'integration-patches/%s.%s/' % (rel_specs['VERSION'], rel_specs['PATCHLEVEL'])
 
-        failure = apply_patches(args, "integration", source_dir, 'integration-patches/',
+        failure = apply_patches(args, "integration", source_dir, patchdir,
                                 bpid.project_dir, logwrite)
         if failure:
             return failure
integration-patches/4.19/0001-enable-backports/0001-enable-backports-built-in.patch renamed from integration-patches/0001-enable-backports/0001-enable-backports-built-in.patch +0 -0
similarity index 100%
rename from integration-patches/0001-enable-backports/0001-enable-backports-built-in.patch
rename to integration-patches/4.19/0001-enable-backports/0001-enable-backports-built-in.patch
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#14 lore raw

PATCH v2 14/15 integration-patches: support 5.4 target kernel

In reply to Thomas Pedersen
---
 .../0001-enable-backports-built-in.patch      | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 integration-patches/5.4/0001-enable-backports/0001-enable-backports-built-in.patch
integration-patches/5.4/0001-enable-backports/0001-enable-backports-built-in.patch new file +40 -0
new file mode 100644
index 000000000000..f086e5412672
@@ -0,0 +1,40 @@
+diff --git a/Makefile b/Makefile
+index d4d36c61940b..ad559055bacf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -616,6 +616,7 @@ endif
+ ifeq ($(KBUILD_EXTMOD),)
+ # Objects we will link into vmlinux / subdirs we need to visit
+ init-y		:= init/
++backports-y 	:= backports/
+ drivers-y	:= drivers/ sound/
+ drivers-$(CONFIG_SAMPLES) += samples/
+ drivers-$(CONFIG_KERNEL_HEADER_TEST) += include/
+@@ -1017,15 +1018,17 @@ core-y		+= kernel/ certs/ 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) $(virt-y)))
+ 
+ vmlinux-alldirs	:= $(sort $(vmlinux-dirs) Documentation \
+ 		     $(patsubst %/,%,$(filter %/, $(init-) $(core-) \
+-			$(drivers-) $(net-) $(libs-) $(virt-))))
++			$(drivers-) $(net-) $(libs-) $(virt-) $(backports))))
+ 
+ build-dirs	:= $(vmlinux-dirs)
+ clean-dirs	:= $(vmlinux-alldirs)
+ 
++backports-y	:= $(patsubst %/, %/built-in.a, $(backports-y))
+ init-y		:= $(patsubst %/, %/built-in.a, $(init-y))
+ core-y		:= $(patsubst %/, %/built-in.a, $(core-y))
+ drivers-y	:= $(patsubst %/, %/built-in.a, $(drivers-y))
+@@ -1036,7 +1039,7 @@ virt-y		:= $(patsubst %/, %/built-in.a, $(virt-y))
+ 
+ # Externally visible symbols (used by link-vmlinux.sh)
+ export KBUILD_VMLINUX_OBJS := $(head-y) $(init-y) $(core-y) $(libs-y2) \
+-			      $(drivers-y) $(net-y) $(virt-y)
++			      $(drivers-y) $(net-y) $(virt-y) $(backports-y)
+ export KBUILD_VMLINUX_LIBS := $(libs-y1)
+ export KBUILD_LDS          := arch/$(SRCARCH)/kernel/vmlinux.lds
+ export LDFLAGS_vmlinux
Signature · 4 lines
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#15 lore raw

PATCH v2 15/15 patches: fixup skb list patch

In reply to Thomas Pedersen

4.19 does indeed add skb->list, but skb_list_del_init() was not added until 4.20. This patch fixes builds against 4.19. Tested with backported v5.15.33.

---
 patches/0097-skb-list/mac80211-rx.patch | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
patches/0097-skb-list/mac80211-rx.patch +6 -1
index 65189dd94e52..1cad4f8ac30b 100644
@@ -99,14 +99,19 @@ the older kernel instead. The list attributes where also backported to
  
  
  	/*
-@@ -5005,8 +5027,13 @@ void ieee80211_rx_napi(struct ieee80211_
+@@ -5005,8 +5027,18 @@ void ieee80211_rx_napi(struct ieee80211_
  		return;
  	}
  
 +#if LINUX_VERSION_IS_GEQ(4,19,0)
  	list_for_each_entry_safe(skb, tmp, &list, list) {
++#if LINUX_VERSION_IS_GEQ(4,20,0)
  		skb_list_del_init(skb);
 +#else
++		__list_del_entry(&skb->list);
++		skb_mark_not_on_list(skb);
++#endif
++#else
 +	skb_queue_walk_safe(&list, skb, tmp) {
 +		__skb_unlink(skb, &list);
 +#endif
Signature · 4 lines
2.30.2

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