您尚未登录。

#1 Re: 全志 SOC » debian下ping出问题了 » 2021-09-30 14:33:56

DHCP域名解析有问题,看看系统DHCP是不是没起来

#3 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-08-13 17:50:22

jkl 说:

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


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

#4 Re: 全志 SOC » 请教**F1C100S**--- ttyS1\ttyS2----串口配置完打开正常,发送数据接收不到问题 » 2020-08-12 16:37:16

这次我每个空格都对过了,发现我的配置  这个不对,我的是ttyS1 pinctrl-1,应该都改成0 pinctrl-0
ttyS1,数据发送正常了
但是cat中断显示还是不对,不显示名称

# cat /proc/interrupts
           CPU0
 16:      24277  sun4i_irq  13 Edge      timer@1c20c00
 17:      19131  sun4i_irq   7 Edge      mv64xxx_i2c
 18:     649811  sun4i_irq  10 Edge      sun6i-spi
 19:        388  sun4i_irq  29 Edge      1c0c000.lcd-controller
 20:       9839  sun4i_irq  23 Edge      sunxi-mmc
 24:      19517  sun4i_irq   1 Edge      ttyS0
 25:         82  sun4i_irq   2 Edge
 64:        946  sunxi_pio_edge  35 Edge      gt911
Err:          0
                        uart0_pins_a: uart0@0 {
                                pins = "PE0", "PE1";
                                function = "uart0";
                        };

                        uart1_pins_a: uart1@0 {
                                pins = "PA2", "PA3";
                                function = "uart1";
                                bias-pull-up;
                        };

                        uart2_pins_a: uart2@0 {
                                pins = "PE7", "PE8";
                                function = "uart2";
                                bias-pull-up;
                        };
&uart0 {
        pinctrl-0 = <&uart0_pins_a>;
        pinctrl-names = "default";
        status = "okay";
};

&uart1 {
        pinctrl-0 = <&uart1_pins_a>;
        pinctrl-names = "default";
        status = "okay";
};

&uart2 {
        pinctrl-0 = <&uart2_pins_a>;
        pinctrl-names = "default";
        status = "okay";
};

#5 Re: 全志 SOC » 请教**F1C100S**--- ttyS1\ttyS2----串口配置完打开正常,发送数据接收不到问题 » 2020-08-12 16:17:23

哇酷小二 说:

确实挺奇怪的,你参考一下这个帖子:


终于把V3s三个串口全部榨干, 控制台只能用 ssh 了, 泪崩 (dropbear大法好,还能秘钥登录)
http://whycan.cn/t_1183.html#p5971
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)


好的,谢谢,我瞅瞅

#6 Re: 全志 SOC » 请教**F1C100S**--- ttyS1\ttyS2----串口配置完打开正常,发送数据接收不到问题 » 2020-08-12 16:14:01

哇酷小二 说:

大佬

大佬可以分享下您的DTS配置吗? 我对比看看有没有哪里不对的,感谢

#7 Re: 全志 SOC » 请教**F1C100S**--- ttyS1\ttyS2----串口配置完打开正常,发送数据接收不到问题 » 2020-08-12 16:11:52


那就奇怪了呀,我的dts配置也是没问题的呀,配置完编译之后我把dtb和zImage全部烧录了一遍,并且我的串口引脚没被占用,都是悬空的,打开串口不就配置DTS就可以的吗?还有别处要改不?

#8 Re: 全志 SOC » 请教**F1C100S**--- ttyS1\ttyS2----串口配置完打开正常,发送数据接收不到问题 » 2020-08-12 16:05:44

哇酷小二 说:

正常。

# echo uart-test > /dev/ttyS1
# echo uart-test > /dev/ttyS2

这样之后 cat /proc/interrupts 看串口中断次数有无增加。

您好,我试了下,发现ttyS0下面两个中断有增加,但是为什么没显示名字呀,难道配置还有问题?

# echo uart-test > /dev/ttyS1
# echo uart-test > /dev/ttyS1
# echo uart-test > /dev/ttyS1
# echo uart-test > /dev/ttyS1
# echo uart-test > /dev/ttyS1
# echo uart-test > /dev/ttyS1
# echo uart-test > /dev/ttyS2
# echo uart-test > /dev/ttyS2
# echo uart-test > /dev/ttyS2
# echo uart-test > /dev/ttyS2
# echo uart-test > /dev/ttyS2
# cat /proc/interrupts
           CPU0
 16:      42900  sun4i_irq  13 Edge      timer@1c20c00
 17:      13471  sun4i_irq   7 Edge      mv64xxx_i2c
 18:     628722  sun4i_irq  10 Edge      sun6i-spi
 19:        388  sun4i_irq  29 Edge      1c0c000.lcd-controller
 20:      17353  sun4i_irq  23 Edge      sunxi-mmc
 24:      10496  sun4i_irq   1 Edge      ttyS0
 25:         13  sun4i_irq   2 Edge
 26:         24  sun4i_irq   3 Edge
 64:        663  sunxi_pio_edge  35 Edge      gt911

#9 Re: 全志 SOC » 请教**F1C100S**--- ttyS1\ttyS2----串口配置完打开正常,发送数据接收不到问题 » 2020-08-12 15:52:26

哇酷小二 说:

linux启动log有没有显示 ttyS1/2正常?


您好,我的启动logo里面显示的是这样的,好像配置正常呀,你看下对吗?

[    0.290349] console [ttyS0] disabled
[    0.310569] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 24, base_baud = 6250000) is a 16550A
[    0.626305] console [ttyS0] enabled
[    0.652017] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 25, base_baud = 6250000) is a 16550A
[    0.682913] 1c25800.serial: ttyS2 at MMIO 0x1c25800 (irq = 26, base_baud = 6250000) is a 16550A

#10 全志 SOC » 请教**F1C100S**--- ttyS1\ttyS2----串口配置完打开正常,发送数据接收不到问题 » 2020-08-12 15:23:46

颜水花生
回复: 16

ttys0作为串口控制台,使用正常,应用程序调用ttyS0也正常, ttyS1\ttyS2应用程序打开正常,发数据没反应

下面是直接通过控制台发数据的测试,
ttyS1\ttyS2,接上CH340插上电脑,发送数据以后没任何反应,收不到任何数据,但是不报错,
ttyS0控制台发送数据以后,可以直接看到数据,发送成功!
ttyS3因为不存在,直接打开错误, ttyS1\ttyS2没报错,说明DTS配置没问题。
倒腾了一天没找到问题,希望各位大神不吝赐教,万分感谢!


    # echo uart-test > /dev/ttyS1
    # echo uart-test > /dev/ttyS2
    # echo uart-test > /dev/ttyS0
    uart-test
    # echo uart-test > /dev/ttyS3
    sh: write error: I/O error
这是配置以后的suniv.dtsi
uart0_pins_a: uart0 {
     pins = "PE0", "PE1";
     function = "uart0";
     bias-pull-up;
};

uart1_pins_a: uart1 {
     pins = "PA2", "PA3";
     function = "uart1";
     bias-pull-up;
};

uart2_pins_a: uart2 {
      pins = "PE7", "PE8";
      function = "uart2";
      bias-pull-up;
};
这是配置以后的suniv-f1c100s-licheepi-nano.dts
&uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
        status = "okay";
};

&uart1 {
        pinctrl-names = "default";
        pinctrl-1 = <&uart1_pins_a>;
        status = "okay";
};

&uart2 {
        pinctrl-names = "default";
        pinctrl-2 = <&uart2_pins_a>;
        status = "okay";
};
这是测试的应用程序,就做了简单的打开串口,发送数据
#include <fcntl.h>

int fd;

int uart_init()
{
       fd = open("/dev/ttyS1", O_RDWR | O_NOCTTY);
       struct termios oldtio = { 0 };
       struct termios newtio = { 0 };
       tcgetattr(fd, &oldtio);
       //设置波特率为115200
       newtio.c_cflag = B115200 | CS8 | CLOCAL | CREAD;
       newtio.c_iflag = 0; // IGNPAR | ICRNL
       newtio.c_oflag = 0;
       newtio.c_lflag = 0; // ICANON
       newtio.c_cc[VTIME] = 0;
       newtio.c_cc[VMIN] = 1;
       tcflush(fd, TCIOFLUSH);
       tcsetattr(fd, TCSANOW, &newtio);

       //设置为非阻塞模式,这个在读串口的时候会用到
       fcntl(fd, F_SETFL, O_NONBLOCK);

      return fd;
}

