想用D1开发板设计一个小电脑,搭配蓝牙鼠标键盘远程控制其他设备。因此需要用到XR829的蓝牙部分,现在的问题是:
Can't get device info: No such device
镜像使用https://github.com/YuzukiHD/Buildroot-YuzukiSBC提供的buildroot编译。除蓝牙外,其他的基本正常
系统的完整启动过程:
[337]BOOT0 commit : 27369ab
[340]set pll start
[342]periph0 has been enabled
[345]set pll end
[346][pmu]: bus read error
[349]board init ok
[351]DRAM only have internal ZQ!!
[354]get_pmu_exist() = -1
[356]ddr_efuse_type: 0x0
[359][AUTO DEBUG] two rank and full DQ!
[363]ddr_efuse_type: 0x0
[366][AUTO DEBUG] rank 0 row = 15
[369][AUTO DEBUG] rank 0 bank = 8
[372][AUTO DEBUG] rank 0 page size = 2 KB
[376][AUTO DEBUG] rank 1 row = 15
[379][AUTO DEBUG] rank 1 bank = 8
[383][AUTO DEBUG] rank 1 page size = 2 KB
[387]rank1 config same as rank0
[389]DRAM BOOT DRIVE INFO: V0.24
[393]DRAM CLK = 792 MHz
[395]DRAM Type = 3 (2:DDR2,3:DDR3)
[398]DRAMC ZQ value: 0x7b7bfb
[401]DRAM ODT value: 0x42.
[403]ddr_efuse_type: 0x0
[406]DRAM SIZE =1024 M
[410]DRAM simple test OK.
[412]dram size =1024
[414]card no is 0
[416]sdcard 0 line count 4
[418][mmc]: mmc driver ver 2021-04-2 16:45
[428][mmc]: Wrong media type 0x0
[431][mmc]: ***Try SD card 0***
[439][mmc]: HSSDR52/SDR25 4 bit
[442][mmc]: 50000000 Hz
[445][mmc]: 3796 MB
[446][mmc]: ***SD/MMC 0 init OK!!!***
[497]Loading boot-pkg Succeed(index=0).
[501]Entry_name = opensbi
[504]Entry_name = u-boot
[507]Entry_name = dtb
[510]mmc not para
[511]Jump to second Boot.
OpenSBI v0.6
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : Allwinner SUN20i - T-HEAD Xuantie Platform
Platform HART Features : RV64ACDFIMSUVX
Platform Max HARTs : 1
Current Hart : 0
Firmware Base : 0x40000400
Firmware Size : 75 KB
Runtime SBI Version : 0.2
MIDELEG : 0x0000000000000222
MEDELEG : 0x000000000000b1ff
PMP0 : 0x0000000040000000-0x000000004001ffff (A)
PMP1 : 0x0000000040000000-0x000000007fffffff (A,R,W,X)
PMP2 : 0x0000000080000000-0x00000000bfffffff (A,R,W,X)
PMP3 : 0x0000000000020000-0x0000000000027fff (A,�
U-Boot 2018.05 (Feb 01 2023 - 05:25:24 +0000) Allwinner Technology
[00.595]DRAM: 1 GiB
[00.597]Relocation Offset is: 3dee9000
[00.601]secure enable bit: 0
[00.604]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[00.610]flash init start
[00.612]workmode = 0,storage type = 1
[00.616][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00
[00.621][mmc]: get sdc_type fail and use default host:tm1.
[00.627][mmc]: can't find node "mmc0",will add new node
[00.632][mmc]: fdt err returned <no error>
[00.636][mmc]: Using default timing para
[00.640][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.657][mmc]: card_caps:0x3000000a
[00.660][mmc]: host_caps:0x3000003f
[00.664]sunxi flash init ok
[00.666]line:703 init_clocks
[00.670]drv_disp_init
fdt get node offset faill: hdmi
[00.681]unable to map hdmi registers
[00.684]drv_disp_init finish
[00.687]boot_gui_init:start
[00.689]set disp.dev0_output_type fail. using defval=0
partno erro : can't find partition Reserve0
[00.714]Get Reserve0 partition number fail!
no cfs of display devices.
[00.720]LCD open finish
[00.722]set disp.fb0_format fail. using defval=4294967295
[00.727]set disp.fb0_width fail. using defval=0
[00.732]set disp.fb0_height fail. using defval=0
bad fb0_cfg[w=0,h=0,bpp=32,format=-1]
[00.739]boot_gui_init:finish
partno erro : can't find partition bootloader
partno erro : can't find partition boot-resource
[00.782]Get bootloader and boot-resource partition number fail!
[00.803]Loading Environment from SUNXI_FLASH... OK
[00.845]Item0 (Map) magic is bad
[00.848]the secure storage item0 copy0 magic is bad
[00.874]Item0 (Map) magic is bad
[00.877]the secure storage item0 copy1 magic is bad
[00.881]Item0 (Map) magic is bad
[00.884]usb burn from boot
delay time 0
weak:otg_phy_config
[00.895]usb prepare ok
[01.114]usb sof ok
[01.116]usb probe ok
[01.118]usb setup ok
set address 0x8
set address 0x8 ok
[04.123]do_burn_from_boot usb : have no handshake
root_partition is rootfs
set root to /dev/mmcblk0p4
[04.134]update part info
[04.139]update bootcmd
[04.144]change working_fdt 0x7eaa8da0 to 0x7ea88da0
disable nand error: FDT_ERR_BADPATH
No reserved memory region found in source FDT
fb_save_para: fb_id(0), lock=0
[04.173]update dts
Hit any key to stop autoboot: 2 1 0
card0 has inited
curr_device:0
Device: SUNXI SD/MMC
Manufacturer ID: 2
OEM: 544d
Name: SA04G
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
Partition Map for MMC device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00008820 0x0000891f "env"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: 26a3a4a2-355e-4373-ac32-e76d6efb4f7e
2 0x00008920 0x00008a1f "env-redund"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: 35c4eb87-5d74-4fcb-afa7-907f01ff90a1
3 0x00008a20 0x00018a1f "boot"
attrs: 0x0000000000000004
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: 19a39da0-3224-4fc8-abcc-40f2eb9b725e
4 0x00018a20 0x00218a1f "rootfs"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: c22b4c4a-1fab-42ad-969b-04aeb7313d89
5 0x00218a20 0x0021ca1f "data"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: f9b6f8bd-92ff-4915-921a-ee5d33b78ea7
10672128 bytes read in 453 ms (22.5 MiB/s)
[06.749]no vendor_boot partition is found
Android's image name: sun20i
[06.764]
Starting kernel ...
[06.767][mmc]: MMC Device 2 not found
[06.770][mmc]: mmc 2 not find, so not exit
[ 0.000000] OF: fdt: Ignoring memory range 0x40000000 - 0x40200000
[ 0.000000] Linux version 5.4.61 (winyunq@Winyunq) (riscv64-unknown-linux-gnu-gcc (C-SKY RISCV Tools V1.8.4 B20200702) 8.1.0, GNU ld (GNU Binutils) 2.32)
[ 0.000000] cma: Reserved 8 MiB at 0x000000007f800000
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000040200000-0x000000007fffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040200000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040200000-0x000000007fffffff]
[ 0.000000] On node 0 totalpages: 261632
[ 0.000000] DMA32 zone: 3577 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 261632 pages, LIFO batch:63
[ 0.000000] elf_hwcap is 0x20112d
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055
[ 0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p4 init=/sbin/init partitions=ext4 cma=8M gpt=1 androidboot.hardware=sun20iw1p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.05(02/01/2023-05:25:24) mbr_offset=1556480 disp_reserve=12308736,0x4e01438143014281 androidboot.dramsize=1024
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.000000] Sorting __ex_table...
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1010592K/1046528K available (6803K kernel code, 703K rwdata, 2275K rodata, 196K init, 429K bss, 27744K reserved, 8192K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 200 interrupts with 1 handlers for 2 contexts.
[ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000006] sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000020] riscv_timer_clockevent depends on broadcast, but no broadcast function available
[ 0.000347] Console: colour dummy device 80x25
[ 0.000381] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.000396] pid_max: default: 32768 minimum: 301
[ 0.000527] LSM: Security Framework initializing
[ 0.000570] SELinux: Initializing.
[ 0.000746] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.000767] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.002438] ASID allocator initialised with 65536 entries
[ 0.002733] BOOTEVENT: 2.720749: ON
[ 0.003192] devtmpfs: initialized
[ 0.018205] random: get_random_u32 called from bucket_table_alloc.isra.31+0x4e/0x15e with crng_init=0
[ 0.019105] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.019130] futex hash table entries: 256 (order: 0, 6144 bytes, linear)
[ 0.019510] pinctrl core: initialized pinctrl subsystem
[ 0.020856] NET: Registered protocol family 16
[ 0.022415] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.022450] audit: initializing netlink subsys (disabled)
[ 0.023232] i2c-core: driver [dummy] registered
[ 0.066139] rtc_ccu: sunxi ccu init OK
[ 0.072927] clock: sunxi ccu init OK
[ 0.073780] clock: sunxi ccu init OK
[ 0.085712] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[ 0.110293] iommu: Default domain type: Translated
[ 0.110461] sunxi iommu: irq = 80
[ 0.111497] SCSI subsystem initialized
[ 0.111827] usbcore: registered new interface driver usbfs
[ 0.111911] usbcore: registered new interface driver hub
[ 0.111991] usbcore: registered new device driver usb
[ 0.113095] Advanced Linux Sound Architecture Driver Initialized.
[ 0.113757] Bluetooth: Core ver 2.22
[ 0.113833] NET: Registered protocol family 31
[ 0.113842] Bluetooth: HCI device and connection manager initialized
[ 0.113859] Bluetooth: HCI socket layer initialized
[ 0.113872] Bluetooth: L2CAP socket layer initialized
[ 0.113907] Bluetooth: SCO socket layer initialized
[ 0.114190] nfc: nfc_init: NFC Core ver 0.1
[ 0.114297] NET: Registered protocol family 39
[ 0.114305] pwm module init!
[ 0.115924] input: sunxi-keyboard as /devices/virtual/input/input0
[ 0.116854] clocksource: Switched to clocksource riscv_clocksource
[ 0.130326] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[ 0.147684] thermal_sys: Registered thermal governor 'step_wise'
[ 0.148197] NET: Registered protocol family 2
[ 0.149071] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[ 0.149126] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.149227] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.149309] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.149482] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 0.149537] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 0.149792] NET: Registered protocol family 1
[ 0.150399] RPC: Registered named UNIX socket transport module.
[ 0.150411] RPC: Registered udp transport module.
[ 0.150415] RPC: Registered tcp transport module.
[ 0.150420] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.152940] Initialise system trusted keyrings
[ 0.152993] Key type blacklist registered
[ 0.153229] workingset: timestamp_bits=62 max_order=18 bucket_order=0
[ 0.167782] NFS: Registering the id_resolver key type
[ 0.167816] Key type id_resolver registered
[ 0.167824] Key type id_legacy registered
[ 0.167840] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 0.190428] NET: Registered protocol family 38
[ 0.190449] Key type asymmetric registered
[ 0.190456] Asymmetric key parser 'x509' registered
[ 0.190521] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.190531] io scheduler mq-deadline registered
[ 0.190537] io scheduler kyber registered
[ 0.191737] [DISP]disp_module_init
[ 0.192334] disp 5000000.disp: Adding to iommu group 0
[ 0.228105] display_fb_request,fb_id:0
[ 0.244420] [DISP] Fb_copy_boot_fb,line:1443:
[ 0.244424] no boot_fb0
[ 0.245328] [DISP]disp_module_init finish
[ 0.246801] sunxi_sid_init()551 - insmod ok
[ 0.247304] pwm-regulator: supplied by regulator-dummy
[ 0.350453] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator
[ 0.351019] uart uart0: get regulator failed
[ 0.351045] uart uart0: uart0 supply uart not found, using dummy regulator
[ 0.351374] uart0: ttyS0 at MMIO 0x2500000 (irq = 18, base_baud = 1500000) is a SUNXI
[ 0.351397] sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n
[ 1.083327] printk: console [ttyS0] enabled
[ 1.088919] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator
[ 1.100280] uart uart1: get regulator failed
[ 1.105091] uart uart1: uart1 supply uart not found, using dummy regulator
[ 1.113152] uart1: ttyS1 at MMIO 0x2500400 (irq = 19, base_baud = 1500000) is a SUNXI
[ 1.135814] loop: module loaded
[ 1.139747] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[ 1.146983] sunxi-rfkill soc@3000000:rfkill@0: devm_pinctrl_get() failed!
[ 1.154583] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[ 1.161892] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[ 1.169297] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[ 1.175820] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[ 1.182746] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1)
[ 1.190461] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=204 assert=1
[ 1.198307] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1
[ 1.206422] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled
[ 1.214089] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power.
[ 1.220842] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1)
[ 1.228371] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=210 assert=0
[ 1.236574] [ADDR_MGT] addr_mgt_probe: module version: v1.0.10
[ 1.244132] [ADDR_MGT] addr_mgt_probe: success.
[ 1.250619] libphy: Fixed MDIO Bus: probed
[ 1.255223] CAN device driver interface
[ 1.260552] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator
[ 1.271839] sunxi gmac driver's version: 1.0.0
[ 1.276981] gmac-power0: NULL
[ 1.280289] gmac-power1: NULL
[ 1.283618] gmac-power2: NULL
[ 1.287996] PPP generic driver version 2.4.2
[ 1.293088] PPP BSD Compression module registered
[ 1.298361] PPP Deflate Compression module registered
[ 1.304002] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.311290] sunxi-ehci: EHCI SUNXI driver
[ 1.316267] get ehci1-controller wakeup-source is fail.
[ 1.322215] sunxi ehci1-controller don't init wakeup source
[ 1.328455] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xffffffe000a13818, 0x:ffffffd004075000, irq_no:31
[ 1.341979] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator
[ 1.354464] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator
[ 1.366655] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
[ 1.373930] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
[ 1.383727] sunxi-ehci 4200000.ehci1-controller: irq 49, io mem 0x04200000
[ 1.404875] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
[ 1.413733] hub 1-0:1.0: USB hub found
[ 1.417999] hub 1-0:1.0: 1 port detected
[ 1.423237] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.430191] sunxi-ohci: OHCI SUNXI driver
[ 1.435175] get ohci1-controller wakeup-source is fail.
[ 1.441126] sunxi ohci1-controller don't init wakeup source
[ 1.447367] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xffffffe000a14370
[ 1.457784] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator
[ 1.470297] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator
[ 1.482492] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
其中有一个 [BH_WRN] miss interrupt!,不知道是不是蓝牙错误的意思
wifi可以正常使用:
wlan0 Link encap:Ethernet HWaddr 20:A1:FC:D8:FD:D2
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
rfkill可以正常工作:
echo 0 > /sys/class/rfkill/rfkill0/st[ 686.015413] sunxi-rfkill soc@3000000:rfkill@0: set block: 1
ate
[ 686.023341] sunxi-rfkill soc@3000000:rfkill@0: bt power off success
cat /sys/class/rfkill/rfkill0/state
0
echo 1 > /sys/class/rfkill/rfkill0/st[ 700.247367] sunxi-rfkill soc@3000000:rfkill@0: set block: 0
ate
[ 700.265298] sunxi-rfkill soc@3000000:rfkill@0: bt power on success
cat /sys/class/rfkill/rfkill0/state
1
个人认为底层蓝牙应该是加载成功的,应该是漏了xradio或者vendor之类的东西导致上面的应用看不到xr829
echo 1 > /proc/bluetooth/sleep/btwake
[ 925.874702] [XR_BT_LPM] bluedroid_write_proc_btwake: bluedroid_write_proc_btwake 1
[ 925.885298] [XR_BT_LPM] bluedroid_write_proc_btwake: wakeup bt device
hciattach -n ttyS1 xradio > /dev/null 2>&1 &
hciconfig hci0 up
Can't get device info: No such device
find / -name "xradio"
/proc/irq/214/xradio_irq
/proc/xradio
/xradio_bt_init.sh
/sys/devices/platform/xradio_device.0
/sys/bus/platform/devices/xradio_device.0
/sys/bus/platform/drivers/xradio_device
/sys/bus/platform/drivers/xradio_device/xradio_device.0
/sys/bus/sdio/drivers/xradio_wlan
/sys/module/xradio_btlpm
/sys/module/xr829/drivers/platform:xradio_device
/xradio_bt_init.sh
hcidump_xr start
/xradio_bt_init.sh: line 34: hcidump_xr: not found
bring up hci0 failed
/bt_init.sh
hcidump_xr start
/bt_init.sh: line 41: hcidump_xr: not found
[ 1245.273187] sunxi-rfkill soc@3000000:rfkill@0: set block: 1
[ 1245.279445] sunxi-rfkill soc@3000000:rfkill@0: bt power off success
[ 1246.325947] sunxi-rfkill soc@3000000:rfkill@0: set block: 0
[ 1246.342238] sunxi-rfkill soc@3000000:rfkill@0: bt power on success
bring up hci0 failed
rfkill
rfkill list
0: sunxi-bt: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
![在这里插入图片描述](
上图所指出的文件节点均存在。
ls /sys/bus/platform/drivers/uart
[1;36m2500000.uart[m [1;36m2500400.uart[m [0;0mbind[m [0;0muevent[m [0;0munbind[m
可能和uart有关系
由于某些原因,需要使用Buildroot才能编译。在使用Buildroot编译后官方提供的手册基本上帮助不太大(绝大部分选项甚至都没有,只有内核部分的配置可以参考)。
目前的情况是,参考官方所提供的手册,把能考虑到的地方都改了,目前可以通过buildroot编译出可以运行XR829固件的系统(因为构建系统方法略有不同,目前还不能运行官方提供的demo验证)。
目前我感觉是XR829已经在正常工作了,包括蓝牙应该也是在工作,我感觉应该是我在配置的时候差了某个环节,导致hciconfig等上层软件看不到底层蓝牙XR829存在(而wifi这边则是正常,可以看到XR829的存在)。
目前我比较怀疑的是漏了xradio,或者vendor的某个环节。
cat /sys/kernel/debug/ieee80211/phy0/xradio/version
Driver Label:XR_V02.16.85_P2P_HT40_01.31
Firmware Label:XR_C09.08.52.73_DBG_02.122 2GHZ HT40 May 18 2021 13:36:09
xradio应该存在
破案了,bluez缺少对xradio的支持,即便是D1 SDK里面的bluez 5.55也不包含xradio,需要从全志官网D1 tina中,把bluez的patch抠出来加上来。
hciattach -n ttyS1 xradio
Unknown device type or id
Unknown device type or id指的即是hciattach中不支持xradio,检查方法如下:
hciattach -l
any 0x0000,0x0000
ericsson 0x0000,0x0000
digi 0x0000,0x0000
bcsp 0x0000,0x0000
xircom 0x0105,0x080a
csr 0x0000,0x0000
bboxes 0x0160,0x0002
swave 0x0000,0x0000
texas 0x0000,0x0000
texasalt 0x0000,0x0000
st 0x0000,0x0000
stlc2500 0x0000,0x0000
philips 0x0000,0x0000
bgb2xx 0x0000,0x0000
picocard 0x025e,0x1000
inventel 0x0000,0x0000
comone 0xffff,0x0101
tdk 0x0105,0x4254
socket 0x0104,0x0096
3com 0x0101,0x0041
bt2000c 0x022d,0x2000
zoom 0x0279,0x950b
sitecom 0x0279,0x950b
billionton0x0279,0x950b
bcm2035 0x0a5c,0x2035
bcm43xx 0x0000,0x0000
xradio 0x0000,0x0000
xr829 0x0000,0x0000
xr819s 0x0000,0x0000
ath3k 0x0000,0x0000
qualcomm 0x0000,0x0000
intel 0x0000,0x0000
3wire 0x0000,0x0000
amp 0x0000,0x0000
aic 0x0000,0x0000
hciattach_xradio.c等文件也不一定加入编译,这个时候需要在buildroot configure后,去makefile检查一下。一个简单的检查办法:
搜索tools/hciattach_bcm43xx.c,观察其上下是否有tools/hciattach_xradio.c,tools/hciattach_xradio.c,tools/hciattach_aic.c,以及output/buildroot,是否有对应的.o文件,若没有,手动加上。