Skip to contentSkip to conversation

package/linux-backports: use buildroot host flex and bison

PATCH New Julien Olivain 6 participants 26 messages Nov 11, 2020 – Nov 17, 2020 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/linux-backports: use buildroot host flex and bison

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 ++++
 1 file changed, 4 insertions(+)
package/linux-backports/linux-backports.mk +4 -0
index 1d7d6e7f00..fafb8efb91 100644
@@ -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) \
Signature · 1 line
2.28.0
#1 lore raw

PATCH 2/2 package/linux-backports: bump version to 5.8

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.

---
 package/linux-backports/linux-backports.hash | 4 ++--
 package/linux-backports/linux-backports.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
package/linux-backports/linux-backports.hash +2 -2
index f39bc2ed27..0d60955b02 100644
@@ -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
package/linux-backports/linux-backports.mk +1 -1
index fafb8efb91..cdce709722 100644
@@ -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)
Signature · 1 line
2.28.0
#2 lore raw

PATCH 2/2 package/linux-backports: bump version to 5.8

Hi Julien,

Quoted 8 lines

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.

...

package/linux-backports/linux-backports.mk line 10

Quoted 5 lines
package/linux-backports/linux-backports.mk +1 -1
-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.

Kind regards,
Petr

#3 lore raw

PATCH 2/2 package/linux-backports: bump version to 5.8

Hi Petr,

Thanks for the review!

Quoted 22 lines · Petr Vorel

Hi Julien,

Quoted 10 lines

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.

...

Quoted 6 lines
package/linux-backports/linux-backports.mk +1 -1
-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)

...

Quoted 6 lines

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

Quoted 5 lines

Kind regards,
Petr

#4 lore raw

PATCH 1/2 package/linux-backports: use buildroot host flex and bison

In reply to Julien Olivain

Julien, All,

On 2020-11-11 17:22 +0100, Julien Olivain spake thusly:

Quoted 27 lines

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 ++++
 1 file changed, 4 insertions(+)
package/linux-backports/linux-backports.mk +0 -0
index 1d7d6e7f00..fafb8efb91 100644

package/linux-backports/linux-backports.mk LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stab · line 14

Quoted 4 lines
package/linux-backports/linux-backports.mk +1 -0
@@ -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...

package/linux-backports/linux-backports.mk LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS) · line 39

Quoted 9 lines
package/linux-backports/linux-backports.mk +2 -0
 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.

Quoted 10 lines
package/linux-backports/linux-backports.mk +0 -0
 	BACKPORT_DIR=$(@D) \
 	KLIB_BUILD=$(LINUX_DIR) \
 	KLIB=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED) \
Signature · 6 lines
2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/2 package/linux-backports: use buildroot host flex and bison

Yann, All,

Thanks for the review,

Quoted 67 lines · Yann E. MORIN

Julien, All,

On 2020-11-11 17:22 +0100, Julien Olivain spake thusly:

Quoted 34 lines

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 ++++
 1 file changed, 4 insertions(+)
package/linux-backports/linux-backports.mk +0 -0
index 1d7d6e7f00..fafb8efb91 100644
@@ -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

Quoted 1 line

+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...

package/linux-backports/linux-backports.mk LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS) · line 39

Quoted 13 lines

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)

package/linux-backports/linux-backports.mk +0 -0
@@ -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 = \

package/linux-backports/linux-backports.mk +2 -0
+	LEX="$(HOST_DIR)/bin/flex" \
+	YACC="$(HOST_DIR)/bin/bison" \
    LEX=flex \
    YACC=bison \
Quoted 4 lines

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.

Quoted 25 lines

Regards,
Yann E. MORIN.

Quoted 10 lines
package/linux-backports/linux-backports.mk +0 -1
 	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.  |

'------------------------------^-------^------------------^--------------------'

#6 lore raw

PATCH 1/2 package/linux-backports: use buildroot host flex and bison

In reply to Julien Olivain

Hi Julien,

thanks for working on linux-backports package!

Quoted 16 lines

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

...

Quoted 1 line
 package/linux-backports/linux-backports.mk | 4 ++++

....

package/linux-backports/linux-backports.mk LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS) · line 39

Quoted 11 lines
package/linux-backports/linux-backports.mk +4 -0
+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.

Kind regards,
Petr

#7 lore raw

PATCH v2 1/2 package/linux-backports: use flex and bison to generate kconfig parser

In reply to Julien Olivain

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

---
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(+)
package/linux-backports/linux-backports.mk +10 -0
index 1d7d6e7f00..030d7a2864 100644
@@ -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) \
Signature · 1 line
2.28.0
#8 lore raw

PATCH v2 2/2 package/linux-backports: bump version to 5.8

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

---
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(-)
package/linux-backports/linux-backports.hash +2 -2
index f39bc2ed27..0d60955b02 100644
@@ -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
package/linux-backports/linux-backports.mk +1 -1
index 030d7a2864..7e725147dc 100644
@@ -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)
Signature · 1 line
2.28.0
#9 lore raw

PATCH v2 2/2 package/linux-backports: bump version to 5.8

Hi Julien,

Quoted 11 lines · Julien Olivain

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

Quoted 35 lines

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

---
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(-)
package/linux-backports/linux-backports.hash +2 -2
index f39bc2ed27..0d60955b02 100644
@@ -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
package/linux-backports/linux-backports.mk +1 -1
index 030d7a2864..7e725147dc 100644
@@ -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)
Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#10 lore raw

PATCH v2 2/2 package/linux-backports: bump version to 5.8

In reply to Julien Olivain

Hello Julien,

Quoted 28 lines · Julien Olivain

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

---
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(-)
package/linux-backports/linux-backports.hash +0 -0
index f39bc2ed27..0d60955b02 100644

package/linux-backports/linux-backports.hash line 4

Quoted 6 lines
package/linux-backports/linux-backports.hash +2 -2
@@ -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

Quoted 13 lines
package/linux-backports/linux-backports.mk +1 -1
index 030d7a2864..7e725147dc 100644
@@ -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)
#11 lore raw

PATCH v2 2/2 package/linux-backports: bump version to 5.8

In reply to Julien Olivain

Hi Julien,

Quoted 11 lines

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

Quoted 1 line

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

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

linux-backports/Config.in +1 -1
index 362e6e4bc7..251d202fd2 100644
@@ -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
 
#12 lore raw

PATCH v2 2/2 package/linux-backports: bump version to 5.8

Julien, Petr, All,

On 2020-11-12 22:01 +0100, Petr Vorel spake thusly:

Quoted 5 lines
Quoted 4 lines

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!

Quoted 7 lines
Quoted 6 lines

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?

Quoted 1 line
Quoted 1 line

