您尚未登录。

楼主 # 2021-12-08 13:12:20

mengxp
会员
注册时间: 2021-10-07
已发帖子: 68
积分: 152

全志r328快速启动实现(上电1.5秒进Shell)

----------------------------------------------------
晚上更新
启用了secureboot,给bootloader做了toc0签名
主板焊接了rtl8723ds sdio模块
启动只需要1.5秒!!比上午的实验还少了0.5秒~
也许是因为上午实验时没有焊接sdio模块,导致mmc部分初始化等待比较久。

下面是securecrt带时间戳的串口日志

[22-06-09.354]BOOTROM elapsed 0 ms (118 ticks)
[22-06-09.354]
[22-06-09.354]
[22-06-09.354]-Hardcore Boot-
[22-06-09.354]
[22-06-09.354]Rev 13, Build Dec  8 2021 21:53:43
[22-06-09.354]mengxp works 2021
[22-06-09.354]
[22-06-09.369]CPU:  Allwinner R328-S3
[22-06-09.428]DRAM: DDR3 128 MB, 792 MHz
[22-06-09.428]NOR:  C22018(JEDEC ID)
[22-06-09.428]
[22-06-09.428]> Setup MMU
[22-06-09.428]> Load Optee
[22-06-09.428]> Load DeviceTree
[22-06-09.428]> Load Kernel
[22-06-09.780]> Open FDT
[22-06-09.781]> Setup FDT
[22-06-09.781]> Boot kernel
[22-06-09.818]Uncompressing Linux... done, booting the kernel.
[22-06-09.818][    0.000000] Booting Linux on physical CPU 0x0
[22-06-09.818][    0.000000] Linux version 4.9.118 (meng@u14aw) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #5 SMP Wed Dec 8 12:55:35 CST 2021
[22-06-09.833][    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[22-06-09.833][    0.000000] CPU: div instructions available: patching division code
[22-06-09.850][    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[22-06-09.850][    0.000000] OF: fdt:Machine model: sun8iw18
[22-06-09.885][    0.000000] bootconsole [earlycon0] enabled
[22-06-09.901][    0.001130] /cpus/cpu@0 missing clock-frequency property
[22-06-09.901][    0.007077] /cpus/cpu@1 missing clock-frequency property
[22-06-10.199][    0.288531] mmc:failed to get gpios
[22-06-10.234][    0.346803] sunxi_get_str_of_property()1561 - failed to get the string of propname led_regulator!
[22-06-10.246][    0.361193] sunxi-mmc sdc1: smc 0 p1 err, cmd 8, RTO !!
[22-06-10.290][    0.394617] sunxi-rtc rtc: hctosys: unable to read the hardware clock
[22-06-10.290]
[22-06-10.684]
[22-06-10.849]Starting fstab.
[22-06-10.890]Starting syslogd.
[22-06-10.890]Starting lo.
[22-06-10.890]
[22-06-10.890]Processing /etc/profile...
[22-06-10.902]root@r328:/# 
[22-06-10.903]root@r328:/# 

下面是dmesg的日志

root@r328:/# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.118 (meng@u14aw) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #5 SMP Wed Dec 8 12:55:35 CST 2021
[    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: sun8iw18
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat c05a68c0, node_mem_map c7ef8000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] percpu: Embedded 13 pages/cpu @c7eb5000 s21196 r8192 d23860 u53248
[    0.000000] pcpu-alloc: s21196 r8192 d23860 u53248 alloc=13*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: earlyprintk=sunxi-uart,0x05000000 console=ttyS0,115200 printk.time=1 quiet mtdparts=spi0.0:384k(uboot),64k(env),64k(dtb),7168k(kernel),8704k(rootfs) root=/dev/mtdblock4 rootfstype=cramfs rootwait
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 120580K/131072K available (4185K kernel code, 165K rwdata, 1012K rodata, 252K init, 168K bss, 10492K 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 : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc041e7ec   (4186 kB)
[    0.000000]       .init : 0xc053f000 - 0xc057e000   ( 252 kB)
[    0.000000]       .data : 0xc057e000 - 0xc05a7738   ( 166 kB)
[    0.000000]        .bss : 0xc05a7738 - 0xc05d17f8   ( 169 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000000] arm_arch_timer: Architected 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.000005] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000014] Switching to timer-based delay loop, resolution 41ns
[    0.000119] Console: colour dummy device 80x30
[    0.000135] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000144] pid_max: default: 32768 minimum: 301
[    0.000300] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000306] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000828] CPU: Testing write buffer coherency: ok
[    0.001130] /cpus/cpu@0 missing clock-frequency property
[    0.007077] /cpus/cpu@1 missing clock-frequency property
[    0.013054] CPU0: update cpu_capacity 1024
[    0.013060] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.013107] Setting up static identity map for 0x400082c0 - 0x40008318
[    0.015428] CPU1: update cpu_capacity 1024
[    0.015434] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.015532] Brought up 2 CPUs
[    0.015540] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.015544] CPU: All CPU(s) started in SVC mode.
[    0.016173] devtmpfs: initialized
[    0.034403] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.034886] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.034905] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.035104] atomic64_test: passed
[    0.035109] pinctrl core: initialized pinctrl subsystem
[    0.035717] NET: Registered protocol family 16
[    0.036010] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.037230] dump_class_init,861, success
[    0.075556] cpuidle: using governor menu
[    0.083309] sun8iw18p1-pinctrl pio: initialized sunXi PIO driver
[    0.126659] pwm module init!
[    0.129252] sunxi-pm debug v3.10
[    0.129728] sunxi_spi_probe()2281 - [spi0] SPI MASTER MODE
[    0.129791] sunxi_spi_request_gpio()1909 - [spi0] Pinctrl init spi0
[    0.129846] sunxi_spi_clk_init()1959 - [spi0] mclk 100000000
[    0.130315] spi spi0: master is unqueued, this is deprecated
[    0.130653] sunxi_spi_probe()2362 - [spi0]: driver probe succeed, base c8858000, irq 161
[    0.130984] sunxi_spi_probe()2281 - [spi1] SPI MASTER MODE
[    0.131042] sunxi_spi_request_gpio()1909 - [spi1] Pinctrl init spi1
[    0.131108] sunxi_spi_clk_init()1959 - [spi1] mclk 100000000
[    0.131564] spi spi1: master is unqueued, this is deprecated
[    0.131589] sunxi_spi_probe()2362 - [spi1]: driver probe succeed, base c885a000, irq 162
[    0.131997] usbcore: registered new interface driver usbfs
[    0.132084] usbcore: registered new interface driver hub
[    0.132186] usbcore: registered new device driver usb
[    0.134569] Bluetooth: Core ver 2.22
[    0.134653] NET: Registered protocol family 31
[    0.134657] Bluetooth: HCI device and connection manager initialized
[    0.134672] Bluetooth: HCI socket layer initialized
[    0.134681] Bluetooth: L2CAP socket layer initialized
[    0.134712] Bluetooth: SCO socket layer initialized
[    0.135934] clocksource: Switched to clocksource arch_sys_counter
[    0.149998] get androidboot.mode fail
[    0.150011] sunxi_i2c_adap_init()2476 - init
[    0.150855] NET: Registered protocol family 2
[    0.151499] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.151520] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.151539] TCP: Hash tables configured (established 1024 bind 1024)
[    0.151588] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.151615] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.151813] NET: Registered protocol family 1
[    0.152001] sunxi budget cooling probe start !
[    0.152019] CPU freq cooling register Success
[    0.152029] CPU hotplug cooling register Success
[    0.152248] CPU budget cooling register Success
[    0.154117] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.163241] io scheduler noop registered
[    0.163475] io scheduler cfq registered (default)
[    0.172248] uart0: ttyS0 at MMIO 0x5000000 (irq = 157, base_baud = 1500000) is a SUNXI
[    0.172275] sw_console_setup()1724 - console setup baud 115200 parity n bits 8, flow n
[    0.172318] console [ttyS0] enabled
[    0.172323] bootconsole [earlycon0] disabled
[    0.173182] misc dump reg init
[    0.174276] m25p80 spi0.0: mx25l12835f (16384 Kbytes) normal
[    0.174298] 5 cmdlinepart partitions found on MTD device spi0.0
[    0.174303] Creating 5 MTD partitions on "spi0.0":
[    0.174312] 0x000000000000-0x000000060000 : "uboot"
[    0.175715] 0x000000060000-0x000000070000 : "env"
[    0.177132] 0x000000070000-0x000000080000 : "dtb"
[    0.178454] 0x000000080000-0x000000780000 : "kernel"
[    0.179842] 0x000000780000-0x000001000000 : "rootfs"
[    0.181199] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.181372] get drv_vbus is fail, 84
[    0.181377] get ehci0-controller, regulator_io is no nocare
[    0.181381] get ehci0-controller wakeup-source is fail.
[    0.181491] sunxi ehci0-controller don't init wakeup source
[    0.181502] [sunxi-ehci0]: probe, pdev->name: 5101000.ehci0-controller, sunxi_ehci: 0xc05c96f8, 0x:c886a000, irq_no:9f
[    0.181555] sunxi-ehci 5101000.ehci0-controller: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.181590] sunxi-ehci 5101000.ehci0-controller: new USB bus registered, assigned bus number 1
[    0.181718] sunxi-ehci 5101000.ehci0-controller: irq 159, io mem 0xc056d83c
[    0.206121] sunxi-ehci 5101000.ehci0-controller: USB 0.0 started, EHCI 1.00
[    0.207193] hub 1-0:1.0: USB hub found
[    0.207237] hub 1-0:1.0: 1 port detected
[    0.207691] [ehci0-controller]: sunxi_usb_disable_ehci
[    0.207699] [sunxi-ehci0]: remove, pdev->name: 5101000.ehci0-controller, sunxi_ehci: 0xc05c96f8
[    0.207717] sunxi-ehci 5101000.ehci0-controller: remove, state 1
[    0.207737] usb usb1: USB disconnect, device number 1
[    0.208791] sunxi-ehci 5101000.ehci0-controller: USB bus 1 deregistered
[    0.209099] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.209290] get drv_vbus is fail, 84
[    0.209295] get ohci0-controller, regulator_io is no nocare
[    0.209299] get ohci0-controller wakeup-source is fail.
[    0.209398] sunxi ohci0-controller don't init wakeup source
[    0.209455] [sunxi-ohci0]: probe, pdev->name: 5101000.ohci0-controller, sunxi_ohci: 0xc05c8e98
[    0.209504] sunxi-ohci 5101000.ohci0-controller: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.209539] sunxi-ohci 5101000.ohci0-controller: new USB bus registered, assigned bus number 1
[    0.209607] sunxi-ohci 5101000.ohci0-controller: irq 160, io mem 0xc04420a4
[    0.280912] hub 1-0:1.0: USB hub found
[    0.280956] hub 1-0:1.0: 1 port detected
[    0.281382] [ohci0-controller]: sunxi_usb_disable_ohci
[    0.281390] [sunxi-ohci0]: remove, pdev->name: 5101000.ohci0-controller, sunxi_ohci: 0xc05c8e98
[    0.281396] sunxi-ohci 5101000.ohci0-controller: remove, state 1
[    0.281420] usb usb1: USB disconnect, device number 1
[    0.282222] sunxi-ohci 5101000.ohci0-controller: USB bus 1 deregistered
[    0.282576] usb_serial_number:20080411
[    0.283491] input: sunxi-keyboard as /devices/virtual/input/input0
[    0.284598] sunxi-rtc rtc: rtc core: registered sunxi-rtc as rtc0
[    0.284607] sunxi-rtc rtc: RTC enabled
[    0.285248] i2c /dev entries driver
[    0.285315] Bluetooth: HCI UART driver ver 2.2.d448471.20181218-163903
[    0.285320] Bluetooth: HCI H4 protocol initialized
[    0.285324] Bluetooth: HCI Realtek H5 protocol initialized
[    0.286644] cpuidle: enable-method property 'psci' found operations
[    0.286978] cpuidle: enable-method property 'psci' found operations
[    0.288043] sunxi-mmc sdc1: SD/MMC/SDIO Host Controller Driver(v3.29 2019-8-6 19:27)
[    0.288139] sunxi-mmc sdc1: Can't get vmmc regulator string
[    0.288145] sunxi-mmc sdc1: Can't get vqmmc regulator string
[    0.288150] sunxi-mmc sdc1: Can't get vdmmc regulator string
[    0.288155] sunxi-mmc sdc1: Can't get vdmmc33sw regulator string
[    0.288159] sunxi-mmc sdc1: Can't get vdmmc18sw regulator string
[    0.288164] sunxi-mmc sdc1: Can't get vqmmc33sw regulator string
[    0.288168] sunxi-mmc sdc1: Can't get vqmmc18sw regulator string
[    0.288173] sunxi-mmc sdc1: Failed getting OCR mask: 0
[    0.288482] sunxi-mmc sdc1: set host busy
[    0.288488] sunxi-mmc sdc1: ***set host ocr***
[    0.288531] mmc:failed to get gpios
[    0.292641] sunxi-mmc sdc1: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    0.316042] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    0.345953] sunxi-mmc sdc1: detmode:manually by software
[    0.346803] sunxi_get_str_of_property()1561 - failed to get the string of propname led_regulator!
[    0.356835] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    0.359302] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    0.361193] sunxi-mmc sdc1: smc 0 p1 err, cmd 8, RTO !!
[    0.367459] sunxi-mmc sdc1: card claims to support voltages below defined range
[    0.377489] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[    0.377589] sunxi-mmc sdc1: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[    0.377713] sunxi-mmc sdc1: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[    0.378483] mmc0: new high speed SDIO card at address 0001
[    0.385576] sunxi_led_probe()1759 - finish
[    0.385900] hidraw: raw HID events driver (C) Jiri Kosina
[    0.386201] usbcore: registered new interface driver usbhid
[    0.386205] usbhid: USB HID core driver
[    0.386272] Netfilter messages via NETLINK v0.30.
[    0.386454] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    0.386721] ctnetlink v0.93: registering with nfnetlink.
[    0.386901] ipip: IPv4 and MPLS over IPv4 tunneling driver
[    0.387559] gre: GRE over IPv4 demultiplexor driver
[    0.387565] ip_gre: GRE over IPv4 tunneling driver
[    0.388990] ip_tables: (C) 2000-2006 Netfilter Core Team
[    0.389205] Initializing XFRM netlink socket
[    0.389233] NET: Registered protocol family 17
[    0.389311] 8021q: 802.1Q VLAN Support v1.8
[    0.391062] Registering SWP/SWPB emulation handler
[    0.394224] get usb_detect_mode is fail, 22
[    0.394231] get det_vbus is fail, 84
[    0.394234] get id is fail, 84
[    0.394617] sunxi-rtc rtc: hctosys: unable to read the hardware clock
[    0.408411] VFS: Mounted root (cramfs filesystem) readonly on device 31:4.
[    0.408481] devtmpfs: mounted
[    0.408870] Freeing unused kernel memory: 252K
[    0.408873] This architecture does not have kernel memory protection.
[    0.416959] random: fast init done

----------------------------------------------------
以下是原始帖子内容(上午)

之前逆向了全志闭源的fes1
https://whycan.com/t_7448.html

现在已经重写出了bootloader然后实现了linux的快速启动
目前是上电 ~1.957 秒进入shell (如果不启用网络协议栈是 ~1.3秒)

由此可见全志linux是可以做到快速启动的…
他的BROM也没拖后腿(0 ms),如果是SBROM可能会长一些,后面再测

之前我在iMX6ULL上实现的是 ~1.67秒,看来全志还可以在优化优化。

平台: 全志R328-S3 (128MB DDR3)
NOR: MX25L12835F (DUAL 50MHz)
内核:Tina SDK r328_s3_std 默认kernel配置基础上,启用了 SPINOR 配置,禁用了 SPINAND。没做其他优化。

crt.png

下面是带时间戳的串口日志

[13-02-20.823]BOOTROM elapsed 0 ms
[13-02-20.823]
[13-02-20.823]
[13-02-20.823]-Hardcore Boot-
[13-02-20.823]
[13-02-20.823]Rev 11, Build Dec  8 2021 11:05:25
[13-02-20.823]mengxp works 2021
[13-02-20.823]
[13-02-20.844]CPU:  Allwinner R328-S3
[13-02-20.844]DRAM: DDR3 128 MB, 792 MHz
[13-02-20.844]NOR:  C22018(JEDEC ID)
[13-02-20.844]
[13-02-20.861]> Setup MMU
[13-02-20.861]> Load Optee
[13-02-20.876]> Load DeviceTree
[13-02-20.876]> Load Kernel
[13-02-21.213]> Open FDT
[13-02-21.213]> Setup FDT
[13-02-21.213]> Boot kernel
[13-02-21.276]Uncompressing Linux... done, booting the kernel.
[13-02-21.287][    0.000000] Booting Linux on physical CPU 0x0
[13-02-21.292][    0.000000] Linux version 4.9.118 (meng@u14aw) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #5 SMP Wed Dec 8 12:55:35 CST 2021
[13-02-21.306][    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[13-02-21.319][    0.000000] CPU: div instructions available: patching division code
[13-02-21.319][    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[13-02-21.323][    0.000000] OF: fdt:Machine model: sun8iw18
[13-02-21.341][    0.000000] bootconsole [earlycon0] enabled
[13-02-21.357][    0.001122] /cpus/cpu@0 missing clock-frequency property
[13-02-21.372][    0.006547] /cpus/cpu@1 missing clock-frequency property
[13-02-21.660][    0.306975] mmc:failed to get gpios
[13-02-21.735][    0.375120] sunxi_get_str_of_property()1561 - failed to get the string of propname led_regulator!
[13-02-21.735][    0.375160] sunxi-mmc sdc1: smc 0 p1 err, cmd 52, RTO !!
[13-02-21.757][    0.391824] sunxi-mmc sdc1: smc 0 p1 err, cmd 52, RTO !!
[13-02-21.757][    0.402291] sunxi-mmc sdc1: smc 0 p1 err, cmd 8, RTO !!
[13-02-21.767][    0.408969] sunxi-mmc sdc1: smc 0 p1 err, cmd 5, RTO !!
[13-02-21.767][    0.415635] sunxi-mmc sdc1: smc 0 p1 err, cmd 5, RTO !!
[13-02-21.784][    0.422300] sunxi-mmc sdc1: smc 0 p1 err, cmd 5, RTO !!
[13-02-21.784][    0.428973] sunxi-mmc sdc1: smc 0 p1 err, cmd 5, RTO !!
[13-02-21.788][    0.435643] sunxi-mmc sdc1: smc 0 p1 err, cmd 55, RTO !!
[13-02-21.799][    0.442409] sunxi-mmc sdc1: smc 0 p1 err, cmd 55, RTO !!
[13-02-21.800][    0.449172] sunxi-mmc sdc1: smc 0 p1 err, cmd 55, RTO !!
[13-02-21.821][    0.455936] sunxi-mmc sdc1: smc 0 p1 err, cmd 55, RTO !!
[13-02-21.837][    0.469110] write_efuse_to_reg_ver_3:reading calibration data0 is zero
[13-02-21.837][    0.480761] sunxi-rtc rtc: hctosys: unable to read the hardware clock
[13-02-22.398]Starting fstab.
[13-02-22.428]Starting syslogd.
[13-02-22.447]Starting lo.
[13-02-22.447]
[13-02-22.447]Processing /etc/profile...
[13-02-22.780]root@r328:/#

最近编辑记录 mengxp (2021-12-08 22:11:37)

离线

楼主 #3 2021-12-08 22:00:58

mengxp
会员
注册时间: 2021-10-07
已发帖子: 68
积分: 152

Re: 全志r328快速启动实现(上电1.5秒进Shell)

shaoxi2010 说:

太强了,想问下重写后bootloader花了多少时间呢?

重写bootloader花多少时间吗?懂原理的话也不是很费时间,就一个星期就研究出来了……

netwp 说:

大佬,请教imx6ull是如何做到1.67启动,太牛了,感觉1.6s也就能起个uboot

需要自己写bootloader。用uboot也行就别调用太多无关的命令和等待。

离线

楼主 #5 2021-12-09 09:05:51

mengxp
会员
注册时间: 2021-10-07
已发帖子: 68
积分: 152

Re: 全志r328快速启动实现(上电1.5秒进Shell)

shaoxi2010 说:

是我的描述不太清楚,一个是我想知道你打印里面有个brom时间,这个是怎么算出来的?第二就是bootloader拉起内核时间是多少呢,想看下和uboot相比有多大的优势。

brom中会初始化ARM核中的Timer,后面可以直接取值拿到CPU上电时间。
Bootloader拉起内核的时间可以看日志
Load Kernel那里是从norflash读取
boot kernel那里是开始跳转

其实主要的问题不是uboot,毕竟uboot可以裁剪。
最大的问题是 boot0 尤其是 sboot 消耗了太多的时间,有0.8秒左右。
而这个东西是不开源的,你没法优化他。

最近编辑记录 mengxp (2021-12-09 09:09:07)

离线

楼主 #8 2021-12-09 11:00:48

mengxp
会员
注册时间: 2021-10-07
已发帖子: 68
积分: 152

Re: 全志r328快速启动实现(上电1.5秒进Shell)

memory 说:

①启用了secureboot,给bootloader做了toc0签名
②主板焊接了rtl8723ds sdio模块
启动只需要1.5秒!!

请教楼主,这是因为①,还是因为②?

secureboot会更耗时因为他需要校验代码有效性

启动时间比上次实验更短了应该是因为②
那个mmc驱动会probe设备,如果找不到设备他的超时等待更长一些吧(但说实话我觉得差这么多有点离谱)

离线

页脚

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

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