All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 14916] New: build buildroot with glibc and linux kernel 5.4 will cause error: "FATAL: kernel too old"
@ 2022-07-18  2:43 bugzilla
  2022-07-18  2:46 ` [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu " bugzilla
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bugzilla @ 2022-07-18  2:43 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=14916

            Bug ID: 14916
           Summary: build buildroot with glibc and linux kernel 5.4 will
                    cause error: "FATAL: kernel too old"
           Product: buildroot
           Version: 2022.02.3
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: Other
          Assignee: unassigned@buildroot.uclibc.org
          Reporter: tgeh23@qq.com
                CC: buildroot@uclibc.org
  Target Milestone: ---

Refer to this article for details: https://www.jianshu.com/p/55952ae88965

1. qemu start error
[ 3.405278] Run /sbin/init as init process
FATAL: kernel too old
[ 3.484534] Kernel panic - not syncing: Attempted to kill init!
exitcode=0x00007f00
[ 3.484974] CPU: 0 PID: 1 Comm: init Not tainted 5.4.195 #1

2. environment
host          arch    linux kernel       buildroot  glibc
ubuntu 20.04  x86_64  5.4.0-195/5.4.195  2022.02.3  2.34

3. error analysis
- buildroot set `BR2_TOOLCHAIN_HEADERS_AT_LEAST` to `5.4`
- but glibc's `--enable-kernel=X.Y.Z`
- buildroot missing `Z`

4. temporary solution
modify buildroot's .config `BR2_TOOLCHAIN_HEADERS_AT_LEAST` to `5.4.0`

5. recompile and start ok

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu will cause error: "FATAL: kernel too old"
  2022-07-18  2:43 [Buildroot] [Bug 14916] New: build buildroot with glibc and linux kernel 5.4 will cause error: "FATAL: kernel too old" bugzilla
@ 2022-07-18  2:46 ` bugzilla
  2022-07-18  6:25 ` bugzilla
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla @ 2022-07-18  2:46 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=14916

Fugui Liu <tgeh23@qq.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|build buildroot with glibc  |build buildroot with glibc
                   |and linux kernel 5.4 will   |and linux kernel 5.4, start
                   |cause error: "FATAL: kernel |with qemu will cause error:
                   |too old"                    |"FATAL: kernel too old"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu will cause error: "FATAL: kernel too old"
  2022-07-18  2:43 [Buildroot] [Bug 14916] New: build buildroot with glibc and linux kernel 5.4 will cause error: "FATAL: kernel too old" bugzilla
  2022-07-18  2:46 ` [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu " bugzilla
@ 2022-07-18  6:25 ` bugzilla
  2022-07-18 21:43 ` bugzilla
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla @ 2022-07-18  6:25 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=14916

Fugui Liu <tgeh23@qq.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2022.02

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu will cause error: "FATAL: kernel too old"
  2022-07-18  2:43 [Buildroot] [Bug 14916] New: build buildroot with glibc and linux kernel 5.4 will cause error: "FATAL: kernel too old" bugzilla
  2022-07-18  2:46 ` [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu " bugzilla
  2022-07-18  6:25 ` bugzilla
@ 2022-07-18 21:43 ` bugzilla
  2022-07-18 22:00 ` bugzilla
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla @ 2022-07-18 21:43 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=14916

--- Comment #1 from Thomas Petazzoni <thomas.petazzoni@bootlin.com> ---
Thanks for the bug report. I am surprised we never realized this before.

Isn't the solution as simple as:

diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index f3a08fbf24..6c54d044a5 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -99,7 +99,7 @@ GLIBC_MAKE = $(BR2_MAKE)
 GLIBC_CONF_ENV += ac_cv_prog_MAKE="$(BR2_MAKE)"

 ifeq ($(BR2_PACKAGE_GLIBC_KERNEL_COMPAT),)
-GLIBC_CONF_OPTS += --enable-kernel=$(call
qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))
+GLIBC_CONF_OPTS += --enable-kernel=$(call
qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)).0
 endif

 # Even though we use the autotools-package infrastructure, we have to

Indeed, $(BR2_TOOLCHAIN_HEADERS_AT_LEAST) never includes the minor version as
far as I can see. Yann, any opinion?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu will cause error: "FATAL: kernel too old"
  2022-07-18  2:43 [Buildroot] [Bug 14916] New: build buildroot with glibc and linux kernel 5.4 will cause error: "FATAL: kernel too old" bugzilla
                   ` (2 preceding siblings ...)
  2022-07-18 21:43 ` bugzilla
@ 2022-07-18 22:00 ` bugzilla
  2022-07-19  3:27 ` bugzilla
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla @ 2022-07-18 22:00 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=14916

Yann E. MORIN <yann.morin.1998@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yann.morin.1998@free.fr

--- Comment #2 from Yann E. MORIN <yann.morin.1998@free.fr> ---
(In reply to Thomas Petazzoni from comment #1)

> -GLIBC_CONF_OPTS += --enable-kernel=$(call strip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))
> +GLIBC_CONF_OPTS += --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)).0

It should not be necessary, because the glibc machinery explicitly already adds
a buncha dot-zeroes:

https://github.com/bminor/glibc/blob/master/sysdeps/unix/sysv/linux/configure.ac#L39
(mips has a special case, but uses the same construct).

    user_version=$((`echo "$minimum_kernel.0.0.0" | [....]

with minimum_kernel defined there, from --enable-kernel=NNN :

    https://github.com/bminor/glibc/blob/master/configure.ac#L273

Note that this is not recent; it's been there since 48d0c5d847a, in 2000...

So yeah, weird...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu will cause error: "FATAL: kernel too old"
  2022-07-18  2:43 [Buildroot] [Bug 14916] New: build buildroot with glibc and linux kernel 5.4 will cause error: "FATAL: kernel too old" bugzilla
                   ` (3 preceding siblings ...)
  2022-07-18 22:00 ` bugzilla
@ 2022-07-19  3:27 ` bugzilla
  2022-07-23 14:05 ` bugzilla
  2022-10-25 20:22 ` bugzilla
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla @ 2022-07-19  3:27 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=14916

--- Comment #3 from Fugui Liu <tgeh23@qq.com> ---
(In reply to Thomas Petazzoni from comment #1)

The solution I want is to be able to set the minior version when we `make
xxconfig`.

(In reply to Yann E. MORIN from comment #2)

I tested multi combinations.
1. buildroot-2022.02.3 with glibc 2.34 linux kernel 5.4/5.15
2. buildroot-2020.08 with glibc 2.31 linux kernle 5.4/5.7
All throw error: FATAL: kernel too old

If I modify buildroot's .config `BR2_TOOLCHAIN_HEADERS_AT_LEAST` to `5.4.0`,
everything is ok.

You can try to build and start.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu will cause error: "FATAL: kernel too old"
  2022-07-18  2:43 [Buildroot] [Bug 14916] New: build buildroot with glibc and linux kernel 5.4 will cause error: "FATAL: kernel too old" bugzilla
                   ` (4 preceding siblings ...)
  2022-07-19  3:27 ` bugzilla
@ 2022-07-23 14:05 ` bugzilla
  2022-10-25 20:22 ` bugzilla
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla @ 2022-07-23 14:05 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=14916

--- Comment #4 from Yann E. MORIN <yann.morin.1998@free.fr> ---
Fugui Liu, All,

Can you provide a defconfig that exhibits the issue, please?

Regards,
Yann E. MORIN.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu will cause error: "FATAL: kernel too old"
  2022-07-18  2:43 [Buildroot] [Bug 14916] New: build buildroot with glibc and linux kernel 5.4 will cause error: "FATAL: kernel too old" bugzilla
                   ` (5 preceding siblings ...)
  2022-07-23 14:05 ` bugzilla
@ 2022-10-25 20:22 ` bugzilla
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla @ 2022-10-25 20:22 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=14916

Thomas Petazzoni <thomas.petazzoni@bootlin.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |NEEDINFO
             Status|NEW                         |RESOLVED

--- Comment #5 from Thomas Petazzoni <thomas.petazzoni@bootlin.com> ---
No feedback from the contributor, insufficient information to reproduce, so
closing the bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-10-25 20:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18  2:43 [Buildroot] [Bug 14916] New: build buildroot with glibc and linux kernel 5.4 will cause error: "FATAL: kernel too old" bugzilla
2022-07-18  2:46 ` [Buildroot] [Bug 14916] build buildroot with glibc and linux kernel 5.4, start with qemu " bugzilla
2022-07-18  6:25 ` bugzilla
2022-07-18 21:43 ` bugzilla
2022-07-18 22:00 ` bugzilla
2022-07-19  3:27 ` bugzilla
2022-07-23 14:05 ` bugzilla
2022-10-25 20:22 ` bugzilla

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.