All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison
@ 2020-11-11 16:22 Julien Olivain
  2020-11-11 16:22 ` [Buildroot] [PATCH 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Julien Olivain @ 2020-11-11 16:22 UTC (permalink / raw)
  To: buildroot

Upstream backports package does not define the LEX/YACC Makefile
variables, contrary to the Kernel which is defining those in [1]. The
default "lex" and "yacc" are then used. On some systems, "yacc" is
Berkeley Yacc. Kconfig parser files are using non-Posix Bison
constructs.

Attempting to generate the parser with byacc fails with error:

    yacc: e - line 97 of "zconf.y", syntax error
    %destructor {
    ^

This patch adds the missing dependencies on host-flex and host-bison,
and make sure the package compilation will use those, to fix this issue.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=73a4f6dbe70a1b93c11e2d1d6ca68f3522daf434

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/linux-backports/linux-backports.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
index 1d7d6e7f00..fafb8efb91 100644
--- a/package/linux-backports/linux-backports.mk
+++ b/package/linux-backports/linux-backports.mk
@@ -11,6 +11,8 @@ LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stab
 LINUX_BACKPORTS_LICENSE = GPL-2.0
 LINUX_BACKPORTS_LICENSE_FILES = COPYING
 
+LINUX_BACKPORTS_DEPENDENCIES = host-bison host-flex
+
 ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y)
 LINUX_BACKPORTS_KCONFIG_FILE = $(LINUX_BACKPORTS_DIR)/defconfigs/$(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG))
 else ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y)
@@ -33,6 +35,8 @@ LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS)
 # LINUX_BACKPORTS_MODULE_MAKE_OPTS is used by the kernel-module infra.
 #
 LINUX_BACKPORTS_MAKE_OPTS = \
+	LEX="$(HOST_DIR)/bin/flex" \
+	YACC="$(HOST_DIR)/bin/bison" \
 	BACKPORT_DIR=$(@D) \
 	KLIB_BUILD=$(LINUX_DIR) \
 	KLIB=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED) \
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH 2/2] package/linux-backports: bump version to 5.8
  2020-11-11 16:22 [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison Julien Olivain
@ 2020-11-11 16:22 ` Julien Olivain
  2020-11-11 21:47   ` Petr Vorel
  2020-11-11 21:06 ` [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison Yann E. MORIN
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 26+ messages in thread
From: Julien Olivain @ 2020-11-11 16:22 UTC (permalink / raw)
  To: buildroot

Attempting to compile this package with newer Kernel version (e.g. v5.4)
fails with message:

   Generating local configuration database from kernel ...Kernel version parse failed!

Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
rather old and beat the very purpose of having newer drivers in older
kernels.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/linux-backports/linux-backports.hash | 4 ++--
 package/linux-backports/linux-backports.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/linux-backports/linux-backports.hash b/package/linux-backports/linux-backports.hash
index f39bc2ed27..0d60955b02 100644
--- a/package/linux-backports/linux-backports.hash
+++ b/package/linux-backports/linux-backports.hash
@@ -1,4 +1,4 @@
-# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v4.4.2/sha256sums.asc
-sha256  a979e194c2ed9fdfca092a448e626d85c5af0e4de5ad993c0967afd15af01285  backports-4.4.2-1.tar.xz
+# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.8/sha256sums.asc
+sha256  19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b  backports-5.8-1.tar.xz
 # Locally computed
 sha256  af8067302947c01fd9eee72befa54c7e3ef8a48fecde7fd71277f2290b2bf0f7  COPYING
diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
index fafb8efb91..cdce709722 100644
--- a/package/linux-backports/linux-backports.mk
+++ b/package/linux-backports/linux-backports.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
+LINUX_BACKPORTS_VERSION_MAJOR = 5.8
 LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
 LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
 LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison
  2020-11-11 16:22 [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison Julien Olivain
  2020-11-11 16:22 ` [Buildroot] [PATCH 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
@ 2020-11-11 21:06 ` Yann E. MORIN
  2020-11-12 10:55   ` Julien Olivain
  2020-11-11 21:35 ` Petr Vorel
  2020-11-12 12:01 ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Julien Olivain
  3 siblings, 1 reply; 26+ messages in thread
From: Yann E. MORIN @ 2020-11-11 21:06 UTC (permalink / raw)
  To: buildroot

Julien, All,

On 2020-11-11 17:22 +0100, Julien Olivain spake thusly:
> Upstream backports package does not define the LEX/YACC Makefile
> variables, contrary to the Kernel which is defining those in [1]. The
> default "lex" and "yacc" are then used. On some systems, "yacc" is
> Berkeley Yacc. Kconfig parser files are using non-Posix Bison
> constructs.
> 
> Attempting to generate the parser with byacc fails with error:
> 
>     yacc: e - line 97 of "zconf.y", syntax error
>     %destructor {
>     ^
> 
> This patch adds the missing dependencies on host-flex and host-bison,
> and make sure the package compilation will use those, to fix this issue.
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=73a4f6dbe70a1b93c11e2d1d6ca68f3522daf434
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
>  package/linux-backports/linux-backports.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
> index 1d7d6e7f00..fafb8efb91 100644
> --- a/package/linux-backports/linux-backports.mk
> +++ b/package/linux-backports/linux-backports.mk
> @@ -11,6 +11,8 @@ LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stab
>  LINUX_BACKPORTS_LICENSE = GPL-2.0
>  LINUX_BACKPORTS_LICENSE_FILES = COPYING
>  
> +LINUX_BACKPORTS_DEPENDENCIES = host-bison host-flex

As far as I understand it, this is need for the kconfig infra (mconf et
al.), right?

If so, can we instead use:

    LINUX_BACKPORTS_DEPENDENCIES = \
        $(BR2_BISON_HOST_DEPENDENCY) \
        $(BR2_FLEX_HOST_DEPENDENCY)

... along with...

>  ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y)
>  LINUX_BACKPORTS_KCONFIG_FILE = $(LINUX_BACKPORTS_DIR)/defconfigs/$(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG))
>  else ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y)
> @@ -33,6 +35,8 @@ LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS)
>  # LINUX_BACKPORTS_MODULE_MAKE_OPTS is used by the kernel-module infra.
>  #
>  LINUX_BACKPORTS_MAKE_OPTS = \
> +	LEX="$(HOST_DIR)/bin/flex" \
> +	YACC="$(HOST_DIR)/bin/bison" \

    LEX=flex \
    YACC=bison \

Thoughts?

See for example: linux/linux.mk lines 80-85
and for reference: support/dependencies/check-host-bison-flex.mk

Regards,
Yann E. MORIN.