/* 功能:uart_send 串口数据发送函数
  * 参数:无
  * 返回值:int:-1 失败
  * 备注:---
  */
int uart_send(void)
{
    uint8_t buffer[4] = {0};
    buffer[0] = 'T';
    buffer[1] = 'X';
    buffer[2] = '\n';
    buffer[3] = '\n';
    int ret = write(fd, buffer, sizeof(buffer));

    return ret;
}

#11 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-02-14 16:51:41

netwp 说:

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

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

#13 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » AWTK win10 编译报错求助各位大神 g++: error: /EHsc: No such file or directory » 2020-02-10 14:51:50

颜水花生
回复: 2

根据官方文档,已经安装了如下软件

1  python(x64 版本>=2.7)
2  scons(版本>=3.0.0)
3  Visual Studio C++(版本>=2017)



进入win10 shell窗口输入命令 scons 编译报错 如下 、烦请各位大神看看啥情况,不胜感激 big_smile

    目录: E:\AWTK Projects\awtk-v1.3-SDK


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        2020/2/10     14:18                awtk
d-----        2020/2/10     14:14                awtk-examples
d-----        2020/2/10     14:34                awtk-linux-fb
d-----        2020/2/10     14:14                user_apps
-a----        2020/1/16     17:07            179 version.txt


PS E:\AWTK Projects\awtk-v1.3-SDK> cd awtk
PS E:\AWTK Projects\awtk-v1.3-SDK\awtk> scons
scons: Reading SConscript files ...
MACH=AMD64 ARCH=('32bit', 'WindowsPE') TARGET_ARCH=arm
TK_ROOT: E:\AWTK Projects\awtk-v1.3-SDK\awtk
scons: done reading SConscript files.
scons: Building targets ...
g++ -o 3rd\agge\agge\math.o -c -DWIN32 -D_WIN32 -DWINDOWS /EHsc -D_CONSOLE /DEBUG /Od /FS /Z7 -DWITH_64BIT_CPU -DTK_ROOT=\"E:\\AWTK Projects\\awtk-v1.3-SDK\\awtk\" -DSTBTT_STATIC -DSTB_IMAGE_STATIC -DWITH_STB_IMAGE -DWITH_SOCKET -DWITH_VGCANVAS -DWITH_UNICODE_BREAK -DWITH_DESKTOP_STYLE -DSDL2 -DHAS_STD_MALLOC -DWITH_SDL -DWITH_FS_RES -DHAS_STDIO -DHAVE_STDIO_H -DWITH_STB_FONT -DWITH_BITMAP_BGRA -DWITH_NANOVG_SOFT -DWITH_FB_BGR565=1 -DWITH_NANOVG_AGGE -D_WIN64 -DSDL_REAL_API -DSDL_HAPTIC_DISABLED -DSDL_SENSOR_DISABLED -DSDL_JOYSTICK_DISABLED -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_HAS_EXCEPTIONS=0 -D_HAS_ITERATOR_DEBUGGING=0 -D_ITERATOR_DEBUG_LEVEL=0 -D_SCL_SECURE=0-D_SECURE_SCL=0 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -I. -Isrc -I3rd -Isrc\ext_widgets -I3rd\pixman -I3rd\cairo -I3rd\bgfx\bgfx\include -I3rd\bgfx\bx\include -I3rd\bgfx\bimg\include -I3rd\agge -I3rd\agg\include -I3rd\nanovg -I3rd\nanovg\gl -I3rd\nanovg\base -I3rd\nanovg\agge -I3rd\nanovg\bgfx -I3rd\SDL\src -I3rd\SDL\include -I3rd\agge\src -I3rd\agge\include -I3rd\gpinyin\include -I3rd\libunibreak -I3rd\gtest\googletest -I3rd\gtest\googletest\include -Itools 3rd\agge\agge\math.cpp
g++: error: /EHsc: No such file or directory
g++: error: /DEBUG: No such file or directory
g++: error: /Od: No such file or directory
g++: error: /FS: No such file or directory
g++: error: /Z7: No such file or directory
g++: error: Projects\\awtk-v1.3-SDK\\awtk": No such file or directory
scons: *** [3rd\agge\agge\math.o] Error 1
scons: building terminated because of errors.
PS E:\AWTK Projects\awtk-v1.3-SDK\awtk>

请问各位大神这是啥情况呀?我电脑已经安装了gcc 和g++
命令行输入 g++ -v 可见如下 而且VS Studio2017也装的C++版本,编译LVGL都是正常的

PS E:\AWTK Projects\awtk-v1.3-SDK\awtk>
PS E:\AWTK Projects\awtk-v1.3-SDK\awtk> g++ -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
PS E:\AWTK Projects\awtk-v1.3-SDK\awtk>

#15 全志 SOC » 【花屏问题】主线Uboot启动显示LOGO,加载内核时候出现1S花屏问题!如何平滑过渡?请问各位大神如何解决?附上测试视频 » 2020-02-05 16:22:20

颜水花生
回复: 4
主线Uboot启动显示LOGO,加载内核时候出现1S花屏问题!请问各位大神如何解决?

使用的是荔枝派NANO,官网主线uboot,和主线linux内核

下面是我的logo打印

U-Boot SPL 2018.01-05679-g013ca457fd-dirty (Feb 05 2020 - 13:26:07)
DRAM: 64 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI


U-Boot 2018.01-05679-g013ca457fd-dirty (Feb 05 2020 - 13:26:07 +0800) Allwinner Technology

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

Setting up a 480x272 lcd console (overscan 0x0)
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 0x130000
SF: 1245184 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 version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #164 Wed Feb 5 01:42:34 CST 2020
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: fast init done
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: vt.global_cursor_default=0 console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[    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: 61212K/65536K available (2384K kernel code, 122K rwdata, 676K rodata, 276K init, 188K bss, 4324K reserved, 0K cma-reserved)
[    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]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (2386 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   ( 276 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 123 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 189 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.000043] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000095] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000544] Console: colour dummy device 80x30
[    0.000619] Calibrating delay loop... 393.21 BogoMIPS (lpj=1966080)
[    0.050178] pid_max: default: 32768 minimum: 301
[    0.050451] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050480] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.051343] CPU: Testing write buffer coherency: ok
[    0.052852] Setting up static identity map for 0x80008400 - 0x8000843c
[    0.054397] devtmpfs: initialized
[    0.058034] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.058078] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.058188] pinctrl core: initialized pinctrl subsystem
[    0.059192] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.070083] clocksource: Switched to clocksource timer
[    0.088837] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.097095] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.099127] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.099167] io scheduler noop registered (default)
[    0.105914] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.215630] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.219946] console [ttyS0] disabled
[    0.240135] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 24, base_baud = 6250000) is a 16550A
[    0.539248] console [ttyS0] enabled
[    0.550676] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.555439] 4 ofpart partitions found on MTD device spi0.0
[    0.560996] Creating 4 MTD partitions on "spi0.0":
[    0.565796] 0x000000000000-0x000000030000 : "u-boot"
[    0.572520] 0x000000030000-0x000000040000 : "dtb"
[    0.578800] 0x000000040000-0x0000001b0000 : "kernel"
[    0.585488] 0x000000170000-0x000000800000 : "rootfs"
[    0.592503] i2c /dev entries driver
[    0.597922] input: ns2009_ts as /devices/platform/soc/1c27000.i2c/i2c-0/0-0048/input/input0
[    0.610556] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc028200c)
[    0.618975] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc02812f0)
[    0.626728] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    0.633364] [drm] No driver support for vblank timestamp query.
[    0.688290] Console: switching to colour frame buffer device 60x34
[    0.713489] sun4i-drm display-engine: fb0:  frame buffer device
[    0.720270] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    0.821046] random: crng init done
[    1.145981] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    1.153325] Freeing unused kernel memory: 276K
[    1.157768] This architecture does not have kernel memory protection.
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.
[4.157768]: root login on 'ttyS0'
helloworld!
#

#17 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-31 17:10:15

jiangchun9981 说:

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

LZ考虑下官方的MELIS看看

好的,可以尝试一下

#19 Re: 全志 SOC » 求助:A33主线uboot跑起来了,但是无法从 eMMC 启动 » 2020-01-30 20:34:38

楼主加油,观望中,今年还打算设计个A33demo板玩玩的,A33性价比太高

#21 Re: 全志 SOC » F1C100S/F1C200S 板子展览馆 » 2020-01-30 20:22:32

晒晒自己设计的demo板 嘉立创打样 双层5元包邮

集成LED x 3 、ADC按键 x 4、BOOT、RST 按键

USB口1为 OTG 和烧录用,USB2为 CH340 USB转TTL 控制台

支持SPI NOR FLASH和SPI NAND ,后面支持TF卡座和SD NAND、焊接二选一

集成正反接40P LCD座 电容触摸座、NS2009触摸芯片、可通过排阻切换为芯片自带RTP


_20200129164506.jpg

_20200129164459.jpg

_20200129164509.jpg

#22 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 20:17:48

zzm24 说:

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

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


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

f1c100s-img_tar.zip

#23 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 14:45:09

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

#24 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 14:44:26

ippen 说:

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

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

#25 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 14:42:42

smartcar 说:

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

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

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

#26 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 14:13:25

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

#27 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 14:11:42

smartcar 说:

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

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

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

#28 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 14:01:01

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 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 13:46:55

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
# 

#30 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 13:01:33

我把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

#31 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 12:24:54

smartcar 说:

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

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

#32 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 12:16:12

ippen 说:

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

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

#33 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 12:05:05

ippen 说:

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

谢谢,这就试试 big_smile

#34 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 12:04:22

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有点太长了,各位大神知道如何优化麻

#35 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 11:27:56

超级萌新 说:

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

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

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

#36 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 11:17:20

达克罗德 说:

用sdnand,要快很多

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

#37 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 11:15:45

超级萌新 说:

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

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

好的谢谢,我试试看 big_smile

#38 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-30 11:14:45

ippen 说:

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

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

#39 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-29 23:58:07

超级萌新 说:

还是我前面那个回复,
可以把根文件系统改小一点,比如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% /
#

#40 Re: 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-29 23:51:17

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>;
            };
        };
    };
};

#41 全志 SOC » F1C100S/F1C200S-减少开机时间、uboot、内核、根文件系统裁减优化问题 » 2020-01-29 23:22:57

颜水花生
回复: 110
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

#42 Re: 全志 SOC » 终于搞好了荔枝派nano linux uboot瘦身 + usb gadget hid + gt911触控 + littlevgl demo » 2020-01-29 22:55:38

超级萌新 说:

rootfs是用jffs2吗,可以把根文件系统改小一点,这样扫描区域就没辣么大,可以节省一点点时间。

对了,你的剪裁可以分享一下吗?

我单独写个帖子探讨下,到时候把配置文件和镜像上传上来

#43 Re: 全志 SOC » 终于搞好了荔枝派nano linux uboot瘦身 + usb gadget hid + gt911触控 + littlevgl demo » 2020-01-29 20:55:46

xm1994 说:

后来去掉了libinput和eudev,开机6秒左右进界面

您好大神,我最近也在裁减系统,16M spiflash,uboot裁减到120K,内核2.3M,rootfs 2.2M,UBOOT等待时间改成0S,启动到内核需要3S,内核和文件系统启动需要9S,加起来上电启动到littlegl demo 需要 12S,还是太长了,请问你的这两个libinput和eudev,在哪里去掉的呀?

#44 Re: 全志 SOC » 如何解决 ?荔枝派 f1c100s LittlevGL 电阻触摸不准,tslib校准后触摸正常 LittlevGL 触摸依然不准问题 » 2019-11-28 13:18:08

结贴啦,问题终于解决了,就是电阻触摸屏,必须用tslib处理过的数据。晚点把附件传上来。

cmake报错问题 -- 解决办法如下: 加入编译好的tslib动态链接库 libts.so

修改CMakelist.txt
FluxBB bbcode 测试

从tslib读取触摸数据--测试视频如下

https://whycan.cn/files/members/2460/VID_20191128_124201.mp4

#45 Re: 全志 SOC » 如何解决 ?荔枝派 f1c100s LittlevGL 电阻触摸不准,tslib校准后触摸正常 LittlevGL 触摸依然不准问题 » 2019-11-28 10:06:36

