MangoPi Dual T113 主线内核编译记录
-
awboot 编译(无需 SPL UBOOT 直接引导内核)
# 交叉编译器需使用 arm-none-eabi-gcc 以下是我交叉编译器的版本 gcc version 8.3.1 20190703 (release) [gcc-8-branch revision 273027] (GNU Tools for Arm Embedded Processors 8-2019-q3-update) # 下拉 awboot git clone https://github.com/szemzoa/awboot cd awboot # 编译工具 cd tools gcc mksunxi.c -o mksunxi # 修改 Makefile 中的 /bin/expr 为 /usr/bin/expr @/usr/bin/expr `/bin/cat .build_revision` + 1 > .build_revision # 编译 awboot make
测试 awboot
xfel write 0x30000 .\awboot.bin xfel exec 0x30000
写入 awboot 到 TF 卡
- 修改链接地址:arch/arm32/mach-t113s3/link.ld 文件中 ORIGIN = 0x00030000 修改为 ORIGIN = 0x00020000
- 修改完链接地址后需要清除重新编译
make clean all
- 写入到 TF 卡中:
sudo dd if=awboot.bin of=/dev/sdd bs=1024 seek=8
内核编译
- 这个是我修改好的主线稳定版内核(带WiFi):Linux-6.0.1
- 也选择去官网下载内核:kernel
- 修改 kernel.org 下载的内核源代码:
# 修改 drivers/clk/sunxi-ng/Kconfig 文件 config SUN20I_D1_CCU tristate "Support for the Allwinner D1 CCU" default RISCV && ARCH_SUNXI - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST + depends on (ARCH_SUNXI) || COMPILE_TEST config SUN20I_D1_R_CCU tristate "Support for the Allwinner D1 PRCM CCU" default RISCV && ARCH_SUNXI - depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST + depends on (ARCH_SUNXI) || COMPILE_TEST # 修改 drivers/clk/sunxi-ng/ccu-sun20i-d1.c 文件 static SUNXI_CCU_MUX_DATA(cpux_clk, "cpux", cpux_parents, - 0x500, 24, 3, CLK_SET_RATE_PARENT); + 0x500, 24, 3, CLK_SET_RATE_PARENT | CLK_IS_CRITICAL); # 修改 arch/arm/mach-sunxi/platsmp.c 文件,在末尾添加以下内容 static int sun8i_t113_smp_boot_secondary(unsigned int cpu, struct task_struct *idle) { u32 reg; void __iomem *cpucfg_membase = ioremap(0x09010000, 0x10); void __iomem *cpuexec_membase[] = {ioremap(0x070005C4, 0x10),ioremap(0x070005C8, 0x10)}; if (cpu != 1) return 0; spin_lock(&cpu_lock); /* Set CPU boot address */ writel(__pa_symbol(secondary_startup), cpuexec_membase[cpu]); /* Deassert the CPU core reset */ reg = readl(cpucfg_membase); writel(reg | BIT(cpu), cpucfg_membase); spin_unlock(&cpu_lock); return 0; } static const struct smp_operations sun8i_t113_smp_ops __initconst = { .smp_boot_secondary = sun8i_t113_smp_boot_secondary, }; CPU_METHOD_OF_DECLARE(sun8i_t113_smp, "allwinner,sun8iw20p1", &sun8i_t113_smp_ops);
配置内核
- 先使用默认配置
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sunxi_defconfig
- 再打开内核配置
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
- 打开芯片时钟支持:
> Device Drivers > Common Clock Framework <*> Clock support for Allwinner SoCs <*> Support for the Allwinner D1 CCU <*> Support for the Allwinner D1 PRCM CCU
添加设备树
- 将设备树添加到内核 arch/arm/boot/dts/ 目录中:sun8i-t113-mangopi-dual.dts sun8i-t113.dtsi
- 并在该目录 Makefile 文件中的CONFIG_MACH_SUN8I下添加改设备树文件:
dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a23-evb.dtb \ sun8i-a23-gt90h-v4.dtb \ sun8i-a23-inet86dz.dtb \ ..................... sun8i-v3s-licheepi-zero-dock.dtb \ sun8i-v40-bananapi-m2-berry.dtb \ sun8i-t113-mangopi-dual.dtb
编译
# 编译内核,设备树以及模块 make -j48 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage dtbs modules # 内核文件 arch/arm/boot/zImage # 设备树文件 arch/arm/boot/dts/sun8i-t113-mangopi-dual.dtb
启动日志
Allwinner T113-loader DRAM SIZE = 128M DRAM simple test OK. CPU freq=1200 MHz SD/MMC card at 'sdhci0' controller found SD/MMC: Image: Read file zImage addr=45000000 SD/MMC: dt blob: Read file sun8i-t113-mangopi-dual.dtb addr=41800000 booting linux... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 6.0.1-g75e3c08038b8 (evler@DESKTOP-6BPS301) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1 SMP Fri Oct 14 20:36:14 CST 2022 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: MangoPi MQ-Dual [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 72 MiB at 0x43800000 [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000040000000-0x0000000047ffffff] [ 0.000000] HighMem empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000040000000-0x0000000047ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff] [ 0.000000] percpu: Embedded 11 pages/cpu s15508 r8192 d21356 u45056 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: mem=128M cma=72M root=/dev/mmcblk0p2 init=/sbin/init rootwait console=tty0 console=ttyS5,115200 [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 43384K/131072K available (7168K kernel code, 942K rwdata, 2104K rodata, 1024K init, 266K bss, 13960K reserved, 73728K cma-reserved, 0K highmem) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2. [ 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=2 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000013] Switching to timer-based delay loop, resolution 41ns [ 0.000189] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.000686] Console: colour dummy device 80x30 [ 0.000998] printk: console [tty0] enabled [ 0.001042] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.001071] pid_max: default: 32768 minimum: 301 [ 0.001240] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.001276] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.001835] CPU: Testing write buffer coherency: ok [ 0.002166] /cpus/cpu@0 missing clock-frequency property [ 0.002215] /cpus/cpu@1 missing clock-frequency property [ 0.002237] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.003020] Setting up static identity map for 0x40100000 - 0x40100060 [ 0.003193] rcu: Hierarchical SRCU implementation. [ 0.003213] rcu: Max phase no-delay instances is 1000. [ 0.003749] smp: Bringing up secondary CPUs ... [ 0.004454] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.004581] smp: Brought up 1 node, 2 CPUs [ 0.004622] SMP: Total of 2 processors activated (96.00 BogoMIPS). [ 0.004638] CPU: All CPU(s) started in SVC mode. [ 0.005159] devtmpfs: initialized [ 0.009273] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.009513] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.009556] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 0.011856] pinctrl core: initialized pinctrl subsystem [ 0.013201] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.014339] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.015229] thermal_sys: Registered thermal governor 'step_wise' [ 0.015529] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.015578] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.023287] platform 5460000.tcon-top: Fixing up cyclic dependency with 5200000.mixer [ 0.023396] platform 5460000.tcon-top: Fixing up cyclic dependency with 5100000.mixer [ 0.023705] platform 5461000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top [ 0.024089] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5604000.tv-encoder [ 0.024169] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top [ 0.025007] platform 7090000.rtc: Fixing up cyclic dependency with 7010000.clock-controller [ 0.035143] SCSI subsystem initialized [ 0.035656] usbcore: registered new interface driver usbfs [ 0.035715] usbcore: registered new interface driver hub [ 0.035764] usbcore: registered new device driver usb [ 0.035998] mc: Linux media interface: v0.10 [ 0.036059] videodev: Linux video capture interface: v2.00 [ 0.036145] pps_core: LinuxPPS API ver. 1 registered [ 0.036162] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.036192] PTP clock support registered [ 0.036650] Advanced Linux Sound Architecture Driver Initialized. [ 0.037823] clocksource: Switched to clocksource arch_sys_counter [ 0.045181] NET: Registered PF_INET protocol family [ 0.045408] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.045967] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.046019] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.046044] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.046076] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 0.046105] TCP: Hash tables configured (established 1024 bind 1024) [ 0.046201] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.046248] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.046434] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.047125] RPC: Registered named UNIX socket transport module. [ 0.047166] RPC: Registered udp transport module. [ 0.047180] RPC: Registered tcp transport module. [ 0.047192] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.048343] Initialise system trusted keyrings [ 0.048634] workingset: timestamp_bits=30 max_order=15 bucket_order=0 [ 0.053533] NFS: Registering the id_resolver key type [ 0.053617] Key type id_resolver registered [ 0.053634] Key type id_legacy registered [ 0.053689] Key type asymmetric registered [ 0.053705] Asymmetric key parser 'x509' registered [ 0.053840] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246) [ 0.053866] io scheduler mq-deadline registered [ 0.053879] io scheduler kyber registered [ 0.112158] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled [ 0.121805] CAN device driver interface [ 0.122573] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.122600] ehci-platform: EHCI generic platform driver [ 0.122740] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.122778] ohci-platform: OHCI generic platform driver [ 0.125187] sun6i-rtc 7090000.rtc: registered as rtc0 [ 0.125338] sun6i-rtc 7090000.rtc: setting system clock to 1970-01-02T00:10:37 UTC (87037) [ 0.125500] sun6i-rtc 7090000.rtc: RTC enabled [ 0.125852] i2c_dev: i2c /dev entries driver [ 0.127617] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0) [ 0.128870] sun8i-ce 3040000.crypto: Set mod clock to 300000000 (300 Mhz) from 400000000 (400 Mhz) [ 0.129231] sun8i-ce 3040000.crypto: will run requests pump with realtime priority [ 0.129586] sun8i-ce 3040000.crypto: will run requests pump with realtime priority [ 0.129826] sun8i-ce 3040000.crypto: will run requests pump with realtime priority [ 0.130039] sun8i-ce 3040000.crypto: will run requests pump with realtime priority [ 0.130195] sun8i-ce 3040000.crypto: Register cbc(aes) [ 0.130230] sun8i-ce 3040000.crypto: Register ecb(aes) [ 0.130249] sun8i-ce 3040000.crypto: Register cbc(des3_ede) [ 0.130268] sun8i-ce 3040000.crypto: Register ecb(des3_ede) [ 0.130307] sun8i-ce 3040000.crypto: CryptoEngine Die ID 0 [ 0.131201] usbcore: registered new interface driver usbhid [ 0.131233] usbhid: USB HID core driver [ 0.133879] NET: Registered PF_PACKET protocol family [ 0.133934] can: controller area network core [ 0.134023] NET: Registered PF_CAN protocol family [ 0.134045] can: raw protocol [ 0.134058] can: broadcast manager protocol [ 0.134075] can: netlink gateway - max_hops=1 [ 0.134293] Key type dns_resolver registered [ 0.134448] Registering SWP/SWPB emulation handler [ 0.134555] Loading compiled-in X.509 certificates [ 0.152533] sun20i-d1-pinctrl 2000000.pinctrl: initialized sunXi PIO driver [ 0.174214] 2500400.serial: ttyS1 at MMIO 0x2500400 (irq = 231, base_baud = 1500000) is a 16550A [ 0.195942] 2501400.serial: ttyS5 at MMIO 0x2501400 (irq = 232, base_baud = 1500000) is a 16550A [ 1.049330] printk: console [ttyS5] enabled [ 1.055564] phy phy-4100400.phy.0: Changing dr_mode to 1 [ 1.056783] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests [ 1.060995] ehci-platform 4101000.usb: EHCI Host Controller [ 1.070724] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver [ 1.075755] ehci-platform 4101000.usb: new USB bus registered, assigned bus number 1 [ 1.081516] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 2 [ 1.090282] ehci-platform 4200000.usb: EHCI Host Controller [ 1.097935] hub 2-0:1.0: USB hub found [ 1.104550] ohci-platform 4200400.usb: Generic Platform OHCI controller [ 1.106450] hub 2-0:1.0: 1 port detected [ 1.117184] ehci-platform 4101000.usb: irq 233, io mem 0x04101000 [ 1.123361] ehci-platform 4200000.usb: new USB bus registered, assigned bus number 3 [ 1.127942] ohci-platform 4200400.usb: new USB bus registered, assigned bus number 4 [ 1.140803] ehci-platform 4200000.usb: irq 235, io mem 0x04200000 [ 1.147129] sunxi-mmc 4020000.mmc: Got CD GPIO [ 1.148376] ehci-platform 4101000.usb: USB 2.0 started, EHCI 1.00 [ 1.157972] ohci-platform 4200400.usb: irq 237, io mem 0x04200400 [ 1.159104] ALSA device list: [ 1.167091] No soundcards found. [ 1.171251] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq [ 1.176832] hub 1-0:1.0: USB hub found [ 1.177242] sunxi-mmc 4020000.mmc: initialized, max. request size: 2048 KB, uses new timings mode [ 1.180665] ehci-platform 4200000.usb: USB 2.0 started, EHCI 1.00 [ 1.195722] hub 1-0:1.0: 1 port detected [ 1.200970] hub 3-0:1.0: USB hub found [ 1.204802] hub 3-0:1.0: 1 port detected [ 1.212314] sunxi-mmc 4021000.mmc: initialized, max. request size: 2048 KB, uses new timings mode [ 1.229522] sunxi-mmc 4021000.mmc: card claims to support voltages below defined range [ 1.232548] hub 4-0:1.0: USB hub found [ 1.241326] hub 4-0:1.0: 1 port detected [ 1.257235] mmc1: new high speed SDIO card at address 0001 [ 1.284358] mmc0: new high speed SDHC card at address aaaa [ 1.290803] mmcblk0: mmc0:aaaa SL32G 29.7 GiB [ 1.300997] mmcblk0: p1 p2 [ 1.307944] ohci-platform 4101400.usb: Generic Platform OHCI controller [ 1.314620] ohci-platform 4101400.usb: new USB bus registered, assigned bus number 5 [ 1.322709] ohci-platform 4101400.usb: irq 236, io mem 0x04101400 [ 1.402615] hub 5-0:1.0: USB hub found [ 1.406430] hub 5-0:1.0: 1 port detected [ 1.443652] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: disabled. [ 1.452694] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 1.467648] devtmpfs: mounted [ 1.471630] Freeing unused kernel image (initmem) memory: 1024K [ 1.478021] Run /sbin/init as init process [ 1.840340] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: disabled. Starting syslogd: OK Starting klogd: OK Running sysctl: OK Starting mdev... OK [ 2.771703] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.815733] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' Initializing random number generator: OK Saving random seed: [ 5.777828] random: crng init done OK Starting system message bus: done Starting network: OK Starting WiFi: Successfully initialized wpa_supplicant OK udhcpc: started, v1.35.0 udhcpc: broadcasting discover Starting sshd: OK Welcome to MangoPi Dual buildroot login: root [root@buildroot]:~$ udhcpc: broadcasting discover udhcpc: broadcasting select for 192.168.10.211, server 192.168.10.251 udhcpc: lease of 192.168.10.211 obtained from 192.168.10.251, lease time 43200 deleting routers adding dns 192.168.10.251 [root@buildroot]:~$ free -h total used free shared buff/cache available Mem: 115.4M 12.7M 79.8M 60.0K 22.8M 97.0M Swap: 0 0 0 [root@buildroot]:~$ df -h Filesystem Size Used Available Use% Mounted on /dev/root 29.0G 21.8M 27.4G 0% / devtmpfs 21.2M 0 21.2M 0% /dev tmpfs 57.7M 0 57.7M 0% /dev/shm tmpfs 57.7M 32.0K 57.7M 0% /tmp tmpfs 57.7M 28.0K 57.7M 0% /run [root@buildroot]:~$ uname -a Linux buildroot 6.0.1-g75e3c08038b8 #1 SMP Fri Oct 14 20:36:14 CST 2022 armv7l GNU/Linux [root@buildroot]:~$ iperf3 -s warning: this system does not seem to support IPv6 - trying IPv4 ----------------------------------------------------------- Server listening on 5201 (test #1) ----------------------------------------------------------- Accepted connection from 192.168.10.246, port 8252 [ 5] local 192.168.10.211 port 5201 connected to 192.168.10.246 port 8254 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 3.92 MBytes 32.9 Mbits/sec [ 5] 1.00-2.00 sec 5.59 MBytes 46.9 Mbits/sec [ 5] 2.00-3.00 sec 5.49 MBytes 46.1 Mbits/sec [ 5] 3.00-4.00 sec 5.69 MBytes 47.7 Mbits/sec [ 5] 4.00-5.00 sec 5.76 MBytes 48.3 Mbits/sec [ 5] 5.00-6.00 sec 5.72 MBytes 48.0 Mbits/sec [ 5] 6.00-7.00 sec 5.79 MBytes 48.5 Mbits/sec [ 5] 7.00-8.00 sec 5.54 MBytes 46.5 Mbits/sec [ 5] 8.00-9.00 sec 5.48 MBytes 45.9 Mbits/sec [ 5] 9.00-10.00 sec 5.70 MBytes 47.8 Mbits/sec [ 5] 10.00-10.04 sec 239 KBytes 48.0 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate [ 5] 0.00-10.04 sec 54.9 MBytes 45.9 Mbits/sec receiver ----------------------------------------------------------- Server listening on 5201 (test #2) -----------------------------------------------------------
给 TF 卡分区以及跟文件系统的制作等,这里就不再讲解,可以参考我写的另一篇帖子:MQ-Quad H616 主线内核编译调试记录(u-boot、kernel、buildroot)
-
主线,主线
-
-
此回复已被删除! -
此回复已被删除! -
@evler 在 MangoPi Dual T113 主线内核编译记录 中说:
sudo dd if=awboot.bin of=/dev/sdd bs=1024 seek=8
神奇,使用百问网的t113 pro开发板,不管改不改内核设备树里面的 uart接口,都是boot启动不了 内核,明天再排查排查
-
@allwinnertech 在 MangoPi Dual T113 主线内核编译记录 中说:
@evler 在 MangoPi Dual T113 主线内核编译记录 中说:
sudo dd if=awboot.bin of=/dev/sdd bs=1024 seek=8
神奇,使用百问网的t113 pro开发板,不管改不改内核设备树里面的 uart接口,都是boot启动不了 内核,明天再排查排查
看看这个,希望能用到
https://whycan.com/t_9231.html -
@ftwtwzy 好的,谢谢
-
@baiwen 大佬,有弄出来吗?我用你们百问网的板子也是这个问题,启动不了内核?nand型号是MX35LF1GE4AB
-
大佬 ,yyds
-
@evler 大佬你好哈!我拉了你的https://github.com/Evlers/linux_kernel_t113.git然后使用mangopi_dual_t113_defconfig配置文件,设备树中加了uart3配置;启动方式使用:uboot + linux6.0.1+buildroot rootfs;但是出现了奇怪的现象:
CPU1: failed to come online
cpu1启动失败; 请教大佬有什么什么思路提供?十分感谢 启动log如下:U-Boot 2018.05 (Mar 21 2023 - 08:00:44 +0000) Allwinner Technology [00.336]CPU: Allwinner Family [00.339]Model: sun8iw20 [00.341]DRAM: 128 MiB [00.344]Relocation Offset is: 04ec5000 [00.371]secure enable bit: 0 E/TC:0 tee_read_fdt:433 fine node /firmware/optee failed with FDT_ERR_NOTFOUND [00.384]smc_tee_inform_fdt failed with: -65536[00.388]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz [00.394]gic: sec monitor mode [00.397]flash init start [00.399]workmode = 0,storage type = 2 [00.402][mmc]: mmc driver ver uboot2018:2021-09-07 19:43:00 [00.409][mmc]: SUNXI SDMMC Controller Version:0x50310 [00.437][mmc]: Best spd md: 2-HSDDR52/DDR50, freq: 2-50000000, Bus width: 4 [00.443]sunxi flash init ok [00.446]line:703 init_clocks [00.449]drv_disp_init request pwm success, pwm7:pwm7:0x2000c00. [00.463]drv_disp_init finish [00.466]boot_gui_init:start [00.469]set disp.dev2_output_type fail. using defval=0 [00.475]boot_gui_init:finish partno erro : can't find partition bootloader 54 bytes read in 1 ms (52.7 KiB/s) [00.494]bmp_name=bootlogo.bmp size 1152054 1152054 bytes read in 47 ms (23.4 MiB/s) [00.655]LCD open finish [00.657]Loading Environment from SUNXI_FLASH... OK [00.685]Item0 (Map) magic is bad [00.688]the secure storage item0 copy0 magic is bad [00.696]Item0 (Map) magic is bad [00.699]the secure storage item0 copy1 magic is bad [00.704]Item0 (Map) magic is bad secure storage read widevine fail [00.710]secure storage read widevine fail with:-1 secure storage read ec_key fail [00.717]secure storage read ec_key fail with:-1 secure storage read ec_cert1 fail [00.724]secure storage read ec_cert1 fail with:-1 secure storage read ec_cert2 fail [00.732]secure storage read ec_cert2 fail with:-1 secure storage read ec_cert3 fail [00.739]secure storage read ec_cert3 fail with:-1 secure storage read rsa_key fail [00.746]secure storage read rsa_key fail with:-1 secure storage read rsa_cert1 fail [00.754]secure storage read rsa_cert1 fail with:-1 secure storage read rsa_cert2 fail [00.761]secure storage read rsa_cert2 fail with:-1 secure storage read rsa_cert3 fail [00.769]secure storage read rsa_cert3 fail with:-1 [00.774]usb burn from boot delay time 0 weak:otg_phy_config [00.785]usb prepare ok [00.992]usb sof ok [00.993]usb probe ok [00.995]usb setup ok set address 0x40 set address 0x40 ok try to update [04.000]do_burn_from_boot usb : have no handshake List file under ULI/factory ** Unrecognized filesystem type ** [04.023]update part info [04.026]update bootcmd [04.044]replace fdt from raw partition(dtb) success [04.049][mmc]: no mmc-hs400-1_8v! [04.052][mmc]: no mmc-hs200-1_8v! [04.055][mmc]: get max-frequency ok 50000000 Hz [04.061]## error: update_fdt_dram_para : FDT_ERR_NOTFOUND [04.068]update dts Hit any key to stop autoboot: 0 [07.313]no vendor_boot partition is found Android's image name: sun8i_arm ## Transferring control to Linux (at address 40008000)... ## Linux machid: 00000000, FDT addr: 41800000 [07.337]Starting kernel ... [07.339][mmc]: mmc exit start [07.358][mmc]: mmc 2 exit ok [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 6.0.1-gd7d8c971c9c5-dirty (dzh@compile) (arm-none-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #4 SMP Mon Apr 24 10:54:04 UTC 2023 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: MangoPi MQ-Dual [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 16 MiB at 0x47000000 [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000040000000-0x0000000047ffffff] [ 0.000000] HighMem empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000040000000-0x0000000047ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff] [ 0.000000] percpu: Embedded 11 pages/cpu s15508 r8192 d21356 u45056 [ 0.000000] pcpu-alloc: s15508 r8192 d21356 u45056 alloc=11*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: earlycon=sunxi-uart,0x02500C00 clk_ignore_unused initcall_debug=0 console=ttyS3,115200 loglevel=8 root=/dev/mmcblk2p5 init=/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:dtb@mmcblk0p6:dsp0@mmcblk0p7:private@mmcblk0p8:UDISK@mmcblk0p9 cma=16M snum= mac_addr= wifi_mac= bt_mac= specialstr= replace_fdt=dtb:raw gpt=1 androidboot.hardware=sun8iw20p1 boot_type=2 androidboot.boot_type=2 gpt=1 uboot_message=2018.05(03/21/2023-08:00:44) disp_reserve=2457600,0x448ee000 androidboot.dramsize=128 [ 0.000000] Unknown kernel command line parameters "partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:dtb@mmcblk0p6:dsp0@mmcblk0p7:private@mmcblk0p8:UDISK@mmcblk0p9 snum= mac_addr= wifi_mac= bt_mac= specialstr= replace_fdt=dtb:raw boot_type=2 uboot_message=2018.05(03/21/2023-08:00:44) disp_reserve=2457600,0x448ee000", will be passed to user space. [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 97312K/131072K available (8192K kernel code, 942K rwdata, 2100K rodata, 1024K init, 263K bss, 17376K reserved, 16384K cma-reserved, 0K highmem) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2. [ 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=2 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000014] Switching to timer-based delay loop, resolution 41ns [ 0.000220] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.000808] Console: colour dummy device 80x30 [ 0.000855] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.000872] pid_max: default: 32768 minimum: 301 [ 0.001043] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.001060] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.001653] CPU: Testing write buffer coherency: ok [ 0.001985] /cpus/cpu@0 missing clock-frequency property [ 0.002019] /cpus/cpu@1 missing clock-frequency property [ 0.002031] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.002915] Setting up static identity map for 0x40100000 - 0x40100060 [ 0.003075] rcu: Hierarchical SRCU implementation. [ 0.003081] rcu: Max phase no-delay instances is 1000. [ 0.003672] smp: Bringing up secondary CPUs ... [ 1.040373] CPU1: failed to come online [ 1.040455] smp: Brought up 1 node, 1 CPU [ 1.040466] SMP: Total of 1 processors activated (48.00 BogoMIPS). [ 1.040474] CPU: All CPU(s) started in SVC mode. [ 1.040991] devtmpfs: initialized [ 1.045887] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 1.046098] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 1.046121] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 1.046780] pinctrl core: initialized pinctrl subsystem [ 1.048133] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 1.049097] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 1.049984] thermal_sys: Registered thermal governor 'step_wise' [ 1.050300] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 1.050313] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 1.059372] platform 5460000.tcon-top: Fixing up cyclic dependency with 5200000.mixer [ 1.059460] platform 5460000.tcon-top: Fixing up cyclic dependency with 5100000.mixer [ 1.059772] platform 5461000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top [ 1.060184] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5604000.tv-encoder [ 1.060246] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top [ 1.061241] platform 7090000.rtc: Fixing up cyclic dependency with 7010000.clock-controller [ 1.072642] SCSI subsystem initialized [ 1.072982] libata version 3.00 loaded. [ 1.073187] usbcore: registered new interface driver usbfs [ 1.073230] usbcore: registered new interface driver hub [ 1.073274] usbcore: registered new device driver usb [ 1.073491] mc: Linux media interface: v0.10 [ 1.073537] videodev: Linux video capture interface: v2.00 [ 1.073620] pps_core: LinuxPPS API ver. 1 registered [ 1.073626] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 1.073642] PTP clock support registered [ 1.074104] Advanced Linux Sound Architecture Driver Initialized. [ 1.075410] clocksource: Switched to clocksource arch_sys_counter [ 1.084034] NET: Registered PF_INET protocol family [ 1.084250] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 1.084872] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear) [ 1.084902] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 1.084914] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 1.084933] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 1.084955] TCP: Hash tables configured (established 1024 bind 1024) [ 1.085042] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 1.085078] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 1.085247] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 1.086082] RPC: Registered named UNIX socket transport module. [ 1.086095] RPC: Registered udp transport module. [ 1.086099] RPC: Registered tcp transport module. [ 1.086103] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 1.087195] Initialise system trusted keyrings [ 1.087600] workingset: timestamp_bits=30 max_order=15 bucket_order=0 [ 1.093369] NFS: Registering the id_resolver key type [ 1.093445] Key type id_resolver registered [ 1.093450] Key type id_legacy registered [ 1.093495] Key type asymmetric registered [ 1.093501] Asymmetric key parser 'x509' registered [ 1.093644] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246) [ 1.093653] io scheduler mq-deadline registered [ 1.093659] io scheduler kyber registered [ 1.161629] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled [ 1.173166] CAN device driver interface [ 1.173999] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.174008] ehci-platform: EHCI generic platform driver [ 1.174170] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 1.174188] ohci-platform: OHCI generic platform driver [ 1.177381] sun6i-rtc 7090000.rtc: registered as rtc0 [ 1.177505] sun6i-rtc 7090000.rtc: setting system clock to 1970-01-02T02:16:51 UTC (94611) [ 1.177648] sun6i-rtc 7090000.rtc: RTC enabled [ 1.178010] i2c_dev: i2c /dev entries driver [ 1.180267] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0) [ 1.181614] sun8i-ce 3040000.crypto: Set mod clock to 300000000 (300 Mhz) from 400000000 (400 Mhz) [ 1.182182] sun8i-ce 3040000.crypto: will run requests pump with realtime priority [ 1.182528] sun8i-ce 3040000.crypto: will run requests pump with realtime priority [ 1.182722] sun8i-ce 3040000.crypto: will run requests pump with realtime priority [ 1.182898] sun8i-ce 3040000.crypto: will run requests pump with realtime priority [ 1.183026] sun8i-ce 3040000.crypto: Register cbc(aes) [ 1.183048] sun8i-ce 3040000.crypto: Register ecb(aes) [ 1.183058] sun8i-ce 3040000.crypto: Register cbc(des3_ede) [ 1.183068] sun8i-ce 3040000.crypto: Register ecb(des3_ede) [ 1.183101] sun8i-ce 3040000.crypto: CryptoEngine Die ID 0 [ 1.184076] usbcore: registered new interface driver usbhid [ 1.184087] usbhid: USB HID core driver [ 1.187146] NET: Registered PF_PACKET protocol family [ 1.187175] can: controller area network core [ 1.187252] NET: Registered PF_CAN protocol family [ 1.187260] can: raw protocol [ 1.187267] can: broadcast manager protocol [ 1.187276] can: netlink gateway - max_hops=1 [ 1.187471] Key type dns_resolver registered [ 1.187623] Registering SWP/SWPB emulation handler [ 1.187832] Loading compiled-in X.509 certificates [ 1.208135] sun20i-d1-pinctrl 2000000.pinctrl: initialized sunXi PIO driver [ 1.209548] printk: console [ttyS3] disabled [ 1.230007] 2500c00.serial: ttyS3 at MMIO 0x2500c00 (irq = 231, base_baud = 1500000) is a 16550A [ 2.178859] printk: console [ttyS3] enabled [ 2.204847] 2501400.serial: ttyS5 at MMIO 0x2501400 (irq = 232, base_baud = 1500000) is a 16550A [ 2.215167] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests [ 2.225071] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver [ 2.230897] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 1 [ 2.239740] hub 1-0:1.0: USB hub found [ 2.243541] hub 1-0:1.0: 1 port detected [ 2.253220] ehci-platform 4200000.usb: EHCI Host Controller [ 2.258914] ehci-platform 4200000.usb: new USB bus registered, assigned bus number 2 [ 2.272228] clk: Not disabling unused clocks [ 2.276598] ALSA device list: [ 2.279570] No soundcards found. [ 2.284167] ohci-platform 4200400.usb: Generic Platform OHCI controller [ 2.290866] ohci-platform 4200400.usb: new USB bus registered, assigned bus number 3 [ 2.303754] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq [ 2.309379] sunxi-mmc 4020000.mmc: Got CD GPIO [ 2.314452] ehci-platform 4200000.usb: irq 236, io mem 0x04200000 [ 2.320988] ohci-platform 4200400.usb: irq 238, io mem 0x04200400 [ 2.333396] sunxi-mmc 4021000.mmc: initialized, max. request size: 2048 KB, uses new timings mode [ 2.342661] sunxi-mmc 4022000.mmc: initialized, max. request size: 2048 KB, uses new timings mode [ 2.351779] ehci-platform 4200000.usb: USB 2.0 started, EHCI 1.00 [ 2.358612] sunxi-mmc 4020000.mmc: initialized, max. request size: 2048 KB, uses new timings mode [ 2.368826] hub 2-0:1.0: USB hub found [ 2.372769] hub 2-0:1.0: 1 port detected [ 2.400219] hub 3-0:1.0: USB hub found [ 2.404026] hub 3-0:1.0: 1 port detected [ 2.627342] mmc2: new DDR MMC card at address 0001 [ 2.633091] mmcblk2: mmc2:0001 AT20S1 112 MiB [ 2.646550] mmcblk2: p1 p2 p3 p4 p5 p6 p7 p8 p9 [ 2.653100] mmcblk2boot0: mmc2:0001 AT20S1 128 KiB [ 2.659816] mmcblk2boot1: mmc2:0001 AT20S1 128 KiB [ 3.285511] phy phy-4100400.phy.0: Changing dr_mode to 1 [ 3.290867] ehci-platform 4101000.usb: EHCI Host Controller [ 3.296491] ehci-platform 4101000.usb: new USB bus registered, assigned bus number 4 [ 3.304505] ehci-platform 4101000.usb: irq 235, io mem 0x04101000 [ 3.335408] ehci-platform 4101000.usb: USB 2.0 started, EHCI 1.00 [ 3.342324] hub 4-0:1.0: USB hub found [ 3.346195] hub 4-0:1.0: 1 port detected [ 3.515485] ohci-platform 4101400.usb: Generic Platform OHCI controller [ 3.522134] ohci-platform 4101400.usb: new USB bus registered, assigned bus number 5 [ 3.530098] ohci-platform 4101400.usb: irq 237, io mem 0x04101400 [ 3.610201] hub 5-0:1.0: USB hub found [ 3.614005] hub 5-0:1.0: 1 port detected [ 3.642633] EXT4-fs (mmcblk2p5): mounted filesystem with ordered data mode. Quota mode: disabled. [ 3.651666] VFS: Mounted root (ext4 filesystem) readonly on device 179:5. [ 3.659363] devtmpfs: mounted [ 3.663679] Freeing unused kernel image (initmem) memory: 1024K [ 3.669884] Run /init as init process [ 3.673552] with arguments: [ 3.676533] /init [ 3.678804] with environment: [ 3.681941] HOME=/ [ 3.684298] TERM=linux [ 3.687035] partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:dtb@mmcblk0p6:dsp0@mmcblk0p7:private@mmcblk0p8:UDISK@mmcblk0p9 [ 3.703104] snum= [ 3.705383] mac_addr= [ 3.708001] wifi_mac= [ 3.710618] bt_mac= [ 3.713061] specialstr= [ 3.715871] replace_fdt=dtb:raw [ 3.719356] boot_type=2 [ 3.722146] uboot_message=2018.05(03/21/2023-08:00:44) [ 3.727637] disp_reserve=2457600,0x448ee000 can't run '/etc/preinit': No such file or directory [ 3.853901] EXT4-fs (mmcblk2p5): re-mounted. Quota mode: disabled. Starting syslogd: OK Starting klogd: OK Populating /dev using udev: [ 3.979556] udevd[101]: starting version 3.2.7 [ 9.105398] random: crng init done [ 9.129299] udevd[101]: specified group 'input' unknown [ 9.135470] udevd[101]: specified group 'kvm' unknown [ 9.163026] udevd[102]: starting eudev-3.2.7
与主线linux内核启动log对比:
-
@evler 话说硬件解码方面支持了没。。。还是只是跑起了linux而已。。。
-
-
楼主,能支持一下LCD吗?
-
@duanzhh 你好,请问你后面解决了吗?方便说下是什么原因吗?我也碰到了此问题
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号