[5.10.x] Beaglebone Black Fails to boot from SD card

I’ve got 2 BBB’s, both Rev C, one purchased from Digikey and one from Mouser although I think they are both manufactured by Seeed. They were both purchased within 3 weeks of each other.

I’m utilizing Buildroot, but I’ve also tried this with the official BB images.

Problem: Booting from the SD card fails 75% of the time. The boards are powered via a 2A 5V power supply. Leaving the SD card inserted and pressing the reboot button will eventually result in a successful boot. Here is the log from a failed boot:

U-Boot SPL 2019.04-00002-g31a8ae0206 (May 13 2020 - 09:26:17 -0500)
Trying to boot from MMC2
Loading Environment from EXT4...
** Unable to use mmc 0:1 for loading the env **


U-Boot 2019.04-00002-g31a8ae0206 (May 13 2020 - 09:26:17 -0500), Build: jenkins-github_Bootloader-Builder-139

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Global external warm reset has occurred.
Reset Source: Global warm SW reset has occurred.
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4...
** Unable to use mmc 0:1 for loading the env **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
93109 bytes read in 12 ms (7.4 MiB/s)
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
618 bytes read in 2 ms (301.8 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from /uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
89466 bytes read in 10 ms (8.5 MiB/s)
6181168 bytes read in 537 ms (11 MiB/s)
bootargs=console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8ffe7000, end 8ffffd79 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.30 (rbeyer@debian) (arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot 2022.08-800-g73890799ee) 11.3.0, GNU ld (GNU Binutils) 2.38) #2 SMP Tue Nov 15 15:19:58 EST 2022
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Green
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x9e800000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000009fdfffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000009fdfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fdfffff]
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] percpu: Embedded 20 pages/cpu s49356 r8192 d24372 u81920
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
[    0.000000] Kernel command line: console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 485820K/522240K available (9216K kernel code, 1030K rwdata, 2168K rodata, 1024K init, 280K bss, 20036K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[    0.000000] random: get_random_bytes called from start_kernel+0x310/0x560 with crng_init=0
[    0.000000] TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
[    0.000010] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000029] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000421] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
[    0.001992] Console: colour dummy device 80x30
[    0.002064] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.090512] pid_max: default: 32768 minimum: 301
[    0.090670] LSM: Security Framework initializing
[    0.090779] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.090796] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.091855] CPU: Testing write buffer coherency: ok
[    0.091947] CPU0: Spectre v2: using BPIALL workaround
[    0.092297] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.093057] Setting up static identity map for 0x80100000 - 0x80100078
[    0.093251] rcu: Hierarchical SRCU implementation.
[    0.093781] smp: Bringing up secondary CPUs ...
[    0.093799] smp: Brought up 1 node, 1 CPU
[    0.093812] SMP: Total of 1 processors activated (996.14 BogoMIPS).
[    0.093822] CPU: All CPU(s) started in SVC mode.
[    0.094444] devtmpfs: initialized
[    0.107978] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.108284] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.108316] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.109672] pinctrl core: initialized pinctrl subsystem
[    0.111449] NET: Registered protocol family 16
[    0.114075] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.121960] audit: initializing netlink subsys (disabled)
[    0.123117] thermal_sys: Registered thermal governor 'fair_share'
[    0.123131] thermal_sys: Registered thermal governor 'step_wise'
[    0.123147] thermal_sys: Registered thermal governor 'user_space'
[    0.123420] cpuidle: using governor menu
[    1.015844] audit: type=2000 audit(0.120:1): state=initialized audit_enabled=0 res=1
[    1.114259] No ATAGs?
[    1.114289] hw-breakpoint: debug architecture 0x4 unsupported.
[    1.132692] Kprobes globally optimized
[    1.141451] iommu: Default domain type: Translated
[    1.143371] vgaarb: loaded
[    1.143923] SCSI subsystem initialized
[    1.144791] pps_core: LinuxPPS API ver. 1 registered
[    1.144812] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.144839] PTP clock support registered
[    1.145965] clocksource: Switched to clocksource dmtimer
[    1.800324] VFS: Disk quotas dquot_6.6.0
[    1.800440] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.810272] NET: Registered protocol family 2
[    1.811139] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    1.811181] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    1.811230] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    1.811291] TCP: Hash tables configured (established 4096 bind 4096)
[    1.811416] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    1.811443] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    1.811609] NET: Registered protocol family 1
[    1.812515] RPC: Registered named UNIX socket transport module.
[    1.812537] RPC: Registered udp transport module.
[    1.812547] RPC: Registered tcp transport module.
[    1.812556] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.812577] PCI: CLS 0 bytes, default 64
[    1.813902] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    1.815469] Initialise system trusted keyrings
[    1.815853] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    1.817320] NFS: Registering the id_resolver key type
[    1.817378] Key type id_resolver registered
[    1.817389] Key type id_legacy registered
[    1.817440] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.817820] Key type asymmetric registered
[    1.817839] Asymmetric key parser 'x509' registered
[    1.817861] io scheduler mq-deadline registered
[    1.817872] io scheduler kyber registered
[    2.259801] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[    2.259853] edma 49000000.dma: TI EDMA DMA engine driver
[    2.281238] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[    2.286498] Serial: 8250/16550 driver, 6 ports, IRQ sharing enabled
[    2.290090] printk: console [ttyS0] disabled
[    2.290293] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 20, base_baud = 3000000) is a 8250
[    2.521201] random: fast init done
[    2.926285] printk: console [ttyS0] enabled
[    2.932154] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 26, base_baud = 3000000) is a 8250
[    2.943646] sdhci: Secure Digital Host Controller Interface driver
[    2.950001] sdhci: Copyright(c) Pierre Ossman
[    2.955077] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.963044] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[    3.007867] brd: module loaded
[    3.020007] loop: module loaded
[    3.025145] mtdoops: mtd device (mtddev=name/number) must be supplied
[    3.034080] libphy: Fixed MDIO Bus: probed
[    3.094240] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
[    3.102491] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    3.110275] libphy: 4a101000.mdio: probed
[    3.117130] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    3.126763] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[    3.133153] cpsw 4a100000.ethernet: ALE Table size 1024
[    3.138875] cpsw 4a100000.ethernet: Detected MACID = 34:84:e4:f1:e3:12
[    3.147716] i2c /dev entries driver
[    3.153028] cpuidle: enable-method property 'ti,am3352' found operations
[    3.160231] ledtrig-cpu: registered to indicate activity on CPUs
[    3.168392] Initializing XFRM netlink socket
[    3.172870] NET: Registered protocol family 10
[    3.179049] Segment Routing with IPv6
[    3.182826] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.189644] NET: Registered protocol family 17
[    3.194142] NET: Registered protocol family 15
[    3.198778] Key type dns_resolver registered
[    3.203647] oprofile: using arm/armv7
[    3.207508] ThumbEE CPU extension supported.
[    3.211816] Registering SWP/SWPB emulation handler
[    3.217123] omap_voltage_late_init: Voltage driver support not added
[    3.223528] sr_dev_init: No voltage domain specified for smartreflex0. Cannot initialize
[    3.231721] sr_dev_init: No voltage domain specified for smartreflex1. Cannot initialize
[    3.240128] SmartReflex Class3 initialized
[    3.245052] Loading compiled-in X.509 certificates
[    3.270152] OMAP GPIO hardware version 0.1
[    3.306606] tps65217-pmic: Failed to locate of_node [id: -1]
[    3.320009] tps65217-bl: Failed to locate of_node [id: -1]
[    3.328769] mmc1: new high speed MMC card at address 0001
[    3.335255] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    3.341043] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    3.347863] mmcblk1: mmc1:0001 M62704 3.56 GiB
[    3.352853] mmcblk1boot0: mmc1:0001 M62704 partition 1 2.00 MiB
[    3.360414] mmcblk1boot1: mmc1:0001 M62704 partition 2 2.00 MiB
[    3.368262] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    3.375650] mmcblk1rpmb: mmc1:0001 M62704 partition 3 512 KiB, chardev (249:0)
[    3.383845] 8<--- cut here ---
[    3.386932] Unhandled fault: external abort on non-linefetch (0x1008) at 0xe1366000
[    3.394623] pgd = (ptrval)
[    3.397340] [e1366000] *pgd=8173c811, *pte=4a326653, *ppte=4a326453
[    3.403663] Internal error: : 1008 [#1] SMP ARM
[    3.408214] Modules linked in:
[    3.411291] CPU: 0 PID: 15 Comm: kworker/0:1 Not tainted 5.10.30 #2
[    3.417583] Hardware name: Generic AM33XX (Flattened Device Tree)
[    3.423726] Workqueue: events deferred_probe_work_func
[    3.428895] PC is at sysc_probe+0xae8/0x1388
[    3.433193] LR is at omap_reset_deassert+0x174/0x204
[    3.438179] pc : [<c05ae934>]    lr : [<c0627fd4>]    psr: 60000013
[    3.444471] sp : c11afe28  ip : 00000000  fp : c0b703bc
[    3.449716] r10: 00000028  r9 : c0a3d944  r8 : c0a3dde4
[    3.454963] r7 : 00000000  r6 : c11e0410  r5 : c0f32144  r4 : c20dde40
[    3.461519] r3 : e1340000  r2 : e1366000  r1 : 00026000  r0 : 00000000
[    3.468075] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    3.475240] Control: 10c5387d  Table: 80004019  DAC: 00000051
[    3.481010] Process kworker/0:1 (pid: 15, stack limit = 0x(ptrval))
[    3.487304] Stack: (0xc11afe28 to 0xc11b0000)
[    3.491684] fe20:                   00000001 00000000 c0e23004 c11e0410 c20dfdc0 00000000
[    3.499901] fe40: 00000001 00000001 00000030 edc3e9d0 00000000 00000000 c11e0410 c0eb6c98
[    3.508118] fe60: c0f38c64 00000000 c0eb6c98 00000009 df93b280 c06b3924 c11e0410 c0f38c5c
[    3.516334] fe80: 00000000 c0f38c64 00000000 c06b15e8 00000000 c11e0410 c0eb6c98 c06b1df4
[    3.524550] fea0: 00000000 00000000 00000000 c0efabe0 df93b280 c06b1c98 00000000 c11afeec
[    3.532768] fec0: c06b1df4 c06af6ac 00000000 c1030e6c c12cc6b8 edc3e9d0 c11e0410 00000001
[    3.540985] fee0: c11e0454 c06b1a68 00000000 c11e0410 00000001 edc3e9d0 c11e0410 c11e0410
[    3.549201] ff00: c0ec7578 c06b0744 c11e0410 c0ec72b4 c0ec72c8 c06b0b68 c0ec72f4 c1194f80
[    3.557419] ff20: df93b0c0 df93e500 00000000 c0155f28 c11ae000 df93b0c0 df93b0d8 c1194f80
[    3.565635] ff40: df93b0c0 c1194f94 df93b0d8 c0e03d00 00000008 c11ae000 df93b280 c01564a0
[    3.573852] ff60: 00000000 c119db00 c119db40 00000000 c11ae000 c0156280 c1194f80 c10b7ec4
[    3.582069] ff80: c119db24 c015bf38 00000001 c119db40 c015be08 00000000 00000000 00000000
[    3.590285] ffa0: 00000000 00000000 00000000 c0100168 00000000 00000000 00000000 00000000
[    3.598501] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.606718] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    3.614951] [<c05ae934>] (sysc_probe) from [<c06b3924>] (platform_drv_probe+0x48/0x9c)
[    3.622910] [<c06b3924>] (platform_drv_probe) from [<c06b15e8>] (really_probe+0xec/0x4a0)
[    3.631129] [<c06b15e8>] (really_probe) from [<c06b1c98>] (driver_probe_device+0x58/0xb4)
[    3.639346] [<c06b1c98>] (driver_probe_device) from [<c06af6ac>] (bus_for_each_drv+0x80/0xd0)
[    3.647913] [<c06af6ac>] (bus_for_each_drv) from [<c06b1a68>] (__device_attach+0xcc/0x190)
[    3.656217] [<c06b1a68>] (__device_attach) from [<c06b0744>] (bus_probe_device+0x84/0x8c)
[    3.664434] [<c06b0744>] (bus_probe_device) from [<c06b0b68>] (deferred_probe_work_func+0x74/0xa0)
[    3.673445] [<c06b0b68>] (deferred_probe_work_func) from [<c0155f28>] (process_one_work+0x1ec/0x544)
[    3.682624] [<c0155f28>] (process_one_work) from [<c01564a0>] (worker_thread+0x220/0x594)
[    3.690842] [<c01564a0>] (worker_thread) from [<c015bf38>] (kthread+0x130/0x144)
[    3.698274] [<c015bf38>] (kthread) from [<c0100168>] (ret_from_fork+0x14/0x2c)
[    3.705527] Exception stack(0xc11affb0 to 0xc11afff8)
[    3.710602] ffa0:                                     00000000 00000000 00000000 00000000
[    3.718817] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.727032] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    3.733683] Code: e3130004 e5943014 e0832001 1a00006a (e5922000)
[    3.739808] ---[ end trace c0a568755bc1498b ]---
[    3.746904]  mmcblk1: p1
[  208.345996] random: crng init done

Building the default BBB image in Buildroot or my custom image does the same thing. Flashing the BBB image from this site also performs the same. I’ve tried 5 different SD cards from different manufacturers (SanDisk, Patriot, Micron, Transcend), with various sizes from 4Gb to 32Gb. (Yes, the posted boot log is forcing a BBG device tree due to needing to use the LCD pins, but using the BBB DT has the same result).

Any help is greatly appreciated!

maybe… soc: ti: omap-prm: Fix external abort for am335x pruss - Patchwork

mainline as of: 5.10.73

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/drivers/soc/ti/omap_prm.c?h=v5.10.73

So I’d try bumping the build:

[ 0.000000] Linux version 5.10.30 (rbeyer@debian) (arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot 2022.08-800-g73890799ee)

Regards,

Updating the kernel worked, just need to figure out the correct configuration for Buildroot (vanilla Kernel 6.0 worked, however it didn’t have any device support). I’ll update the post when I confirm the updated settings in Buildroot for others to see.

Thanks a ton, I tried searching for the non-linefetch 1008 line, but the post you linked never showed up.

1 Like

In case anybody is wondering how to update the Buildroot configuration, change the “Custom Tarball Location” in the board configuration to the following:

$(call github,beagleboard,linux,5.10.145-ti-r54)/linux-5.10.145-ti-r54.tar.gz

You can also change the KERNEL_DEFCONFIG to “bb.org” as referenced in the answer (not bb.org_defconfig as the _defconfig is automatically added).

1 Like