error
[ 3.399884] Freeing unused kernel image memory: 1348K
[ 3.401079] Write protecting the kernel read-only data: 20480k
[ 3.403804] Freeing unused kernel image memory: 2004K
[ 3.405016] Freeing unused kernel image memory: 812K
[ 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
[ 3.485185] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[ 3.485519] Call Trace:
[ 3.486318] dump_stack+0x50/0x63
[ 3.486505] panic+0xf6/0x2b7
[ 3.486595] do_exit.cold+0x50/0xda
[ 3.486687] do_group_exit+0x35/0x90
[ 3.486792] __x64_sys_exit_group+0xf/0x10
[ 3.486929] do_syscall_64+0x43/0x110
[ 3.487082] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 3.487337] RIP: 0033:0x7f9c420f1bf1
[ 3.487612] Code: f7 d8 89 01 48 83 c8 ff c3 be e7 00 00 00 ba 3c 00 00 00 eb 11 0f 1f 40 00 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 89 05 df 15 01 00 eb dd 0f 1f 44 00
[ 3.488129] RSP: 002b:00007ffef044c498 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
[ 3.488380] RAX: ffffffffffffffda RBX: 00007ffef044c620 RCX: 00007f9c420f1bf1
[ 3.488551] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 000000000000007f
[ 3.488827] RBP: 00007ffef044c840 R08: 0000000000000054 R09: 0000000000000000
[ 3.489139] R10: 00007f9c420f8929 R11: 0000000000000246 R12: 00007ffef044c5f8
[ 3.489380] R13: 0000000000000000 R14: 00007ffef044c600 R15: 0000000000000000
[ 3.490061] Kernel Offset: disabled
[ 3.490398] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 ]---
environment
| host | arch | linux kernel | buildroot | glibc |
|---|---|---|---|---|
| ubuntu 20.04 | x86_64 | 5.4.0-195/5.4.195 | 2022.02.3 | 2.34 |
config of buildroot
- C library choose
glibc - Kernel Headers choose
Linux 5.4.x kernel headers
- qemu-system-x86_64 -kernel use
Linux 5.4.0-195
error analysis
-
FATAL: kernel too oldwas throwed byglibc: /sysdeps/unix/sysv/linux/dl-osinfo.h
-
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00was throwed bykernel: /kernel/panic.c/panic(const char *fmt, ...)
-
in
package/glibc/glibc.mk, will add glibc compile option from buildroot's configBR2_TOOLCHAIN_HEADERS_AT_LEAST
-
and
BR2_TOOLCHAIN_HEADERS_AT_LEASToption in.configis 5.4
but in C.1 Configuring and compiling the GNU C Library, kernel version rule is:
X.Y.Z(buildroot is 5.4, missingZ)
--enable-kernel=version
This option is currently only useful on GNU/Linux systems. The version parameter should have the formX.Y.Zand describes the smallest version of the Linux kernel the generated library is expected to support. The higher the version number is, the less compatibility code is added, and the faster the code gets.
temporary solution
modify buildroot's .config BR2_TOOLCHAIN_HEADERS_AT_LEAST to 5.4.0

recompile and start ok

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




