WhyCan Forum(哇酷开发者社区)

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

您尚未登录。

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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)

离线

#2 2020-01-29 23:40:32

smartcar
会员
注册时间: 2018-02-19
累计积分: 674

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

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

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

离线

#3 2020-01-29 23:43:12

超级萌新
会员
注册时间: 2018-05-04
累计积分: 406

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

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

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

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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
累计积分: 51

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)

离线

#6 2020-01-30 01:40:31

达克罗德
会员
注册时间: 2018-04-10
累计积分: 938

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

用sdnand,要快很多

离线

#7 2020-01-30 01:41:54

达克罗德
会员
注册时间: 2018-04-10
累计积分: 938

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

BTW,楼主板子很不错

离线

#8 2020-01-30 08:17:04

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
累计积分: 775
个人网站

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

板子真漂亮。
发到展览馆吧

https://whycan.cn/t_3575.html

离线

#9 2020-01-30 10:18:16

超级萌新
会员
注册时间: 2018-05-04
累计积分: 406

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

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

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

离线

#10 2020-01-30 10:30:36

ippen
会员
注册时间: 2018-07-22
累计积分: 344

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

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

离线

#11 2020-01-30 10:42:45

cityf
会员
注册时间: 2017-11-03
累计积分: 195

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

ippen 说:

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

为什么?请教这个如何设置?

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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

ippen 说:

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

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

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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
累计积分: 51

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

达克罗德 说:

用sdnand,要快很多

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

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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

离线

#16 2020-01-30 11:31:09

zzm24
会员
注册时间: 2018-05-07
累计积分: 38

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

我觉得这个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

离线

#17 2020-01-30 11:33:19

ippen
会员
注册时间: 2018-07-22
累计积分: 344

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

颜水花生 说:

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

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

离线

#18 2020-01-30 11:44:42

cityf
会员
注册时间: 2017-11-03
累计积分: 195

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

ippen 说:

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

多谢指教,mark

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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
累计积分: 51

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
累计积分: 51

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

ippen 说:

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

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

离线

#22 2020-01-30 12:19:36

smartcar
会员
注册时间: 2018-02-19
累计积分: 674

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

颜水花生 说:

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

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

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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
累计积分: 51

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

离线

#25 2020-01-30 13:16:10

smartcar
会员
注册时间: 2018-02-19
累计积分: 674

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

超级萌新 说:

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

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

这里还浪费了一点点时间,
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
根文件系统还缺这几个目录, 最好手动建立一下.

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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
累计积分: 51

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

离线

#28 2020-01-30 14:05:55

smartcar
会员
注册时间: 2018-02-19
累计积分: 674

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

颜水花生 说:

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

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

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

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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

smartcar 说:

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

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

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

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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

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

离线

#31 2020-01-30 14:27:54

smartcar
会员
注册时间: 2018-02-19
累计积分: 674

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

颜水花生 说:

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

中科世为那个速度得确实不错, 加上全志官方sdk可能优化得更好吧.

离线

#32 2020-01-30 14:36:51

smartcar
会员
注册时间: 2018-02-19
累计积分: 674

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

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

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

离线

#33 2020-01-30 14:38:15

ippen
会员
注册时间: 2018-07-22
累计积分: 344

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

颜水花生 说:

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

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

离线

#34 2020-01-30 14:40:17

jiangming1399
会员
注册时间: 2018-06-14
累计积分: 112

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

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

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

最近编辑记录 jiangming1399 (2020-01-30 14:44:18)

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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

smartcar 说:

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

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

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

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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
累计积分: 51

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 谢谢我参考下

离线

#38 2020-01-30 17:37:11

zzm24
会员
注册时间: 2018-05-07
累计积分: 38

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

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

离线

#39 2020-01-30 18:08:20

cityf
会员
注册时间: 2017-11-03
累计积分: 195

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

zzm24 说:

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

在家睡到自然醒没钱数尴尬排队厚脸求教程。

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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)

离线

#41 2020-01-30 20:39:45

smartcar
会员
注册时间: 2018-02-19
累计积分: 674

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

颜水花生 说:

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


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

f1c100s-img_tar.zip

感谢分享, 只是下载有点慢, 一会再仔细研究.

离线

#42 2020-01-31 15:31:04

RedK
会员
注册时间: 2020-01-15
累计积分: 15

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

mark一个!!

离线

#43 2020-01-31 17:01:11

jiangchun9981
会员
注册时间: 2019-07-31
累计积分: 103

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

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

LZ考虑下官方的MELIS看看

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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

jiangchun9981 说:

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

LZ考虑下官方的MELIS看看

好的,可以尝试一下

离线

#45 2020-02-01 17:41:53

1066950103
会员
注册时间: 2017-11-17
累计积分: 60

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

这个板子确实漂亮!

离线

#46 2020-02-09 17:03:20

netwp
会员
注册时间: 2018-08-19
累计积分: 22

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

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

最近编辑记录 netwp (2020-02-09 17:06:14)

离线

#47 2020-02-10 15:21:08

达克罗德
会员
注册时间: 2018-04-10
累计积分: 938

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

netwp 说:

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

A33+EMMC也是2秒多,不深度优化是不行的

离线

#48 2020-02-14 16:04:42

1066950103
会员
注册时间: 2017-11-17
累计积分: 60

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

确实优化的很小。照着配置文件自己编译 Uboot kernel rootfs ,但是把uboot 配置弄进去编译的时候就出错了,难道uboot代码也要修改?下面是报错信息。麻烦指点一下。

  LD      u-boot
board/sunxi/built-in.o: In function `setup_environment':
/home/du/f1c100s/u-boot/board/sunxi/board.c:699: undefined reference to `eth_env_set_enetaddr'
board/sunxi/built-in.o: In function `board_mmc_init':
/home/du/f1c100s/u-boot/board/sunxi/board.c:488: undefined reference to `sunxi_mmc_init'
cmd/built-in.o: In function `label_boot':
/home/du/f1c100s/u-boot/cmd/pxe.c:796: undefined reference to `do_bootm'
common/built-in.o: In function `usb_kbd_remove':
/home/du/f1c100s/u-boot/common/usb_kbd.c:625: undefined reference to `stdio_deregister_dev'
arm-linux-gnueabi-ld.bfd: BFD (Linaro_Binutils-2017.11) 2.28.2.20170706 assertion fail /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabi/snapshots/binutils-gdb.git~users~linaro~binutils-2_28-branch/bfd/elf32-arm.c:9514
arm-linux-gnueabi-ld.bfd: BFD (Linaro_Binutils-2017.11) 2.28.2.20170706 assertion fail /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabi/snapshots/binutils-gdb.git~users~linaro~binutils-2_28-branch/bfd/elf32-arm.c:9514
arm-linux-gnueabi-ld.bfd: BFD (Linaro_Binutils-2017.11) 2.28.2.20170706 assertion fail /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabi/snapshots/binutils-gdb.git~users~linaro~binutils-2_28-branch/bfd/elf32-arm.c:9514
arm-linux-gnueabi-ld.bfd: BFD (Linaro_Binutils-2017.11) 2.28.2.20170706 assertion fail /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabi/snapshots/binutils-gdb.git~users~linaro~binutils-2_28-branch/bfd/elf32-arm.c:9514
Makefile:1261: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1

离线

#49 2020-02-14 16:14:48

晕哥
管理员
注册时间: 2017-09-06
累计积分: 9,189

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

@1066950103 这地方u-boot解决得不完美,需要自己手工修改代码屏蔽那些无法链接的变量。

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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

netwp 说:

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

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

离线

#51 2020-02-14 18:28:40

1066950103
会员
注册时间: 2017-11-17
累计积分: 60

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

晕哥 说:

@1066950103 这地方u-boot解决得不完美,需要自己手工修改代码屏蔽那些无法链接的变量。

晕哥 好的 我试试哈 谢谢晕哥

离线

#52 2020-02-14 18:46:30

1066950103
会员
注册时间: 2017-11-17
累计积分: 60

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

晕哥 说:

@1066950103 这地方u-boot解决得不完美,需要自己手工修改代码屏蔽那些无法链接的变量。

晕哥 代码改了 能编译通过了 但是遇到奇怪的问题了 这是撒呢
  LD      spl/lib/built-in.o
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  COPY    spl/u-boot-spl.bin
  MKSUNXI spl/sunxi-spl.bin
  BINMAN  u-boot-sunxi-with-spl.bin
binman: Node '/binman/u-boot-img': Entry contents size is 0x335a5 (210341) but entry size is 0x1f000 (126976)
Makefile:1148: recipe for target 'u-boot-sunxi-with-spl.bin' failed
make: *** [u-boot-sunxi-with-spl.bin] Error 1

离线

#53 2020-02-14 18:51:02

1066950103
会员
注册时间: 2017-11-17
累计积分: 60

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

颜水花生 说:

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


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

f1c100s-img_tar.zip

能把uboot 代码分享出来不呢!我用这上面的 https://github.com/Lichee-Pi/u-boot/tree/nano-v2018.01 源码编译不通过

离线

#54 2020-02-14 21:40:37

ippen
会员
注册时间: 2018-07-22
累计积分: 344

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

1066950103 说:

晕哥 代码改了 能编译通过了 但是遇到奇怪的问题了 这是撒呢
  LD      spl/lib/built-in.o
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  COPY    spl/u-boot-spl.bin
  MKSUNXI spl/sunxi-spl.bin
  BINMAN  u-boot-sunxi-with-spl.bin
binman: Node '/binman/u-boot-img': Entry contents size is 0x335a5 (210341) but entry size is 0x1f000 (126976)
Makefile:1148: recipe for target 'u-boot-sunxi-with-spl.bin' failed
make: *** [u-boot-sunxi-with-spl.bin] Error 1

编译出来的uboot体积太大了,使用空间和env环境的地址冲突了,将env环境的地址调大一点

离线

#55 2020-02-15 10:26:44

pk559
会员
注册时间: 2020-02-15
累计积分: 2

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

u-boot能直接跑gui吗?

离线

#56 2020-02-15 10:32:53

晕哥
管理员
注册时间: 2017-09-06
累计积分: 9,189

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

pk559 说:

u-boot能直接跑gui吗?

可以,但是意义不大,而且驱动和其他依赖软件又没有linux丰富,不建议这么玩,除非有很特别的原因。

离线

#57 2020-02-15 17:19:47

jiangchun9981
会员
注册时间: 2019-07-31
累计积分: 103

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

我也一直想u-boot直接跑图形界面,主要是有几个GPIO,SPI,这些外设就可以了,做个简单的控制   可以做到秒启动

LINUX无论如何优化也不可能做到1S内启动图形界面的

离线

#58 2020-02-15 19:37:33

checkout
会员
注册时间: 2018-11-09
累计积分: 166

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

可以用xboot

jiangchun9981 说:

我也一直想u-boot直接跑图形界面,主要是有几
个GPIO,SPI,这些外设就可以了,做个简单的控制   可以做到秒启动

LINUX无论如何优化也不可能做到1S内启动图形界面的

离线

#59 2020-02-15 20:06:59

netwp
会员
注册时间: 2018-08-19
累计积分: 22

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

直接跑uboot那不就是裸奔了吗

离线

#60 2020-02-20 11:21:48

1066950103
会员
注册时间: 2017-11-17
累计积分: 60

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

ippen 说:

编译出来的uboot体积太大了,使用空间和env环境的地址冲突了,将env环境的地址调大一点

那里面的参数 咋个填写的呢! 感觉不是我理解的那样子个 一个是描述环境变量空间大小 ?一个是描述环境变量空间的偏移地址?

离线

#61 2020-03-15 21:36:15

jiangming1399
会员
注册时间: 2018-06-14
累计积分: 112

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

4.5s进Kernel,7秒到命令行是我的极限了……

[0.000000 0.000000]
[0.000567 0.000567] U-Boot SPL 2019.04 (Mar 15 2020 - 20:25:30 +0800)
[0.004723 0.004156] DRAM: 32 MiB
[0.016690 0.011967] SPL: Unsupported Boot Device!
[0.002319 0.002319] Trying to boot from sunxi SPI
[0.345268 0.342949]
[0.345360 0.000092]
[0.345387 0.000027] U-Boot 2019.04 (Mar 15 2020 - 20:25:30 +0800) Allwinner Technology
[0.351057 0.005670]
[0.351088 0.000031] CPU:   Allwinner F Series (SUNIV)
[0.354100 0.003011] Model: Lotlab ACT Monitor
[0.357005 0.002906] DRAM:  32 MiB
[0.879050 0.522044] Setting up a 480x272 lcd console (overscan 0x0)
[0.967089 0.088039] In:    serial
[0.968047 0.000958] Out:   vga
[0.969033 0.000986] Err:   vga
[0.971987 0.002954] Hit any key to stop autoboot:  0
[0.980985 0.008999] SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
[0.991056 0.010071] device 0 offset 0x3c000, size 0x4000
[1.015056 0.024000] SF: 16384 bytes @ 0x3c000 Read: OK
[1.019068 0.004012] device 0 offset 0x40000, size 0x240000
[3.719108 2.700040] SF: 2359296 bytes @ 0x40000 Read: OK
[3.724043 0.004935] ## Flattened Device Tree blob at 80c00000
[3.728991 0.004948]    Booting using the fdt blob at 0x80c00000
[3.735000 0.006009]    Loading Device Tree to 80eab000, end 80eb01a2 ... OK
[3.746073 0.011072]
[3.746195 0.000122] Starting kernel ...
[3.748125 0.001930]
[4.503158 0.755033] [    0.000000] Booting Linux on physical CPU 0x0
[4.508012 0.004854] [    0.000000] Linux version 5.2.4 (jim@jim-pc) (gcc version 8.3.0 (Buildroot 2020.02)) #5 Sun Mar 15 20:14:37 CST 2020
[4.518121 0.010109] [    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[4.525092 0.006971] [    0.000000] CPU: VIVT data cache, VIVT instruction cache
[4.530318 0.005226] [    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[4.535147 0.004828] [    0.000000] Memory policy: Data cache writeback
[4.540014 0.004868] [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[4.546372 0.006358] [    0.000000] Kernel command line: panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=squashfs init=/sbin/mnt_overlay
[4.557096 0.010724] [    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[4.563426 0.006330] [    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[4.570290 0.006864] [    0.000000] Memory: 25868K/32768K available (4096K kernel code, 159K rwdata, 532K rodata, 1024K init, 205K bss, 6900K reserved, 0K cma-reserved)
[4.583270 0.012980] [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[4.589105 0.005835] [    0.000000] random: get_random_bytes called from 0xc0600a84 with crng_init=0
[4.596064 0.006959] [    0.000046] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[4.604088 0.008024] [    0.000101] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[4.613078 0.008990] [    0.000568] Console: colour dummy device 80x30
[4.617318 0.004241] [    0.001027] printk: console [tty0] enabled
[4.621344 0.004025] [    0.001138] Calibrating delay loop... 334.23 BogoMIPS (lpj=1671168)
[4.628018 0.006675] [    0.050263] pid_max: default: 32768 minimum: 301
[4.632339 0.004321] [    0.050425] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[4.639180 0.006841] [    0.050484] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[4.646232 0.007052] [    0.051856] CPU: Testing write buffer coherency: ok
[4.651090 0.004858] [    0.054029] Setting up static identity map for 0x80100000 - 0x8010003c
[4.657220 0.006130] [    0.056102] devtmpfs: initialized
[4.661073 0.003853] [    0.070968] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[4.670980 0.009907] [    0.071114] futex hash table entries: 256 (order: -1, 3072 bytes)
[4.677037 0.006058] [    0.071270] pinctrl core: initialized pinctrl subsystem
[4.682108 0.005070] [    0.074046] NET: Registered protocol family 16
[4.686270 0.004162] [    0.075338] DMA: preallocated 256 KiB pool for atomic coherent allocations
[4.693215 0.006946] [    0.080370] cpuidle: using governor menu
[4.697250 0.004035] [    0.126249] clocksource: Switched to clocksource timer
[4.702239 0.004989] [    0.180323] NET: Registered protocol family 2
[4.707061 0.004822] [    0.183919] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[4.714263 0.007203] [    0.184071] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[4.721272 0.007009] [    0.184151] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[4.728051 0.006779] [    0.184219] TCP: Hash tables configured (established 1024 bind 1024)
[4.734209 0.006158] [    0.184535] UDP hash table entries: 256 (order: 0, 4096 bytes)
[4.740157 0.005948] [    0.184639] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[4.746239 0.006082] [    0.186047] NET: Registered protocol family 1
[4.751062 0.004823] [    0.190645] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[4.757162 0.006100] [    0.192058] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[4.763079 0.005917] [    0.192167] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[4.769082 0.006003] [    0.198473] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[4.775056 0.005974] [    0.250694] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[4.782225 0.007169] [    0.252818] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[4.793005 0.010780] [    0.257108] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[4.801214 0.008209] [    0.344204] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[4.807384 0.006171] [    0.382288] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[4.816277 0.008893] [    0.695683] printk: console [ttyS0] enabled
[4.828065 0.011788] [    0.707818] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[4.850157 0.022091] [    0.729106] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[4.872073 0.021917] [    0.750949] m25p80 spi0.0: found s25fl064k, expected w25q64
[4.877286 0.005213] [    0.756747] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[4.882336 0.005050] [    0.761652] 5 fixed-partitions partitions found on MTD device spi0.0
[4.889007 0.006670] [    0.768112] Creating 5 MTD partitions on "spi0.0":
[4.893381 0.004374] [    0.772955] 0x000000000000-0x00000003c000 : "u-boot"
[4.907049 0.013668] [    0.786887] 0x00000003c000-0x000000040000 : "dtb"
[4.921066 0.014017] [    0.800637] 0x000000040000-0x000000280000 : "kernel"
[4.934068 0.013002] [    0.813192] 0x000000280000-0x000000780000 : "rootfs"
[4.948041 0.013973] [    0.827617] 0x000000780000-0x000000800000 : "overlay"
[4.968011 0.019970] [    0.847169] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
[4.980047 0.012037] [    0.859628] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[4.990011 0.009964] [    0.869284] Initializing XFRM netlink socket
[4.994210 0.004199] [    0.873754] NET: Registered protocol family 17
[5.001047 0.006837] [    0.880207] NET: Registered protocol family 15
[5.016096 0.015049] [    0.894942] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[5.031058 0.014961] [    0.910067] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[5.040995 0.009937] [    0.920745] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc05308a0)
[5.052203 0.011209] [    0.931292] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc052f508)
[5.060031 0.007827] [    0.939156] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[5.066326 0.006295] [    0.945803] [drm] No driver support for vblank timestamp query.
[5.075135 0.008809] [    0.954805] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[5.092130 0.016994] [    0.970946] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device
[5.100040 0.007910] [    0.979521] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[5.116049 0.016008] [    0.995243] using random self ethernet address
[5.120280 0.004231] [    0.999893] using random host ethernet address
[5.132252 0.011971] [    1.011061] usb0: HOST MAC 6e:38:35:96:dc:b3
[5.136162 0.003910] [    1.015513] usb0: MAC 3a:97:0e:a2:12:d4
[5.140116 0.003954] [    1.019570] using random self ethernet address
[5.145041 0.004925] [    1.024066] using random host ethernet address
[5.149205 0.004164] [    1.028785] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[5.156180 0.006975] [    1.035453] g_ether gadget: g_ether ready
[5.163033 0.006853] [    1.042700] vcc3v3: disabling
[5.176095 0.013062] [    1.054986] random: fast init done
[5.181042 0.004947] [    1.060490] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[5.194026 0.012984] [    1.073359] devtmpfs: mounted
[5.201013 0.006987] [    1.080565] Freeing unused kernel memory: 1024K
[5.206109 0.005095] [    1.085259] Run /sbin/mnt_overlay as init process
[5.381470 0.175361] [    1.260258] random: crng init done
[5.779200 0.397730] [    1.658367] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
[5.883472 0.104272] [    1.762622] overlayfs: upper fs does not support tmpfile.
[5.888996 0.005524] [    1.768214] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
[6.116461 0.227465] Starting syslogd: OK
[6.150147 0.033685] Starting klogd: OK
[6.186171 0.036024] Running sysctl: OK
[6.339748 0.153577] Saving random seed: OK
[6.400528 0.060780] Starting network: OK
[6.590488 0.189960] Starting udhcpd: OK
[6.631476 0.040988] Starting dropbear sshd: OK
[6.852184 0.220708]
[6.852304 0.000120] Welcome to Buildroot
[6.854232 0.001928] buildroot login:

离线

#62 2020-03-15 23:24:56

达克罗德
会员
注册时间: 2018-04-10
累计积分: 938

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

jiangming1399 说:

4.5s进Kernel,7秒到命令行是我的极限了……

[0.000000 0.000000]
[0.000567 0.000567] U-Boot SPL 2019.04 (Mar 15 2020 - 20:25:30 +0800)
[0.004723 0.004156] DRAM: 32 MiB
[0.016690 0.011967] SPL: Unsupported Boot Device!
[0.002319 0.002319] Trying to boot from sunxi SPI
[0.345268 0.342949]
[0.345360 0.000092]
[0.345387 0.000027] U-Boot 2019.04 (Mar 15 2020 - 20:25:30 +0800) Allwinner Technology
[0.351057 0.005670]
[0.351088 0.000031] CPU:   Allwinner F Series (SUNIV)
[0.354100 0.003011] Model: Lotlab ACT Monitor
[0.357005 0.002906] DRAM:  32 MiB
[0.879050 0.522044] Setting up a 480x272 lcd console (overscan 0x0)
[0.967089 0.088039] In:    serial
[0.968047 0.000958] Out:   vga
[0.969033 0.000986] Err:   vga
[0.971987 0.002954] Hit any key to stop autoboot:  0
[0.980985 0.008999] SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
[0.991056 0.010071] device 0 offset 0x3c000, size 0x4000
[1.015056 0.024000] SF: 16384 bytes @ 0x3c000 Read: OK
[1.019068 0.004012] device 0 offset 0x40000, size 0x240000
[3.719108 2.700040] SF: 2359296 bytes @ 0x40000 Read: OK
[3.724043 0.004935] ## Flattened Device Tree blob at 80c00000
[3.728991 0.004948]    Booting using the fdt blob at 0x80c00000
[3.735000 0.006009]    Loading Device Tree to 80eab000, end 80eb01a2 ... OK
[3.746073 0.011072]
[3.746195 0.000122] Starting kernel ...
[3.748125 0.001930]
[4.503158 0.755033] [    0.000000] Booting Linux on physical CPU 0x0
[4.508012 0.004854] [    0.000000] Linux version 5.2.4 (jim@jim-pc) (gcc version 8.3.0 (Buildroot 2020.02)) #5 Sun Mar 15 20:14:37 CST 2020
[4.518121 0.010109] [    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[4.525092 0.006971] [    0.000000] CPU: VIVT data cache, VIVT instruction cache
[4.530318 0.005226] [    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[4.535147 0.004828] [    0.000000] Memory policy: Data cache writeback
[4.540014 0.004868] [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[4.546372 0.006358] [    0.000000] Kernel command line: panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=squashfs init=/sbin/mnt_overlay
[4.557096 0.010724] [    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[4.563426 0.006330] [    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[4.570290 0.006864] [    0.000000] Memory: 25868K/32768K available (4096K kernel code, 159K rwdata, 532K rodata, 1024K init, 205K bss, 6900K reserved, 0K cma-reserved)
[4.583270 0.012980] [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[4.589105 0.005835] [    0.000000] random: get_random_bytes called from 0xc0600a84 with crng_init=0
[4.596064 0.006959] [    0.000046] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[4.604088 0.008024] [    0.000101] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[4.613078 0.008990] [    0.000568] Console: colour dummy device 80x30
[4.617318 0.004241] [    0.001027] printk: console [tty0] enabled
[4.621344 0.004025] [    0.001138] Calibrating delay loop... 334.23 BogoMIPS (lpj=1671168)
[4.628018 0.006675] [    0.050263] pid_max: default: 32768 minimum: 301
[4.632339 0.004321] [    0.050425] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[4.639180 0.006841] [    0.050484] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[4.646232 0.007052] [    0.051856] CPU: Testing write buffer coherency: ok
[4.651090 0.004858] [    0.054029] Setting up static identity map for 0x80100000 - 0x8010003c
[4.657220 0.006130] [    0.056102] devtmpfs: initialized
[4.661073 0.003853] [    0.070968] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[4.670980 0.009907] [    0.071114] futex hash table entries: 256 (order: -1, 3072 bytes)
[4.677037 0.006058] [    0.071270] pinctrl core: initialized pinctrl subsystem
[4.682108 0.005070] [    0.074046] NET: Registered protocol family 16
[4.686270 0.004162] [    0.075338] DMA: preallocated 256 KiB pool for atomic coherent allocations
[4.693215 0.006946] [    0.080370] cpuidle: using governor menu
[4.697250 0.004035] [    0.126249] clocksource: Switched to clocksource timer
[4.702239 0.004989] [    0.180323] NET: Registered protocol family 2
[4.707061 0.004822] [    0.183919] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[4.714263 0.007203] [    0.184071] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[4.721272 0.007009] [    0.184151] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[4.728051 0.006779] [    0.184219] TCP: Hash tables configured (established 1024 bind 1024)
[4.734209 0.006158] [    0.184535] UDP hash table entries: 256 (order: 0, 4096 bytes)
[4.740157 0.005948] [    0.184639] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[4.746239 0.006082] [    0.186047] NET: Registered protocol family 1
[4.751062 0.004823] [    0.190645] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[4.757162 0.006100] [    0.192058] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[4.763079 0.005917] [    0.192167] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[4.769082 0.006003] [    0.198473] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[4.775056 0.005974] [    0.250694] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[4.782225 0.007169] [    0.252818] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[4.793005 0.010780] [    0.257108] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[4.801214 0.008209] [    0.344204] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[4.807384 0.006171] [    0.382288] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[4.816277 0.008893] [    0.695683] printk: console [ttyS0] enabled
[4.828065 0.011788] [    0.707818] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[4.850157 0.022091] [    0.729106] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[4.872073 0.021917] [    0.750949] m25p80 spi0.0: found s25fl064k, expected w25q64
[4.877286 0.005213] [    0.756747] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[4.882336 0.005050] [    0.761652] 5 fixed-partitions partitions found on MTD device spi0.0
[4.889007 0.006670] [    0.768112] Creating 5 MTD partitions on "spi0.0":
[4.893381 0.004374] [    0.772955] 0x000000000000-0x00000003c000 : "u-boot"
[4.907049 0.013668] [    0.786887] 0x00000003c000-0x000000040000 : "dtb"
[4.921066 0.014017] [    0.800637] 0x000000040000-0x000000280000 : "kernel"
[4.934068 0.013002] [    0.813192] 0x000000280000-0x000000780000 : "rootfs"
[4.948041 0.013973] [    0.827617] 0x000000780000-0x000000800000 : "overlay"
[4.968011 0.019970] [    0.847169] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
[4.980047 0.012037] [    0.859628] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[4.990011 0.009964] [    0.869284] Initializing XFRM netlink socket
[4.994210 0.004199] [    0.873754] NET: Registered protocol family 17
[5.001047 0.006837] [    0.880207] NET: Registered protocol family 15
[5.016096 0.015049] [    0.894942] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[5.031058 0.014961] [    0.910067] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[5.040995 0.009937] [    0.920745] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc05308a0)
[5.052203 0.011209] [    0.931292] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc052f508)
[5.060031 0.007827] [    0.939156] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[5.066326 0.006295] [    0.945803] [drm] No driver support for vblank timestamp query.
[5.075135 0.008809] [    0.954805] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[5.092130 0.016994] [    0.970946] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device
[5.100040 0.007910] [    0.979521] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[5.116049 0.016008] [    0.995243] using random self ethernet address
[5.120280 0.004231] [    0.999893] using random host ethernet address
[5.132252 0.011971] [    1.011061] usb0: HOST MAC 6e:38:35:96:dc:b3
[5.136162 0.003910] [    1.015513] usb0: MAC 3a:97:0e:a2:12:d4
[5.140116 0.003954] [    1.019570] using random self ethernet address
[5.145041 0.004925] [    1.024066] using random host ethernet address
[5.149205 0.004164] [    1.028785] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[5.156180 0.006975] [    1.035453] g_ether gadget: g_ether ready
[5.163033 0.006853] [    1.042700] vcc3v3: disabling
[5.176095 0.013062] [    1.054986] random: fast init done
[5.181042 0.004947] [    1.060490] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[5.194026 0.012984] [    1.073359] devtmpfs: mounted
[5.201013 0.006987] [    1.080565] Freeing unused kernel memory: 1024K
[5.206109 0.005095] [    1.085259] Run /sbin/mnt_overlay as init process
[5.381470 0.175361] [    1.260258] random: crng init done
[5.779200 0.397730] [    1.658367] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
[5.883472 0.104272] [    1.762622] overlayfs: upper fs does not support tmpfile.
[5.888996 0.005524] [    1.768214] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
[6.116461 0.227465] Starting syslogd: OK
[6.150147 0.033685] Starting klogd: OK
[6.186171 0.036024] Running sysctl: OK
[6.339748 0.153577] Saving random seed: OK
[6.400528 0.060780] Starting network: OK
[6.590488 0.189960] Starting udhcpd: OK
[6.631476 0.040988] Starting dropbear sshd: OK
[6.852184 0.220708]
[6.852304 0.000120] Welcome to Buildroot
[6.854232 0.001928] buildroot login:

你是怎么让Uboot和kernel统一时间打印的?

离线

#63 2020-03-16 08:42:22

jiangming1399
会员
注册时间: 2018-06-14
累计积分: 112

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

达克罗德 说:

你是怎么让Uboot和kernel统一时间打印的?

用grabserial

离线

#64 2020-03-16 09:14:48

超级萌新
会员
注册时间: 2018-05-04
累计积分: 406

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

jiangming1399 说:

用grabserial

刚试了一下这工具不错,

1. 装库:

D:\Python\Python37\python.exe -m pip install pyserial

2. 克隆:

3. 安装:

D:\Python\Python37\python.exe setup.py install

4. 运行:

D:\Python\Python37\python.exe grabserial

参考: https://www.cnblogs.com/zqb-all/p/5906621.html

离线

#65 2020-04-09 18:28:54

kekemuyu
会员
注册时间: 2018-12-13
累计积分: 568

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

颜水花生 说:

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

最终优化配置可以分享一下吗?

离线

#66 2020-04-09 18:30:28

kekemuyu
会员
注册时间: 2018-12-13
累计积分: 568

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

我用你的uboot.config配置,编译出现错误,是需要修改uboot代码吗?

board/sunxi/built-in.o: In function `setup_environment':
/root/u-boot/board/sunxi/board.c:699: undefined reference to `eth_env_set_enetaddr'
board/sunxi/built-in.o: In function `board_mmc_init':
/root/u-boot/board/sunxi/board.c:488: undefined reference to `sunxi_mmc_init'
cmd/built-in.o: In function `label_boot':
/root/u-boot/cmd/pxe.c:796: undefined reference to `do_bootm'
common/built-in.o: In function `usb_kbd_remove':
/root/u-boot/common/usb_kbd.c:625: undefined reference to `stdio_deregister_dev'
arm-linux-gnueabi-ld.bfd: BFD (Linaro_Binutils-2017.11) 2.28.2.20170706 assertion fail /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabi/snapshots/binutils-gdb.git~users~linaro~binutils-2_28-branch/bfd/elf32-arm.c:9514
arm-linux-gnueabi-ld.bfd: BFD (Linaro_Binutils-2017.11) 2.28.2.20170706 assertion fail /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabi/snapshots/binutils-gdb.git~users~linaro~binutils-2_28-branch/bfd/elf32-arm.c:9514
arm-linux-gnueabi-ld.bfd: BFD (Linaro_Binutils-2017.11) 2.28.2.20170706 assertion fail /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabi/snapshots/binutils-gdb.git~users~linaro~binutils-2_28-branch/bfd/elf32-arm.c:9514
arm-linux-gnueabi-ld.bfd: BFD (Linaro_Binutils-2017.11) 2.28.2.20170706 assertion fail /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabi/snapshots/binutils-gdb.git~users~linaro~binutils-2_28-branch/bfd/elf32-arm.c:9514
Makefile:1261: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1

最近编辑记录 kekemuyu (2020-04-09 18:31:04)

离线

#67 2020-04-12 21:46:10

MK-2020
会员
注册时间: 2020-01-02
累计积分: 50

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

U-BOOT是怎么删减到122K的?我去掉很多没用的都还有317K。

离线

#68 2020-04-12 22:32:04

达克罗德
会员
注册时间: 2018-04-10
累计积分: 938

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

[3.719108 2.700040] SF: 2359296 bytes @ 0x40000 Read: OK

这个似乎太慢了,SPI读kernel,2MB用了2.7秒。SPI速度也不该这么慢。 我用SDNAND这里只花了400ms.

离线

#69 2020-04-16 19:14:08

liuchangyin
会员
注册时间: 2020-03-17
累计积分: 203

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

颜水花生 说:

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

优化的速度很快了

离线

#70 2020-04-17 10:22:54

asdfwyg
会员
注册时间: 2020-04-10
累计积分: 21

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

没啥好办法,就是把不必要的驱动都去掉,比如你不用usb就禁用掉,还有音频之类的

离线

#71 2020-04-17 20:37:40

jiangming1399
会员
注册时间: 2018-06-14
累计积分: 112

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

之前SPI频率没设置好,导致用默认的1MHZ读取,所以才那么慢……这次改了之后,启动到shell只要4.72秒了

[0.000000 0.000000] 
[0.000081 0.000081] U-Boot SPL 2019.04 (Apr 17 2020 - 20:28:57 +0800)
[0.004955 0.004874] DRAM: 32 MiB
[0.015868 0.010913] SPL: Unsupported Boot Device!
[0.018527 0.002659] Trying to boot from sunxi SPI
[0.360361 0.341834] 
[0.360445 0.000083] 
[0.360477 0.000033] U-Boot 2019.04 (Apr 17 2020 - 20:28:57 +0800) Allwinner Technology
[0.365895 0.005418] 
[0.365914 0.000019] CPU:   Allwinner F Series (SUNIV)
[0.368937 0.003022] Model: Lotlab ACT Monitor
[0.372805 0.003869] DRAM:  32 MiB
[0.894012 0.521207] Setting up a 480x272 lcd console (overscan 0x0)
[0.981311 0.087299] In:    serial
[0.981699 0.000388] Out:   vga
[0.981949 0.000250] Err:   vga
[0.985814 0.003865] Hit any key to stop autoboot:  0 
[0.994699 0.008885] SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
[1.004777 0.010079] device 0 offset 0x3c000, size 0x4000
[1.014091 0.009314] SF: 16384 bytes @ 0x3c000 Read: OK
[1.018516 0.004424] device 0 offset 0x40000, size 0x240000
[1.591478 0.572962] SF: 2359296 bytes @ 0x40000 Read: OK
[1.595648 0.004170] ## Flattened Device Tree blob at 80c00000
[1.599776 0.004128]    Booting using the fdt blob at 0x80c00000
[1.604728 0.004951]    Loading Device Tree to 80eab000, end 80eb02de ... OK
[1.618777 0.014050] 
[1.618844 0.000067] Starting kernel ...
[1.619115 0.000271] 
[2.350141 0.731026] [    0.000000] Booting Linux on physical CPU 0x0
[2.353339 0.003198] [    0.000000] Linux version 5.2.4 (jim@jim-pc) (gcc version 8.3.0 (Buildroot 2020.02)) #1 Fri Apr 17 16:03:10 CST 2020
[2.364343 0.011004] [    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[2.370341 0.005997] [    0.000000] CPU: VIVT data cache, VIVT instruction cache
[2.375832 0.005491] [    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[2.381069 0.005237] [    0.000000] Memory policy: Data cache writeback
[2.386379 0.005310] [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[2.392483 0.006103] [    0.000000] Kernel command line: panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=squashfs init=/sbin/mnt_overlay
[2.403266 0.010783] [    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[2.409246 0.005980] [    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[2.414662 0.005415] [    0.000000] Memory: 25868K/32768K available (4096K kernel code, 159K rwdata, 532K rodata, 1024K init, 205K bss, 6900K reserved, 0K cma-reserved)
[2.428816 0.014154] [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[2.434347 0.005532] [    0.000000] random: get_random_bytes called from 0xc0600a84 with crng_init=0
[2.442313 0.007966] [    0.000046] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[2.448554 0.006240] [    0.000103] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[2.459003 0.010449] [    0.000530] Console: colour dummy device 80x30
[2.462107 0.003104] [    0.000961] printk: console [tty0] enabled
[2.467560 0.005453] [    0.001063] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[2.473369 0.005809] [    0.050274] pid_max: default: 32768 minimum: 301
[2.478546 0.005177] [    0.050431] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[2.484616 0.006070] [    0.050488] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[2.492521 0.007905] [    0.051836] CPU: Testing write buffer coherency: ok
[2.495973 0.003452] [    0.054011] Setting up static identity map for 0x80100000 - 0x8010003c
[2.503781 0.007807] [    0.056039] devtmpfs: initialized
[2.506730 0.002949] [    0.070914] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[2.515540 0.008811] [    0.071055] futex hash table entries: 256 (order: -1, 3072 bytes)
[2.523230 0.007690] [    0.071200] pinctrl core: initialized pinctrl subsystem
[2.528665 0.005435] [    0.073526] NET: Registered protocol family 16
[2.532079 0.003413] [    0.074841] DMA: preallocated 256 KiB pool for atomic coherent allocations
[2.539894 0.007816] [    0.079693] cpuidle: using governor menu
[2.543061 0.003167] [    0.125078] clocksource: Switched to clocksource timer
[2.548722 0.005660] [    0.178353] NET: Registered protocol family 2
[2.551851 0.003129] [    0.181941] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[2.559968 0.008117] [    0.182092] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[2.567875 0.007907] [    0.182175] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[2.573756 0.005881] [    0.182240] TCP: Hash tables configured (established 1024 bind 1024)
[2.579702 0.005946] [    0.182553] UDP hash table entries: 256 (order: 0, 4096 bytes)
[2.585088 0.005385] [    0.182655] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[2.592948 0.007861] [    0.184044] NET: Registered protocol family 1
[2.596119 0.003170] [    0.188572] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[2.601933 0.005814] [    0.190016] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[2.609621 0.007689] [    0.190123] jffs2: version 2.2. (NAND)  2001-2006 Red Hat, Inc.
[2.615380 0.005759] [    0.196256] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[2.621007 0.005626] [    0.247807] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[2.627030 0.006023] [    0.248568] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[2.638022 0.010992] [    0.251323] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[2.646965 0.008943] [    0.335831] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[2.652162 0.005197] [    0.372278] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[2.662772 0.010610] [    0.685537] printk: console [ttyS0] enabled
[2.673443 0.010671] [    0.696059] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[2.693179 0.019736] [    0.715625] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[2.713386 0.020207] [    0.735987] m25p80 spi0.0: found s25fl064k, expected w25q64
[2.719090 0.005704] [    0.741680] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[2.722610 0.003520] [    0.746664] 5 fixed-partitions partitions found on MTD device spi0.0
[2.730417 0.007807] [    0.753058] Creating 5 MTD partitions on "spi0.0":
[2.734192 0.003775] [    0.757955] 0x000000000000-0x00000003c000 : "u-boot"
[2.749183 0.014991] [    0.771745] 0x00000003c000-0x000000040000 : "dtb"
[2.763125 0.013942] [    0.785552] 0x000000040000-0x000000280000 : "kernel"
[2.777174 0.014049] [    0.799569] 0x000000280000-0x000000780000 : "rootfs"
[2.793167 0.015993] [    0.815553] 0x000000780000-0x000000800000 : "overlay"
[2.810735 0.017568] [    0.833326] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
[2.823409 0.012674] [    0.845894] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[2.834450 0.011041] [    0.857047] Initializing XFRM netlink socket
[2.837862 0.003412] [    0.861570] NET: Registered protocol family 17
[2.845357 0.007494] [    0.868002] NET: Registered protocol family 15
[2.860150 0.014793] [    0.882686] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[2.875217 0.015067] [    0.897785] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[2.884561 0.009344] [    0.908447] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc05308a0)
[2.896362 0.011801] [    0.919005] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc052f508)
[2.902674 0.006312] [    0.926870] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[2.910596 0.007922] [    0.933515] [drm] No driver support for vblank timestamp query.
[2.919911 0.009315] [    0.942445] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[2.935894 0.015983] [    0.958518] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device
[2.943292 0.007398] [    0.967079] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[2.960226 0.016934] [    0.982810] using random self ethernet address
[2.963835 0.003608] [    0.987453] using random host ethernet address
[2.976130 0.012295] [    0.998613] usb0: HOST MAC 5e:b0:50:1e:38:d0
[2.979740 0.003609] [    1.003061] usb0: MAC 36:03:f5:46:dc:54
[2.983214 0.003474] [    1.007124] using random self ethernet address
[2.988200 0.004986] [    1.011616] using random host ethernet address
[2.993549 0.005349] [    1.016334] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[2.999682 0.006133] [    1.022994] g_ether gadget: g_ether ready
[3.007613 0.007931] [    1.030254] vcc3v3: disabling
[3.018141 0.010529] [    1.040721] random: fast init done
[3.023640 0.005499] [    1.046263] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[3.041610 0.017971] [    1.064226] devtmpfs: mounted
[3.048696 0.007086] [    1.071328] Freeing unused kernel memory: 1024K
[3.052474 0.003778] [    1.076110] Run /sbin/mnt_overlay as init process
[3.189843 0.137369] [    1.212072] random: crng init done
[3.577372 0.387528] [    1.599975] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
[3.709996 0.132624] [    1.732544] overlayfs: upper fs does not support tmpfile.
[3.713619 0.003624] [    1.738142] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
[3.954268 0.240649] Starting syslogd: OK
[3.989470 0.035202] Starting klogd: OK
[4.032711 0.043241] Running sysctl: OK
[4.217460 0.184750] Initializing random number generator: OK
[4.229857 0.012396] Saving random seed: OK
[4.278125 0.048269] Starting network: OK
[4.469963 0.191837] Starting udhcpd: OK
[4.510248 0.040286] Starting dropbear sshd: OK
[4.724422 0.214173] 
[4.724488 0.000067] Welcome to Buildroot
[4.724971 0.000482] buildroot login: 

离线

#72 2020-04-17 20:42:25

歌以咏志
会员
注册时间: 2019-09-21
累计积分: 165

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

jiangming1399 说:

之前SPI频率没设置好,导致用默认的1MHZ读取,所以才那么慢……这次改了之后,启动到shell只要4.72秒了

在哪里设置呢? u-boot 吗?

离线

#73 2020-04-17 22:10:31

jiangming1399
会员
注册时间: 2018-06-14
累计积分: 112

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

歌以咏志 说:

在哪里设置呢? u-boot 吗?

uboot设备树

离线

#74 2020-04-17 22:25:28

smartcar
会员
注册时间: 2018-02-19
累计积分: 674

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

jiangming1399 说:

uboot设备树

有道理,默认是1Mbps那就尴尬了,怪不得那么慢。而且还是1bit的spi

最近编辑记录 smartcar (2020-04-17 22:25:51)

离线

#75 2020-04-24 10:27:55

ytm2020
会员
注册时间: 2020-04-24
累计积分: 5

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

这一个的u-boot 与 linux 版本是多少?

离线

#76 2020-04-24 10:35:32

龙折翼
会员
注册时间: 2020-04-24
累计积分: 9

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

这个spi的默认频率是1M,在spi驱动里面可以设置频率,设置高一些速度就快多了

离线

#77 2020-05-03 14:47:26

拉轰的脚踏车
会员
注册时间: 2020-03-20
累计积分: 103

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

jiangming1399 说:

之前SPI频率没设置好,导致用默认的1MHZ读取,所以才那么慢……这次改了之后,启动到shell只要4.72秒了

请教一下,
https://github.com/Lichee-Pi/u-boot/blob/nano-v2018.01/arch/arm/dts/suniv-f1c100s-licheepi-nano.dts

&spi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&spi0_pins_a>;
	status = "okay";

	flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "winbond,w25q128", "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <40000000>;
	};
};

这个 spi 速率明明是 40Mhz, 为什么说是 1Mhz 呢?

离线

#78 2020-05-07 11:36:29

麻瓜不带皮
会员
注册时间: 2020-05-07
累计积分: 2

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

串口输出波特率提高,也可以快一点(应该)

离线

#79 2020-06-03 11:04:51

wxw_1983
会员
注册时间: 2020-04-30
累计积分: 8

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

正在优化代码,看下能不能把空间压小

离线

#80 2020-06-05 10:02:50

qq9417058
会员
注册时间: 2020-01-03
累计积分: 7

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

根据官方文档一直没搞定

离线

#81 2020-06-05 10:47:08

kingwho
会员
注册时间: 2020-01-05
累计积分: 14
个人网站

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

怎么减少启动时间,我不清楚,不过,板子很漂亮,哈哈~~~

离线

#82 2020-08-12 19:35:56

jkl
会员
注册时间: 2019-11-18
累计积分: 111

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

ippen 说:

编译出来的uboot体积太大了,使用空间和env环境的地址冲突了,将env环境的地址调大一点

请问一下,这个问题您解决了吗?修改了哪里?

离线

#83 2020-08-12 20:02:03

jkl
会员
注册时间: 2019-11-18
累计积分: 111

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

1066950103 说:

那里面的参数 咋个填写的呢! 感觉不是我理解的那样子个 一个是描述环境变量空间大小 ?一个是描述环境变量空间的偏移地址?

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

离线

#84 2020-08-12 20:13:08

justkidding
会员
注册时间: 2020-07-28
累计积分: 8

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

正好学习需要用到系统裁剪和移植,有机会好好取经了。

离线

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

颜水花生
会员
注册时间: 2019-11-20
累计积分: 51

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

jkl 说:

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


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

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

离线

#86 2020-09-08 17:30:25

jkl
会员
注册时间: 2019-11-18
累计积分: 111

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

达克罗德 说:
netwp 说:

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

A33+EMMC也是2秒多,不深度优化是不行的

你好,这个A33+emmc两秒多是怎么达到的,我现在要七秒钟左右!!!

离线

页脚

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