您尚未登录。

楼主 #1 2019-04-16 14:26:52

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

奔溃现场:

[    4.556319] VFS: Mounted root (jffs2 filesystem) on device 31:4.
[    4.563812] devtmpfs: mounted
[    4.567967] Freeing unused kernel memory: 1024K
FATAL: kernel too old
[    4.768232] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[    4.768232]
[    4.777374] CPU: 0 PID: 1 Comm: linuxrc Not tainted 4.10.15-licheepi-zero-00962-g02a01d8 #18
[    4.785797] Hardware name: Allwinner sun8i Family
[    4.790537] [<c010e494>] (unwind_backtrace) from [<c010b230>] (show_stack+0x10/0x14)
[    4.798281] [<c010b230>] (show_stack) from [<c0358368>] (dump_stack+0x84/0x98)
[    4.805503] [<c0358368>] (dump_stack) from [<c01a7b84>] (panic+0xdc/0x248)
[    4.812378] [<c01a7b84>] (panic) from [<c011e358>] (do_exit+0x9d0/0xa00)
[    4.819074] [<c011e358>] (do_exit) from [<c011f4c4>] (do_group_exit+0x3c/0xd0)
[    4.826290] [<c011f4c4>] (do_group_exit) from [<c011f568>] (__wake_up_parent+0x0/0x18)
[    4.834204] Rebooting in 5 seconds..

全部 log:

U-Boot SPL 2017.01-rc2-00074-g3214598-dirty (Apr 10 2019 - 21:26:39)
DRAM: 64 MiB
Trying to boot from sunxi SPI

U-Boot 2017.01-rc2-00074-g3214598-dirty (Apr 10 2019 - 21:26:39 -0400) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

Setting up a 1024x600 lcd console (overscan 0x0)
dotclock: 48000kHz = 48000kHz: (1 * 3MHz * 96) / 6
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800


U-Boot 2017.01-rc2-00074-g3214598-dirty (Apr 10 2019 - 21:26:39 -0400) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

