mbox series

[0/7] Resurrect backports Integration Mode

Message ID 20211124055505.1267128-1-thomas@adapt-ip.com (mailing list archive)
Headers show
Series Resurrect backports Integration Mode | expand

Message

Thomas Pedersen Nov. 24, 2021, 5:54 a.m. UTC
The backports integration mode[0] seems to have suffered some bitrot and
doesn't currently work. Integration mode can be convenient in certain
use cases and build flows though, so this patch set tries to fixup the
integration mode.

These changes were developed and tested for backporting a v5.10
backports + linux branch to a v4.19 kernel. v5.15-rc6 backports + linux
was successfully built against v4.19.

0: https://backports.wiki.kernel.org/index.php/Documentation/integration

Thomas Pedersen (7):
  backport: refresh integration patch
  backport: resurrect integrations
  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

 backport/Kconfig.integrate                    | 11 ++--
 backport/Kconfig.package                      | 10 +--
 backport/Kconfig.package.hacks                |  9 +++
 backport/Kconfig.sources                      | 18 +++---
 backport/compat/Kconfig                       |  9 ---
 gentree.py                                    | 62 +++++++++++++------
 .../0001-enable-backports-built-in.patch      | 34 +++++-----
 lib/bpversion.py                              | 11 +++-
 lib/kconfig.py                                |  5 +-
 9 files changed, 96 insertions(+), 73 deletions(-)

Comments

Luis Chamberlain Nov. 24, 2021, 1:57 p.m. UTC | #1
On Tue, Nov 23, 2021 at 09:54:58PM -0800, Thomas Pedersen wrote:
> The backports integration mode[0] seems to have suffered some bitrot and
> doesn't currently work. Integration mode can be convenient in certain
> use cases and build flows though, so this patch set tries to fixup the
> integration mode.
> 
> These changes were developed and tested for backporting a v5.10
> backports + linux branch to a v4.19 kernel. v5.15-rc6 backports + linux
> was successfully built against v4.19.
> 
> 0: https://backports.wiki.kernel.org/index.php/Documentation/integration

Good stuff, looks good, just one thing the $FOO --> $(FOO) thing,
does that assume/require a bump in kconfig used in backports, ie,
if not using integration does that still work? If so then cool,
otherwise an upgrade to kconfig would be needed, and if that is
going to be done, I have a better solution to bump kconfig soon.

I'll be making kconfig code stand alone tree soon which projects
which want to embrace it can use it as a git subtree (note this
is different and better than a git sub module). Then updates
can just be done with something like:

  make refresh-kconfig

And that would just get the latest kconfig and trigger a merge commit 
locally.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Thomas Pedersen Nov. 25, 2021, 4 a.m. UTC | #2
Hi Luis,

On 2021-11-24 05:57, Luis Chamberlain wrote:
> On Tue, Nov 23, 2021 at 09:54:58PM -0800, Thomas Pedersen wrote:
>> The backports integration mode[0] seems to have suffered some bitrot 
>> and
>> doesn't currently work. Integration mode can be convenient in certain
>> use cases and build flows though, so this patch set tries to fixup the
>> integration mode.
>> 
>> These changes were developed and tested for backporting a v5.10
>> backports + linux branch to a v4.19 kernel. v5.15-rc6 backports + 
>> linux
>> was successfully built against v4.19.
>> 
>> 0: 
>> https://backports.wiki.kernel.org/index.php/Documentation/integration
> 
> Good stuff, looks good, just one thing the $FOO --> $(FOO) thing,
> does that assume/require a bump in kconfig used in backports, ie,
> if not using integration does that still work? If so then cool,
> otherwise an upgrade to kconfig would be needed, and if that is
> going to be done, I have a better solution to bump kconfig soon.

I just tried the package mode, and no it doesn't work. The embedded 
kconfig doesn't like "$()".

In that case I'll wait for your changes and resubmit once they've been 
merged.

> I'll be making kconfig code stand alone tree soon which projects
> which want to embrace it can use it as a git subtree (note this
> is different and better than a git sub module). Then updates
> can just be done with something like:
> 
>   make refresh-kconfig
> 
> And that would just get the latest kconfig and trigger a merge commit
> locally.

Cool. It seems kconfig is becoming somewhat of a standard for build time 
configuration (backports, u-boot, buildroot, etc.), so it makes sense to 
live as a standalone repo.

Thanks.
Hauke Mehrtens Nov. 28, 2021, 9:52 p.m. UTC | #3
On 11/24/21 6:54 AM, Thomas Pedersen wrote:
> The backports integration mode[0] seems to have suffered some bitrot and
> doesn't currently work. Integration mode can be convenient in certain
> use cases and build flows though, so this patch set tries to fixup the
> integration mode.
> 
> These changes were developed and tested for backporting a v5.10
> backports + linux branch to a v4.19 kernel. v5.15-rc6 backports + linux
> was successfully built against v4.19.
> 
> 0: https://backports.wiki.kernel.org/index.php/Documentation/integration

