Omap platform beagle bone black 21.02.1 kernel boot failed

I tried several bbb board and other am335x board,but come to the same error:

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 SMP Sun Oct 24 09:01:35 2021
[    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 Black
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x9ec00000
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] percpu: Embedded 15 pages/cpu s31116 r8192 d22132 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 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: 488620K/522240K available (8290K kernel code, 333K rwdata, 1528K rodata, 1024K init, 302K bss, 17236K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 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 0xc0b00bbc with crng_init=0
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000039] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000049] OMAP clocksource: timer1 at 24000000 Hz
[    0.000550] timer_probe: no matching timers found
[    0.000681] Console: colour dummy device 80x30
[    0.000744] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.089202] pid_max: default: 32768 minimum: 301
[    0.089391] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.089406] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.090350] CPU: Testing write buffer coherency: ok
[    0.090424] CPU0: Spectre v2: using BPIALL workaround
[    0.090832] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.091525] Setting up static identity map for 0x80100000 - 0x80100060
[    0.091691] rcu: Hierarchical SRCU implementation.
[    0.092003] smp: Bringing up secondary CPUs ...
[    0.092014] smp: Brought up 1 node, 1 CPU
[    0.092023] SMP: Total of 1 processors activated (996.14 BogoMIPS).
[    0.092030] CPU: All CPU(s) started in SVC mode.
[    0.103066] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.103293] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.103318] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.104436] pinctrl core: initialized pinctrl subsystem
[    0.105843] NET: Registered protocol family 16
[    0.107780] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.133304] l3-aon-clkctrl:0000:0: failed to disable
[    0.135292] cpuidle: using governor ladder
[    0.135307] cpuidle: using governor menu
[    0.203217] edma 49000000.edma: TI EDMA DMA engine driver
[    0.207828] SCSI subsystem initialized
[    0.221787] usbcore: registered new interface driver usbfs
[    0.221866] usbcore: registered new interface driver hub
[    0.221932] usbcore: registered new device driver usb
[    0.222648] pps_core: LinuxPPS API ver. 1 registered
[    0.222661] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.222688] PTP clock support registered
[    0.222918] Advanced Linux Sound Architecture Driver Initialized.
[    0.223024] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.227741] clocksource: Switched to clocksource timer1
[    0.228025] VFS: Disk quotas dquot_6.6.0
[    0.228103] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.232596] thermal_sys: Registered thermal governor 'fair_share'
[    0.232605] thermal_sys: Registered thermal governor 'step_wise'
[    0.232622] thermal_sys: Registered thermal governor 'user_space'
[    0.233173] NET: Registered protocol family 2
[    0.233387] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.234015] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.234047] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.234090] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.234149] TCP: Hash tables configured (established 4096 bind 4096)
[    0.234249] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.234273] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.234465] NET: Registered protocol family 1
[    0.243484] RPC: Registered named UNIX socket transport module.
[    0.243506] RPC: Registered udp transport module.
[    0.243512] RPC: Registered tcp transport module.
[    0.243518] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.245642] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.256299] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.257846] NFS: Registering the id_resolver key type
[    0.257899] Key type id_resolver registered
[    0.257906] Key type id_legacy registered
[    0.257960] jffs2: version 2.2 (NAND) (SUMMARY) (LZO) (LZMA) (RTIME) (RUBIN) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.299463] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.303740] OMAP GPIO hardware version 0.1
[    0.339587] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[    0.342721] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.345685] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.345766] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 29, base_baud = 3000000) is a OMAP UART0
[    0.964952] printk: console [ttyO0] enabled
[    0.984598] brd: module loaded
[    0.991748] loop: module loaded
[    0.996221] Loading iSCSI transport class v2.0-870.
[    1.009284] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.017998] libphy: Fixed MDIO Bus: probed
[    1.077692] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    1.085743] libphy: 4a101000.mdio: probed
[    1.091425] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    1.101179] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[    1.107865] cpsw 4a100000.ethernet: ALE Table size 1024
[    1.113840] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[    1.121444] cpsw 4a100000.ethernet: Detected MACID = d0:39:72:18:7e:df
[    1.130700] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.137548] ehci-omap: OMAP-EHCI Host Controller driver
[    1.145901] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
[    1.164143] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
[    1.185272] omap_rtc 44e3e000.rtc: registered as rtc0
[    1.191456] i2c /dev entries driver
[    1.196624] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    1.206725] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[    1.215938] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.272647] omap_hsmmc 47810000.mmc: RX DMA channel request failed
[    1.283060] ledtrig-cpu: registered to indicate activity on CPUs
[    1.290000] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    1.296388] omap-aes 53500000.aes: will run requests pump with realtime priority
[    1.306328] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    1.319478] davinci-mcasp 48038000.mcasp: IRQ common not found
[    1.332861] NET: Registered protocol family 10
[    1.341140] Segment Routing with IPv6
[    1.345162] NET: Registered protocol family 17
[    1.349962] NET: Registered protocol family 15
[    1.354678] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.368332] 8021q: 802.1Q VLAN Support v1.8
[    1.372756] Key type dns_resolver registered
[    1.377329] ThumbEE CPU extension supported.
[    1.381840] Registering SWP/SWPB emulation handler
[    1.386859] omap_voltage_late_init: Voltage driver support not added
[    1.393539] sr_dev_init: Unknown instance smartreflex0
[    1.399263] SmartReflex Class3 initialized
[    1.421174] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.433890] mmc0: new high speed SDHC card at address aaaa
[    1.440872] mmcblk0: mmc0:aaaa SU08G 7.40 GiB 
[    1.447431]  mmcblk0: p1 p2
[    1.460191] random: fast init done
[    1.473464] mmc1: new high speed MMC card at address 0001
[    1.481731] mmcblk1: mmc1:0001 MMC04G 3.60 GiB 
[    1.486778] mmcblk1boot0: mmc1:0001 MMC04G partition 1 2.00 MiB
[    1.493389] mmcblk1boot1: mmc1:0001 MMC04G partition 2 2.00 MiB
[    1.499783] mmcblk1rpmb: mmc1:0001 MMC04G partition 3 128 KiB, chardev (246:0)
[    1.508096] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    1.514222] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.522631] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    1.529179] 8<--- cut here ---
[    1.532387] Unable to handle kernel NULL pointer dereference at virtual address 00000008
[    1.540913] pgd = (ptrval)
[    1.543746] [00000008] *pgd=00000000
[    1.547496] Internal error: Oops: 5 [#1] SMP ARM
[    1.552325] Modules linked in:
[    1.555527] CPU: 0 PID: 1108 Comm: kworker/0:3 Not tainted 5.4.154 #0
[    1.562268] Hardware name: Generic AM33XX (Flattened Device Tree)
[    1.568652] Workqueue: events 0xc05aba90
[    1.572757] PC is at 0xc06b4294
[    1.576040] LR is at 0xc06a4968
[    1.579325] pc : [<c06b4294>]    lr : [<c06a4968>]    psr: a0000013
[    1.585884] sp : dd96dd88  ip : 00000002  fp : ffffe000
[    1.591351] r10: c0c96ec4  r9 : c0c04f08  r8 : ddad2400
[    1.596819] r7 : 00000000  r6 : de035040  r5 : ddad2410  r4 : de034040
[    1.603652] r3 : ddad2210  r2 : c09ed4a0  r1 : 00000200  r0 : ddad2200
[    1.610486] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    1.617955] Control: 10c5387d  Table: 80004019  DAC: 00000051
[    1.623967] Process kworker/0:3 (pid: 1108, stack limit = 0x(ptrval))
[    1.630708] Stack: (0xdd96dd88 to 0xdd96e000)
[    1.635269] dd80:                   c0c04f08 c06831fc de034040 c0c96ec0 de035040 c0c96ebc
[    1.643833] dda0: ddad2400 c06a4968 00000a20 00000000 c0c971f4 dfdeea38 a0000013 ddad2410
[    1.652395] ddc0: de27ba00 00000038 c0c96ec0 c0c96eb8 00000000 c04fb214 00000000 dfdee528
[    1.660957] dde0: 00000000 00000001 00000001 c071214c dd488b40 dd488b40 c0c271f8 c02d48d0
[    1.669522] de00: dd488b40 00000000 00000000 c0a35c48 00000001 c02d4a7c c0c3fbc0 00000006
[    1.678087] de20: dda98300 c02d46fc 00000000 dd488b40 ddad05a0 ddad05a0 dd488b40 0ebe159f
[    1.686651] de40: c0a35c48 ddad2410 00000000 c0c3fbc0 00000000 00000000 c0c3fbc0 00000006
[    1.695216] de60: ffffe000 c05adf3c c0c9482c ddad2410 c0c94824 00000000 00000000 c05ac51c
[    1.703780] de80: ddad2410 c0c3fbc0 c05ac9b0 00000001 00000000 00000000 00000000 c05ac800
[    1.712344] dea0: c0c3fbc0 dd96dee8 ddad2410 00000000 dd96dee8 c05ac9b0 00000001 00000000
[    1.720908] dec0: 00000000 00000000 ffffe000 c05aaa54 de008b6c de2e16b8 ddad2410 ddad2454
[    1.729472] dee0: c0c37cd0 c05ac2b4 ddad2410 00000001 c0c37a54 ddad2410 ddad2410 c0c37cd0
[    1.738035] df00: dfdc5c00 c05ab668 ddad2410 c0c37a4c c0c37a54 c05abaf8 c0c37aa0 dd8ea500
[    1.746598] df20: dfdc29c0 c0145dd0 00000008 c0c03d00 dd8ea500 dd8ea514 dfdc29c0 00000008
[    1.755163] df40: c0c03d00 dfdc29d8 dfdc29c0 c01462d4 c0c1de30 c092f0fc ffffe000 dd8ea500
[    1.763727] df60: c014602c dd8e6b80 dd8e6c80 00000000 dd96c000 dd8ea500 c014602c de071eac
[    1.772291] df80: dd8e6b9c c014b7c0 00000015 dd8e6c80 c014b674 00000000 00000000 00000000
[    1.780854] dfa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[    1.789417] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.797979] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    1.806549] Function entered at [<c06b4294>] from [<c06a4968>]
[    1.812654] Function entered at [<c06a4968>] from [<c05adf3c>]
[    1.818759] Function entered at [<c05adf3c>] from [<c05ac51c>]
[    1.824861] Function entered at [<c05ac51c>] from [<c05ac800>]
[    1.830964] Function entered at [<c05ac800>] from [<c05aaa54>]
[    1.837065] Function entered at [<c05aaa54>] from [<c05ac2b4>]
[    1.843167] Function entered at [<c05ac2b4>] from [<c05ab668>]
[    1.849270] Function entered at [<c05ab668>] from [<c05abaf8>]
[    1.855372] Function entered at [<c05abaf8>] from [<c0145dd0>]
[    1.861477] Function entered at [<c0145dd0>] from [<c01462d4>]
[    1.867579] Function entered at [<c01462d4>] from [<c014b7c0>]
[    1.873683] Function entered at [<c014b7c0>] from [<c01010e8>]
[    1.879785] Exception stack(0xdd96dfb0 to 0xdd96dff8)
[    1.885071] dfa0:                                     00000000 00000000 00000000 00000000
[    1.893632] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.902193] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.909122] Code: e34c209e e5953024 e2430010 e5937040 (e5978008) 
[    1.915543] ---[ end trace b9a3348b3cd5e5c5 ]---
[    1.920392] Kernel panic - not syncing: Fatal exception
[    1.925869] Rebooting in 1 seconds..

Did you try the 21.02.1 firmware listed in the OpenWRT hardware page?

Yes,TI Beaglebone Black was the hardware I tried yesterday.

Issue seems to be starting with this:

Unable to handle kernel NULL pointer dereference at virtual address 00000008

Could you test a master image to see if it produces the same error?

snapshot build(Sun Jan 23 23:04:51 2022) seems fine

Then it looks like it was fixed somewhere along the way. I grepped the git log for OMAP commits, but nothing jumps out. You could file a bug report so this can be tracked/found in some way when other people bump into the same issue. But it doesn't look like an easy fix for 21.02.

I tried snapshot build for my custom am335x board,works fine:

root@OpenWrt:/# cat /proc/cpuinfo 
processor       : 0
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 298.84
Features        : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc08
CPU revision    : 2

Hardware        : Generic AM33XX (Flattened Device Tree)
Revision        : 0000
Serial          : 88:4a:ea:ce:ae:e1
root@OpenWrt:/# uname -a
Linux OpenWrt 5.10.92 #0 SMP Mon Jan 24 11:07:42 2022 armv7l GNU/Linux

I think the main change might be kernel version from linux-5.4.154 to linux-5.10.92