Setting up a 1024x600 lcd console (overscan 0x0)
dotclock: 48000kHz = 48000kHz: (1 * 3MHz * 96) / 6
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x500000
SF: 5242880 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42df9000, end 42dff04f ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.10.15-licheepi-zero-00962-g02a01d8 (root@test4) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) ) #18 SMP Mon Apr 15 21:11:46 EDT 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Lichee Pi Zero with Dock
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 14 pages/cpu @c3d08000 s24780 r8192 d24372 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 15660
[    0.000000] Kernel command line: console=ttyS2,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:992k(uboot)ro,32k(env)ro,64k(dtb)ro,5M(kernel)ro,-(rootfs) root=31:04 rw rootfstype=jffs2 init=/linuxrc vt.global_cursor_default=0
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 51584K/63136K available (6144K kernel code, 310K rwdata, 2084K rodata, 1024K init, 273K bss, 11552K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4000000 - 0xff800000   ( 952 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc3da8000   (  61 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0a00000 - 0xc0b00000   (1024 kB)
[    0.000000]       .data : 0xc0b00000 - 0xc0b4d800   ( 310 kB)
[    0.000000]        .bss : 0xc0b4f000 - 0xc0b93714   ( 274 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU debugfs-based tracing is enabled.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000018] Switching to timer-based delay loop, resolution 41ns
[    0.000184] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000426] Console: colour dummy device 80x30
[    0.000461] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000475] pid_max: default: 32768 minimum: 301
[    0.000608] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000619] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001314] CPU: Testing write buffer coherency: ok
[    0.001725] /cpus/cpu@0 missing clock-frequency property
[    0.001747] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002106] Setting up static identity map for 0x40100000 - 0x40100058
[    0.002851] smp: Bringing up secondary CPUs ...
[    0.002868] smp: Brought up 1 node, 1 CPU
[    0.002878] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.002884] CPU: All CPU(s) started in SVC mode.
[    0.003685] devtmpfs: initialized
[    0.007353] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.007645] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.007675] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.007830] pinctrl core: initialized pinctrl subsystem
[    0.008855] NET: Registered protocol family 16
[    0.009402] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.010839] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.010858] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.025254] SCSI subsystem initialized
[    0.025543] usbcore: registered new interface driver usbfs
[    0.025606] usbcore: registered new interface driver hub
[    0.025700] usbcore: registered new device driver usb
[    0.025958] pps_core: LinuxPPS API ver. 1 registered
[    0.025970] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.025993] PTP clock support registered
[    0.026216] Advanced Linux Sound Architecture Driver Initialized.
[    0.028069] clocksource: Switched to clocksource arch_sys_counter
[    0.039051] NET: Registered protocol family 2
[    0.039783] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.039814] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.039838] TCP: Hash tables configured (established 1024 bind 1024)
[    0.039928] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.039974] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.040189] NET: Registered protocol family 1
[    0.040785] RPC: Registered named UNIX socket transport module.
[    0.040803] RPC: Registered udp transport module.
[    0.040809] RPC: Registered tcp transport module.
[    0.040814] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.043281] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.052036] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.052998] NFS: Registering the id_resolver key type
[    0.053047] Key type id_resolver registered
[    0.053056] Key type id_legacy registered
[    0.053133] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.057617] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.057640] io scheduler noop registered
[    0.057647] io scheduler deadline registered
[    0.057823] io scheduler cfq registered (default)
[    0.063028] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.130785] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.154457] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[    0.176067] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 37, base_baud = 1500000) is a U6_16550A
[    0.197637] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 38, base_baud = 1500000) is a U6_16550A
[    0.795303] console [ttyS2] enabled
[    0.799620] [drm] Initialized
[    0.806027] m25p80 spi32766.0: mx25l25635e (32768 Kbytes)
[    0.811555] 5 cmdlinepart partitions found on MTD device spi32766.0
[    0.817815] Creating 5 MTD partitions on "spi32766.0":
[    0.822982] 0x000000000000-0x0000000f8000 : "uboot"
[    0.829473] 0x0000000f8000-0x000000100000 : "env"
[    0.835597] 0x000000100000-0x000000110000 : "dtb"
[    0.841844] 0x000000110000-0x000000610000 : "kernel"
[    0.848367] 0x000000610000-0x000002000000 : "rootfs"
[    0.855218] libphy: Fixed MDIO Bus: probed
[    0.859973] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    0.865789] dwmac-sun8i 1c30000.ethernet: No regulator found
[    0.871584] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[    0.877745] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    0.883459] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    0.890695] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    0.896348] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    0.903577] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    0.908549] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    0.915536] libphy: stmmac: probed
[    0.920937] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.927473] ehci-platform: EHCI generic platform driver
[    0.933122] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.938812] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.946726] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[    0.978087] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    0.985336] hub 1-0:1.0: USB hub found
[    0.989293] hub 1-0:1.0: 1 port detected
[    0.993833] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.000152] ohci-platform: OHCI generic platform driver
[    1.005680] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    1.012412] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    1.020392] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[    1.093195] hub 2-0:1.0: USB hub found
[    1.097026] hub 2-0:1.0: 1 port detected
[    1.104234] usbcore: registered new interface driver usb-storage
[    1.110928] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    1.120469] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.129828] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[    1.136626] sun6i-rtc 1c20400.rtc: RTC enabled
[    1.141306] i2c /dev entries driver
[    1.146248] Goodix-TS 0-005d: i2c test failed attempt 1: -6
[    1.188202] Goodix-TS 0-005d: i2c test failed attempt 2: -6
[    1.228094] Goodix-TS 0-005d: I2C communication failure: -6
[    1.234501] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.298118] sunxi-mmc 1c0f000.mmc: base:0xc4335000 irq:23
[    1.358091] sunxi-mmc 1c10000.mmc: base:0xc4339000 irq:24
[    1.364548] usbcore: registered new interface driver usbhid
[    1.370213] usbhid: USB HID core driver
[    1.375726] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[    1.383795] sun4i-codec 1c22c00.codec: Failed to register our card
[    1.391732] NET: Registered protocol family 10
[    1.398819] Segment Routing with IPv6
[    1.402557] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.409447] NET: Registered protocol family 17
[    1.413994] Key type dns_resolver registered
[    1.418534] Registering SWP/SWPB emulation handler
[    1.431875] usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.439830] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.445594] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[    1.454915] hub 3-0:1.0: USB hub found
[    1.458952] hub 3-0:1.0: 1 port detected
[    1.463674] using random self ethernet address
[    1.468230] using random host ethernet address
[    1.475116] usb0: HOST MAC 32:cc:9f:3a:8e:c2
[    1.479602] usb0: MAC 76:4d:08:27:02:20
[    1.483487] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.491014] g_cdc gadget: g_cdc ready
[    1.497358] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[    1.508865] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:03:12 UTC (192)
[    1.517203] vcc5v0: disabling
[    1.520267] ALSA device list:
[    1.523236]   #0: V3s Audio Codec
[    1.528701] random: fast init done
[    1.544273] mmc1: host does not support reading read-only switch, assuming write-enable
[    1.557687] mmc1: new high speed SD card at address 0001
[    1.571657] mmcblk1: mmc1:0001 00000 1.83 GiB
[    1.580893]  mmcblk1: p1 p2
[    1.595109] random: crng init done
[    4.538331] jffs2: notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    4.556319] VFS: Mounted root (jffs2 filesystem) on device 31:4.
[    4.563812] devtmpfs: mounted
[    4.567967] Freeing unused kernel memory: 1024K
FATAL: kernel too old
[    4.768232] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[    4.768232]
[    4.777374] CPU: 0 PID: 1 Comm: linuxrc Not tainted 4.10.15-licheepi-zero-00962-g02a01d8 #18
[    4.785797] Hardware name: Allwinner sun8i Family
[    4.790537] [<c010e494>] (unwind_backtrace) from [<c010b230>] (show_stack+0x10/0x14)
[    4.798281] [<c010b230>] (show_stack) from [<c0358368>] (dump_stack+0x84/0x98)
[    4.805503] [<c0358368>] (dump_stack) from [<c01a7b84>] (panic+0xdc/0x248)
[    4.812378] [<c01a7b84>] (panic) from [<c011e358>] (do_exit+0x9d0/0xa00)
[    4.819074] [<c011e358>] (do_exit) from [<c011f4c4>] (do_group_exit+0x3c/0xd0)
[    4.826290] [<c011f4c4>] (do_group_exit) from [<c011f568>] (__wake_up_parent+0x0/0x18)
[    4.834204] Rebooting in 5 seconds..