>  	BACKPORT_DIR=$(@D) \
>  	KLIB_BUILD=$(LINUX_DIR) \
>  	KLIB=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED) \
> -- 
> 2.28.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison
  2020-11-11 16:22 [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison Julien Olivain
  2020-11-11 16:22 ` [Buildroot] [PATCH 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
  2020-11-11 21:06 ` [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison Yann E. MORIN
@ 2020-11-11 21:35 ` Petr Vorel
  2020-11-12 12:01 ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Julien Olivain
  3 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2020-11-11 21:35 UTC (permalink / raw)
  To: buildroot

Hi Julien,

thanks for working on linux-backports package!

> Upstream backports package does not define the LEX/YACC Makefile
> variables, contrary to the Kernel which is defining those in [1]. The
> default "lex" and "yacc" are then used. On some systems, "yacc" is
> Berkeley Yacc. Kconfig parser files are using non-Posix Bison
> constructs.

> Attempting to generate the parser with byacc fails with error:

>     yacc: e - line 97 of "zconf.y", syntax error
>     %destructor {
>     ^

> This patch adds the missing dependencies on host-flex and host-bison,
> and make sure the package compilation will use those, to fix this issue.

> [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=73a4f6dbe70a1b93c11e2d1d6ca68f3522daf434

...
>  package/linux-backports/linux-backports.mk | 4 ++++
....
> +LINUX_BACKPORTS_DEPENDENCIES = host-bison host-flex
> +
>  ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y)
>  LINUX_BACKPORTS_KCONFIG_FILE = $(LINUX_BACKPORTS_DIR)/defconfigs/$(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG))
>  else ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y)
> @@ -33,6 +35,8 @@ LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS)
>  # LINUX_BACKPORTS_MODULE_MAKE_OPTS is used by the kernel-module infra.

>  LINUX_BACKPORTS_MAKE_OPTS = \
> +	LEX="$(HOST_DIR)/bin/flex" \
> +	YACC="$(HOST_DIR)/bin/bison" \
Are these really in /bin? Not in /usr/bin?

Otherwise LGTM.
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH 2/2] package/linux-backports: bump version to 5.8
  2020-11-11 16:22 ` [Buildroot] [PATCH 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
@ 2020-11-11 21:47   ` Petr Vorel
  2020-11-12 11:07     ` Julien Olivain
  0 siblings, 1 reply; 26+ messages in thread
From: Petr Vorel @ 2020-11-11 21:47 UTC (permalink / raw)
  To: buildroot

Hi Julien,

> Attempting to compile this package with newer Kernel version (e.g. v5.4)
> fails with message:

>    Generating local configuration database from kernel ...Kernel version parse failed!

> Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
> rather old and beat the very purpose of having newer drivers in older
> kernels.

...
> -LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
> +LINUX_BACKPORTS_VERSION_MAJOR = 5.8
>  LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
>  LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
>  LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
...

Thanks for updating to the latest stable release.

I haven't found any info about minimal kernel version required.
Looking briefly into the code, it still supports 3.0 (LINUX_VERSION_IS_GEQ(3,0,0))
=> nothing has changed.

Reviewed-by: Petr Vorel <petr.vorel@gmail.com>

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison
  2020-11-11 21:06 ` [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison Yann E. MORIN
@ 2020-11-12 10:55   ` Julien Olivain
  0 siblings, 0 replies; 26+ messages in thread
From: Julien Olivain @ 2020-11-12 10:55 UTC (permalink / raw)
  To: buildroot

Yann, All,

Thanks for the review,

On 11/11/2020 22:06, Yann E. MORIN wrote:
> Julien, All,
> 
> On 2020-11-11 17:22 +0100, Julien Olivain spake thusly:
>> Upstream backports package does not define the LEX/YACC Makefile
>> variables, contrary to the Kernel which is defining those in [1]. The
>> default "lex" and "yacc" are then used. On some systems, "yacc" is
>> Berkeley Yacc. Kconfig parser files are using non-Posix Bison
>> constructs.
>> 
>> Attempting to generate the parser with byacc fails with error:
>> 
>>     yacc: e - line 97 of "zconf.y", syntax error
>>     %destructor {
>>     ^
>> 
>> This patch adds the missing dependencies on host-flex and host-bison,
>> and make sure the package compilation will use those, to fix this 
>> issue.
>> 
>> [1] 
>> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=73a4f6dbe70a1b93c11e2d1d6ca68f3522daf434
>> 
>> Signed-off-by: Julien Olivain <ju.o@free.fr>
>> ---
>>  package/linux-backports/linux-backports.mk | 4 ++++
>>  1 file changed, 4 insertions(+)
>> 
>> diff --git a/package/linux-backports/linux-backports.mk 
>> b/package/linux-backports/linux-backports.mk
>> index 1d7d6e7f00..fafb8efb91 100644
>> --- a/package/linux-backports/linux-backports.mk
>> +++ b/package/linux-backports/linux-backports.mk
>> @@ -11,6 +11,8 @@ LINUX_BACKPORTS_SITE = 
>> $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stab
>>  LINUX_BACKPORTS_LICENSE = GPL-2.0
>>  LINUX_BACKPORTS_LICENSE_FILES = COPYING
>> 
>> +LINUX_BACKPORTS_DEPENDENCIES = host-bison host-flex
> 
> As far as I understand it, this is need for the kconfig infra (mconf et
> al.), right?
> 
> If so, can we instead use:
> 
>     LINUX_BACKPORTS_DEPENDENCIES = \
>         $(BR2_BISON_HOST_DEPENDENCY) \
>         $(BR2_FLEX_HOST_DEPENDENCY)
> 
> ... along with...
> 
>>  ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y)
>>  LINUX_BACKPORTS_KCONFIG_FILE = 
>> $(LINUX_BACKPORTS_DIR)/defconfigs/$(call 
>> qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG))
>>  else ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y)
>> @@ -33,6 +35,8 @@ LINUX_BACKPORTS_KCONFIG_OPTS = 
>> $(LINUX_BACKPORTS_MAKE_OPTS)
>>  # LINUX_BACKPORTS_MODULE_MAKE_OPTS is used by the kernel-module 
>> infra.
>>  #
>>  LINUX_BACKPORTS_MAKE_OPTS = \
>> +	LEX="$(HOST_DIR)/bin/flex" \
>> +	YACC="$(HOST_DIR)/bin/bison" \
> 
>     LEX=flex \
>     YACC=bison \
> 
> Thoughts?
> 
> See for example: linux/linux.mk lines 80-85
> and for reference: support/dependencies/check-host-bison-flex.mk

I agree it will be better to follow the same logic as in the Linux 
Kernel.
I'll update the patches with your suggestions.

Best regrads,

Julien.


> Regards,
> Yann E. MORIN.
> 
>>  	BACKPORT_DIR=$(@D) \
>>  	KLIB_BUILD=$(LINUX_DIR) \
>>  	KLIB=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED) \
>> --
>> 2.28.0
>> 
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
> 
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' 
> conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___        
>        |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There 
> is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   
> conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH 2/2] package/linux-backports: bump version to 5.8
  2020-11-11 21:47   ` Petr Vorel
@ 2020-11-12 11:07     ` Julien Olivain
  0 siblings, 0 replies; 26+ messages in thread
From: Julien Olivain @ 2020-11-12 11:07 UTC (permalink / raw)
  To: buildroot

Hi Petr,

Thanks for the review!

On 11/11/2020 22:47, Petr Vorel wrote:
> Hi Julien,
> 
>> Attempting to compile this package with newer Kernel version (e.g. 
>> v5.4)
>> fails with message:
> 
>>    Generating local configuration database from kernel ...Kernel 
>> version parse failed!
> 
>> Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
>> rather old and beat the very purpose of having newer drivers in older
>> kernels.
> 
> ...
>> -LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
>> +LINUX_BACKPORTS_VERSION_MAJOR = 5.8
>>  LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
>>  LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
>>  LINUX_BACKPORTS_SITE = 
>> $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
> ...
> 
> Thanks for updating to the latest stable release.
> 
> I haven't found any info about minimal kernel version required.
> Looking briefly into the code, it still supports 3.0
> (LINUX_VERSION_IS_GEQ(3,0,0))
> => nothing has changed.

I initially though like you there was no change in the minimal kernel 
version.
Looking a bit deeper, it appear that the minimal Kernel requirement 
changed
from 3.0 to 3.10, in [1], introduced in backports tag v4.14-rc4-1.

I'll update the patch to add a note about that.

Best regards,

Julien.

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76


