我使用的内核是 GitHub - rubikpi-ai/linux-ubuntu: The Linux kernel used by Ubuntu.,在以下文件中仿照uart2的方法开启uart8节点,启动过程中内核报错。导致无法启动,会不会是硬件哪里配置有问题?
对设备树的改动如下,并按照步骤安装新内核,
之后启动的打印节选如下
[ 5.286186] /soc@0/geniqup@ac0000/i2c@a84000/hdmi-bridge@39: Fixed dependency cycle(s) with /hdmi-connector
[ 5.443232] /soc@0/geniqup@ac0000/i2c@a84000/hdmi-bridge@39: Fixed dependency cycle(s) with /soc@0/display-subsystem@ae00000/dsi@ae94000
[ 5.461327] qcom-ice 1d88000.crypto: Found QC Inline Crypto Engine (ICE) v3.2.0
[ 5.468866] qcom-ice 1d88000.crypto: QC ICE HWKM (Hardware Key Manager) version = 1
[ 5.478611] arm-smmu 3da0000.iommu: probing hardware configuration...
[ 5.485253] arm-smmu 3da0000.iommu: SMMUv2 with:
[ 5.490028] arm-smmu 3da0000.iommu: stage 1 translation
[ 5.495490] arm-smmu 3da0000.iommu: coherent table walk
[ 5.500952] arm-smmu 3da0000.iommu: stream matching with 9 register groups
[ 5.508123] arm-smmu 3da0000.iommu: 7 context banks (0 stage-2 only)
[ 5.514761] arm-smmu 3da0000.iommu: Supported page sizes: 0x61311000
[ 5.521389] arm-smmu 3da0000.iommu: Stage-1: 48-bit VA -> 36-bit IPA
[ 5.528276] arm-smmu 3da0000.iommu: preserved 0 boot mappings
[ 5.537934] qcom,qfprom 784000.efuse: supply vcc not found, using dummy regulator
[ 5.561886] qcom-pcie 1c08000.pcie: supply vddpe-3v3 not found, using dummy regulator
[ 5.562491] 988000.serial: ttyHS2 at MMIO 0x988000 (irq = 128, base_baud = 0) is a MSM
[ 5.570140] qcom-pcie 1c08000.pcie: host bridge /soc@0/pcie@1c08000 ranges:
[ 5.580138] 994000.serial: ttyMSM0 at MMIO 0x994000 (irq = 129, base_baud = 0) is a MSM
[ 5.585275] qcom-pcie 1c08000.pcie: IO 0x0040200000..0x00402fffff -> 0x0000000000
[ 5.601728] qcom-pcie 1c08000.pcie: MEM 0x0040300000..0x005fffffff -> 0x0040300000
[ 5.610441] printk: legacy console [ttyMSM0] enabled
[ 5.610441] printk: legacy console [ttyMSM0] enabled
[ 5.620676] printk: legacy bootconsole [qcom_geni0] disabled
[ 5.620676] printk: legacy bootconsole [qcom_geni0] disabled
[ 5.634505] 99c000.serial: ttyHS7 at MMIO 0x99c000 (irq = 130, base_baud = 0) is a MSM
[ 5.643788] serial serial0: tty port ttyHS7 registered
[ 5.651839] a80000.serial: ttyHS8 at MMIO 0xa80000 (irq = 132, base_baud = 0) is a MSM
[ 5.660143] Internal error: synchronous external abort: 0000000096000010 [#1] SMP
[ 5.667825] Modules linked in: aes_neon_bs aes_neon_blk aes_ce_blk aes_ce_cipher
[ 5.675432] CPU: 7 PID: 83 Comm: kworker/u16:3 Not tainted 6.8.0-1055-qcom #55
[ 5.682845] Hardware name: Thundercomm, Inc. RUBIK Pi 3 (DT)
[ 5.688657] Workqueue: events_unbound deferred_probe_work_func
[ 5.694665] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 5.701811] pc : qcom_geni_serial_set_mctrl+0x64/0x1d0
[ 5.707096] lr : uart_configure_port.isra.0+0x1fc/0x278
[ 5.712463] sp : ffff8000807a39b0
[ 5.715871] x29: ffff8000807a39b0 x28: 0000000000000000 x27: ffffa29a22d82208
[ 5.723203] x26: ffffa29a22abac60 x25: ffffa29a214c5c00 x24: ffffa29a22ababa0
[ 5.730529] x23: ffff627207198ec0 x22: 0000000000000000 x21: 0000000000000000
[ 5.737856] x20: ffff627207198dc0 x19: ffffa29a22d81ff8 x18: ffff8000807430a0
[ 5.745182] x17: 0000000000000000 x16: 0000000000000000 x15: 3331203d20717269
[ 5.752507] x14: 0000000000000000 x13: 0000000000000000 x12: 000500a400000000
[ 5.759833] x11: 0000000000000000 x10: 0000000000001bb0 x9 : ffffa29a20452d5c
[ 5.767161] x8 : ffff8000807a34d8 x7 : 0000000000000000 x6 : 0000000000000000
[ 5.767823] qcom-pcie 1c08000.pcie: iATU: unroll T, 8 ob, 8 ib, align 4K, limit 1024G
[ 5.774493] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000080000002
[ 5.774500] x2 : 0000000000000000 x1 : ffff8000839b82ac x0 : ffffa29a22d81ff8
[ 5.774506] Call trace:
[ 5.774509] qcom_geni_serial_set_mctrl+0x64/0x1d0
[ 5.804617] uart_configure_port.isra.0+0x1fc/0x278
[ 5.809625] serial_core_add_one_port+0x16c/0x278
[ 5.814456] serial_core_register_port+0xc8/0x1b0
[ 5.819288] serial_ctrl_register_port+0x1c/0x40
[ 5.824037] uart_add_one_port+0x1c/0x40
[ 5.828072] qcom_geni_serial_probe+0x304/0x5d8
[ 5.832726] platform_probe+0x74/0x118
[ 5.836583] really_probe+0x1c0/0x420
[ 5.840354] __driver_probe_device+0x94/0x1d8
[ 5.844839] driver_probe_device+0x48/0x188
[ 5.849146] __device_attach_driver+0x114/0x220
[ 5.853811] bus_for_each_drv+0x94/0x118
[ 5.857852] __device_attach+0xac/0x208
[ 5.861800] device_initial_probe+0x20/0x48
[ 5.866101] bus_probe_device+0xcc/0xd8
[ 5.870051] deferred_probe_work_func+0xac/0x120
[ 5.874795] process_one_work+0x17c/0x448
[ 5.878923] worker_thread+0x360/0x480
[ 5.882779] kthread+0xf8/0x110
[ 5.886007] ret_from_fork+0x10/0x20
[ 5.889691] Code: 1a9f0063 f9400801 910ab021 d50332bf (b9000023)
[ 5.895948] ---[ end trace 0000000000000000 ]---
[ 5.900687] note: kworker/u16:3[83] exited with irqs disabled
[ 5.906617] note: kworker/u16:3[83] exited with preempt_count 1
[ 6.789662] qcom-pcie 1c08000.pcie: Phy link never came up
[ 6.795813] qcom-pcie 1c08000.pcie: PCI host bridge to bus 0001:00
[ 6.802272] pci_bus 0001:00: root bus resource [bus 00-ff]
[ 6.807917] pci_bus 0001:00: root bus resource [io 0x0000-0xfffff]
[ 6.814367] pci_bus 0001:00: root bus resource [mem 0x40300000-0x5fffffff]
[ 6.821519] pci 0001:00:00.0: [17cb:010b] type 01 class 0x060400 PCIe Root Port
[ 6.829054] pci 0001:00:00.0: BAR 0 [mem 0x00000000-0x00000fff]
[ 6.835145] pci 0001:00:00.0: PCI bridge to [bus 01-ff]
[ 6.840524] pci 0001:00:00.0: bridge window [io 0x0000-0x0fff]
[ 6.846793] pci 0001:00:00.0: bridge window [mem 0x00000000-0x000fffff]
[ 6.853776] pci 0001:00:00.0: bridge window [mem 0x00000000-0x000fffff 64bit pref]
[ 6.861779] pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
[ 6.876964] pci 0001:00:00.0: BAR 0 [mem 0x40300000-0x40300fff]: assigned
[ 6.883968] pci 0001:00:00.0: PCI bridge to [bus 01-ff]
[ 6.889580] pcieport 0001:00:00.0: Adding to iommu group 3
[ 6.897600] pcieport 0001:00:00.0: Cannot get wake GPIO
[ 6.903166] pcieport 0001:00:00.0: PME: Signaling with IRQ 141
[ 6.910094] pcieport 0001:00:00.0: AER: enabled with IRQ 141
初步的debug过程如下
ubuntu@2990c793929f:~/linux-ubuntu/debian/build/build-qcom$ gdb-multiarch vmlinux
GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vmlinux...
(gdb) list *(qcom_geni_serial_set_mctrl + 0x64)
0xffff800080cde214 is in qcom_geni_serial_set_mctrl (/home/ubuntu/linux-ubuntu/arch/arm64/include/asm/io.h:39).
34 }
35
36 #define __raw_writel __raw_writel
37 static __always_inline void __raw_writel(u32 val, volatile void __iomem *addr)
38 {
39 asm volatile("str %w0, [%1]" : : "rZ" (val), "r" (addr));
40 }
41
42 #define __raw_writeq __raw_writeq
43 static __always_inline void __raw_writeq(u64 val, volatile void __iomem *addr)
(gdb)
是不是哪里还需要再配置?谢谢!![]()