离线

楼主 #2 2019-04-16 14:28:28

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

纠结这个 kernel too old 到底是哪里报出来的

首先 克隆了一个 busybox

git clone git://busybox.net/busybox.git

然后搜了一圈 grep "kernel too" -r .

啥也没有搜到。





离线

楼主 #3 2019-04-16 14:31:14

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

接着进入 buildroot 目录一顿狂搜:

root@ubuntu:/opt/buildroot-2018.08.2# grep "kernel too old" -r .
Binary file ./output/target/lib/ld-2.27.so matches
Binary file ./output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/libc.a matches
Binary file ./output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/csu/libc-start.o matches
Binary file ./output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/elf/ld.so matches
Binary file ./output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/elf/sln matches
Binary file ./output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/elf/ldconfig matches
Binary file ./output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/elf/dl-allobjs.os matches
Binary file ./output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/elf/rtld.os matches
Binary file ./output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/elf/librtld.os matches
./output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/sysdeps/unix/sysv/linux/dl-osinfo.h:         FATAL ("FATAL: kernel too old\n");                                \
./output/build/linux-zero-4.13.y/Documentation/arm/kernel_user_helpers.txt:             fprintf(stderr, "can't do atomic operations, kernel too old\n");
./output/build/linux-zero-4.13.y/Documentation/translations/zh_CN/arm/kernel_user_helpers.txt:          fprintf(stderr, "can't do atomic operations, kernel too old\n");
./output/build/linux-zero-4.13.y/net/netfilter/xt_hashlimit.c:          pr_info("Unknown mode mask %X, kernel too old?\n",
./output/build/linux-headers-zero-4.13.y/Documentation/arm/kernel_user_helpers.txt:             fprintf(stderr, "can't do atomic operations, kernel too old\n");
./output/build/linux-headers-zero-4.13.y/Documentation/translations/zh_CN/arm/kernel_user_helpers.txt:          fprintf(stderr, "can't do atomic operations, kernel too old\n");
./output/build/linux-headers-zero-4.13.y/net/netfilter/xt_hashlimit.c:          pr_info("Unknown mode mask %X, kernel too old?\n",
Binary file ./output/images/rootfs.tar matches
Binary file ./output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libc.a matches
Binary file ./output/host/arm-buildroot-linux-gnueabihf/sysroot/sbin/sln matches
Binary file ./output/host/arm-buildroot-linux-gnueabihf/sysroot/sbin/ldconfig matches
Binary file ./output/host/arm-buildroot-linux-gnueabihf/sysroot/lib/ld-2.27.so matches
./dl/linux/git/Documentation/arm/kernel_user_helpers.txt:               fprintf(stderr, "can't do atomic operations, kernel too old\n");
./dl/linux/git/Documentation/translations/zh_CN/arm/kernel_user_helpers.txt:            fprintf(stderr, "can't do atomic operations, kernel too old\n");
./dl/linux/git/net/netfilter/xt_hashlimit.c:            pr_info("Unknown mode mask %X, kernel too old?\n",

最可疑就是这个 glibc 了 output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/sysdeps/unix/sysv/linux/dl-osinfo.h





离线

楼主 #4 2019-04-16 14:33:57

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

打开 output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/sysdeps/unix/sysv/linux/dl-osinfo.h

#define DL_SYSDEP_OSCHECK(FATAL)                                              \
  do {                                                                        \
    /* Test whether the kernel is new enough.  This test is only performed    \
       if the library is not compiled to run on all kernels.  */              \
                                                                              \
    int version = _dl_discover_osversion ();                                  \
    if (__glibc_likely (version >= 0))                                        \
      {                                                                       \
        if (__builtin_expect (GLRO(dl_osversion) == 0, 1)                     \
            || GLRO(dl_osversion) > version)                                  \
          GLRO(dl_osversion) = version;                                       \
                                                                              \
        /* Now we can test with the required version.  */                     \
        if (__LINUX_KERNEL_VERSION > 0 && version < __LINUX_KERNEL_VERSION)   \
          /* Not sufficent.  */                                               \
          FATAL ("FATAL: kernel too old\n");                                  \
      }                                                                       \
    else if (__LINUX_KERNEL_VERSION > 0)                                      \
      FATAL ("FATAL: cannot determine kernel version\n");                     \
  } while (0)

错误就是这里报出来的:

/* Now we can test with the required version.  */                     \
        if (__LINUX_KERNEL_VERSION > 0 && version < __LINUX_KERNEL_VERSION)   \
          /* Not sufficent.  */                                               \
          FATAL ("FATAL: kernel too old\n");                                  \
      }





离线

楼主 #5 2019-04-16 14:33:59

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

打开配置文件 output/build/glibc-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/config.h


/* Linux specific: minimum supported kernel version.  */
#define __LINUX_KERNEL_VERSION (4 * 65536 + 13 * 256 + 0)

/* Override abi-tags ABI version if necessary.  */
#define __ABI_TAG_VERSION 4,13,0

这下终于知道为什么了,





离线

楼主 #6 2019-04-16 14:38:37

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

2019-04-16_143657.png

2019-04-16_143713.png

会是这里引起吗?

改改看吧





离线

#7 2019-04-16 15:41:09

真的是很烦
会员
注册时间: 2018-10-08
已发帖子: 154
积分: 146.5

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

kernel忙活了半天, 满身大汉,  居然被人嘲笑"你不行了"
盘他

离线

楼主 #8 2019-04-16 15:52:02

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

真的是很烦 说:

kernel忙活了半天, 满身大汉,  居然被人嘲笑"你不行了"
盘他

是这么个道理, 还能解释得更形象一点吗?





离线

楼主 #9 2019-04-17 08:07:35

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

2019-04-17_080606.png

如果跑 Linux 4.10 系统, 建议用 buildroot 配置时候选 Linux 4.9.x kernel headers

如果选 Linux 4.10.x kernel headers 仍然可能出现一样的 kernel too old 错误然后宕机.





离线

#10 2019-04-17 08:50:34

Jmhh247
会员
注册时间: 2018-12-21
已发帖子: 262
积分: 262

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

学习经验

离线

#11 2019-04-17 10:13:32

真的是很烦
会员
注册时间: 2018-10-08
已发帖子: 154
积分: 146.5

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

晕哥 说:

https://whycan.cn/files/members/3/2019-04-17_080606.png

如果跑 Linux 4.10 系统, 建议用 buildroot 配置时候选 Linux 4.9.x kernel headers

如果选 Linux 4.10.x kernel headers 仍然可能出现一样的 kernel too old 错误然后宕机.

kernel 4.10, 头文件却要选 4.9.x 这有点说不通诶.

离线

楼主 #12 2019-04-17 10:18:16

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

真的是很烦 说:
晕哥 说:

https://whycan.cn/files/members/3/2019-04-17_080606.png

如果跑 Linux 4.10 系统, 建议用 buildroot 配置时候选 Linux 4.9.x kernel headers

如果选 Linux 4.10.x kernel headers 仍然可能出现一样的 kernel too old 错误然后宕机.

kernel 4.10, 头文件却要选 4.9.x 这有点说不通诶.

应该是最低要求的意思





离线

#13 2019-04-20 20:15:00

超级萌新
会员
注册时间: 2018-05-04
已发帖子: 408
积分: 407

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

get 新姿势

离线

#14 2019-05-14 14:04:26

tt
会员
注册时间: 2019-04-25
已发帖子: 3
积分: 3

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

晕哥 说:

https://whycan.cn/files/members/3/2019-04-17_080606.png

如果跑 Linux 4.10 系统, 建议用 buildroot 配置时候选 Linux 4.9.x kernel headers

如果选 Linux 4.10.x kernel headers 仍然可能出现一样的 kernel too old 错误然后宕机.

下面还有一个手动指定版本的选项(Manually specified Linux version)可以设置具体的小版本号。

离线

楼主 #15 2019-05-14 14:10:52

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

tt 说:
晕哥 说:

https://whycan.cn/files/members/3/2019-04-17_080606.png

如果跑 Linux 4.10 系统, 建议用 buildroot 配置时候选 Linux 4.9.x kernel headers

如果选 Linux 4.10.x kernel headers 仍然可能出现一样的 kernel too old 错误然后宕机.

下面还有一个手动指定版本的选项(Manually specified Linux version)可以设置具体的小版本号。

刚刚看了一下, 确实有, 多谢指教 ^_^





离线

#16 2019-10-28 22:03:26

lanjackg2003
会员
注册时间: 2019-06-12
已发帖子: 42
积分: 42

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

又站在晕哥的肩膀上解决了更换glibc的问题

离线

#17 2023-01-15 01:32:57

muzhi
会员
注册时间: 2019-12-14
已发帖子: 39
积分: 35.5

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

多年以后,有一位萌新吭哧吭哧的顺着搜索引擎又翻出来这篇帖子,我的版本号更激进,不过这个报错的确好奇怪,glibc选择5.10.x,kernel版本5.10.3
QQ截图20230115012314.png
QQ截图20230115013042.png

搜索引擎找到几篇文章,linux kernel 报错:FATAL: kernel too old -CSDN
FATAL: kernel too old -CSDN

按上述文章指导,file指令查看交叉编译时生成的libc,可以看到确实目标kernel版本号确实要高。"nterpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 5.15.0"
QQ截图20230115011059.png

离线

#18 2023-11-16 19:25:15

1070758302
会员
注册时间: 2022-04-08
已发帖子: 6
积分: 6

Re: 把 Linux4.13 替换成 4.10, 系统提示 FATAL: kernel too old, 然后奔溃

看到这种内核log,我一定会在kernel疯狂找这个报错的,buildroot是在内核里吗,还是说这一行没有前面的时间,所以判定是应用程序打的吗

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn