pojiro / nerves_system_f3rp70

Apache License 2.0
11 stars 2 forks source link

Kernel created with nerves_toolchain_armv7_nerves_linux_gnueabihf causes a kernel panic during boot #1

Open pojiro opened 3 years ago

pojiro commented 3 years ago

current releases (0.1.0, 0.2.0) don't have this issue, because they are made by bellow settings,

BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_KERNEL_HEADERS_4_14=y

nerves_defconfig relates this issue

BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/nerves-project/toolchains/releases/download/v1.4.2/nerves_toolchain_armv7_nerves_linux_gnueabihf-darwin_x86_64-1.4.2-6A1DC92.tar.xz"
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="armv7-nerves-linux-gnueabihf"
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
# BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y

boot log

U-Boot 2019.04 (Mar 19 2020 - 08:35:01 +0900) Xilinx Zynq F3RP7x

CPU:   Zynq 7z020
Silicon: v3.1
DRAM:  ECC disabled 1 GiB
Flash: 256 MiB
MMC:   mmc@e0100000: 1, mmc@e0101000: 0
Loading Environment from SPI Flash... SF: Detected n25q128a13 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

OK
In:    serial@e0000000
Out:   serial@e0000000
Err:   serial@e0000000
Model: Xilinx F3RP7x board
eth0 : 00:00:64:9c:a2:f4
eth1 : 00:00:64:9c:a2:f5
Module Name : [F3RP70-2L]
Net:   
ZYNQ GEM: e000b000, phyaddr 3, interface rgmii-id

Warning: ethernet@e000b000 using MAC address from ROM
eth0: ethernet@e000b000
ZYNQ GEM: e000c000, phyaddr 7, interface rgmii-id

Warning: ethernet@e000c000 using MAC address from ROM
, eth1: ethernet@e000c000
SF: Detected n25q128a13 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
852 bytes read in 9 ms (91.8 KiB/s)
Importing environment from mmc 0 ...
Checking if uenvcmd is set ...
Hit any key to stop autoboot:  2  1  0 
SF: Detected n25q128a13 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
byte at 0x08000000 (0xe0) != byte at 0xe000a064 (0xe1)
Total of 0 byte(s) were the same
Total of 1 byte(s) were the same
Interface:  MMC
  Device 0: Vendor: Man 000002 Snr d4260f01 Rev: 2.9 Prod: SA16GU
            Type: Removable Hard Disk
            Capacity: 14832.0 MB = 14.4 GB (30375936 x 512)
Filesystem: FAT16 "NO NAME    "
boot device is mmc 0
2881448 bytes read in 147 ms (18.7 MiB/s)
14656 bytes read in 6 ms (2.3 MiB/s)
dtb is f3rp7x_2l.dtb
Kernel image @ 0x2000000 [ 0x000000 - 0x2bf7a8 ]
## Flattened Device Tree blob at 02a00000
   Booting using the fdt blob at 0x2a00000
   Using Device Tree in place at 02a00000, end 02a0693f

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.14.164-rt73-ert3xlnx (buildroot@buildroot) (gcc version 10.2.0 (crosstool-NG 1.24.0.299_6729a76)) #1 SMP PREEMPT RT Wed Jul 14 07:17:42 JST 2021
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Yokogawa e-RT3 F3RP7x
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x3f000000
random: get_random_bytes called from start_kernel+0x7c/0x424 with crng_init=0
percpu: Embedded 17 pages/cpu s38588 r8192 d22852 u69632
Built 1 zonelists, mobility grouping on.  Total pages: 261208
Kernel command line: console=ttyPS0,115200 log_buf_len=131072 rootwait panic=10 vmalloc=600MB root=/dev/mmcblk0p2
log_buf_len: 131072 bytes
early log buf free: 14840(90%)
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 8, 1310720 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 1009888K/1048576K available (6144K kernel code, 372K rwdata, 1964K rodata, 1024K init, 169K bss, 22304K reserved, 16384K cma-reserved, 606208K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xda800000 - 0xff800000   ( 592 MB)
    lowmem  : 0xc0000000 - 0xda000000   ( 416 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0700000   (7136 kB)
      .init : 0xc0a00000 - 0xc0b00000   (1024 kB)
      .data : 0xc0b00000 - 0xc0b5d114   ( 373 kB)
       .bss : 0xc0b639f4 - 0xc0b8e0a0   ( 170 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
ftrace: allocating 22696 entries in 45 pages
Preemptible hierarchical RCU implementation.
    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
    RCU priority boosting: priority 1 delay 500 ms.
    No expedited grace period (rcu_normal_after_boot).
    Tasks RCU enabled.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to da800000
slcr mapped to da802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at da802100
Zynq clock init
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 413490550 ns
sched_clock: 16 bits at 70kHz, resolution 14178ns, wraps every 464596123ns
timer #0 at da80a000, irq=16
Calibrating delay loop... 1724.41 BogoMIPS (lpj=862208)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: Spectre v2: using BPIALL workaround
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x10003c
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU1: Spectre v2: using BPIALL workaround
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (3448.83 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xda880000
zynq_gpio_probe: base = -19
Requested IO range too big, new size set to 64K
f3rp7x_pci b0000000.pci-ctrl: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x80000000-0x9fffffff]
pci_bus 0000:00: root bus resource [io  0x0000-0xfffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
PCI: bus0: Fast back to back transfers disabled
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
NetLabel:  unlabeled traffic allowed by default
clocksource: Switched to clocksource ttc_clocksource
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 5, 229376 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 3, 32768 bytes)
UDP-Lite hash table entries: 256 (order: 3, 32768 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: no interrupt-affinity property for /pmu, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=14 max_order=18 bucket_order=4
squashfs: version 4.0 (2009/01/31) Phillip Lougher
ntfs: driver 2.1.32 [Flags: R/W].
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
jitterentropy: Initialization failed with host not compliant with requirements: 2
bounce: pool size: 64 pages
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac:    DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 25, base_baud = 6249999) is a xuartps
console [ttyPS0] enabled
brd: module loaded
loop: module loaded
cfi: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x00227e
NOR chip too large to fit in mapping. Attempting to cope...
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.5.
number of CFI chips: 1
Reducing visibility of 262144KiB chip to 131072KiB
cfi: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x00227e
NOR chip too large to fit in mapping. Attempting to cope...
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.5.
number of CFI chips: 1
Reducing visibility of 262144KiB chip to 131072KiB
Concatenating MTD devices:
(0): "cfi"
(1): "cfi"
into device "60000000.nor_flash"
1 ofpart partitions found on MTD device 60000000.nor_flash
Creating 1 MTD partitions on "60000000.nor_flash":
0x000000000000-0x000010000000 : "user"
1 ofpart partitions found on MTD device 70000000.sram
Creating 1 MTD partitions on "70000000.sram":
0x000000000000-0x000000780000 : "user sram"
libphy: Fixed MDIO Bus: probed
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 28 (00:00:64:9c:a2:f4)
Generic PHY e000b000.ethernet-ffffffff:03: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:03, irq=POLL)
libphy: MACB_mii_bus: probed
macb e000c000.ethernet eth1: Cadence GEM rev 0x00020118 at 0xe000c000 irq 29 (00:00:64:9c:a2:f5)
Generic PHY e000c000.ethernet-ffffffff:07: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000c000.ethernet-ffffffff:07, irq=POLL)
rtc-4574 48001000.rtc-ctrl: rtc core: registered rtc4574 as rtc0
i2c /dev entries driver
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 22
cdns-i2c e0005000.i2c: 400 kHz mmio e0005000 irq 23
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at da929000 with timeout 10s
EDAC DEVICE0: Giving out device to module pl310_edac_l2 controller pl310_l2_controller: DEV f8f02000.cache-controller (POLLED)
EDAC MC: ECC not enabled
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0101000.sdhci [e0101000.sdhci] using ADMA
mmc1: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
m3io_probe: irq 52
m3cpu_probe: irq 53
m3ras_probe: irq 54
m3ras_probe: irq 55
NET: Registered protocol family 17
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
registered taskstats version 1
mmc0: new high speed SDHC card at address 1234
rtc-4574 48001000.rtc-ctrl: setting system clock to 2021-07-14 00:15:56 UTC (1626221756)
mmcblk0: mmc0:1234 SA16G 14.5 GiB 
 mmcblk0: p1 p2 p3
VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
FATAL: kernel too old
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00

CPU: 0 PID: 1 Comm: init Not tainted 4.14.164-rt73-ert3xlnx #1
Hardware name: Xilinx Zynq Platform
[<c010f18c>] (unwind_backtrace) from [<c010a960>] (show_stack+0x18/0x1c)
[<c010a960>] (show_stack) from [<c06212c8>] (dump_stack+0xb0/0xcc)
[<c06212c8>] (dump_stack) from [<c011d248>] (panic+0xd8/0x24c)
[<c011d248>] (panic) from [<c01217d0>] (do_exit+0x1c4/0xa14)
[<c01217d0>] (do_exit) from [<c01220bc>] (do_group_exit+0x60/0xc8)
[<c01220bc>] (do_group_exit) from [<c012213c>] (__wake_up_parent+0x0/0x20)
CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.164-rt73-ert3xlnx #1
Hardware name: Xilinx Zynq Platform
[<c010f18c>] (unwind_backtrace) from [<c010a960>] (show_stack+0x18/0x1c)
[<c010a960>] (show_stack) from [<c06212c8>] (dump_stack+0xb0/0xcc)
[<c06212c8>] (dump_stack) from [<c010d30c>] (ipi_cpu_stop+0x44/0xa4)
[<c010d30c>] (ipi_cpu_stop) from [<c010dcdc>] (handle_IPI+0x68/0x88)
[<c010dcdc>] (handle_IPI) from [<c0101458>] (gic_handle_irq+0x88/0x94)
[<c0101458>] (gic_handle_irq) from [<c010b6cc>] (__irq_svc+0x6c/0xbc)
Exception stack(0xd90fff90 to 0xd90fffd8)
ff80:                                     00000000 00001320 00000000 c0117ba0
ffa0: d90fe000 00000051 10c0387d c0b63cd0 0000406a 413fc090 00000000 00000000
ffc0: 18c78000 d90fffe0 c01075b0 c01075a0 60000013 ffffffff
[<c010b6cc>] (__irq_svc) from [<c01075a0>] (arch_cpu_idle+0x24/0x40)
[<c01075a0>] (arch_cpu_idle) from [<c015a310>] (do_idle+0xdc/0x128)
[<c015a310>] (do_idle) from [<c015a5dc>] (cpu_startup_entry+0x20/0x24)
[<c015a5dc>] (cpu_startup_entry) from [<0010150c>] (0x10150c)
pojiro commented 2 years ago

This caused by f3rp70 kernel version 4.14.164 is lower than following version.

[0|]pojiro@X1-Carbon-9th:~/Downloads/nerves_toolchain_armv7_nerves_linux_gnueabihf-linux_x86_64-1.4.2$ 
grep -irn "4\.14\." ./*
./ct-ng.config:298:CT_LINUX_VERSION="4.14.215"
./ct-ng.config:477:CT_GLIBC_MIN_KERNEL="4.14.215"