您尚未登录。

楼主 #1 2020-01-29 23:22:57

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

F1C100S/F1C200S-开机时间、uboot、内核、根文件系统裁减优化问题

16M spiflash 系统

uboot裁减到122K   内核2.3M   rootfs 2M 移植加入tslib,使用jffs2文件系统。我目前优化办法就是各种裁减,然后内核速度改到了800Mhz,SPI速度改到了108M。

uboot等待时间改成0S,uboot启动到内核需要3S ,内核和文件系统启动需要9S ,加起来上电启动到littlegl demo 需要 12S


12S这个时间还是太长,请问各位大神,还有什么办法可以加快开机速度,请各位不吝赐教谢谢! big_smile


下面是我的分区规划

mtd0	192KB	       spl+uboot	   0x0000000-0x0030000 : “uboot”

mtd1	64KB	       dtb文件		   0x0030000-0x0040000 : “dtb”

mtd2	2.375MB	       linux内核	   0x0040000-0x02A0000 : “kernel”

mtd3	剩余	        根文件系统	   0x02A0000-0x1000000 : “rootfs”

下面是我系统启动打印的logo日志

U-Boot SPL 2018.01-05679-g013ca457fd-dirty (Jan 29 2020 - 15:37:30)
DRAM: 64 MiB
Trying to boot from MMC1
MMC Device 0 not found
spl: could not find mmc device. error: -19
Trying to boot from sunxi SPI


U-Boot 2018.01-05679-g013ca457fd-dirty (Jan 29 2020 - 15:37:30 +0800) Allwinnery

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  64 MiB
MMC:   
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Unknown command 'usb' - try 'help'
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 0x30000, size 0x4000
SF: 16384 bytes @ 0x30000 Read: OK
device 0 offset 0x40000, size 0x260000
SF: 2490368 bytes @ 0x40000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fa000, end 816ff0f2 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (yan@yan-Z5) (gcc versio0
[    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: 16256
[    0.000000] Kernel command line: vt.global_cursor_default=0 console=ttyS0,112
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 57308K/65536K available (4096K kernel code, 170K rwdata,)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (5088 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 171 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 216 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.000041] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 8947s
[    0.000090] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, maxs
[    0.000485] Console: colour dummy device 80x30
[    0.000553] Calibrating delay loop... 395.67 BogoMIPS (lpj=1978368)
[    0.120222] pid_max: default: 32768 minimum: 301
[    0.120430] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120458] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.121308] CPU: Testing write buffer coherency: ok
[    0.122694] Setting up static identity map for 0x80100000 - 0x80100058
[    0.124450] devtmpfs: initialized
[    0.128221] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ms
[    0.128268] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.128417] pinctrl core: initialized pinctrl subsystem
[    0.130332] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.131639] cpuidle: using governor menu
[    0.145336] SCSI subsystem initialized
[    0.145821] Advanced Linux Sound Architecture Driver Initialized.
[    0.146040] clocksource: Switched to clocksource timer
[    0.167062] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.168800] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.174759] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.185175] Block layer SCSI generic (bsg) driver version 0.4 loaded (major )
[    0.185212] io scheduler noop registered
[    0.185223] io scheduler deadline registered
[    0.185746] io scheduler cfq registered (default)
[    0.185772] io scheduler mq-deadline registered
[    0.185783] io scheduler kyber registered
[    0.192577] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.325981] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.331286] console [ttyS0] disabled
[    0.351550] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 24, base_baud = 6A
[    0.694320] console [ttyS0] enabled
[    0.702503] panel-simple panel: panel supply power not found, using dummy rer
[    0.711471] SCSI Media Changer driver v0.25 
[    0.718451] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.723210] 4 ofpart partitions found on MTD device spi0.0
[    0.728785] Creating 4 MTD partitions on "spi0.0":
[    0.733586] 0x000000000000-0x000000030000 : "u-boot"
[    0.740702] 0x000000030000-0x000000040000 : "dtb"
[    0.747377] 0x000000040000-0x0000002a0000 : "kernel"
[    0.754202] 0x0000002a0000-0x000001040000 : "rootfs"
[    0.759287] mtd: partition "rootfs" extends beyond the end of device "spi0.00
[    0.771218] i2c /dev entries driver
[    0.776825] input: ns2009_ts as /devices/platform/soc/1c27000.i2c/i2c-0/0-000
[    0.846154] sunxi-mmc 1c0f000.mmc: base:0x0d7490d4 irq:20
[    0.873560] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc)
[    0.882275] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0)
[    0.890041] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    0.896677] [drm] No driver support for vblank timestamp query.
[    0.945303] Console: switching to colour frame buffer device 60x34
[    0.970499] sun4i-drm display-engine: fb0:  frame buffer device
[    0.977443] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on0
[    0.985746] vcc3v3: disabling
[    0.988841] ALSA device list:
[    0.991814]   #0: Loopback 1
[    1.096244] random: crng init done
[    1.412503] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    1.420587] devtmpfs: mounted
[    1.428004] Freeing unused kernel memory: 1024K
mount: mounting tmpfs on /dev/shm failed: Invalid argument
mount: mounting tmpfs on /tmp failed: Invalid argument
mount: mounting tmpfs on /run failed: Invalid argument
hostname: applet not found
Starting syslogd: OK
Starting klogd: OK
Starting mdev...
modprobe: can't change directory to '/lib/modules': No such file or directory
Initializing random number generator... done.
Starting network: ifup: applet not found
FAIL
[8.500100]: root login on 'ttyS0'
helloworld!
#

下面是我的测试镜像f1c100s-img.tar.gz里面包含测试镜像,编译好的uboot,内核,文件系统,还有config配置文件,16M flash可以直接烧录flashimg.bin,支持F1C100S和F1C200S,上电以后显示linux 开机LOGO,然后自动加载 demo程序

-rw-r--r-- 1 yan yan  93K 1月  29 23:35 buildroot-2019.5.1.config
-rw-r--r-- 1 yan yan 8.0M 1月  29 23:28 flashimg.bin
-rw-r--r-- 1 yan yan 5.3M 1月  29 23:27 jffs2.img
-rw-r--r-- 1 yan yan  66K 1月  29 23:34 linux.config
-rw-r--r-- 1 yan yan  234 1月  29 23:29 mtd.hklm.txt
-rw-r--r-- 1 yan yan 2.0M 1月  29 23:27 rootfs.tar
-rw-r--r-- 1 yan yan 8.3K 1月  29 23:27 suniv-f1c100s-licheepi-nano.dtb
-rw-r--r-- 1 yan yan 122K 1月  29 23:28 u-boot.bin
-rw-r--r-- 1 yan yan  24K 1月  29 23:34 uboot.config
-rw-r--r-- 1 yan yan 156K 1月  29 23:27 u-boot-sunxi-with-spl.bin
-rwxr-xr-x 1 yan yan   85 1月  29 23:29 write-all-spiimg.sh
-rwxr-xr-x 1 yan yan 2.3M 1月  29 23:27 zImage

最后附上我的测试视频,和我自己设计的开发板美照,手工焊接QFN着实难焊 。big_smile

_20200129164506.jpg

_20200129164459.jpg

_20200129164509.jpg

最近编辑记录 颜水花生 (2020-01-30 01:02:28)

离线

楼主 #4 2020-01-29 23:51:17

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

smartcar 说:

linux设备树你的 spi 速度是多少?

等等,有点不对劲,
0x0000002a0000-0x000001040000 : "rootfs"
这里貌似超过16M了?

对哦,:lol:  看了下,是设备树那里搞错了呢,改成0XD60000就好了

&spi0 {
    pinctrl-names = "default";
    pinctrl-0 = <&spi0_pins_a>;
    status = "okay";
    spi-max-frequency = <108000000>;
    flash: w25q128@0 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "winbond,w25q128", "jedec,spi-nor";
        reg = <0>;
        spi-max-frequency = <108000000>;
        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

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

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

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

            partition@510000 {
                label = "rootfs";
                reg = <0x2A0000 0xDA0000>;
            };
        };
    };
};

离线

楼主 #5 2020-01-29 23:58:07

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

超级萌新 说:

还是我前面那个回复,
可以把根文件系统改小一点,比如5M,
这样扫描区域就没辣么大,可以节省一点点时间。

还有,lvgl应用放 /etc/init.d/S90app 里面,记得加后台运行符号。


好的谢谢,根文件系统改小我试过哦,我把根文件系统改成了5M,对比了下发现不明显哦,时间没有明显提升。lvgl应用我没加后台符号,不过我不执行lvgl开机时间也要那么长,加了lvgl demo程序加载大概需要2S时间。

这是我改的,测试发现开机时间一模一样,没啥变化

[    0.733537] 0x000000000000-0x000000030000 : "u-boot"
[    0.740647] 0x000000030000-0x000000040000 : "dtb"
[    0.747326] 0x000000040000-0x0000002a0000 : "kernel"
[    0.754149] 0x0000002a0000-0x000000800000 : "rootfs"

Starting mdev...
modprobe: can't change directory to '/lib/modules': No such file or directory
Initializing random number generator... done.
Starting network: ifup: applet not found
FAIL
[8.500100]: root login on 'ttyS0'
helloworld!
# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 5.4M      3.1M      2.3M  58% /
#

最近编辑记录 颜水花生 (2020-01-30 00:06:43)

离线

楼主 #12 2020-01-30 11:14:45

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

ippen 说:

内核是用gz压缩方式?改成xz方式会快一点

同请教,如何修改内核压缩方式呢?我用的默认的设置,百度了以下没找到答案,谢谢 big_smile

离线

楼主 #13 2020-01-30 11:15:45

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

超级萌新 说:

1. 看你的log,可以屏蔽uboot的emmc,在.comfig里面可以删除,估计能提高0.0x秒

2.  /etc/init.d/S90app 改成  /etc/init.d/S01app,可以最先执行lvgl app

好的谢谢,我试试看 big_smile

离线

楼主 #14 2020-01-30 11:17:20

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

达克罗德 说:

用sdnand,要快很多

是的SD快很多,速度达到要求,但是项目成本有要求,SD贵很多呀 big_smile

离线

楼主 #15 2020-01-30 11:27:56

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

超级萌新 说:

1. 看你的log,可以屏蔽uboot的emmc,在.comfig里面可以删除,估计能提高0.0x秒

2.  /etc/init.d/S90app 改成  /etc/init.d/S01app,可以最先执行lvgl app

感谢支招,用了你的方法,果然提速了差不多4S 牛掰 big_smile

离线

楼主 #19 2020-01-30 12:04:22

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

zzm24 说:

我觉得这个ttyS0 init占用太多时间了,能不能改短一点
[    0.192577] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.325981] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.331286] console [ttyS0] disabled
[    0.351550] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 24, base_baud = 6A
[    0.694320] console [ttyS0] enabled

是的哦,350ms有点太长了,各位大神知道如何优化麻

离线

楼主 #20 2020-01-30 12:05:05

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

ippen 说:

在内核常规设置选项里面
General setup  --->Kernel compression mode (Gzip)
将gzip改为xz模式

谢谢,这就试试 big_smile

离线

楼主 #21 2020-01-30 12:16:12

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

ippen 说:

在内核常规设置选项里面
General setup  --->Kernel compression mode (Gzip)
将gzip改为xz模式

刚刚试了下,发现速度倒是没什么差别,修改前8.8S,修改后还是一样8.8S。但是体积小了好多,从2.3M变成1.7M了,感谢支招 big_smile

离线

楼主 #23 2020-01-30 12:24:54

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

smartcar 说:

sf load zImage 的时候, 可以加载小一点,  0.6M大概节省 0.x 秒.

感谢提醒,试了下 big_smile 果然如此,现在启动到界面需要8S

最近编辑记录 颜水花生 (2020-01-30 12:41:46)

离线

楼主 #24 2020-01-30 13:01:33

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

我把SPI速度改到了128M,速度好像没有提升,使用了楼上各种方法,目前启动到 lvgl demo需要8S, uboot启动2S,内核启动完成7.4S 一共9.4S

下面是启动logo

U-Boot SPL 2018.01-05679-g013ca457fd-dirty (Jan 30 2020 - 12:55:16)
DRAM: 64 MiB
Trying to boot from MMC1
MMC Device 0 not found
spl: could not find mmc device. error: -19
Trying to boot from sunxi SPI


U-Boot 2018.01-05679-g013ca457fd-dirty (Jan 30 2020 - 12:55:16 +0800) Allwinnery

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  64 MiB
MMC:   
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Unknown command 'usb' - try 'help'
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 0x30000, size 0x4000
SF: 16384 bytes @ 0x30000 Read: OK
device 0 offset 0x40000, size 0x1c0000
SF: 1835008 bytes @ 0x40000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fa000, end 816ff0f2 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (yan@yan-Z5) (gcc versio0
[    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: 16256
[    0.000000] Kernel command line: vt.global_cursor_default=0 console=ttyS0,112
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 57308K/65536K available (4096K kernel code, 170K rwdata,)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (5088 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 171 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 216 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.000041] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 8947s
[    0.000090] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, maxs
[    0.000485] Console: colour dummy device 80x30
[    0.000553] Calibrating delay loop... 395.67 BogoMIPS (lpj=1978368)
[    0.120222] pid_max: default: 32768 minimum: 301
[    0.120430] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120459] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.121308] CPU: Testing write buffer coherency: ok
[    0.122694] Setting up static identity map for 0x80100000 - 0x80100058
[    0.124451] devtmpfs: initialized
[    0.128223] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ms
[    0.128269] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.128419] pinctrl core: initialized pinctrl subsystem
[    0.130335] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.131642] cpuidle: using governor menu
[    0.145353] SCSI subsystem initialized
[    0.145835] Advanced Linux Sound Architecture Driver Initialized.
[    0.146060] clocksource: Switched to clocksource timer
[    0.167073] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.168823] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.174770] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.185229] Block layer SCSI generic (bsg) driver version 0.4 loaded (major )
[    0.185265] io scheduler noop registered
[    0.185276] io scheduler deadline registered
[    0.185797] io scheduler cfq registered (default)
[    0.185824] io scheduler mq-deadline registered
[    0.185835] io scheduler kyber registered
[    0.192663] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.326036] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.331324] console [ttyS0] disabled
[    0.351583] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 24, base_baud = 6A
[    0.694356] console [ttyS0] enabled
[    0.702548] panel-simple panel: panel supply power not found, using dummy rer
[    0.711511] SCSI Media Changer driver v0.25 
[    0.718500] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.723263] 4 ofpart partitions found on MTD device spi0.0
[    0.728833] Creating 4 MTD partitions on "spi0.0":
[    0.733637] 0x000000000000-0x000000030000 : "u-boot"
[    0.740726] 0x000000030000-0x000000040000 : "dtb"
[    0.747401] 0x000000040000-0x0000002a0000 : "kernel"
[    0.754230] 0x0000002a0000-0x000001000000 : "rootfs"
[    0.761495] i2c /dev entries driver
[    0.767097] input: ns2009_ts as /devices/platform/soc/1c27000.i2c/i2c-0/0-000
[    0.836175] sunxi-mmc 1c0f000.mmc: base:0x0d7490d4 irq:20
[    0.863654] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc)
[    0.872360] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0)
[    0.880128] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    0.886773] [drm] No driver support for vblank timestamp query.
[    0.935414] Console: switching to colour frame buffer device 60x34
[    0.960615] sun4i-drm display-engine: fb0:  frame buffer device
[    0.967563] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on0
[    0.975881] vcc3v3: disabling
[    0.978979] ALSA device list:
[    0.981951]   #0: Loopback 1
[    1.086998] random: crng init done
[    1.422609] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    1.430718] devtmpfs: mounted
[    1.438129] Freeing unused kernel memory: 1024K
mount: mounting tmpfs on /dev/shm failed: Invalid argument
mount: mounting tmpfs on /tmp failed: Invalid argument
mount: mounting tmpfs on /run failed: Invalid argument
hostname: applet not found
S01app start!
Starting syslogd: OK
Starting klogd: OK
Initializing random number generator... done.
login[74]: root login on 'ttyS0'
helloworld!
# The framebuffer device was opened successfully.
480x272, 32bpp
The framebuffer device was mapped to memory successfully.
Frame buffer hor. res: 480, ver. res: 272

离线

楼主 #26 2020-01-30 13:46:55

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

smartcar 说:

这里还浪费了一点点时间,
Trying to boot from MMC1
MMC Device 0 not found
spl: could not find mmc device. error: -19

还有你的 lvgl app有没有 strip ?体积多大?





mount: mounting tmpfs on /dev/shm failed: Invalid argument
mount: mounting tmpfs on /tmp failed: Invalid argument
mount: mounting tmpfs on /run failed: Invalid argument
根文件系统还缺这几个目录, 最好手动建立一下.

好的谢谢,我这就试试,我的程序775K,strip是啥?可以优化速度吗?刚搞lvgl不大懂,请指教


刚刚看了下,根文件有这几个目录的哦,不知道咋会报错

mount: mounting tmpfs on /dev/shm failed: Invalid argument
mount: mounting tmpfs on /tmp failed: Invalid argument
mount: mounting tmpfs on /run failed: Invalid argument
hostname: applet not found
S01app start!
Starting syslogd: OK
Starting klogd: OK
Starting mdev...
The framebuffer device was opened successfully.
480x272, 32bpp
The framebuffer device was mapped to memory successfully.
Frame buffer hor. res: 480, ver. res: 272
modprobe: can't change directory to '/lib/modules': No such file or directory
Initializing random number generator... done.
login[85]: root login on 'ttyS0'
helloworld!
# ls /
bin      lib      media    proc     sbin     usr
dev      lib32    mnt      root     sys      var
etc      linuxrc  opt      run      tmp
# 

最近编辑记录 颜水花生 (2020-01-30 13:56:16)

离线

楼主 #27 2020-01-30 14:01:01

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x30000, size 0x4000
SF: 16384 bytes @ 0x30000 Read: OK
device 0 offset 0x40000, size 0x1c0000
SF: 1835008 bytes @ 0x40000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fa000, end 816ff0f2 ... OK

Starting kernel ...         

   uboot 主要是 Starting kernel ...    这个地方花的时间太多,差不多2S

离线

楼主 #29 2020-01-30 14:11:42

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

smartcar 说:

这个地方优化空间估计有限, 除非你再把 zImage一部分编译成 ko把文件尺寸降下来.

还有, spi 速度不建议那么高, 60Mhz 左右就可以, 否则可能会导致不稳定, 比如jffs2根文件系统出错.

好的谢谢,我也就测试敢这么玩,项目中不敢 跑这么欢的 big_smile

离线

楼主 #30 2020-01-30 14:13:25

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

不知道中科视为他们怎么做到的,可以4S启动到界面。很牛掰

离线

楼主 #35 2020-01-30 14:42:42

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

smartcar 说:

不太可能, 除非你的应用接管了 SIG_KILL 软中断命令.

或者试一试这个命令:
killall 应用名

找到问题了,PID 号输入错了,填的VSZ号 big_smile

离线

楼主 #36 2020-01-30 14:44:26

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

ippen 说:

官方的sdk编译出来的内核体积比较小,我记得我编译出uboot+kernek+rootfs总共才2.6M,启动5秒多6秒的样子,不过我没有显示界面的需求,所以内核剪裁比较多,显示部分、声卡全部裁掉了,你可以试一下用官方的sdk

好的,谢谢,回头试试官方的SDK

离线

楼主 #37 2020-01-30 14:45:09

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

jiangming1399 说:

https://elinux.org/images/9/97/Boot_one_second_altenberg.pdf
https://elinux.org/images/6/64/Chris-simmonds-boot-time-elce-2017_0.pdf

这篇文章提供了一些通用的方法,主要是要删掉用不上的驱动,并且把不需要的加载放在后面。

好的,:D 谢谢我参考下

离线

楼主 #40 2020-01-30 20:17:48

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

zzm24 说:

楼主能不能分享一下内核裁剪经验,我怎么裁减zImage都有3M,你的才2.3M,厉害
厚脸皮求上传个.config最好

我的配置文件已经开源了哦,看帖不认真 big_smile 哈哈,上面有个压缩包,里面镜像和配置文件都有,改了XZ压缩方式,还可以缩到1.7M


奇怪,昨天明明放上去的呀,咋不见了,我再发一次

f1c100s-img_tar.zip

最近编辑记录 颜水花生 (2020-01-30 20:19:46)

离线

楼主 #44 2020-01-31 17:10:15

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

jiangchun9981 说:

F1C100这个是ARM9,多少年前的技术了,而且LINUX本身是"庞大"的系统,启动速度不会有太大的优化

LZ考虑下官方的MELIS看看

好的,可以尝试一下

离线

楼主 #50 2020-02-14 16:51:41

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

netwp 说:

楼主最终优化时间能到多少,如果用A33或V3S是不是要快点

目前最终优化 uboot需要2S,linux启动到命令行需要4.5S, 整体启动到LVGL界面需要5S左右,最终还是缩小内核体积,现在内核只有1.2M,外设全部改成驱动挂上去

离线

楼主 #85 2020-08-13 17:50:22

颜水花生
会员
注册时间: 2019-11-20
已发帖子: 53
积分: 37

Re: F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题

jkl 说:

你好,请问你这个问题弄明白了吗,我现在也遇到了同样的问题???


进入U-BOOT图形配置->Environment   --->  Environment   offset(修改这个值) 我配置的是0X30000也就是最大192K,如果编译出来比这个值大,就要相应的改大

最近编辑记录 颜水花生 (2020-08-13 17:51:39)

离线

页脚

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

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