[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.

Quoted 15 lines

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

linux-backports/Config.in +1 -1
index 362e6e4bc7..251d202fd2 100644
@@ -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
 
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#13 lore raw

PATCH v2 2/2 package/linux-backports: bump version to 5.8

Hi Johannes,

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

Thanks for info.

Kind regards,
Petr

Quoted 42 lines

Julien, Petr, All,

On 2020-11-12 22:01 +0100, Petr Vorel spake thusly:

Quoted 5 lines
Quoted 4 lines

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!

Quoted 7 lines
Quoted 6 lines

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?

Quoted 1 line
Quoted 1 line

[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.

Quoted 14 lines

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

linux-backports/Config.in +1 -1
index 362e6e4bc7..251d202fd2 100644
@@ -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

A message that is not in the archive (sent off-list or not yet received): MW3PR11MB476417BF2CC5E2E72CA4AE36E9E60@MW3PR11MB4764.namprd11.prod.outlook.com

#15 lore raw

PATCH v2 2/2 package/linux-backports: bump version to 5.8

Hi Johannes, All,

Quoted 9 lines · Johannes
Quoted 3 lines

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.

#16 lore raw

PATCH v2 1/2 package/linux-backports: use flex and bison to generate kconfig parser

In reply to Julien Olivain

Hi Julien,

Quoted 12 lines

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 {
    ^
Quoted 6 lines

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

Thank you!

Kind regards,
Petr

#17 lore raw

PATCH v2 1/2 package/linux-backports: use flex and bison to generate kconfig parser

In reply to Julien Olivain

Julien, all,

On 2020-11-12 13:01 +0100, Julien Olivain spake thusly:

Quoted 12 lines

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 {
    ^
Quoted 8 lines

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

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 43 lines

---
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(+)
package/linux-backports/linux-backports.mk +10 -0
index 1d7d6e7f00..030d7a2864 100644
@@ -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) \
Signature · 6 lines
2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#18 lore raw

PATCH v3 1/2 package/linux-backports: fix kernel version check

In reply to Julien Olivain

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.

---
Changes v1 -> v3:
- new patch to fix kernel version check

---
 package/linux-backports/linux-backports.mk | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
package/linux-backports/linux-backports.mk +8 -5
index 030d7a2864..1827ee18b7 100644
@@ -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" \
Signature · 1 line
2.28.0
#19 lore raw

PATCH v3 2/2 package/linux-backports: bump version to 5.8

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

---
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(-)
package/linux-backports/Config.in +1 -1
index 362e6e4bc7..251d202fd2 100644
@@ -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
 
package/linux-backports/linux-backports.hash +5 -3
index f39bc2ed27..3e103424f5 100644
@@ -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
package/linux-backports/linux-backports.mk +13 -8
index 1827ee18b7..1e054c7969 100644
@@ -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 $(@)
Signature · 1 line
2.28.0
#20 lore raw

PATCH v3 2/2 package/linux-backports: bump version to 5.8

Hi Julien,

Quoted 13 lines

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.

Quoted 5 lines

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

Thanks for your fixes!

Kind regards,
Petr

#21 lore raw

PATCH v3 2/2 package/linux-backports: bump version to 5.8

In reply to Julien Olivain

Julien, All,

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

On 2020-11-13 14:09 +0100, Julien Olivain spake thusly:

Quoted 9 lines

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.

Quoted 7 lines

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--]

Quoted 6 lines
package/linux-backports/linux-backports.mk +0 -0
index 1827ee18b7..1e054c7969 100644
@@ -4,12 +4,15 @@
 #

package/linux-backports/linux-backports.mk line 11

Quoted 10 lines
package/linux-backports/linux-backports.mk +2 -3
 ################################################################################
 
-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.

package/linux-backports/linux-backports.mk line 15

Quoted 4 lines
package/linux-backports/linux-backports.mk +4 -0
+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.

Quoted 35 lines
package/linux-backports/linux-backports.mk +7 -5
 # 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 $(@)
Signature · 6 lines
2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#22 lore raw

PATCH v3 2/2 package/linux-backports: bump version to 5.8

In reply to Julien Olivain

Julien, All,

On 2020-11-13 14:09 +0100, Julien Olivain spake thusly:

Quoted 13 lines

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.

Quoted 7 lines

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

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.

Quoted 97 lines

---
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(-)
package/linux-backports/Config.in +1 -1
index 362e6e4bc7..251d202fd2 100644
@@ -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
 
package/linux-backports/linux-backports.hash +5 -3
index f39bc2ed27..3e103424f5 100644
@@ -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
package/linux-backports/linux-backports.mk +13 -8
index 1827ee18b7..1e054c7969 100644
@@ -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 $(@)
Signature · 6 lines
2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#23 lore raw

PATCH v3 1/2 package/linux-backports: fix kernel version check

In reply to Julien Olivain

Hi Julien,

Quoted 9 lines

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.

Kind regards,
Petr

#24 lore raw

PATCH v3 1/2 package/linux-backports: fix kernel version check

In reply to Julien Olivain

Kulien, All,

On 2020-11-13 14:09 +0100, Julien Olivain spake thusly:

Quoted 11 lines

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.

Applied to master, thanks! :-)

Regards,
Yann E. MORIN.

Quoted 48 lines

---
Changes v1 -> v3:
- new patch to fix kernel version check

---
 package/linux-backports/linux-backports.mk | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
package/linux-backports/linux-backports.mk +8 -5
index 030d7a2864..1827ee18b7 100644
@@ -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" \
Signature · 6 lines
2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#25 lore raw

PATCH v3 1/2 package/linux-backports: fix kernel version check

In reply to Julien Olivain
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Julien" == Julien Olivain <[email protected]> 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.

Quoted 6 lines

This commit fixes the kernel version check.

---
Changes v1 -> v3:
- new patch to fix kernel version check

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

Signature · 1 line
Bye, Peter Korsgaard
#26 lore raw

PATCH v2 1/2 package/linux-backports: use flex and bison to generate kconfig parser

In reply to Julien Olivain
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Julien" == Julien Olivain <[email protected]> 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.

Quoted 7 lines

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

---
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.

Signature · 1 line
Bye, Peter Korsgaard