您尚未登录。

楼主 #1 2020-04-30 12:02:49

大帅
会员
注册时间: 2019-01-17
已发帖子: 169
积分: 128.5

主线4.19 增加声卡驱动,启动失败了?

参考: https://whycan.cn/t_2041.html#p39583

针对主线kernel4.19,我增加了声卡驱动,原来正常的启动的固件uboot和rootfs没有修改,编译后zImage和dtb打包烧写后启动失败,求指点,这大致是什么原因?

U-Boot SPL 2018.01-00050-g85fc4ff3d1-dirty (Sep 01 2019 - 16:37:09)
DRAM: 32 MiB
SPL: Unsupported Boot Device!
Trying to boot from sunxi SPI


U-Boot 2018.01-00050-g85fc4ff3d1-dirty (Sep 01 2019 - 16:37:09 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
Using default environment

Setting up a 800x480 lcd console (overscan 0x0)
In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Hit any key to stop autoboot:  0 
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x60000, size 0x10000
SF: 65536 bytes @ 0x60000 Read: OK
Uncompressed size: 385078 = 0x5E036
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80ea4000, end 80ea9825 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano (root@d8328ec61965) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #2 Mon Apr 27 02:08:11 UTC 2020
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: fast init done
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2  vt.global_cursor_default=0
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22668K/32768K available (6144K kernel code, 239K rwdata, 1420K rodata, 1024K init, 247K bss, 10100K reserved, 0K 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 : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 240 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 248 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000050] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000119] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000766] Console: colour dummy device 80x30
[    0.000863] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070244] pid_max: default: 32768 minimum: 301
[    0.070555] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070598] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072060] CPU: Testing write buffer coherency: ok
[    0.074002] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076711] devtmpfs: initialized
[    0.084927] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.085003] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.085268] pinctrl core: initialized pinctrl subsystem
[    0.087349] NET: Registered protocol family 16
[    0.089420] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.091474] cpuidle: using governor menu
[    0.122661] SCSI subsystem initialized
[    0.123064] usbcore: registered new interface driver usbfs
[    0.123223] usbcore: registered new interface driver hub
[    0.123454] usbcore: registered new device driver usb
[    0.123977] pps_core: LinuxPPS API ver. 1 registered
[    0.124005] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.124074] PTP clock support registered
[    0.124637] Advanced Linux Sound Architecture Driver Initialized.
[    0.126328] clocksource: Switched to clocksource timer
[    0.155472] NET: Registered protocol family 2
[    0.157174] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.157255] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.157306] TCP: Hash tables configured (established 1024 bind 1024)
[    0.157664] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.157737] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.158279] NET: Registered protocol family 1
[    0.159565] RPC: Registered named UNIX socket transport module.
[    0.159605] RPC: Registered udp transport module.
[    0.159621] RPC: Registered tcp transport module.
[    0.159636] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.161973] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.164008] Initialise system trusted keyrings
[    0.164613] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.183212] NFS: Registering the id_resolver key type
[    0.183304] Key type id_resolver registered
[    0.183325] Key type id_legacy registered
[    0.197632] Key type asymmetric registered
[    0.197677] Asymmetric key parser 'x509' registered
[    0.197904] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.197940] io scheduler noop registered
[    0.197958] io scheduler deadline registered
[    0.198778] io scheduler cfq registered (default)
[    0.198808] io scheduler mq-deadline registered
[    0.198826] io scheduler kyber registered
[    0.200180] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.210474] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.402120] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.409690] console [ttyS0] disabled
[    0.429972] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 27, base_baud = 6250000) is a 16550A
[    0.900221] console [ttyS0] enabled
[    0.914714] panel-simple panel: panel supply power not found, using dummy regulator
[    0.958972] brd: module loaded
[    0.984794] loop: module loaded
[    0.988969] SCSI Media Changer driver v0.25

离线

楼主 #3 2020-05-09 09:28:27

大帅
会员
注册时间: 2019-01-17
已发帖子: 169
积分: 128.5

Re: 主线4.19 增加声卡驱动,启动失败了?

编译过程中的错误,需要修改源码如下:

1.linux_patch\drivers\dma\Makefile屏蔽mediatek和ti

#obj-y += mediatek/

obj-y += qcom/

#obj-y += ti/

obj-y += xilinx/

2.linux_patch\drivers\dma\Kconfig屏蔽mediatek和ti

source "drivers/dma/bestcomm/Kconfig"


#source "drivers/dma/mediatek/Kconfig"


source "drivers/dma/qcom/Kconfig"


source "drivers/dma/dw/Kconfig"


source "drivers/dma/hsu/Kconfig"


source "drivers/dma/sh/Kconfig"


#source "drivers/dma/ti/Kconfig"

3. linux_patch\sound\soc\sunxi\suniv-codec.c结构成员use_pmdown_time修改为pmdown_time

.pmdown_time    = 1,  /*.use_pmdown_time    = 1,*/

离线

楼主 #4 2020-05-09 09:33:02

大帅
会员
注册时间: 2019-01-17
已发帖子: 169
积分: 128.5

Re: 主线4.19 增加声卡驱动,启动失败了?

[    1.469081] Waiting for root device /dev/mtdblock3...
[  195.813232] random: crng init done
开机启动失败:

修改源码设备树,增加spi0分区信息:
增加设备树spi0下面分区信息:
            partitions {
                    compatible = "fixed-partitions";
                    #address-cells = <0x1>;
                    #size-cells = <0x1>;

                    partition@0 {
                        label = "u-boot";
                        reg = <0x0 0x100000>;
                        read-only;
                    };

                    partition@100000 {
                        label = "dtb";
                        reg = <0x100000 0x10000>;
                        read-only;
                    };

                    partition@110000 {
                        label = "kernel";
                        reg = <0x110000 0x400000>;
                        read-only;
                    };

                    partition@510000 {
                        label = "rootfs";
                        reg = <0x510000 0xaf0000>;
                    };
                };

离线

楼主 #5 2020-05-09 09:43:05

大帅
会员
注册时间: 2019-01-17
已发帖子: 169
积分: 128.5

Re: 主线4.19 增加声卡驱动,启动失败了?

经过以上几处修改,可以正常开机,可以正常识别声卡。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn