This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am having a strange problem with an AM4372 based board when booting Linux. There is no NAND, 2GB of currently empty eMMC and an external SD card which currently has boot priority.
The device will run into a kernel panic when it should run /sbin/init.
Normally this means that either the wrong root path has been specified or that there is nothing useful to boot at that path. Both are not the case:
[ 1.438840] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 1.447063] VFS: Mounted root (ext4 filesystem) on device 179:2.
He found the path specified in kernel command line, he detected the file system correctly and he mounted it.
The same image (and actually the same SD) works fine in the AM437x EVM and - if replacing the u-boot files - even in BBB, so it do not see an image problem here.
Any good ideas are highly appreciated.
Regards
Peter
U-Boot 2019.01-g0757f3d81d-dirty (Oct 01 2020 - 15:30:20 +0200) CPU : AM437X-GP rev 1.2 Model: SMaBiT SMaWay DRAM: 512 MiB PMIC: TPS65218 NAND: 0 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Loading Environment from FAT... *** Warning - bad CRC, using default environment Net: No ethernet found. Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device SD/MMC found on device 0 ** Unable to read file boot.scr ** 312 bytes read in 1 ms (304.7 KiB/s) Loaded env from uEnv.txt Importing environment from mmc0 ... switch to partitions #0, OK mmc0 is current device SD/MMC found on device 0 3850752 bytes read in 240 ms (15.3 MiB/s) 43595 bytes read in 4 ms (10.4 MiB/s) ## Flattened Device Tree blob at 88000000 Booting using the fdt blob at 0x88000000 Loading Device Tree to 8fff2000, end 8ffffa4a ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.19.59-g5f8c1c6121 (phoyer@SmaLin) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #2 PREEMPT Thu May 7 12:40:21 CEST 2020 [ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: SMaBiT SMaWay [ 0.000000] Memory policy: Data cache writeback [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] cma: Reserved 48 MiB at 0x9d000000 [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] AM437x ES1.2 (neon) [ 0.000000] random: get_random_bytes called from start_kernel+0xa4/0x434 with crng_init=0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 105344 [ 0.000000] Kernel command line: console=ttyO0,115200n8 net.ifnames=0 biosdevnames=0 root=PARTUUID=48b4e363-02 rw rootfstype=ext4 rootwait [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Memory: 359504K/425984K available (8192K kernel code, 295K rwdata, 2428K rodata, 1024K init, 250K bss, 17328K reserved, 49152K 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 : 0xe0800000 - 0xff800000 ( 496 MB) [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (9184 kB) [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB) [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 296 kB) [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 251 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] Tasks RCU enabled. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000 [ 0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000 [ 0.000000] L2C-310 enabling early BRESP for Cortex-A9 [ 0.000000] OMAP L2C310: ROM does not support power control setting [ 0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled [ 0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB [ 0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000 [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz [ 0.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.000041] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.000055] OMAP clocksource: timer1 at 24000000 Hz [ 0.000645] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns [ 0.000660] OMAP clocksource: 32k_counter at 32768 Hz [ 0.001171] Console: colour dummy device 80x30 [ 0.001210] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0' [ 0.001218] This ensures that you still see kernel messages. Please [ 0.001226] update your kernel commandline. [ 0.001285] Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256) [ 0.090237] pid_max: default: 32768 minimum: 301 [ 0.090501] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.090527] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.091578] CPU: Testing write buffer coherency: ok [ 0.091663] CPU0: Spectre v2: using BPIALL workaround [ 0.092980] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.093193] rcu: Hierarchical SRCU implementation. [ 0.093709] EFI services will not be available. [ 0.094843] devtmpfs: initialized [ 0.107456] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 [ 0.108034] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.108068] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.113206] pinctrl core: initialized pinctrl subsystem [ 0.114294] DMI not present or invalid. [ 0.114905] NET: Registered protocol family 16 [ 0.118563] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.202910] cpuidle: using governor ladder [ 0.202963] cpuidle: using governor menu [ 0.213229] OMAP GPIO hardware version 0.1 [ 0.220989] No ATAGs? [ 0.221024] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. [ 0.221045] hw-breakpoint: maximum watchpoint size is 4 bytes. [ 0.239819] edma 49000000.edma: TI EDMA DMA engine driver [ 0.244216] media: Linux media interface: v0.10 [ 0.244283] videodev: Linux video capture interface: v2.00 [ 0.244405] pps_core: LinuxPPS API ver. 1 registered [ 0.244417] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.244447] PTP clock support registered [ 0.244499] EDAC MC: Ver: 3.0.0 [ 0.245589] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400 [ 0.247929] clocksource: Switched to clocksource timer1 [ 0.259323] NET: Registered protocol family 2 [ 0.260416] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes) [ 0.260464] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [ 0.260521] TCP bind hash table entries: 4096 (order: 2, 16384 bytes) [ 0.260588] TCP: Hash tables configured (established 4096 bind 4096) [ 0.260778] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.260806] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.260996] NET: Registered protocol family 1 [ 0.261828] RPC: Registered named UNIX socket transport module. [ 0.261846] RPC: Registered udp transport module. [ 0.261855] RPC: Registered tcp transport module. [ 0.261863] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.264270] Initialise system trusted keyrings [ 0.264683] workingset: timestamp_bits=14 max_order=17 bucket_order=3 [ 0.271203] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.272210] NFS: Registering the id_resolver key type [ 0.272261] Key type id_resolver registered [ 0.272272] Key type id_legacy registered [ 0.272328] ntfs: driver 2.1.32 [Flags: R/O]. [ 0.275558] Key type asymmetric registered [ 0.275581] Asymmetric key parser 'x509' registered [ 0.275681] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) [ 0.275699] io scheduler noop registered [ 0.275710] io scheduler deadline registered [ 0.276059] io scheduler cfq registered (default) [ 0.276075] io scheduler mq-deadline registered [ 0.276085] io scheduler kyber registered [ 0.279953] pinctrl-single 44e10800.pinmux: 199 pins, size 796 [ 0.347687] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled [ 0.352314] omap8250 44e09000.serial: No clock speed specified: using default: 48000000 [ 0.353304] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 31, base_baud = 3000000) is a 8250 [ 1.014358] console [ttyS0] enabled [ 1.020525] omap_rng 48310000.rng: Random Number Generator ver. 20 [ 1.028141] random: fast init done [ 1.031855] random: crng init done [ 1.055410] brd: module loaded [ 1.071868] loop: module loaded [ 1.078235] libphy: Fixed MDIO Bus: probed [ 1.084399] i2c /dev entries driver [ 1.090422] cpuidle: enable-method property 'ti,am4372' found operations [ 1.097729] sdhci: Secure Digital Host Controller Interface driver [ 1.104011] sdhci: Copyright(c) Pierre Ossman [ 1.111097] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.117709] ledtrig-cpu: registered to indicate activity on CPUs [ 1.126160] NET: Registered protocol family 10 [ 1.132122] Segment Routing with IPv6 [ 1.135923] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 1.142945] NET: Registered protocol family 17 [ 1.147770] Key type dns_resolver registered [ 1.152495] omap_voltage_late_init: Voltage driver support not added [ 1.160148] Loading compiled-in X.509 certificates [ 1.224449] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz [ 1.230611] cpu cpu0: Linked as a consumer to regulator.2 [ 1.236119] cpu cpu0: Dropping the link to regulator.2 [ 1.241639] cpu cpu0: Linked as a consumer to regulator.2 [ 1.249236] omap_hsmmc 48060000.mmc: Linked as a consumer to regulator.4 [ 1.283226] omap_hsmmc 481d8000.mmc: Linked as a consumer to regulator.4 [ 1.314322] hctosys: unable to open rtc device (rtc0) [ 1.324279] Waiting for root device PARTUUID=48b4e363-02... [ 1.332009] mmc0: host does not support reading read-only switch, assuming write-enable [ 1.342206] mmc0: new high speed SDHC card at address 1234 [ 1.351153] mmcblk0: mmc0:1234 SA32G 28.9 GiB [ 1.359464] mmcblk0: p1 p2 p3 p4 < p5 p6 > [ 1.382426] mmc1: new high speed MMC card at address 0001 [ 1.393077] mmcblk1: mmc1:0001 MMC02G 1.79 GiB [ 1.399643] mmcblk1boot0: mmc1:0001 MMC02G partition 1 1.00 MiB [ 1.407309] mmcblk1boot1: mmc1:0001 MMC02G partition 2 1.00 MiB [ 1.413981] mmcblk1rpmb: mmc1:0001 MMC02G partition 3 128 KiB, chardev (244:0) [ 1.432813] EXT4-fs (mmcblk0p2): recovery complete [ 1.438840] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 1.447063] VFS: Mounted root (ext4 filesystem) on device 179:2. [ 1.462518] devtmpfs: mounted [ 1.468761] Freeing unused kernel memory: 1024K [ 1.473526] Run /sbin/init as init process [ 1.511528] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 1.511528] [ 1.520756] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 1.520756] ]---
To add one thing which may be useful: if I purposely indicate a wrong root target, I get a list of valid partitions:
[ 1.814777] Disabling rootwait; root= is invalid. [ 1.819761] mmc0: host does not support reading read-only switch, assuming write-enable [ 1.828423] VFS: Cannot open root device "PARTUUID=/dev/mmcblk0p2" or unknown-block(0,0): error -6 [ 1.837902] Please append a correct "root=" boot option; here are the available partitions: [ 1.846898] mmc0: new high speed SDHC card at address 1234 [ 1.852732] 0100 65536 ram0 [ 1.852744] (driver?) [ 1.861686] mmcblk0: mmc0:1234 SA32G 28.9 GiB [ 1.866271] 0101 65536 ram1 [ 1.866278] (driver?) [ 1.873862] 0102 65536 ram2 [ 1.873872] (driver?) [ 1.880339] 0103 65536 ram3 [ 1.880346] (driver?) [ 1.887022] 0104 65536 ram4 [ 1.887029] (driver?) [ 1.893647] 0105 65536 ram5 [ 1.893655] (driver?) [ 1.899941] mmcblk0: p1 p2 p3 p4 < p5 p6 > [ 1.906357] 0106 65536 ram6 [ 1.906368] (driver?) [ 1.912675] 0107 65536 ram7 [ 1.912682] (driver?) [ 1.918999] 0108 65536 ram8 [ 1.919005] (driver?) [ 1.925183] 0109 65536 ram9 [ 1.925188] (driver?) [ 1.931474] 010a 65536 ram10 [ 1.931480] (driver?) [ 1.937740] 010b 65536 ram11 [ 1.937745] (driver?) [ 1.944030] 010c 65536 ram12 [ 1.944035] (driver?) [ 1.950392] 010d 65536 ram13 [ 1.950398] (driver?) [ 1.956674] 010e 65536 ram14 [ 1.956679] (driver?) [ 1.962959] 010f 65536 ram15 [ 1.962965] (driver?) [ 1.969229] mmc1: new high speed MMC card at address 0001 [ 1.975228] b300 30253056 mmcblk0 [ 1.975237] driver: mmcblk [ 1.983476] mmcblk1: mmc1:0001 MMC02G 1.79 GiB [ 1.988698] b301 40960 mmcblk0p1 48b4e363-01 [ 1.988706] [ 1.995544] b302 972800 mmcblk0p2 48b4e363-02 [ 1.995547] [ 2.003228] mmcblk1boot0: mmc1:0001 MMC02G partition 1 1.00 MiB [ 2.010713] mmcblk1boot1: mmc1:0001 MMC02G partition 2 1.00 MiB [ 2.017022] b303 768000 mmcblk0p3 48b4e363-03 [ 2.017031] [ 2.024024] mmcblk1rpmb: mmc1:0001 MMC02G partition 3 128 KiB, chardev (244:0) [ 2.031321] b304 1 mmcblk0p4 [ 2.031326] [ 2.037201] b305 302080 mmcblk0p5 48b4e363-05 [ 2.037204] [ 2.045363] b306 8192 mmcblk0p6 48b4e363-06 [ 2.045373] [ 2.055107] b310 1875968 mmcblk1 [ 2.055119] driver: mmcblk
So this shows to me that the parition 2 of mmc0 was specified correctly in the initial specification and that Linux apparently found it. Otherwise I would have received the device list as here above.
Any idea what might go wrong or how to obtain more debug information on what is happening at this step?
Again. the same partition boots fine with other devices (AM437x EVM and BBB). I have also tried with a standard image from the SDK. Same error.
Regards
Peter
Hello,
Well somewhat obviously the interesting thing about this is that the same card boots on other boards. The main differences here would be DeviceTree and Hardware. Since everything seems to be working to the point of loading starting init, I would think h/w is good enough. You could do some experiments in U-Boot to validate this with some reading and writing of files and see if that works well. Then, of course, make sure the h/w is setup the same between U-Boot and Linux.
If that is all good, or if you want to move directly to it, DeviceTree seems to be the next difference. Here, you can compare what is working on the other boards with what is not working on this board.
I hope this is helpful.
Hi Ron,
from u-boot I can at least read files. When trying to write I get an error but as I get the same with EVM, I suppose I am just to stupid to do so. However, init should theoretically boot with a RO file system as well.
It is also defintively not a file system issue: if I use "init=/bin/notexist", I will get a file not found error. But if I keep "init=/sbin/init" or I try "init=/bin/bash", he panics.
The dts is what we have been working on but there is nothing specifially strange. Especially as you get the list of partitions in the kernel log, it looks like there is no problem with the mmc definitions. Any other idea for parameters which may have an impact on that specific function?
As an other approach, do you maybe know if there is a kernel flag to increase debug for that specific function or any other idea how to find what is going on?
Regards
Peter
Hi Peter,
I'm sorry, I don't have any other specific advice as we haven't seen this issue. Anything in the community that deals with init not starting with systemD should be pretty applicable.
Does your DTS file use the AM33xx.dtsi file that TI uses like the other DTS files that do work (the other boards you mentioned)? That is a good start. Then I would get the file down to the simplest possible and see if that boots. A colleague actually did a presentation on this at ELC that might help:
https://cm.e-ale.org/2020/ELC2020/devicetree/elc_2020_americas_rev2.pdf
Here is a full list of the presentations that has the videos and the example he used:
https://elinux.org/ELC_2020_Presentations
If a very simple DTS file based on the right include file still doesn't boot, I would look elsewhere for the problem.
Thanks.