晕哥 说:

一定要使用 tslib 转换过的数据才行,否则要自己做各种处理,非常麻烦。

荔枝派的demo为什么可以?是因为他的是电容触摸屏,触摸芯片出来的数据已经是原始坐标数据了。

果然如我想的一样,感谢晕哥解惑 big_smile   我这就试试加入tslib数据。

#46 Re: 全志 SOC » 如何解决 ?荔枝派 f1c100s LittlevGL 电阻触摸不准,tslib校准后触摸正常 LittlevGL 触摸依然不准问题 » 2019-11-28 09:53:57

晕哥 说:

你的应用程序读取触摸屏数据是不是使用 tslib ?

#
#
我程序读取触摸使用的是荔枝派官方给出的代码,具体如下
#
目前怀疑触摸数据读的是原始数据,没有经过tslib校准。
#
现在正在根据这个大神的帖子 笔记-编译LittlevGL GUI demo支持tslib 来加入tslib支持,目前卡在找不到tslib.h头文件这里,编译报错!
#
正在想办法把tslib动态链接库引入到cmake里面编译!还在奋斗中 big_smile
#
FluxBB bbcode 测试

#48 Re: 全志 SOC » 如何解决 ?荔枝派 f1c100s LittlevGL 电阻触摸不准,tslib校准后触摸正常 LittlevGL 触摸依然不准问题 » 2019-11-27 22:39:40

晕哥 说:

感谢晕哥的热心解答! big_smile

不过我不是这个问题、
我的 tslib 配置运行是好的,运行 ts_calibrate校准以后 ts_test触摸和划线都是没问题的,触摸很精准。

我的问题是ts_test 测试触摸精准,但是运行荔枝派nano官方littlevgl_demo_with_wallpaper程序触摸不准,我试了自己编译出来的Littlegl程序运行也是一样,只有一小块触摸区域有反应,并且位置不准确!目前手里测试的是ns2009驱动的电阻屏,驱动是从zero那里扣过来的。

我的TS LIB 环境变量配置如下,在系统任何位置输入ts_  然后tab都可以找到命令运行!
#
#
#
FluxBB bbcode 测试

#49 Re: 全志 SOC » 如何解决 ?荔枝派 f1c100s LittlevGL 电阻触摸不准,tslib校准后触摸正常 LittlevGL 触摸依然不准问题 » 2019-11-26 16:47:14

晕哥 说:

运行 ts_calibrate 校准一下。

用ts_calibrate校准过,之前一开始没校准,ts_test和ts_print_raw数据都不对,校准以后ts_test数据准了,画线什么的都正常,但是ts_print_raw数据还是不对,起始值还是从两百多开始的,刚刚又校准了一次,还是老样子,LittlevGL 触摸数据调用的应该不是tslib校准过的数据,这个情况是需要改ns2009底层驱动么?

#50 Re: 全志 SOC » 如何解决 ?荔枝派 f1c100s LittlevGL 电阻触摸不准,tslib校准后触摸正常 LittlevGL 触摸依然不准问题 » 2019-11-26 16:37:20

晕哥 说:

ts_test
ts_print_raw

测试一下输出坐标是否正确

晕哥帮忙看下,好像触摸数据起始值不对,谢谢 big_smile

ts_test 测试                   测试分别为: X轴 从左到右 Y轴从上到下

ts_print_raw 测试      测试分别为: 左上角坐标   左下角坐标  右上角坐标  右下角坐标

#52 全志 SOC » 如何解决 ?荔枝派 f1c100s LittlevGL 电阻触摸不准,tslib校准后触摸正常 LittlevGL 触摸依然不准问题 » 2019-11-26 16:07:34

颜水花生
回复: 13

小弟刚入坑,请各位大神帮忙看看啥情况,谢谢 big_smile 

触摸用的电阻触摸,NS2009驱动 

[    0.969214] i2c /dev entries driver                                                    
[    0.975248] input: ns2009_ts as /devices/platform/soc/1c27000.i2c/i2c-0/0-0048/input/i0

/*-----------------LittlevGL demo触摸测试-------------------*/


/*-----------------tslib触摸测试-------------------*/

页脚

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

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