> 
> Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
> 
> Kind regards,
> Petr

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser
  2020-11-11 16:22 [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison Julien Olivain
                   ` (2 preceding siblings ...)
  2020-11-11 21:35 ` Petr Vorel
@ 2020-11-12 12:01 ` Julien Olivain
  2020-11-12 12:01   ` [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
                     ` (4 more replies)
  3 siblings, 5 replies; 26+ messages in thread
From: Julien Olivain @ 2020-11-12 12:01 UTC (permalink / raw)
  To: buildroot

Upstream backports package does not define the LEX/YACC Makefile
variables, contrary to the Kernel which is defining those in [1]. The
default "lex" and "yacc" are then used. On some systems, "yacc" is
Berkeley Yacc. Kconfig parser files are using non-Posix Bison
constructs.

Attempting to generate the parser with byacc fails with error:

    yacc: e - line 97 of "zconf.y", syntax error
    %destructor {
    ^

This patch defines the LEX and YACC Makefile variable to use flex and
bison, to fix this issue. The host-bison and host-flex dependencies are
added only if the host does not have them, following the same logic of
the Kernel.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=73a4f6dbe70a1b93c11e2d1d6ca68f3522daf434

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes v1 -> v2:
  - Include suggestions from Yann:
    Follow the same logic as the Kernel for kconfig flex/bison.
---
 package/linux-backports/linux-backports.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
index 1d7d6e7f00..030d7a2864 100644
--- a/package/linux-backports/linux-backports.mk
+++ b/package/linux-backports/linux-backports.mk
@@ -11,6 +11,14 @@ LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stab
 LINUX_BACKPORTS_LICENSE = GPL-2.0
 LINUX_BACKPORTS_LICENSE_FILES = COPYING
 
+# flex and bison are needed to generate kconfig parser. We use the
+# same logic as the linux kernel (we add host dependencies only if
+# host does not have them). See linux/linux.mk and
+# support/dependencies/check-host-bison-flex.mk.
+LINUX_BACKPORTS_DEPENDENCIES = \
+	$(BR2_BISON_HOST_DEPENDENCY) \
+	$(BR2_FLEX_HOST_DEPENDENCY)
+
 ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y)
 LINUX_BACKPORTS_KCONFIG_FILE = $(LINUX_BACKPORTS_DIR)/defconfigs/$(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG))
 else ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y)
@@ -33,6 +41,8 @@ LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS)
 # LINUX_BACKPORTS_MODULE_MAKE_OPTS is used by the kernel-module infra.
 #
 LINUX_BACKPORTS_MAKE_OPTS = \
+	LEX=flex \
+	YACC=bison \
 	BACKPORT_DIR=$(@D) \
 	KLIB_BUILD=$(LINUX_DIR) \
 	KLIB=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED) \
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8
  2020-11-12 12:01 ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Julien Olivain
@ 2020-11-12 12:01   ` Julien Olivain
  2020-11-12 12:34     ` Baruch Siach
                       ` (2 more replies)
  2020-11-12 20:53   ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Petr Vorel
                     ` (3 subsequent siblings)
  4 siblings, 3 replies; 26+ messages in thread
From: Julien Olivain @ 2020-11-12 12:01 UTC (permalink / raw)
  To: buildroot

Attempting to compile this package with newer Kernel version (e.g. v5.4)
fails with message:

   Generating local configuration database from kernel ...Kernel version parse failed!

Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
rather old and beat the very purpose of having newer drivers in older
kernels.

Note that since backports tag v4.14-rc4-1, the requirement on minimal
kernel version changed from 3.0 to 3.10. See commit [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes v1 -> v2:
  - Add a note about the change in minimal kernel version (3.0 -> 3.10).
---
 package/linux-backports/linux-backports.hash | 4 ++--
 package/linux-backports/linux-backports.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/linux-backports/linux-backports.hash b/package/linux-backports/linux-backports.hash
index f39bc2ed27..0d60955b02 100644
--- a/package/linux-backports/linux-backports.hash
+++ b/package/linux-backports/linux-backports.hash
@@ -1,4 +1,4 @@
-# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v4.4.2/sha256sums.asc
-sha256  a979e194c2ed9fdfca092a448e626d85c5af0e4de5ad993c0967afd15af01285  backports-4.4.2-1.tar.xz
+# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.8/sha256sums.asc
+sha256  19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b  backports-5.8-1.tar.xz
 # Locally computed
 sha256  af8067302947c01fd9eee72befa54c7e3ef8a48fecde7fd71277f2290b2bf0f7  COPYING
diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
index 030d7a2864..7e725147dc 100644
--- a/package/linux-backports/linux-backports.mk
+++ b/package/linux-backports/linux-backports.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
+LINUX_BACKPORTS_VERSION_MAJOR = 5.8
 LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
 LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
 LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8
  2020-11-12 12:01   ` [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
@ 2020-11-12 12:34     ` Baruch Siach
  2020-11-12 19:30     ` Peter Seiderer
  2020-11-12 21:01     ` Petr Vorel
  2 siblings, 0 replies; 26+ messages in thread
From: Baruch Siach @ 2020-11-12 12:34 UTC (permalink / raw)
  To: buildroot

Hi Julien,

On Thu, Nov 12 2020, Julien Olivain wrote:
> Attempting to compile this package with newer Kernel version (e.g. v5.4)
> fails with message:
>
>    Generating local configuration database from kernel ...Kernel version parse failed!
>
> Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
> rather old and beat the very purpose of having newer drivers in older
> kernels.
>
> Note that since backports tag v4.14-rc4-1, the requirement on minimal
> kernel version changed from 3.0 to 3.10. See commit [1].

The help text of BR2_PACKAGE_LINUX_BACKPORTS in Config.in should be
updated.

baruch

> [1] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76
>
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> Changes v1 -> v2:
>   - Add a note about the change in minimal kernel version (3.0 -> 3.10).
> ---
>  package/linux-backports/linux-backports.hash | 4 ++--
>  package/linux-backports/linux-backports.mk   | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/package/linux-backports/linux-backports.hash b/package/linux-backports/linux-backports.hash
> index f39bc2ed27..0d60955b02 100644
> --- a/package/linux-backports/linux-backports.hash
> +++ b/package/linux-backports/linux-backports.hash
> @@ -1,4 +1,4 @@
> -# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v4.4.2/sha256sums.asc
> -sha256  a979e194c2ed9fdfca092a448e626d85c5af0e4de5ad993c0967afd15af01285  backports-4.4.2-1.tar.xz
> +# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.8/sha256sums.asc
> +sha256  19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b  backports-5.8-1.tar.xz
>  # Locally computed
>  sha256  af8067302947c01fd9eee72befa54c7e3ef8a48fecde7fd71277f2290b2bf0f7  COPYING
> diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
> index 030d7a2864..7e725147dc 100644
> --- a/package/linux-backports/linux-backports.mk
> +++ b/package/linux-backports/linux-backports.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>  
> -LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
> +LINUX_BACKPORTS_VERSION_MAJOR = 5.8
>  LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
>  LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
>  LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)


-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8
  2020-11-12 12:01   ` [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
  2020-11-12 12:34     ` Baruch Siach
@ 2020-11-12 19:30     ` Peter Seiderer
  2020-11-12 21:01     ` Petr Vorel
  2 siblings, 0 replies; 26+ messages in thread
From: Peter Seiderer @ 2020-11-12 19:30 UTC (permalink / raw)
  To: buildroot

Hello Julien,

On Thu, 12 Nov 2020 13:01:55 +0100, Julien Olivain <ju.o@free.fr> wrote:

> Attempting to compile this package with newer Kernel version (e.g. v5.4)
> fails with message:
>
>    Generating local configuration database from kernel ...Kernel version parse failed!
>
> Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
> rather old and beat the very purpose of having newer drivers in older
> kernels.
>
> Note that since backports tag v4.14-rc4-1, the requirement on minimal
> kernel version changed from 3.0 to 3.10. See commit [1].
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76
>
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> Changes v1 -> v2:
>   - Add a note about the change in minimal kernel version (3.0 -> 3.10).
> ---
>  package/linux-backports/linux-backports.hash | 4 ++--
>  package/linux-backports/linux-backports.mk   | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/package/linux-backports/linux-backports.hash b/package/linux-backports/linux-backports.hash
> index f39bc2ed27..0d60955b02 100644
> --- a/package/linux-backports/linux-backports.hash
> +++ b/package/linux-backports/linux-backports.hash
> @@ -1,4 +1,4 @@
> -# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v4.4.2/sha256sums.asc
> -sha256  a979e194c2ed9fdfca092a448e626d85c5af0e4de5ad993c0967afd15af01285  backports-4.4.2-1.tar.xz
> +# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.8/sha256sums.asc
> +sha256  19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b  backports-5.8-1.tar.xz
>  # Locally computed
>  sha256  af8067302947c01fd9eee72befa54c7e3ef8a48fecde7fd71277f2290b2bf0f7  COPYING

	$ sha256sum backports-4.4.2-1/COPYING backports-5.8-1/COPYING
af8067302947c01fd9eee72befa54c7e3ef8a48fecde7fd71277f2290b2bf0f7  backports-4.4.2-1/COPYING
fb5a425bd3b3cd6071a3a9aff9909a859e7c1158d54d32e07658398cd67eb6a0  backports-5.8-1/COPYING


	$ cat backports-5.8-1/COPYING
The Linux Kernel is provided under:

	SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note

Being under the terms of the GNU General Public License version 2 only,
according with:

	LICENSES/preferred/GPL-2.0

With an explicit syscall exception, as stated at:

	LICENSES/exceptions/Linux-syscall-note

In addition, other licenses may also apply. Please see:

	Documentation/process/license-rules.rst

for more details.

All contributions to the Linux Kernel are subject to this COPYING file.


Seems the license info needs an update too...

Regards,
Peter


> diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
> index 030d7a2864..7e725147dc 100644
> --- a/package/linux-backports/linux-backports.mk
> +++ b/package/linux-backports/linux-backports.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>
> -LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
> +LINUX_BACKPORTS_VERSION_MAJOR = 5.8
>  LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
>  LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
>  LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser
  2020-11-12 12:01 ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Julien Olivain
  2020-11-12 12:01   ` [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
@ 2020-11-12 20:53   ` Petr Vorel
  2020-11-12 21:24   ` Yann E. MORIN
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2020-11-12 20:53 UTC (permalink / raw)
  To: buildroot

Hi Julien,

> Upstream backports package does not define the LEX/YACC Makefile
> variables, contrary to the Kernel which is defining those in [1]. The
> default "lex" and "yacc" are then used. On some systems, "yacc" is
> Berkeley Yacc. Kconfig parser files are using non-Posix Bison
> constructs.

> Attempting to generate the parser with byacc fails with error:

>     yacc: e - line 97 of "zconf.y", syntax error
>     %destructor {
>     ^

> This patch defines the LEX and YACC Makefile variable to use flex and
> bison, to fix this issue. The host-bison and host-flex dependencies are
> added only if the host does not have them, following the same logic of
> the Kernel.

> [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=73a4f6dbe70a1b93c11e2d1d6ca68f3522daf434

Reviewed-by: Petr Vorel <petr.vorel@gmail.com>

Thank you!

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8
  2020-11-12 12:01   ` [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
  2020-11-12 12:34     ` Baruch Siach
  2020-11-12 19:30     ` Peter Seiderer
@ 2020-11-12 21:01     ` Petr Vorel
  2020-11-12 21:17       ` Yann E. MORIN
  2 siblings, 1 reply; 26+ messages in thread
From: Petr Vorel @ 2020-11-12 21:01 UTC (permalink / raw)
  To: buildroot

Hi Julien,

Reviewed-by: Petr Vorel <petr.vorel@gmail.com>

> Attempting to compile this package with newer Kernel version (e.g. v5.4)
> fails with message:

>    Generating local configuration database from kernel ...Kernel version parse failed!

> Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
> rather old and beat the very purpose of having newer drivers in older
> kernels.

> Note that since backports tag v4.14-rc4-1, the requirement on minimal
> kernel version changed from 3.0 to 3.10. See commit [1].
Good catch!

In that case, can please person who merges this update
package/linux-backports/Config.in?


Kind regards,
Petr

> [1] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76

Update also package/linux-backports/Config.in:

diff --git package/linux-backports/Config.in package/linux-backports/Config.in
index 362e6e4bc7..251d202fd2 100644
--- package/linux-backports/Config.in
+++ package/linux-backports/Config.in
@@ -9,7 +9,7 @@ config BR2_PACKAGE_LINUX_BACKPORTS
 	  recent kernels, backported to older ones.
 
 	  This version of linux-backports supports kernels starting
-	  from 3.0.
+	  from 3.10.
 
 	  https://backports.wiki.kernel.org
 

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8
  2020-11-12 21:01     ` Petr Vorel
@ 2020-11-12 21:17       ` Yann E. MORIN
  2020-11-12 21:24         ` Petr Vorel
  0 siblings, 1 reply; 26+ messages in thread
From: Yann E. MORIN @ 2020-11-12 21:17 UTC (permalink / raw)
  To: buildroot

Julien, Petr, All,

On 2020-11-12 22:01 +0100, Petr Vorel spake thusly:
> > Attempting to compile this package with newer Kernel version (e.g. v5.4)
> > fails with message:
> 
> >    Generating local configuration database from kernel ...Kernel version parse failed!
> 
> > Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
> > rather old and beat the very purpose of having newer drivers in older
> > kernels.
> 
> > Note that since backports tag v4.14-rc4-1, the requirement on minimal
> > kernel version changed from 3.0 to 3.10. See commit [1].
> Good catch!

Is this a mandatory dependency for *all* drivers, or only for the WiFi
ones?

> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76

It looks like it is just about the crypto stuff needed for mac80211...

Thoughts?

Regards,
Yann E. MORIN.

> Update also package/linux-backports/Config.in:
> 
> diff --git package/linux-backports/Config.in package/linux-backports/Config.in
> index 362e6e4bc7..251d202fd2 100644
> --- package/linux-backports/Config.in
> +++ package/linux-backports/Config.in
> @@ -9,7 +9,7 @@ config BR2_PACKAGE_LINUX_BACKPORTS
>  	  recent kernels, backported to older ones.
>  
>  	  This version of linux-backports supports kernels starting
> -	  from 3.0.
> +	  from 3.10.
>  
>  	  https://backports.wiki.kernel.org
>  

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser
  2020-11-12 12:01 ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Julien Olivain
  2020-11-12 12:01   ` [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
  2020-11-12 20:53   ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Petr Vorel
@ 2020-11-12 21:24   ` Yann E. MORIN
  2020-11-13 13:09   ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Julien Olivain
  2020-11-15 15:09   ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Peter Korsgaard
  4 siblings, 0 replies; 26+ messages in thread
From: Yann E. MORIN @ 2020-11-12 21:24 UTC (permalink / raw)
  To: buildroot

Julien, all,

On 2020-11-12 13:01 +0100, Julien Olivain spake thusly:
> Upstream backports package does not define the LEX/YACC Makefile
> variables, contrary to the Kernel which is defining those in [1]. The
> default "lex" and "yacc" are then used. On some systems, "yacc" is
> Berkeley Yacc. Kconfig parser files are using non-Posix Bison
> constructs.
> 
> Attempting to generate the parser with byacc fails with error:
> 
>     yacc: e - line 97 of "zconf.y", syntax error
>     %destructor {
>     ^
> 
> This patch defines the LEX and YACC Makefile variable to use flex and
> bison, to fix this issue. The host-bison and host-flex dependencies are
> added only if the host does not have them, following the same logic of
> the Kernel.
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=73a4f6dbe70a1b93c11e2d1d6ca68f3522daf434
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> Changes v1 -> v2:
>   - Include suggestions from Yann:
>     Follow the same logic as the Kernel for kconfig flex/bison.
> ---
>  package/linux-backports/linux-backports.mk | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
> index 1d7d6e7f00..030d7a2864 100644
> --- a/package/linux-backports/linux-backports.mk
> +++ b/package/linux-backports/linux-backports.mk
> @@ -11,6 +11,14 @@ LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stab
>  LINUX_BACKPORTS_LICENSE = GPL-2.0
>  LINUX_BACKPORTS_LICENSE_FILES = COPYING
>  
> +# flex and bison are needed to generate kconfig parser. We use the
> +# same logic as the linux kernel (we add host dependencies only if
> +# host does not have them). See linux/linux.mk and
> +# support/dependencies/check-host-bison-flex.mk.
> +LINUX_BACKPORTS_DEPENDENCIES = \
> +	$(BR2_BISON_HOST_DEPENDENCY) \
> +	$(BR2_FLEX_HOST_DEPENDENCY)
> +
>  ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y)
>  LINUX_BACKPORTS_KCONFIG_FILE = $(LINUX_BACKPORTS_DIR)/defconfigs/$(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG))
>  else ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y)
> @@ -33,6 +41,8 @@ LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS)
>  # LINUX_BACKPORTS_MODULE_MAKE_OPTS is used by the kernel-module infra.
>  #
>  LINUX_BACKPORTS_MAKE_OPTS = \
> +	LEX=flex \
> +	YACC=bison \
>  	BACKPORT_DIR=$(@D) \
>  	KLIB_BUILD=$(LINUX_DIR) \
>  	KLIB=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED) \
> -- 
> 2.28.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8
  2020-11-12 21:17       ` Yann E. MORIN
@ 2020-11-12 21:24         ` Petr Vorel
       [not found]           ` <MW3PR11MB476417BF2CC5E2E72CA4AE36E9E60@MW3PR11MB4764.namprd11.prod.outlook.com>
  0 siblings, 1 reply; 26+ messages in thread
From: Petr Vorel @ 2020-11-12 21:24 UTC (permalink / raw)
  To: buildroot

Hi Johannes,

Unless using mac80211, which require v3.10 current backports still support
kernel v3.0 right?

Thanks for info.

Kind regards,
Petr

> Julien, Petr, All,

> On 2020-11-12 22:01 +0100, Petr Vorel spake thusly:
> > > Attempting to compile this package with newer Kernel version (e.g. v5.4)
> > > fails with message:

> > >    Generating local configuration database from kernel ...Kernel version parse failed!

> > > Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
> > > rather old and beat the very purpose of having newer drivers in older
> > > kernels.

> > > Note that since backports tag v4.14-rc4-1, the requirement on minimal
> > > kernel version changed from 3.0 to 3.10. See commit [1].
> > Good catch!

> Is this a mandatory dependency for *all* drivers, or only for the WiFi
> ones?

> > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76

> It looks like it is just about the crypto stuff needed for mac80211...

> Thoughts?

> Regards,
> Yann E. MORIN.

> > Update also package/linux-backports/Config.in:

> > diff --git package/linux-backports/Config.in package/linux-backports/Config.in
> > index 362e6e4bc7..251d202fd2 100644
> > --- package/linux-backports/Config.in
> > +++ package/linux-backports/Config.in
> > @@ -9,7 +9,7 @@ config BR2_PACKAGE_LINUX_BACKPORTS
> >  	  recent kernels, backported to older ones.

> >  	  This version of linux-backports supports kernels starting
> > -	  from 3.0.
> > +	  from 3.10.

> >  	  https://backports.wiki.kernel.org

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8
       [not found]           ` <MW3PR11MB476417BF2CC5E2E72CA4AE36E9E60@MW3PR11MB4764.namprd11.prod.outlook.com>
@ 2020-11-13 11:56             ` Julien Olivain
  0 siblings, 0 replies; 26+ messages in thread
From: Julien Olivain @ 2020-11-13 11:56 UTC (permalink / raw)
  To: buildroot

Hi Johannes, All,

On 13/11/2020 08:18, Berg, Johannes wrote:
>> Unless using mac80211, which require v3.10 current backports still 
>> support
>> kernel v3.0 right?
> 
> Not really. While we haven't actively _removed_ things, we no longer 
> test them.
> 
> In any case, backports basically only supports WiFi these days anyway,
> so what would the point be?

In that case, I will send an updated patch that will raise the minimal 
kernel
version requirement to 3.10.

Thanks!

Julien.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check
  2020-11-12 12:01 ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Julien Olivain
                     ` (2 preceding siblings ...)
  2020-11-12 21:24   ` Yann E. MORIN
@ 2020-11-13 13:09   ` Julien Olivain
  2020-11-13 13:09     ` [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
                       ` (3 more replies)
  2020-11-15 15:09   ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Peter Korsgaard
  4 siblings, 4 replies; 26+ messages in thread
From: Julien Olivain @ 2020-11-13 13:09 UTC (permalink / raw)
  To: buildroot

The commit 05fea6e4a60a38a797d9bacbf318a2cd7dbd435f "infra/pkg-kconfig:
do not rely on package's .config as a timestamp" broke the kernel
version check of this linux-backports package (it was no longer
executed). Since linux-4.19, the kernel's build system internally
touches its .config file, so it can no longer be used as a stamp file.
The stamp file defined in KCONFIG_STAMP_DOTCONFIG variable of
pkg-kconfig infra need to be used instead.

This commit fixes the kernel version check.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes v1 -> v3:
  - new patch to fix kernel version check
---
 package/linux-backports/linux-backports.mk | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
index 030d7a2864..1827ee18b7 100644
--- a/package/linux-backports/linux-backports.mk
+++ b/package/linux-backports/linux-backports.mk
@@ -85,21 +85,24 @@ $(eval $(kconfig-package))
 # not have been parsed yet, so the Linux build dir LINUX_DIR is not yet
 # known. Thus, we use a "secondary expansion" so the rule is re-evaluated
 # after all Makefiles are parsed, and thus at that time we will have the
-# LINUX_DIR variable set to the proper value.
+# LINUX_DIR variable set to the proper value. Moreover, since linux-4.19,
+# the kernel's build system internally touches its .config file, so we
+# can't use it as a stamp file. We use the LINUX_KCONFIG_STAMP_DOTCONFIG
+# instead.
 #
 # Furthermore, we want to check the kernel version, since linux-backports
 # only supports kernels >= 3.0. To avoid overriding linux-backports'
-# .config rule defined in the kconfig-package infra, we use an
-# intermediate stamp-file.
+# KCONFIG_STAMP_DOTCONFIG rule defined in the kconfig-package infra, we
+# use an intermediate stamp-file.
 #
 # Finally, it must also come after the call to kconfig-package, so we get
 # LINUX_BACKPORTS_DIR properly defined (because the target part of the
 # rule is not re-evaluated).
 #
-$(LINUX_BACKPORTS_DIR)/.config: $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version
+$(LINUX_BACKPORTS_DIR)/$(LINUX_BACKPORTS_KCONFIG_STAMP_DOTCONFIG): $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version
 
 .SECONDEXPANSION:
-$(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/.config
+$(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/$$(LINUX_KCONFIG_STAMP_DOTCONFIG)
 	$(Q)LINUX_VERSION_PROBED=$(LINUX_VERSION_PROBED); \
 	if [ $${LINUX_VERSION_PROBED%%.*} -lt 3 ]; then \
 		printf "Linux version '%s' is too old for linux-backports (needs 3.0 or later)\n" \
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8
  2020-11-13 13:09   ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Julien Olivain
@ 2020-11-13 13:09     ` Julien Olivain
  2020-11-13 19:07       ` Petr Vorel
                         ` (2 more replies)
  2020-11-13 19:06     ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Petr Vorel
                       ` (2 subsequent siblings)
  3 siblings, 3 replies; 26+ messages in thread
From: Julien Olivain @ 2020-11-13 13:09 UTC (permalink / raw)
  To: buildroot

Attempting to compile this package with newer Kernel version (e.g. v5.4)
fails with message:

   Generating local configuration database from kernel ...Kernel version parse failed!

Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
rather old and beat the very purpose of having newer drivers in older
kernels.

Since backports tag v4.14-rc4-1, the requirement on minimal kernel
version changed from 3.0 to 3.10. See commit [1]. The minimal kernel
version check is changed accordingly.

License files are also updated: the linux backports package copies the
license files from the kernel version used for its generation. v5.8 is now
"GPL-2.0 WITH Linux-syscall-note".

[1] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes v2 -> v3:
  - Update kernel version check for 3.10 minimal version
  - Update all references to 3.0 to 3.10 (Config.in, .mk)
  - Update license files and checksums

Changes v1 -> v2:
  - Add a note about the change in minimal kernel version (3.0 -> 3.10).
---
 package/linux-backports/Config.in            |  2 +-
 package/linux-backports/linux-backports.hash |  8 +++++---
 package/linux-backports/linux-backports.mk   | 21 ++++++++++++--------
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/package/linux-backports/Config.in b/package/linux-backports/Config.in
index 362e6e4bc7..251d202fd2 100644
--- a/package/linux-backports/Config.in
+++ b/package/linux-backports/Config.in
@@ -9,7 +9,7 @@ config BR2_PACKAGE_LINUX_BACKPORTS
 	  recent kernels, backported to older ones.
 
 	  This version of linux-backports supports kernels starting
-	  from 3.0.
+	  from 3.10.
 
 	  https://backports.wiki.kernel.org
 
diff --git a/package/linux-backports/linux-backports.hash b/package/linux-backports/linux-backports.hash
index f39bc2ed27..3e103424f5 100644
--- a/package/linux-backports/linux-backports.hash
+++ b/package/linux-backports/linux-backports.hash
@@ -1,4 +1,6 @@
-# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v4.4.2/sha256sums.asc
-sha256  a979e194c2ed9fdfca092a448e626d85c5af0e4de5ad993c0967afd15af01285  backports-4.4.2-1.tar.xz
+# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.8/sha256sums.asc
+sha256  19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b  backports-5.8-1.tar.xz
 # Locally computed
-sha256  af8067302947c01fd9eee72befa54c7e3ef8a48fecde7fd71277f2290b2bf0f7  COPYING
+sha256  fb5a425bd3b3cd6071a3a9aff9909a859e7c1158d54d32e07658398cd67eb6a0  COPYING
+sha256  8e378ab93586eb55135d3bc119cce787f7324f48394777d00c34fa3d0be3303f  LICENSES/exceptions/Linux-syscall-note
+sha256  f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79  LICENSES/preferred/GPL-2.0
diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
index 1827ee18b7..1e054c7969 100644
--- a/package/linux-backports/linux-backports.mk
+++ b/package/linux-backports/linux-backports.mk
@@ -4,12 +4,15 @@
 #
 ################################################################################
 
-LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
+LINUX_BACKPORTS_VERSION_MAJOR = 5.8
 LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
 LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
 LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
-LINUX_BACKPORTS_LICENSE = GPL-2.0
-LINUX_BACKPORTS_LICENSE_FILES = COPYING
+LINUX_BACKPORTS_LICENSE = GPL-2.0 WITH Linux-syscall-note
+LINUX_BACKPORTS_LICENSE_FILES = \
+	COPYING \
+	LICENSES/exceptions/Linux-syscall-note \
+	LICENSES/preferred/GPL-2.0
 
 # flex and bison are needed to generate kconfig parser. We use the
 # same logic as the linux kernel (we add host dependencies only if
@@ -91,7 +94,7 @@ $(eval $(kconfig-package))
 # instead.
 #
 # Furthermore, we want to check the kernel version, since linux-backports
-# only supports kernels >= 3.0. To avoid overriding linux-backports'
+# only supports kernels >= 3.10. To avoid overriding linux-backports'
 # KCONFIG_STAMP_DOTCONFIG rule defined in the kconfig-package infra, we
 # use an intermediate stamp-file.
 #
@@ -103,10 +106,12 @@ $(LINUX_BACKPORTS_DIR)/$(LINUX_BACKPORTS_KCONFIG_STAMP_DOTCONFIG): $(LINUX_BACKP
 
 .SECONDEXPANSION:
 $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/$$(LINUX_KCONFIG_STAMP_DOTCONFIG)
-	$(Q)LINUX_VERSION_PROBED=$(LINUX_VERSION_PROBED); \
-	if [ $${LINUX_VERSION_PROBED%%.*} -lt 3 ]; then \
-		printf "Linux version '%s' is too old for linux-backports (needs 3.0 or later)\n" \
-			"$${LINUX_VERSION_PROBED}"; \
+	$(Q)KVER=$(LINUX_VERSION_PROBED); \
+	KVER_MAJOR=`echo $${KVER} | sed 's/^\([0-9]*\)\..*/\1/'`; \
+	KVER_MINOR=`echo $${KVER} | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`; \
+	if [ $${KVER_MAJOR} -lt 3 -o \( $${KVER_MAJOR} -eq 3 -a $${KVER_MINOR} -lt 10 \) ]; then \
+		printf "Linux version '%s' is too old for linux-backports (needs 3.10 or later)\n" \
+			"$${KVER}"; \
 		exit 1; \
 	fi
 	$(Q)touch $(@)
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check
  2020-11-13 13:09   ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Julien Olivain
  2020-11-13 13:09     ` [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
@ 2020-11-13 19:06     ` Petr Vorel
  2020-11-13 22:08     ` Yann E. MORIN
  2020-11-16 14:49     ` Peter Korsgaard
  3 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2020-11-13 19:06 UTC (permalink / raw)
  To: buildroot

Hi Julien,

> The commit 05fea6e4a60a38a797d9bacbf318a2cd7dbd435f "infra/pkg-kconfig:
> do not rely on package's .config as a timestamp" broke the kernel
> version check of this linux-backports package (it was no longer
> executed). Since linux-4.19, the kernel's build system internally
> touches its .config file, so it can no longer be used as a stamp file.
> The stamp file defined in KCONFIG_STAMP_DOTCONFIG variable of
> pkg-kconfig infra need to be used instead.

> This commit fixes the kernel version check.
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Tested-by: Petr Vorel <petr.vorel@gmail.com>

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8
  2020-11-13 13:09     ` [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
@ 2020-11-13 19:07       ` Petr Vorel
  2020-11-13 22:21       ` Yann E. MORIN
  2020-11-17 21:26       ` Yann E. MORIN
  2 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2020-11-13 19:07 UTC (permalink / raw)
  To: buildroot

Hi Julien,

> Attempting to compile this package with newer Kernel version (e.g. v5.4)
> fails with message:

>    Generating local configuration database from kernel ...Kernel version parse failed!

> Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
> rather old and beat the very purpose of having newer drivers in older
> kernels.

> Since backports tag v4.14-rc4-1, the requirement on minimal kernel
> version changed from 3.0 to 3.10. See commit [1]. The minimal kernel
> version check is changed accordingly.

> License files are also updated: the linux backports package copies the
> license files from the kernel version used for its generation. v5.8 is now
> "GPL-2.0 WITH Linux-syscall-note".

> [1] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76

Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Tested-by: Petr Vorel <petr.vorel@gmail.com>

Thanks for your fixes!

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check
  2020-11-13 13:09   ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Julien Olivain
  2020-11-13 13:09     ` [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
  2020-11-13 19:06     ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Petr Vorel
@ 2020-11-13 22:08     ` Yann E. MORIN
  2020-11-16 14:49     ` Peter Korsgaard
  3 siblings, 0 replies; 26+ messages in thread
From: Yann E. MORIN @ 2020-11-13 22:08 UTC (permalink / raw)
  To: buildroot

Kulien, All,

On 2020-11-13 14:09 +0100, Julien Olivain spake thusly:
> The commit 05fea6e4a60a38a797d9bacbf318a2cd7dbd435f "infra/pkg-kconfig:
> do not rely on package's .config as a timestamp" broke the kernel
> version check of this linux-backports package (it was no longer
> executed). Since linux-4.19, the kernel's build system internally
> touches its .config file, so it can no longer be used as a stamp file.
> The stamp file defined in KCONFIG_STAMP_DOTCONFIG variable of
> pkg-kconfig infra need to be used instead.
> 
> This commit fixes the kernel version check.
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Applied to master, thanks! :-)

Regards,
Yann E. MORIN.

> ---
> Changes v1 -> v3:
>   - new patch to fix kernel version check
> ---
>  package/linux-backports/linux-backports.mk | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
> index 030d7a2864..1827ee18b7 100644
> --- a/package/linux-backports/linux-backports.mk
> +++ b/package/linux-backports/linux-backports.mk
> @@ -85,21 +85,24 @@ $(eval $(kconfig-package))
>  # not have been parsed yet, so the Linux build dir LINUX_DIR is not yet
>  # known. Thus, we use a "secondary expansion" so the rule is re-evaluated
>  # after all Makefiles are parsed, and thus at that time we will have the
> -# LINUX_DIR variable set to the proper value.
> +# LINUX_DIR variable set to the proper value. Moreover, since linux-4.19,
> +# the kernel's build system internally touches its .config file, so we
> +# can't use it as a stamp file. We use the LINUX_KCONFIG_STAMP_DOTCONFIG
> +# instead.
>  #
>  # Furthermore, we want to check the kernel version, since linux-backports
>  # only supports kernels >= 3.0. To avoid overriding linux-backports'
> -# .config rule defined in the kconfig-package infra, we use an
> -# intermediate stamp-file.
> +# KCONFIG_STAMP_DOTCONFIG rule defined in the kconfig-package infra, we
> +# use an intermediate stamp-file.
>  #
>  # Finally, it must also come after the call to kconfig-package, so we get
>  # LINUX_BACKPORTS_DIR properly defined (because the target part of the
>  # rule is not re-evaluated).
>  #
> -$(LINUX_BACKPORTS_DIR)/.config: $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version
> +$(LINUX_BACKPORTS_DIR)/$(LINUX_BACKPORTS_KCONFIG_STAMP_DOTCONFIG): $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version
>  
>  .SECONDEXPANSION:
> -$(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/.config
> +$(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/$$(LINUX_KCONFIG_STAMP_DOTCONFIG)
>  	$(Q)LINUX_VERSION_PROBED=$(LINUX_VERSION_PROBED); \
>  	if [ $${LINUX_VERSION_PROBED%%.*} -lt 3 ]; then \
>  		printf "Linux version '%s' is too old for linux-backports (needs 3.0 or later)\n" \
> -- 
> 2.28.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8
  2020-11-13 13:09     ` [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
  2020-11-13 19:07       ` Petr Vorel
@ 2020-11-13 22:21       ` Yann E. MORIN
  2020-11-17 21:26       ` Yann E. MORIN
  2 siblings, 0 replies; 26+ messages in thread
From: Yann E. MORIN @ 2020-11-13 22:21 UTC (permalink / raw)
  To: buildroot

Julien, All,

Peter, Thomas, Arnout: question for you below, please read-on.

On 2020-11-13 14:09 +0100, Julien Olivain spake thusly:
> Attempting to compile this package with newer Kernel version (e.g. v5.4)
> fails with message:
> 
>    Generating local configuration database from kernel ...Kernel version parse failed!
> 
> Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
> rather old and beat the very purpose of having newer drivers in older
> kernels.
> 
> Since backports tag v4.14-rc4-1, the requirement on minimal kernel
> version changed from 3.0 to 3.10. See commit [1]. The minimal kernel
> version check is changed accordingly.
> 
> License files are also updated: the linux backports package copies the
> license files from the kernel version used for its generation. v5.8 is now
> "GPL-2.0 WITH Linux-syscall-note".

So, this got me wondering...

[--SNIP--]
> diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
> index 1827ee18b7..1e054c7969 100644
> --- a/package/linux-backports/linux-backports.mk
> +++ b/package/linux-backports/linux-backports.mk
> @@ -4,12 +4,15 @@
>  #
>  ################################################################################
>  
> -LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
> +LINUX_BACKPORTS_VERSION_MAJOR = 5.8
>  LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
>  LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
>  LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
> -LINUX_BACKPORTS_LICENSE = GPL-2.0
> -LINUX_BACKPORTS_LICENSE_FILES = COPYING
> +LINUX_BACKPORTS_LICENSE = GPL-2.0 WITH Linux-syscall-note

In linux.mk, we have "GPL-2.0" without the extra clause "WITH
Linux-syscall-note". There is no such SPDX identifier (contrary to the
claims in COPYING).

I wonder what we should use, but one thing is sure: we want to use the
same for linux and linux-backports.

> +LINUX_BACKPORTS_LICENSE_FILES = \
> +	COPYING \
> +	LICENSES/exceptions/Linux-syscall-note \
> +	LICENSES/preferred/GPL-2.0

This list is the same as we have in linux.mk.

However:

 1. COPYING also states:

    In addition, other licenses may also apply. Please see:
        Documentation/process/license-rules.rst

 2. ... and indeed, there are a few additional licenses throughout the
    tree, which texts are also available:

    LICENSES/deprecated/GPL-1.0
    LICENSES/deprecated/ISC
    LICENSES/deprecated/Linux-OpenIB
    LICENSES/deprecated/X11
    LICENSES/dual/Apache-2.0
    LICENSES/dual/CDDL-1.0
    LICENSES/dual/MPL-1.1
    LICENSES/exceptions/GCC-exception-2.0
    LICENSES/exceptions/Linux-syscall-note
    LICENSES/preferred/BSD-2-Clause
    LICENSES/preferred/BSD-3-Clause
    LICENSES/preferred/BSD-3-Clause-Clear
    LICENSES/preferred/GPL-2.0
    LICENSES/preferred/LGPL-2.0
    LICENSES/preferred/LGPL-2.1
    LICENSES/preferred/MIT

In linux, it is very probably that most, if not all of those licenses,
do apply. I think it would make sense to be exhaustive in this case.

linux-backports has the same set of licenses, and I think it should
carry it as well (for consistency with linux).

Peter, Thomas, Arnout: thoughts?

(Julien: do not resend for now, let's wait a bit for more feedback)

Regards,
Yann E. MORIN.

>  # flex and bison are needed to generate kconfig parser. We use the
>  # same logic as the linux kernel (we add host dependencies only if
> @@ -91,7 +94,7 @@ $(eval $(kconfig-package))
>  # instead.
>  #
>  # Furthermore, we want to check the kernel version, since linux-backports
> -# only supports kernels >= 3.0. To avoid overriding linux-backports'
> +# only supports kernels >= 3.10. To avoid overriding linux-backports'
>  # KCONFIG_STAMP_DOTCONFIG rule defined in the kconfig-package infra, we
>  # use an intermediate stamp-file.
>  #
> @@ -103,10 +106,12 @@ $(LINUX_BACKPORTS_DIR)/$(LINUX_BACKPORTS_KCONFIG_STAMP_DOTCONFIG): $(LINUX_BACKP
>  
>  .SECONDEXPANSION:
>  $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/$$(LINUX_KCONFIG_STAMP_DOTCONFIG)
> -	$(Q)LINUX_VERSION_PROBED=$(LINUX_VERSION_PROBED); \
> -	if [ $${LINUX_VERSION_PROBED%%.*} -lt 3 ]; then \
> -		printf "Linux version '%s' is too old for linux-backports (needs 3.0 or later)\n" \
> -			"$${LINUX_VERSION_PROBED}"; \
> +	$(Q)KVER=$(LINUX_VERSION_PROBED); \
> +	KVER_MAJOR=`echo $${KVER} | sed 's/^\([0-9]*\)\..*/\1/'`; \
> +	KVER_MINOR=`echo $${KVER} | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`; \
> +	if [ $${KVER_MAJOR} -lt 3 -o \( $${KVER_MAJOR} -eq 3 -a $${KVER_MINOR} -lt 10 \) ]; then \
> +		printf "Linux version '%s' is too old for linux-backports (needs 3.10 or later)\n" \
> +			"$${KVER}"; \
>  		exit 1; \
>  	fi
>  	$(Q)touch $(@)
> -- 
> 2.28.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser
  2020-11-12 12:01 ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Julien Olivain
                     ` (3 preceding siblings ...)
  2020-11-13 13:09   ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Julien Olivain
@ 2020-11-15 15:09   ` Peter Korsgaard
  4 siblings, 0 replies; 26+ messages in thread
From: Peter Korsgaard @ 2020-11-15 15:09 UTC (permalink / raw)
  To: buildroot

>>>>> "Julien" == Julien Olivain <ju.o@free.fr> writes:

 > Upstream backports package does not define the LEX/YACC Makefile
 > variables, contrary to the Kernel which is defining those in [1]. The
 > default "lex" and "yacc" are then used. On some systems, "yacc" is
 > Berkeley Yacc. Kconfig parser files are using non-Posix Bison
 > constructs.

 > Attempting to generate the parser with byacc fails with error:

 >     yacc: e - line 97 of "zconf.y", syntax error
 >     %destructor {
 >     ^

 > This patch defines the LEX and YACC Makefile variable to use flex and
 > bison, to fix this issue. The host-bison and host-flex dependencies are
 > added only if the host does not have them, following the same logic of
 > the Kernel.

 > [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=73a4f6dbe70a1b93c11e2d1d6ca68f3522daf434

 > Signed-off-by: Julien Olivain <ju.o@free.fr>
 > ---
 > Changes v1 -> v2:
 >   - Include suggestions from Yann:
 >     Follow the same logic as the Kernel for kconfig flex/bison.

Committed to 2020.02.x and 2020.08.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check
  2020-11-13 13:09   ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Julien Olivain
                       ` (2 preceding siblings ...)
  2020-11-13 22:08     ` Yann E. MORIN
@ 2020-11-16 14:49     ` Peter Korsgaard
  3 siblings, 0 replies; 26+ messages in thread
From: Peter Korsgaard @ 2020-11-16 14:49 UTC (permalink / raw)
  To: buildroot

>>>>> "Julien" == Julien Olivain <ju.o@free.fr> writes:

 > The commit 05fea6e4a60a38a797d9bacbf318a2cd7dbd435f "infra/pkg-kconfig:
 > do not rely on package's .config as a timestamp" broke the kernel
 > version check of this linux-backports package (it was no longer
 > executed). Since linux-4.19, the kernel's build system internally
 > touches its .config file, so it can no longer be used as a stamp file.
 > The stamp file defined in KCONFIG_STAMP_DOTCONFIG variable of
 > pkg-kconfig infra need to be used instead.

 > This commit fixes the kernel version check.

 > Signed-off-by: Julien Olivain <ju.o@free.fr>
 > ---
 > Changes v1 -> v3:
 >   - new patch to fix kernel version check

Committed to 2020.02.x and 2020.08.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8
  2020-11-13 13:09     ` [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
  2020-11-13 19:07       ` Petr Vorel
  2020-11-13 22:21       ` Yann E. MORIN
@ 2020-11-17 21:26       ` Yann E. MORIN
  2 siblings, 0 replies; 26+ messages in thread
From: Yann E. MORIN @ 2020-11-17 21:26 UTC (permalink / raw)
  To: buildroot

Julien, All,

On 2020-11-13 14:09 +0100, Julien Olivain spake thusly:
> Attempting to compile this package with newer Kernel version (e.g. v5.4)
> fails with message:
> 
>    Generating local configuration database from kernel ...Kernel version parse failed!
> 
> Upgrading the package to 5.8 fixes this issue. Anyways, v4.4 is now
> rather old and beat the very purpose of having newer drivers in older
> kernels.
> 
> Since backports tag v4.14-rc4-1, the requirement on minimal kernel
> version changed from 3.0 to 3.10. See commit [1]. The minimal kernel
> version check is changed accordingly.
> 
> License files are also updated: the linux backports package copies the
> license files from the kernel version used for its generation. v5.8 is now
> "GPL-2.0 WITH Linux-syscall-note".
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/commit/?id=a0d05f9f9ca50ea8b1d60726fac6b54167257e76
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

OK, so after some twists and turns (and my getting some sleep), I have
eventually applied that to next, with just a small change:

  - keep license as GPL-2.0, like for linux

and with a commit log amended accordingly, please review it for the
explanations.

Thanks for this patch!

Now, if you stiull believe the "syscall note" is important to have in
the license list, I would be OK to apply that, as long as it is changed
for both linux and linux-backports, probably as a single patch that
explains it all.

Furthermore, I'd still like we get to think about the list of licenses
in Linux.

Indeed, there are a few different licenses that apply to individual
files:

  - GPL-2.0
  - GPL-2.0+
  - GPL-1.0+  (yes there are still quite a few of them1)
  - BSD-3c
  - dual BSD-3c or GPL-2.0
  - BSD-2c
  - dual BSD-4c or GPL-2.0
  - MIT
  - dual MIT or GPL-2.0
  - ...

So, if we wanted to be exhaustive, we'd list all those in the license
list, and we'd include all the license files as well.

Would that make sense?

Would you send the patch, please? ;-)

Regards,
Yann E. MORIN.

> ---
> Changes v2 -> v3:
>   - Update kernel version check for 3.10 minimal version
>   - Update all references to 3.0 to 3.10 (Config.in, .mk)
>   - Update license files and checksums
> 
> Changes v1 -> v2:
>   - Add a note about the change in minimal kernel version (3.0 -> 3.10).
> ---
>  package/linux-backports/Config.in            |  2 +-
>  package/linux-backports/linux-backports.hash |  8 +++++---
>  package/linux-backports/linux-backports.mk   | 21 ++++++++++++--------
>  3 files changed, 19 insertions(+), 12 deletions(-)
> 
> diff --git a/package/linux-backports/Config.in b/package/linux-backports/Config.in
> index 362e6e4bc7..251d202fd2 100644
> --- a/package/linux-backports/Config.in
> +++ b/package/linux-backports/Config.in
> @@ -9,7 +9,7 @@ config BR2_PACKAGE_LINUX_BACKPORTS
>  	  recent kernels, backported to older ones.
>  
>  	  This version of linux-backports supports kernels starting
> -	  from 3.0.
> +	  from 3.10.
>  
>  	  https://backports.wiki.kernel.org
>  
> diff --git a/package/linux-backports/linux-backports.hash b/package/linux-backports/linux-backports.hash
> index f39bc2ed27..3e103424f5 100644
> --- a/package/linux-backports/linux-backports.hash
> +++ b/package/linux-backports/linux-backports.hash
> @@ -1,4 +1,6 @@
> -# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v4.4.2/sha256sums.asc
> -sha256  a979e194c2ed9fdfca092a448e626d85c5af0e4de5ad993c0967afd15af01285  backports-4.4.2-1.tar.xz
> +# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v5.8/sha256sums.asc
> +sha256  19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b  backports-5.8-1.tar.xz
>  # Locally computed
> -sha256  af8067302947c01fd9eee72befa54c7e3ef8a48fecde7fd71277f2290b2bf0f7  COPYING
> +sha256  fb5a425bd3b3cd6071a3a9aff9909a859e7c1158d54d32e07658398cd67eb6a0  COPYING
> +sha256  8e378ab93586eb55135d3bc119cce787f7324f48394777d00c34fa3d0be3303f  LICENSES/exceptions/Linux-syscall-note
> +sha256  f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79  LICENSES/preferred/GPL-2.0
> diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk
> index 1827ee18b7..1e054c7969 100644
> --- a/package/linux-backports/linux-backports.mk
> +++ b/package/linux-backports/linux-backports.mk
> @@ -4,12 +4,15 @@
>  #
>  ################################################################################
>  
> -LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
> +LINUX_BACKPORTS_VERSION_MAJOR = 5.8
>  LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
>  LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
>  LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
> -LINUX_BACKPORTS_LICENSE = GPL-2.0
> -LINUX_BACKPORTS_LICENSE_FILES = COPYING
> +LINUX_BACKPORTS_LICENSE = GPL-2.0 WITH Linux-syscall-note
> +LINUX_BACKPORTS_LICENSE_FILES = \
> +	COPYING \
> +	LICENSES/exceptions/Linux-syscall-note \
> +	LICENSES/preferred/GPL-2.0
>  
>  # flex and bison are needed to generate kconfig parser. We use the
>  # same logic as the linux kernel (we add host dependencies only if
> @@ -91,7 +94,7 @@ $(eval $(kconfig-package))
>  # instead.
>  #
>  # Furthermore, we want to check the kernel version, since linux-backports
> -# only supports kernels >= 3.0. To avoid overriding linux-backports'
> +# only supports kernels >= 3.10. To avoid overriding linux-backports'
>  # KCONFIG_STAMP_DOTCONFIG rule defined in the kconfig-package infra, we
>  # use an intermediate stamp-file.
>  #
> @@ -103,10 +106,12 @@ $(LINUX_BACKPORTS_DIR)/$(LINUX_BACKPORTS_KCONFIG_STAMP_DOTCONFIG): $(LINUX_BACKP
>  
>  .SECONDEXPANSION:
>  $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/$$(LINUX_KCONFIG_STAMP_DOTCONFIG)
> -	$(Q)LINUX_VERSION_PROBED=$(LINUX_VERSION_PROBED); \
> -	if [ $${LINUX_VERSION_PROBED%%.*} -lt 3 ]; then \
> -		printf "Linux version '%s' is too old for linux-backports (needs 3.0 or later)\n" \
> -			"$${LINUX_VERSION_PROBED}"; \
> +	$(Q)KVER=$(LINUX_VERSION_PROBED); \
> +	KVER_MAJOR=`echo $${KVER} | sed 's/^\([0-9]*\)\..*/\1/'`; \
> +	KVER_MINOR=`echo $${KVER} | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`; \
> +	if [ $${KVER_MAJOR} -lt 3 -o \( $${KVER_MAJOR} -eq 3 -a $${KVER_MINOR} -lt 10 \) ]; then \
> +		printf "Linux version '%s' is too old for linux-backports (needs 3.10 or later)\n" \
> +			"$${KVER}"; \
>  		exit 1; \
>  	fi
>  	$(Q)touch $(@)
> -- 
> 2.28.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2020-11-17 21:26 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 16:22 [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison Julien Olivain
2020-11-11 16:22 ` [Buildroot] [PATCH 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
2020-11-11 21:47   ` Petr Vorel
2020-11-12 11:07     ` Julien Olivain
2020-11-11 21:06 ` [Buildroot] [PATCH 1/2] package/linux-backports: use buildroot host flex and bison Yann E. MORIN
2020-11-12 10:55   ` Julien Olivain
2020-11-11 21:35 ` Petr Vorel
2020-11-12 12:01 ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Julien Olivain
2020-11-12 12:01   ` [Buildroot] [PATCH v2 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
2020-11-12 12:34     ` Baruch Siach
2020-11-12 19:30     ` Peter Seiderer
2020-11-12 21:01     ` Petr Vorel
2020-11-12 21:17       ` Yann E. MORIN
2020-11-12 21:24         ` Petr Vorel
     [not found]           ` <MW3PR11MB476417BF2CC5E2E72CA4AE36E9E60@MW3PR11MB4764.namprd11.prod.outlook.com>
2020-11-13 11:56             ` Julien Olivain
2020-11-12 20:53   ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Petr Vorel
2020-11-12 21:24   ` Yann E. MORIN
2020-11-13 13:09   ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Julien Olivain
2020-11-13 13:09     ` [Buildroot] [PATCH v3 2/2] package/linux-backports: bump version to 5.8 Julien Olivain
2020-11-13 19:07       ` Petr Vorel
2020-11-13 22:21       ` Yann E. MORIN
2020-11-17 21:26       ` Yann E. MORIN
2020-11-13 19:06     ` [Buildroot] [PATCH v3 1/2] package/linux-backports: fix kernel version check Petr Vorel
2020-11-13 22:08     ` Yann E. MORIN
2020-11-16 14:49     ` Peter Korsgaard
2020-11-15 15:09   ` [Buildroot] [PATCH v2 1/2] package/linux-backports: use flex and bison to generate kconfig parser Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.