Thank you for your work. I didn't use this feature and you are right it 
did bit rot.

Hauke

> 
> Thomas Pedersen (7):
>    backport: refresh integration patch
>    backport: resurrect integrations
>    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
> 
>   backport/Kconfig.integrate                    | 11 ++--
>   backport/Kconfig.package                      | 10 +--
>   backport/Kconfig.package.hacks                |  9 +++
>   backport/Kconfig.sources                      | 18 +++---
>   backport/compat/Kconfig                       |  9 ---
>   gentree.py                                    | 62 +++++++++++++------
>   .../0001-enable-backports-built-in.patch      | 34 +++++-----
>   lib/bpversion.py                              | 11 +++-
>   lib/kconfig.py                                |  5 +-
>   9 files changed, 96 insertions(+), 73 deletions(-)
> 

--
To unsubscribe from this list: send the line "unsubscribe backports" in
Luis Chamberlain Feb. 4, 2022, 2:22 a.m. UTC | #4
On Wed, Nov 24, 2021 at 08:00:18PM -0800, Thomas Pedersen wrote:
> Hi Luis,
> 
> On 2021-11-24 05:57, Luis Chamberlain wrote:
> > On Tue, Nov 23, 2021 at 09:54:58PM -0800, Thomas Pedersen wrote:
> > > The backports integration mode[0] seems to have suffered some bitrot
> > > and
> > > doesn't currently work. Integration mode can be convenient in certain
> > > use cases and build flows though, so this patch set tries to fixup the
> > > integration mode.
> > > 
> > > These changes were developed and tested for backporting a v5.10
> > > backports + linux branch to a v4.19 kernel. v5.15-rc6 backports +
> > > linux
> > > was successfully built against v4.19.
> > > 
> > > 0:
> > > https://backports.wiki.kernel.org/index.php/Documentation/integration
> > 
> > Good stuff, looks good, just one thing the $FOO --> $(FOO) thing,
> > does that assume/require a bump in kconfig used in backports, ie,
> > if not using integration does that still work? If so then cool,
> > otherwise an upgrade to kconfig would be needed, and if that is
> > going to be done, I have a better solution to bump kconfig soon.
> 
> I just tried the package mode, and no it doesn't work. The embedded kconfig
> doesn't like "$()".
> 
> In that case I'll wait for your changes and resubmit once they've been
> merged.

OK I have kconfig as a git subtree and two trees using it. The main
kconfig tree:

https://github.com/mcgrof/kconfig

Two demos:

https://github.com/mcgrof/init-kconfig
https://github.com/mcgrof/kdevops

Can someone try to convert over backports to it?

First:

git rm -rf backport/kconf/

I think something like the following is needed after that:


diff --git a/backport/Makefile.real b/backport/Makefile.real
index 65508028..1488e117 100644
--- a/backport/Makefile.real
+++ b/backport/Makefile.real
@@ -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)/scripts/kconf
+include $(KCONFIG_DIR)/kconfig.Makefile
 
 .config:
 	@test -f defconfig && $(MAKE) usedefconfig || (			\

Or just wait to add the code until after the next commits.
Then see this on init-kconfig example:

mcgrof@fulton ~/devel/init-kconfig (git::master)$ cat Makefile.subtrees 
# 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=scripts/kconfig/ kconfig master

refresh-kconfig:
	git fetch kconfig
	git subtree pull --prefix=scripts/kconfig/ kconfig master

The prefix will be differnt for backports, so backport/kconfig/
So you can just run this manually first:

git remote add kconfig https://github.com/mcgrof/kconfig.git
git subtree add --prefix=backport/kconf/ kconfig master

Generate a tree and see if that worked.

> > I'll be making kconfig code stand alone tree soon which projects
> > which want to embrace it can use it as a git subtree (note this
> > is different and better than a git sub module). Then updates
> > can just be done with something like:
> > 
> >   make refresh-kconfig
> > 
> > And that would just get the latest kconfig and trigger a merge commit
> > locally.
> 
> Cool. It seems kconfig is becoming somewhat of a standard for build time
> configuration (backports, u-boot, buildroot, etc.), so it makes sense to
> live as a standalone repo.

Indeed. Hence the above effort. I finally got it. If this works then
we can just sync kconfig once in the kconfig tree and then projects
which use it can just run the refresh target to update.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Luis Chamberlain Feb. 4, 2022, 9:41 p.m. UTC | #5
On Thu, Feb 03, 2022 at 06:22:16PM -0800, Luis Chamberlain wrote:
> Can someone try to convert over backports to it?

Nevermind, I've done this work and I'll post patches now.

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