您尚未登录。

#2 Re: 全志 SOC » F1C100S玩游戏系列-FC红白机Nes模拟器(二)-移植正点原子的nes模拟器(ye781205的汇编核心),带声音,ARM转GNU汇编 » 2024-06-26 23:24:26

Microsoft Windows [版本 10.0.22631.3737]
(c) Microsoft Corporation。保留所有权利。

E:\RTT\BoloRTT\bsp\f1c>scons -j8
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build
CC build\applications\Apps\demo.o
CC build\applications\Apps\UartCursor.o
CC build\applications\main.o
CC build\bootloader\exception.o
AS build\bootloader\memcpy.o
AS build\bootloader\memset.o
CC build\bootloader\sys-clock.o
CC build\bootloader\sys-copyself.o
scons: *** [build\bootloader\sys-copyself.o] Error -1073741701
scons: *** [build\applications\main.o] Error -1073741701
scons: *** [build\applications\Apps\demo.o] Error -1073741701
scons: *** [build\bootloader\memcpy.o] Error -1073741701
scons: *** [build\applications\Apps\UartCursor.o] Error -1073741701
scons: *** [build\bootloader\exception.o] Error -1073741701
scons: *** [build\bootloader\sys-clock.o] Error -1073741701
scons: *** [build\bootloader\memset.o] Error -1073741701
scons: building terminated because of errors.

求助这是什么错误,?

#5 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL8.3.0 长文本滚动显示,设备连续运行几天之后不滚动! » 2023-11-10 11:14:34

大帅
回复: 1

在spi屏幕上面跑了多个页面,每次页面跳转会删除当前页面资源,主页面显示有长文本信息,老化测试几天之后,主页面的长文本都不滚动了。
1.如果内容更新也会显示。
2.如果按键进入菜单再返回主页面会恢复滚动。

有大佬遇到类似的问题吗?

#6 Re: 全志 SOC » V3S 基于 BSP 的squashfs + overlay 支持w25q256 32M nor flash » 2021-05-24 17:50:49

找到楼主里面的启动脚本:

echo 0 > /sys/class/android_usb/android0/enable
echo 18d1 > /sys/class/android_usb/android0/idVendor
echo 0001 > /sys/class/android_usb/android0/idProduct
echo adb > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
/sbin/ifconfig lo up
/bin/adbd

为什么我执行之后电脑识别出adb了,但是adb shell提示:error: device offline

# echo 0 > /sys/class/android_usb/android0/enable
[   49.447998] android_usb: already disabled
#
# echo g_ffs > /sys/class/android_usb/androi[   65.895711] android_usb: Cannot enable 'g_ffs' (-22)d0/functions
#
# echo adb > /sys/class/android_usb/android0/functions
#
# echo 1 > /sys/class/android_usb/android0/enable
#
# adbd &
# install_listener('tcp:5037','*sm
[  159.381771] adb_open
artsocket*')
[  159.386510] adb_bind_config
[  159.391084] ep_matches, wrn: endpoint already claimed, ep(0xc04b8b3c, 0xc31080c0, ep1in-bulk)
[  159.670697] android_usb gadget: high-speed config #1: android

这里面有个ep_matches, wrn: endpoint already claimed,警告不知道是什么,

v3s的BSP使用usb这么费劲么?

#7 Re: 全志 SOC » V3S 基于 BSP 的squashfs + overlay 支持w25q256 32M nor flash » 2021-05-22 10:58:36

路漫漫的是主线把? 我用主线是可以的,我之前确认过,用bsp的时候,usb adb不识别

#8 Re: 全志 SOC » V3S 基于 BSP 的squashfs + overlay 支持w25q256 32M nor flash » 2021-05-22 10:04:37

请教:v3s的bsp应该是支持adb的,为什么我不论用bsp的固件启动zero,还是用的固件启动zero,usb电脑都不识别呢? 我用主线4.13的固件adb是可以用的,说明板子usb没有问题。

#11 Re: 全志 SOC » 有人搞定V3s BSP 3.4的usb ADB么? » 2021-04-26 09:41:37

webb_2002 说:
大帅 说:

你说的全志的 tina3.5支持 ADB 调试。tina3.5是f1cxxx的sdk内核是3.10,我这里弄的是V3S的bsp内核是3.4,不知道是不是配置那里出了问题,还是V3S的内核又问题?

不,内核就是3.4的支持ADB。

方便给个配置文件么?

#12 Re: 全志 SOC » 有人搞定V3s BSP 3.4的usb ADB么? » 2021-04-26 09:31:27

你说的全志的 tina3.5支持 ADB 调试。tina3.5是f1cxxx的sdk内核是3.10,我这里弄的是V3S的bsp内核是3.4,不知道是不是配置那里出了问题,还是V3S的内核又问题?

#13 全志 SOC » 有人搞定V3s BSP 3.4的usb ADB么? » 2021-04-25 09:19:12

大帅
回复: 4

V3s BSP 3.4的 ADB问题有解决了么?

# depmod
# modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 iSerialNumber="buildroot"
[   78.678502] g_ffs: file system registered
# mkdir -p /dev/usb-ffs/adb
# mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
# adbd &
# install_listener('tcp:5037','*sm[   99.388973] g_ffs: read descriptors
artsocket*')
[   99.395368] g_ffs: read strings
[   99.399856] udc sunxi_usb_udc: registering UDC driver [g_ffs]
[   99.406909] g_ffs gadget: using random self ethernet address
[   99.413519] g_ffs gadget: using random host ethernet address
[   99.428949] usb0: MAC 36:44:e2:9f:2f:a4
[   99.433523] usb0: HOST MAC 12:f8:3d:91:69:45
[   99.452645] g_ffs gadget: adding config #1 'FunctionFS + RNDIS'/bf00b460
[   99.460754] g_ffs gadget: adding 'rndis'/c1fc1cc0 to config 'FunctionFS + RNDIS'/bf00b460
[   99.470054] ep_matches, wrn: endpoint already claimed, ep(0xc04be754, 0xc1e5b7c0, ep1in-bulk)
[   99.479764] ep_matches, wrn: endpoint already claimed, ep(0xc04be754, 0xc1e5b7c0, ep1in-bulk)
[   99.489470] ep_matches, wrn: endpoint already claimed, ep(0xc04be7a0, 0xc1e5b7c0, ep1out-bulk)
[   99.499274] gadget_is_softwinner_otg is not -int
[   99.504524] gadget_is_softwinner_otg is not -int
[   99.509993] g_ffs: rndis_register: configNr = 0
[   99.515303] g_ffs: rndis_set_param_medium: 0 0
[   99.520372] g_ffs gadget: RNDIS: dual speed IN/ep1in-bulk OUT/ep1out-bulk NOTIFY/ep4-int
[   99.529663] g_ffs gadget: adding 'Function FS Gadget'/c0e684e4 to config 'FunctionFS + RNDIS'/bf00b460
[   99.540260] ep_matches, wrn: endpoint already claimed, ep(0xc04be754, 0xc1e5b7c0, ep1in-bulk)
[   99.549855] ep_matches, wrn: endpoint already claimed, ep(0xc04be7a0, 0xc1e5b7c0, ep1out-bulk)
[   99.560637] ep_matches, wrn: endpoint already claimed, ep(0xc04be754, 0xc1e5b7c0, ep1in-bulk)
[   99.570407] ep_matches, wrn: endpoint already claimed, ep(0xc04be7a0, 0xc1e5b7c0, ep1out-bulk)
[   99.580377] g_ffs gadget: cfg 1/bf00b460 speeds: high full
[   99.586595] g_ffs gadget:   interface 0 = rndis/c1fc1cc0
[   99.592747] g_ffs gadget:   interface 1 = rndis/c1fc1cc0
[   99.598779] g_ffs gadget: adding config #2 'FunctionFS + ECM'/bf00b4d4
[   99.606703] g_ffs gadget: adding 'cdc_ethernet'/c1fc1c00 to config 'FunctionFS + ECM'/bf00b4d4
[   99.616563] ep_matches, wrn: endpoint already claimed, ep(0xc04be754, 0xc1e5b7c0, ep1in-bulk)
[   99.626163] ep_matches, wrn: endpoint already claimed, ep(0xc04be754, 0xc1e5b7c0, ep1in-bulk)
[   99.635874] ep_matches, wrn: endpoint already claimed, ep(0xc04be7a0, 0xc1e5b7c0, ep1out-bulk)
[   99.645672] gadget_is_softwinner_otg is not -int
[   99.650926] gadget_is_softwinner_otg is not -int
[   99.656443] g_ffs gadget: CDC Ethernet: dual speed IN/ep1in-bulk OUT/ep1out-bulk NOTIFY/ep4-int
[   99.666270] g_ffs gadget: adding 'Function FS Gadget'/c0e68864 to config 'FunctionFS + ECM'/bf00b4d4
[   99.676675] ep_matches, wrn: endpoint already claimed, ep(0xc04be754, 0xc1e5b7c0, ep1in-bulk)
[   99.686389] ep_matches, wrn: endpoint already claimed, ep(0xc04be7a0, 0xc1e5b7c0, ep1out-bulk)
[   99.696923] ep_matches, wrn: endpoint already claimed, ep(0xc04be754, 0xc1e5b7c0, ep1in-bulk)
[   99.706668] ep_matches, wrn: endpoint already claimed, ep(0xc04be7a0, 0xc1e5b7c0, ep1out-bulk)
[   99.716535] g_ffs gadget: cfg 2/bf00b4d4 speeds: high full
[   99.722887] g_ffs gadget:   interface 0 = cdc_ethernet/c1fc1c00
[   99.729581] g_ffs gadget:   interface 1 = cdc_ethernet/c1fc1c00
[   99.736408] g_ffs gadget: adding config #3 'FunctionFS'/bf00b548
[   99.743632] g_ffs gadget: adding 'Function FS Gadget'/c1fc8de4 to config 'FunctionFS'/bf00b548
[   99.753619] g_ffs gadget: cfg 3/bf00b548 speeds: high full
[   99.759978] g_ffs gadget: g_ffs ready

#15 Re: 全志 SOC » [问题已解决,34楼] 自制F1c100s板子,但是不工作,求社区大佬指导一下 » 2021-04-19 23:13:28

贴出cpu的购买渠道和价格,FEL能否进入,多半是假货坏的,我在某宝上买的F1C200S一个不能用!

#16 Re: 全志 SOC » Zero V3s 全过程编译BSP,使用sunxi-fel启动系统问题 » 2021-04-16 17:31:47

uboot、kernel、buildroot 配置

u-boot.cfg
lichee-v3s-ramdisk-linux.config
lichee-v3s-buildroot-ramdisk.config
Ramdisk配置.7z

#19 Re: 全志 SOC » Zero V3s 全过程编译BSP,使用sunxi-fel启动系统问题 » 2021-04-16 16:05:39

如果遇到这样的错误:

[    1.437777] ALSA device list:
[    1.441278]   #0: audiocodec
[    1.445157] RAMDISK: gzip image found at block 0
[    1.584502] VFS: Mounted root (ext2 filesystem) on device 1:0.
[    1.591484] devtmpfs: mounted
[    1.595207] Freeing init memory: 144K
mount: you must be root
mount: you must be root
mkdir: can't create directory '/dev/pts': Permission denied
mkdir: can't create directory '/dev/shm': Permission denied
mount: you must be root
hostname: sethostname: Operation not permitted
Starting logging: OK
Initializing random number generator... done.
Starting network: ip: RTNETLINK answers: Operation not permitted
ip: SIOCSIFFLAGS: Permission denied
FAIL
can't open /dev/console: Permission denied
can't open /dev/console: Permission denied
can't open /dev/console: Permission denied

查看busybox权限:

# buildroot-2017.08.1/output$ ll target/bin/busybox
-rwsr-xr-x 1 osboxes osboxes 675052 四月 12 04:35 target/bin/busybox*

解决办法:
chmod a-s busybox

#20 Re: 全志 SOC » Zero V3s 全过程编译BSP,使用sunxi-fel启动系统问题 » 2021-04-16 15:59:04

1. 让BSP从ramdisk根文件系统启动

     1.1 修改内核配置选项
    make ARCH=arm menuconfig
    打开配置菜单,修改配置项
1_20210416-1525.jpg
        Ramdisk方式需要清空Initramfs source file(s)

2_20210416-1525.jpg
          之所以(4096)是因为我之后制作的ramdisk是4096KB大小的。
         如果这个大小和你做的ramdisk不匹配,则启动时仍然会出现 kernel panic,提示ramdisk格式不正确,挂载不上ramdisk。

3_20210416-1525.jpg
        注意:ramdisk是一种内存虚拟磁盘技术,实质上并不是一种文件系统,它使用的文件系统是ext2文件系统。 

        1.2 文件系统配置
4_20210416-1525.jpg
    其中Toolchain path是kernel的交叉编译链的位置
  kernel的版本,在交叉编译链下面查看:
  libc/usr/include/linux/version.h
  我这里的 LINUX_VERSION_CODE 版本是 262144
  将262144转换16进制40000
  我的编译链版本是4.0.0

5.jpg
  保存配置开始编译
  编译完成后生成根文件系统

2. 修改内核启动参数
    2.1 安装mkimage
   

sudo apt install mkimage

    采用修改u-boot的bootargs环境变量来传递启动参数
    修改bsp.cmd文件:一键制作boot.src.7z

    2.2 安装sunxi-tools工具,制作script参数配置
   

git clone -b v3s https://github.com/Icenowy/sunxi-tools.git
    make && sudo make install

    一键制作script参数配置bin文件
    一键制作script.bin.7z

3. 制作ramdisk镜像
    安装工具: sudo apt install genext2fs
    编译buildroot
    cd 到 buildroot/output 执行
   

$ genext2fs -b 4096 -d target/ ramdisk
    $ gzip -9 -f ramdisk

    制作出镜像
    builtroot/output/ramdisk.gz

    到此制作出全部启动文件: boot.scr script.bin u-boot-sunxi-with-spl.bin  ramdisk.gz uImage

#21 Re: 全志 SOC » Zero V3s 全过程编译BSP,使用sunxi-fel启动系统问题 » 2021-04-16 15:09:11

由于BSP驱动比较全,使用比较方便,所以优先使用,看到晕哥制作的FEL启动系统很方便,所为也要为BSP做了FEL方式启动整个系统,但遇到了问题,纵观整个论坛都是主线的方式,解决问题反复摸索的时间比较长。。。

#22 Re: 全志 SOC » Zero V3s 全过程编译BSP,使用sunxi-fel启动系统问题 » 2021-04-16 15:03:28

U-Boot SPL 2017.01-rc2-00057-g32ab180 (Apr 06 2021 - 04:01:39)
DRAM: 64 MiB
Trying to boot from FEL

U-Boot 2017.01-rc2-00057-g32ab180 (Apr 06 2021 - 04:01:39 -0400) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2-00057-g32ab180 (Apr 06 2021 - 04:01:39 -0400) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
(FEL boot)
## Executing script at 41e00000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2457016 Bytes = 2.3 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x1029 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (osboxes@osboxes) (gcc version 4.9.4 (Linaro GCC 4.9-2017.01) ) #29 Fri Apr 16 02:27:37 EDT 2021
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait initrd=0x41b00000,0x200000 root=/dev/ram init=/linuxrc earlyprintk rw
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    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: 64MB = 64MB total
[    0.000000] Memory: 28316k/28316k available, 37220k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc047f000   (4572 kB)
[    0.000000]       .init : 0xc047f000 - 0xc04a3000   ( 144 kB)
[    0.000000]       .data : 0xc04a4000 - 0xc04e8830   ( 275 kB)
[    0.000000]        .bss : 0xc04e8854 - 0xc0583494   ( 620 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000168] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000188] pid_max: default: 32768 minimum: 301
[    0.000327] Mount-cache hash table entries: 512
[    0.000888] CPU: Testing write buffer coherency: ok
[    0.001153] Setting up static identity map for 0x40359488 - 0x403594e0
[    0.001812] devtmpfs: initialized
[    0.003527] pinctrl core: initialized pinctrl subsystem
[    0.004013] NET: Registered protocol family 16
[    0.004356] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004418] script_sysfs_init success
[    0.005167] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.006065] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006440] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007264] persistent_ram: error in header, 4
[    0.007277] persistent_ram: no valid data in buffer (sig = 0x00000000)
[    0.014391] console [ram-1] enabled
[    0.015207] Not Found clk pll_isp in script 
[    0.015463] Not Found clk pll_video in script 
[    0.015597] Not Found clk pll_ve in script 
[    0.015730] Not Found clk pll_periph0 in script 
[    0.015975] Not Found clk pll_de in script 
[    0.019920] bio: create slab <bio-0> at 0
[    0.020285] pwm module init!
[    0.022663] SCSI subsystem initialized
[    0.023026] usbcore: registered new interface driver usbfs
[    0.023334] usbcore: registered new interface driver hub
[    0.023612] usbcore: registered new device driver usb
[    0.023873] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.024125] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.024956] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.025226] axp20_board 0-0034: failed reading at 0x03
[    0.025504] axp20_board: probe of 0-0034 failed with error -70
[    0.025685] Linux video capture interface: v2.00
[    0.026020] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.026487] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.027421] Switching to clocksource arch_sys_counter
[    0.029973] NET: Registered protocol family 2
[    0.029973] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.030120] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.030411] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.030565] TCP: Hash tables configured (established 2048 bind 2048)
[    0.030810] TCP: reno registered
[    0.030949] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.031205] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.031604] NET: Registered protocol family 1
[    0.032052] Trying to unpack rootfs image as initramfs...
[    0.033221] rootfs image is not initramfs (no cpio magic); looks like an initrd
[    0.042563] Freeing initrd memory: 2048K
[    0.042879] standby_mode = 1. 
[    0.043013] wakeup src cnt is : 3. 
[    0.043280] pmu1_enable = 0x1. 
[    0.043413] pmux_id = 0x1. 
[    0.043556] config_pmux_para: script_parser_fetch err. 
[    0.043801] pmu2_enable = 0x0. 
[    0.043938] add_sys_pwr_dm: get ldo name failed
[    0.044072] add_sys_pwr_dm: get ldo name failed
[    0.044320] add_sys_pwr_dm: get ldo name failed
[    0.044453] add_sys_pwr_dm: get ldo name failed
[    0.044585] add_sys_pwr_dm: get ldo name failed
[    0.044829] add_sys_pwr_dm: get ldo name failed
[    0.044961] add_sys_pwr_dm: get ldo name failed
[    0.045205] add_sys_pwr_dm: get ldo name failed
[    0.045337] add_sys_pwr_dm: get ldo name failed
[    0.045469] add_sys_pwr_dm: get ldo name failed
[    0.045712] after inited: sys_mask config = 0x0. 
[    0.045847] dynamic_standby enalbe = 0x0. 
[    0.046155] sunxi_reg_init enter
[    0.048393] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.048583] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.049019] msgmni has been set to 59
[    0.050146] io scheduler noop registered
[    0.050406] io scheduler deadline registered
[    0.050623] io scheduler cfq registered (default)
[    0.051271] [DISP]disp_module_init
[    0.051804] cmdline,disp=
[    0.052472] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.052853] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.055430] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.058206] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator 
[    0.059369] [DISP]disp_module_init finish
[    0.059777] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.060454] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.060602] sw_uart_pm()890 - uart0 clk is already enable
[    0.060861] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.174413] console [ttyS0] enabled
[    0.724937] brd: module loaded
[    0.729069] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.737127] spi spi0: master is unqueued, this is deprecated
[    0.745256] Failed to alloc md5
[    0.748923] eth0: Use random mac address
[    0.753535] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.781248] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.790316] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.799067] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.820035] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.827419] hub 1-0:1.0: USB hub found
[    0.831767] hub 1-0:1.0: 1 port detected
[    0.836836] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.842522] usb usb1: USB disconnect, device number 1
[    0.848976] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.865434] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.892637] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.901321] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    0.910003] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    0.974640] hub 1-0:1.0: USB hub found
[    0.978944] hub 1-0:1.0: 1 port detected
[    0.983825] sunxi-ohci sunxi-ohci.1: remove, state 1
[    0.989610] usb usb1: USB disconnect, device number 1
[    0.995909] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    1.012486] Initializing USB Mass Storage driver...
[    1.018108] usbcore: registered new interface driver usb-storage
[    1.025043] USB Mass Storage support registered.
[    1.030611] file system registered
[    1.035996] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.043963] android_usb gadget: Number of LUNs=1
[    1.049333]  lun0: LUN: removable file: (no medium)
[    1.055498] android_usb gadget: android_usb ready
[    1.061002] sunxikbd_script_init: key para not found, used default para. 
[    1.069744] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.078199] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.087208] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.096194] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.104940] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.113720] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.122508] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.131158] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.140209] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.147583] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.159050] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.166767] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.173205] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.183138] no led_3, ignore it!
[    1.186959] no led_4, ignore it!
[    1.190721] no led_5, ignore it!
[    1.194427] no led_6, ignore it!
[    1.198239] no led_7, ignore it!
[    1.202696] usbcore: registered new interface driver usbhid
[    1.209043] usbhid: USB HID core driver
[    1.214200] ashmem: initialized
[    1.217951] logger: created 256K log 'log_main'
[    1.223297] logger: created 32K log 'log_events'
[    1.228760] logger: created 32K log 'log_radio'
[    1.234052] logger: created 32K log 'log_system'
[    1.240949] script_get_item return type err, consider it no ldo
[    1.248442] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.256344] TCP: cubic registered
[    1.260322] NET: Registered protocol family 17
[    1.265536] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    1.274441] ThumbEE CPU extension supported.
[    1.279319] Registering SWP/SWPB emulation handler
[    1.285818] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.294903] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.303601] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.312297] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.320867] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.329542] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.338413] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.347250] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 00:34:49 UTC (2089)
[    1.357772] ALSA device list:
[    1.361277]   #0: audiocodec
[    1.365158] RAMDISK: gzip image found at block 0
[    1.504469] VFS: Mounted root (ext2 filesystem) on device 1:0.
[    1.511454] devtmpfs: mounted
[    1.515177] Freeing init memory: 144K
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

Welcome to Buildroot
buildroot login: 
Welcome to Buildroot
buildroot login: root
# 
# 
# 
# ls
# 
# 
# cd /
# 
# 
# ls
THIS_IS_NOT_YOUR_ROOT_FILESYSTEM  mnt
bin                               opt
dev                               proc
etc                               root
init                              run
init_bk                           sbin
lib                               sys
lib32                             tmp
linuxrc                           usr
lost+found                        var
media
# 
# 

#23 Re: 全志 SOC » Zero V3s 全过程编译BSP,使用sunxi-fel启动系统问题 » 2021-04-16 15:02:48

问题解决!随后更新Ramdisk启动方式,制作详细步骤

#25 Re: 全志 SOC » Zero V3s 全过程编译BSP,使用sunxi-fel启动系统问题 » 2021-04-14 17:00:24

不明白为什么设备树必须写到这个位置? write 0x41d00000 script.bin

#26 全志 SOC » Zero V3s 全过程编译BSP,使用sunxi-fel启动系统问题 » 2021-04-14 15:13:25

大帅
回复: 14

编译BSP系统参考: https://whycan.com/t_682.html

1. 编译uboot
2. 生成boot.scr文件
    编写boot.cmd
    setenv bootdelay 0
    setenv bootargs "console=ttyS0,115200 panic=5 rootwait root=/dev/ram0 rdinit=/linuxrc earlyprintk rw"
    setenv bootm_boot_mode sec
    setenv machid 1029
    bootm 0x41000000
    制作:
    tools/mkimage -C none -A arm -T script -d boot.cmd boot.scr
3. 生成 script.bin文件
    使用qianhao提供的sys_config.fex
    fex2bin sys_config.fex > script.bin
4. 编译文件系统
    使用https://buildroot.org/downloads/buildroot-2017.08.1.tar.gz
    Toolchain

x x                                        Toolchain type (External toolchain)  --->                                                              x x 
  x x                                        *** Toolchain External Options ***                                                                     x x 
  x x                                        Toolchain (Custom toolchain)  --->                                                                     x x 
  x x                                        Toolchain origin (Pre-installed toolchain)  --->                                                       x x 
  x x                                    (/opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf) Toolchain path                                 
  x x 
  x x                                    (arm-linux-gnueabihf) Toolchain prefix                                                                     x x 
  x x                                        External toolchain gcc version (4.9.x)  --->                                                           x x 
  x x                                        External toolchain kernel headers series (4.0.x)  --->                                                 
  x x 
  x x                                        External toolchain C library (glibc/eglibc)  --->                                                      x x

    Filesystem images 制作rootfs.cpio.gz

x x                            * cpio the root filesystem (for use as an initial RAM filesystem)                               x x 
  x x                                  Compression method (gzip)  --->

   
  编译完成后,生成output/images/文件夹下的rootfs.cpio.gz
  制作ramfs
  mkimage -A arm -T ramdisk -C none -n uInitrd -d rootfs.cpio.gz rootfs.cpio.gz.uImage

5. 编译内核
    cp lichee_BSP_config .config
    配置内核

General setup  --->
  x x                     * Initial RAM filesystem and RAM disk (initramfs/initrd) support                         x x 
  x x                     (/home/osboxes/v3s/licheezero/rootfs/rootfs-bin) Initramfs source file(s)
  x x                     (0)     User ID to map to 0 (user root)                                                      x x 
  x x                     (0)     Group ID to map to 0 (group root)                                                  x x 
  x x                     *   Support initial ramdisks compressed using gzip                                       x x 
  x x                     [ ]   Support initial ramdisks compressed using bzip2                                      x x 
  x x                     [ ]   Support initial ramdisks compressed using LZMA                                       x x 
  x x                     [ ]   Support initial ramdisks compressed using XZ                                         x x 
  x x                     [ ]   Support initial ramdisks compressed using LZO                                        x x 
  x x                           Built-in initramfs compression mode (None)  --->

    其中/home/osboxes/v3s/licheezero/rootfs/rootfs-bin目录下存放制作好的rootfs.cpio.gz
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage -j8

上电进入FEL模式运行:
sunxi-fel.exe -p uboot u-boot-sunxi-with-spl.bin write 0x41000000 uImage write 0x41d00000 script.bin write 0x41e00000 boot.scr write 0x41A00000 rootfs.cpio.gz.uImage

系统启动后停在

[    1.324816] Warning: unable to open an initial console.
[    1.330947] Waiting for root device /dev/ram0...

输入回车没有反应。

U-Boot SPL 2017.01-rc2-00057-g32ab180 (Apr 06 2021 - 04:01:39)
DRAM: 64 MiB
Trying to boot from FEL

U-Boot 2017.01-rc2-00057-g32ab180 (Apr 06 2021 - 04:01:39 -0400) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2-00057-g32ab180 (Apr 06 2021 - 04:01:39 -0400) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
(FEL boot)
## Executing script at 41e00000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3939328 Bytes = 3.8 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x1029 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (osboxes@osboxes) (gcc version 4.9.4 (Linaro GCC 4.9-2017.01) ) #24 Wed Apr 14 02:02:59 EDT 2021
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/ram0 rdinit=/linuxrc earlyprintk rw
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    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: 64MB = 64MB total
[    0.000000] Memory: 28932k/28932k available, 36604k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0476000   (4536 kB)
[    0.000000]       .init : 0xc0476000 - 0xc0609000   (1612 kB)
[    0.000000]       .data : 0xc060a000 - 0xc064e7b0   ( 274 kB)
[    0.000000]        .bss : 0xc064e7d4 - 0xc06e93d4   ( 619 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000164] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000187] pid_max: default: 32768 minimum: 301
[    0.000333] Mount-cache hash table entries: 512
[    0.000885] CPU: Testing write buffer coherency: ok
[    0.001153] Setting up static identity map for 0x40351820 - 0x40351878
[    0.001815] devtmpfs: initialized
[    0.003500] pinctrl core: initialized pinctrl subsystem
[    0.003999] NET: Registered protocol family 16
[    0.004326] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004387] script_sysfs_init success
[    0.005137] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.006030] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006395] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007234] persistent_ram: uncorrectable error in header
[    0.007251] persistent_ram: no valid data in buffer (sig = 0x42004000)
[    0.014267] console [ram-1] enabled
[    0.015084] Not Found clk pll_isp in script 
[    0.015231] Not Found clk pll_video in script 
[    0.015481] Not Found clk pll_ve in script 
[    0.015614] Not Found clk pll_periph0 in script 
[    0.015859] Not Found clk pll_de in script 
[    0.019832] bio: create slab <bio-0> at 0
[    0.020250] pwm module init!
[    0.022593] SCSI subsystem initialized
[    0.022975] usbcore: registered new interface driver usbfs
[    0.023177] usbcore: registered new interface driver hub
[    0.023566] usbcore: registered new device driver usb
[    0.023854] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.024105] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.024926] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.025195] axp20_board 0-0034: failed reading at 0x03
[    0.025470] axp20_board: probe of 0-0034 failed with error -70
[    0.025652] Linux video capture interface: v2.00
[    0.025871] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.026457] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.027368] Switching to clocksource arch_sys_counter
[    0.029976] NET: Registered protocol family 2
[    0.029976] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.030088] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.030383] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.030541] TCP: Hash tables configured (established 2048 bind 2048)
[    0.030789] TCP: reno registered
[    0.030927] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.031186] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.031588] NET: Registered protocol family 1
[    0.036956] standby_mode = 1. 
[    0.037102] wakeup src cnt is : 3. 
[    0.037258] pmu1_enable = 0x1. 
[    0.037392] pmux_id = 0x1. 
[    0.037646] config_pmux_para: script_parser_fetch err. 
[    0.037780] pmu2_enable = 0x0. 
[    0.037917] add_sys_pwr_dm: get ldo name failed
[    0.038161] add_sys_pwr_dm: get ldo name failed
[    0.038294] add_sys_pwr_dm: get ldo name failed
[    0.038539] add_sys_pwr_dm: get ldo name failed
[    0.038673] add_sys_pwr_dm: get ldo name failed
[    0.038805] add_sys_pwr_dm: get ldo name failed
[    0.039049] add_sys_pwr_dm: get ldo name failed
[    0.039184] add_sys_pwr_dm: get ldo name failed
[    0.039429] add_sys_pwr_dm: get ldo name failed
[    0.039562] add_sys_pwr_dm: get ldo name failed
[    0.039693] after inited: sys_mask config = 0x0. 
[    0.039939] dynamic_standby enalbe = 0x0. 
[    0.040192] sunxi_reg_init enter
[    0.042311] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.042608] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.042930] msgmni has been set to 56
[    0.043972] io scheduler noop registered
[    0.044118] io scheduler deadline registered
[    0.044443] io scheduler cfq registered (default)
[    0.044977] [DISP]disp_module_init
[    0.045512] cmdline,disp=
[    0.046199] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.046584] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.049270] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.052038] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator 
[    0.053202] [DISP]disp_module_init finish
[    0.053608] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.054219] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.054366] sw_uart_pm()890 - uart0 clk is already enable
[    0.054621] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.168106] console [ttyS0] enabled
[    0.693158] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.701167] spi spi0: master is unqueued, this is deprecated
[    0.709217] Failed to alloc md5
[    0.712928] eth0: Use random mac address
[    0.717581] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.745091] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.754272] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.763044] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.780033] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.787525] hub 1-0:1.0: USB hub found
[    0.791980] hub 1-0:1.0: 1 port detected
[    0.796902] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.802702] usb usb1: USB disconnect, device number 1
[    0.809884] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.826456] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.853566] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.862347] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    0.871029] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    0.934634] hub 1-0:1.0: USB hub found
[    0.939056] hub 1-0:1.0: 1 port detected
[    0.944018] sunxi-ohci sunxi-ohci.1: remove, state 1
[    0.949665] usb usb1: USB disconnect, device number 1
[    0.956101] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    0.972558] Initializing USB Mass Storage driver...
[    0.978295] usbcore: registered new interface driver usb-storage
[    0.985101] USB Mass Storage support registered.
[    0.990762] file system registered
[    0.996141] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.004080] android_usb gadget: Number of LUNs=1
[    1.009328]  lun0: LUN: removable file: (no medium)
[    1.015344] android_usb gadget: android_usb ready
[    1.020960] sunxikbd_script_init: key para not found, used default para. 
[    1.029586] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.038112] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.047301] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.056172] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.064958] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.073743] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.082404] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.091162] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.100213] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.107475] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.118960] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.126787] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.133119] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.143178] no led_3, ignore it!
[    1.146916] no led_4, ignore it!
[    1.150766] no led_5, ignore it!
[    1.154468] no led_6, ignore it!
[    1.158166] no led_7, ignore it!
[    1.162781] usbcore: registered new interface driver usbhid
[    1.169212] usbhid: USB HID core driver
[    1.174278] ashmem: initialized
[    1.178164] logger: created 256K log 'log_main'
[    1.183516] logger: created 32K log 'log_events'
[    1.188871] logger: created 32K log 'log_radio'
[    1.194278] logger: created 32K log 'log_system'
[    1.200956] script_get_item return type err, consider it no ldo
[    1.208588] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.216351] TCP: cubic registered
[    1.220218] NET: Registered protocol family 17
[    1.225531] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    1.234380] ThumbEE CPU extension supported.
[    1.239401] Registering SWP/SWPB emulation handler
[    1.245869] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.255042] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.263759] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.272334] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.281020] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.289686] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.298452] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.307371] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 04:37:28 UTC (16648)
[    1.317941] ALSA device list:
[    1.321435]   #0: audiocodec
[    1.324816] Warning: unable to open an initial console.
[    1.330947] Waiting for root device /dev/ram0...

#27 Re: 全志 SOC » V3s 下载到sdram 启动系统,卡在这里,如何排查问题? » 2021-04-12 17:10:13

## Loading init Ramdisk from Legacy Image at 41a00000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    10522913 Bytes = 10 MiB

是不是rootfs太大了

#32 Re: 全志 SOC » 全志v3s板 (开源) » 2021-03-08 09:29:19

谢谢,楼主恢复的真及时

#33 Re: 全志 SOC » 全志v3s板 (开源) » 2021-03-08 09:19:32

3.1、耳机引脚顺序画错,只有左声道有声音
疑惑:
查看楼主的原理图和PCB,没有发现画错啊,怎么左声道没有声音?上传到的AD工程是已经修复这个错误了么?
QQ截图20210308091603.jpg
QQ截图20210308091514.jpg

#34 Re: 全志 SOC » 全志v3s板 (开源) » 2021-03-02 09:07:46

NS2009触摸没有飞线,怎么做的?

#35 Re: 全志 SOC » 全志v3s板 (开源) » 2021-03-02 08:51:00

楼主优秀,代码开源不

#36 Re: 全志 SOC » LINUX动态修改开机动画应用层修改开机动画 » 2021-02-03 10:59:58

项目地址 https://gitee.com/youliangixn/Linux

你所访问的页面不存在!
资源不存在或者没有访问权限,点击这里返回首页

没了???

#37 Re: 全志 SOC » 【解决】但不知原因,Nano主线uboot增加LCD和BMP启动卡在Starting kernel ... » 2021-02-02 11:05:45

修改configs/suniv.h

屏蔽下面两句
#define CONFIG_VIDEO_LOGO
#define CONFIG_VIDEO_BMP_LOGO

系统可以正常启动了,开机先显示一个linux企鹅,然后是我的logo.bmp。
不屏蔽上面两句,uboot默认显示的是licheepi的800*480的logo,

虽然问题解决,但是不知道卡死在Starting kernel ...的具体原因是什么???

#39 Re: 全志 SOC » 【解决】但不知原因,Nano主线uboot增加LCD和BMP启动卡在Starting kernel ... » 2021-02-01 15:49:10

raspberryman 说:

是不是bmp把dtb或者zImage的地址覆盖了?

bootcmd=fatload mmc 0:1 0x80008000 zImage;fatload mmc 0:1 0x80C00000 logo.bmp;bmp display 0x80C00000;fatload mmc 0:1 0x80C00000 dtb.bin;bootz 0x80008000 - 0x80C00000
bootdelay=0

把bootcmd里面的
fatload mmc 0:1 0x80C00000 logo.bmp;bmp display 0x80C00000;
去掉也是不能启动。。。

#40 Re: 全志 SOC » 【解决】但不知原因,Nano主线uboot增加LCD和BMP启动卡在Starting kernel ... » 2021-02-01 15:30:29

在这里淫侵多年,只发现路漫漫的固件里面的uboot有bmp命令,但不知道uboot的配置。
经过一番搜索学习,增加上面的几个配置,开机进入uboot,使用指令是可以显示bmp,
fatload mmc 0:1 0x80C00000 logo.bmp
bmp display 0x80C00000
屏幕可以显示,但是开机不知道为什么会卡在Starting kernel ...???

#41 全志 SOC » 【解决】但不知原因,Nano主线uboot增加LCD和BMP启动卡在Starting kernel ... » 2021-02-01 15:22:34

大帅
回复: 7

问题现象描述:
主线是TF卡启动(系统可以正常),
uboot不带bmp命令,增加指令,做开机logo,
打开uboot几个相关配置之后开机一直卡在Starting kernel ...

不修改uboot之前正常开机log:

U-Boot SPL 2018.01 (Jan 31 2021 - 20:25:53)
DRAM: 32 MiB
Trying to boot from MMC1

U-Boot 2018.01 (Jan 31 2021 - 20:25:53 -0500) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
reading zImage
4043624 bytes read in 286 ms (13.5 MiB/s)
reading splash.bmp
385078 bytes read in 52 ms (7.1 MiB/s)
Unknown command 'bmp' - try 'help'
reading dtb.bin
11834 bytes read in 34 ms (339.8 KiB/s)
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fa000, end 816ffe39 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano (root@osboxes) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #34 Fri Jan 29 03:05:50 EST 2021
[    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

修改uboot,使之增加bmp:

1.
-> ARM architecture
     [ * ] Enable graphical uboot console on HDMI, LCD or VGA
     LCD panel timing details:
            x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:40,up:31,lo:13,hs:1,vs:1,sync:3,vmode:0
     (PE6) LCD panel backlight pwm pin
2.
      -> Device Drivers
    - > Graphics support
             [ * ]   Enable colour frame buffer console
3.
    -> Command line interface
                -> Misc commands                               
                                [ * ] Enable 'bmp' command

编译uboot,烧写到tf卡8k偏移,开机log:

U-Boot SPL 2018.01 (Feb 01 2021 - 01:53:16)
DRAM: 32 MiB
Trying to boot from MMC1


U-Boot 2018.01 (Feb 01 2021 - 01:53:16 -0500) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
reading zImage
4043624 bytes read in 287 ms (13.4 MiB/s)
reading dtb.bin
11834 bytes read in 34 ms (339.8 KiB/s)
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e01000, end 80e06e39 ... OK

Starting kernel ...

运行在这里系统就卡住了。。。

对比发现
Loading Device Tree to 816fa000, end 816ffe39
Loading Device Tree to 80e01000, end 80e06e39
修改前后设备树的地址相差很大,

求大佬指点!!!

【已解决】见下面

#42 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-28 00:20:02

卓林 说:

非常感谢楼主的慷慨无私,我已经解决问题了。

哈哈,没想到困扰我一晚上的事情是自己眼瞎了。

最后感谢楼主大帅逼,无私奉献,无私分享,家和万事兴!@大帅

大帅 说:

感谢 @卓林 解决问题回复  cool

#45 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-27 10:21:47

卓林 说:
[ 1526.819255] usb 1-1: new high-speed USB device number 8 using musb-hdrc
[ 1527.779254] usb 1-1: new high-speed USB device number 9 using musb-hdrc
[ 1527.963969] rndis_host 1-1:1.0 eth0: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, ac:4b:b3:b9:eb:e5
[ 1527.976257] option 1-1:1.2: GSM modem (1-port) converter detected
[ 1527.984359] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1527.992359] option 1-1:1.3: GSM modem (1-port) converter detected
[ 1528.000486] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1528.008418] option 1-1:1.4: GSM modem (1-port) converter detected
[ 1528.016821] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
# ifconfig                                                                     
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 92:50:ED:2C:61:50  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# 

为什么我按照你说的改完内核和配置还是找不到网卡呢,有ttyUSB1-3三个节点,

你的也是合宙模块么?
重点参考我的2.2章节,哦不好意思,我2.2里面的uid,pid截图时写的不对,你移植的时候修改下就可以了。

#46 Re: 全志 SOC » V3S挖坑EC20 » 2021-01-26 17:14:00

【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡
http://whycan.com/t_5919.html
(出处:哇酷开发者社区)

还是rndis用着爽!

#47 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-26 16:33:35

移远AT指令

# echo ATI > /dev/ttyUSB1
#

Quectel

EC200T

Revision: EC200TCNBAR02A04M16

OK

# echo AT+QCFG="usbnet" > /dev/ttyUSB1
#

+QCFG: "usbnet",3

OK

# echo AT+CGREG? > /dev/ttyUSB1
#

+CGREG: 0,1

OK

# echo AT+CSQ > /dev/ttyUSB1
#

+CSQ: 26,99

OK

#48 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-26 16:29:41

按上面步骤,移植大移远4G模块,测试!!!

#
#     拔掉模块
#
# [ 1059.077876] usb 1-1: USB disconnect, device number 3
[ 1059.083457] rndis_host 1-1:1.0 usb1: unregister 'rndis_host' usb-musb-hdrc.1.auto-1, RNDIS device
[ 1059.098645] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 1059.106833] option 1-1:1.2: device disconnected
[ 1059.116525] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 1059.124824] option 1-1:1.3: device disconnected
[ 1059.132794] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 1059.141145] option 1-1:1.4: device disconnected

[2]+  Done                       cat /dev/ttyUSB1
#
#
#  再次插入
#
#
# [ 1066.278029] usb 1-1: new high-speed USB device number 4 using musb-hdrc
[ 1066.463978] rndis_host 1-1:1.0 usb1: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, 82:06:9b:08:30:76
[ 1066.476685] option 1-1:1.2: GSM modem (1-port) converter detected
[ 1066.484978] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1066.493156] option 1-1:1.3: GSM modem (1-port) converter detected
[ 1066.501482] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1066.509829] option 1-1:1.4: GSM modem (1-port) converter detected
[ 1066.516747] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2

#
#
# ifconfig -a
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 7A:B3:77:BF:1D:BC 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb1      Link encap:Ethernet  HWaddr 82:06:9B:08:30:76 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

#
#
#
# udhcpc -i usb1
udhcpc: started, v1.27.1
udhcpc: sending discover
udhcpc: sending select for 192.168.43.101
udhcpc: lease of 192.168.43.101 obtained, lease time 86400
deleting routers
adding dns 192.168.43.1
#
#
# ping p***.china***.com
PING p***.china***.com (1**.255.205.19): 56 data bytes
64 bytes from 1**.255.205.19: seq=0 ttl=115 time=60.075 ms
64 bytes from 1**.255.205.19: seq=1 ttl=115 time=59.394 ms
64 bytes from 1**.255.205.19: seq=2 ttl=115 time=57.790 ms
64 bytes from 1**.255.205.19: seq=3 ttl=115 time=67.194 ms
64 bytes from 1**.255.205.19: seq=4 ttl=115 time=66.751 ms
64 bytes from 1**.255.205.19: seq=5 ttl=115 time=66.210 ms
64 bytes from 1**.255.205.19: seq=6 ttl=115 time=65.574 ms
64 bytes from 1**.255.205.19: seq=7 ttl=115 time=65.002 ms
^Z[2]+  Stopped                    ping p***.china***.com
#

需要注意的是合宙的模块内置自动拨号,移远的需要AT拨号才可以获取IP。

#51 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-26 11:57:06

2.4
     

跳坑

发现是合宙官方驱动指导说明里有bug。
     

出坑

无意中在看移远的移植驱动时发现针对合宙驱动不能让usb0和usb1被识别为GSM串口驱动。

#52 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-26 11:45:28

# [13676.718011] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[13676.901065] option 1-1:1.0: GSM modem (1-port) converter detected
[13676.909600] option 1-1:1.1: GSM modem (1-port) converter detected
[13676.916634] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[13676.926004] option 1-1:1.2: GSM modem (1-port) converter detected
[13676.933237] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[13676.943394] option 1-1:1.3: GSM modem (1-port) converter detected
[13676.950619] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[13676.960851] option 1-1:1.4: GSM modem (1-port) converter detected
[13676.968054] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2632 (2.5 KiB)  TX bytes:2632 (2.5 KiB)

usb0      Link encap:Ethernet  HWaddr 22:05:2C:1B:73:F2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

合宙的手册说明usb0和usb1是网络网卡,在移植的过程中,发现usb1被识别成GSM串口,
ifconfig -a查看只有lo和usb0网卡,usb0网卡怎么都不能自动获取ip,发现usb0网卡移植
没有RUNNING,并且ping之后TX,RX数据还是零。
后来才知道usb0不是识别出来的4G模块,是RNDIS-DEVICE网卡。
知道问题所在,就好下手,检查下内核驱动,果然是驱动有问题。

#53 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-26 11:34:44

2.3 使能CONFIG_USB_SERIAL_OPTION

4_20210126-1134.jpg

编译内核
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8

#54 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-26 11:33:36

1.内核usb相关配置
1_20210126-1127.jpg
2_20210126-1127.jpg
编译模块
  $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 modules
安装模块
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install INSTALL_MOD_PATH=/home/osboxes/rootfs/buildroot-2017.08/output/target/lib
把你的 ko 文件用上面的命令安装到你的根文件系统(根据具体情况调整参数),并删除安装目录下面的build和source目录,它软连接到源码。

2. 修改内核使之能驱动合宙模块
2.1 添加usb vid和pid
[内核]/drivers/usb/serial/option.c
3_20210126-1132.jpg
2.2 增加Zero Packet(上图3)

#56 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-26 00:25:32

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr AC:00:00:CE:B4:38  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 92:E6:A8:7C:97:DE  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# 
# udhcpc -i eth0
udhcpc: started, v1.27.1
[ 1398.968142] musb-hdrc musb-hdrc.1.auto: int hwep alloc failed for 1x16
ifconfig: SIOCSIFFLAGS: No space left on device
udhcpc: sending discover
udhcpc: sending select for 192.168.0.100
udhcpc: lease of 192.168.0.100 obtained, lease time 86400
deleting routers
adding dns 192.168.0.1
# 
# 
# ping 123.149.232.30
PING 123.149.232.30 (123.149.232.30): 56 data bytes
64 bytes from 123.149.232.30: seq=0 ttl=118 time=1473.042 ms
64 bytes from 123.149.232.30: seq=2 ttl=118 time=847.767 ms
64 bytes from 123.149.232.30: seq=3 ttl=118 time=554.274 ms
^C
--- 123.149.232.30 ping statistics ---
4 packets transmitted, 3 packets received, 25% packet loss
round-trip min/avg/max = 554.274/958.361/1473.042 ms
# 

搞定,搞定!!!

#58 Re: 全志 SOC » 也发一个荔枝派zero 全志V3s 32M spi flash 固件,800x480 LCD, 开机自动运行 Qt analogclock » 2021-01-25 15:08:40

路漫漫 说:

开机运行emwin demo 的固件: v3s_flash_32m_20191219_adbd_emwin.tgz

可以直接用 adb shell 进入命令行.

求大佬指教,V3s不是Arm9怎么运行的emwin?

#59 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-25 15:03:51

拉轰的脚踏车 说:

也发一个荔枝派zero 全志V3s 32M spi flash 固件,800x480 LCD, 开机自动运行 Qt analogclock
http://whycan.com/t_3400.html#p47841
(出处:哇酷开发者社区)

可惜不能用这个固件测试,我的是荔枝派nano

#60 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-25 14:54:11

哇酷小二 说:

那插电脑Ubuntu试一试

在Ubuntu里面试了,经过测试需要在etc/network/interfaces里面增加
auto usb0
iface usb0 inet dhcp
然后重启网络
/etc/init.d/networking restart
Ubuntu里面就可以ping了,

但是在licheepi里面没有重启网络命令,使用
ifconfig usb0 down
ifconfig usb0 up
之后ping还是不行

#61 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-25 14:49:52

哇酷小二 说:

检查天线,供电,和三个LED灯,确认是不是连接成功了。

模块的三个灯正常,licheepi使用AT去查,模块联网也正常。

etc/network/interfaces
也增加了
auto usb0
iface usb0 inet dhcp

#62 Re: 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-25 14:45:09

哇酷小二 说:

udhcpc -i usb0

不行,
# udhcpc -i usb0
udhcpc: started, v1.27.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
^C
#

#63 全志 SOC » 【填坑求精】荔枝派rndis-host驱动合宙4G模块,荔枝派插入WIN/Unbutu识别为Rndis网卡 » 2021-01-25 14:33:20

大帅
回复: 31

荔枝派nano插入合宙的4G模块,驱动识别出来了(这个模块在WIN10上面驱动可以正常使用)。

# [13676.718011] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[13676.901065] option 1-1:1.0: GSM modem (1-port) converter detected
[13676.909600] option 1-1:1.1: GSM modem (1-port) converter detected
[13676.916634] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[13676.926004] option 1-1:1.2: GSM modem (1-port) converter detected
[13676.933237] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[13676.943394] option 1-1:1.3: GSM modem (1-port) converter detected
[13676.950619] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[13676.960851] option 1-1:1.4: GSM modem (1-port) converter detected
[13676.968054] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4

# 
# ifconfig -a
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2632 (2.5 KiB)  TX bytes:2632 (2.5 KiB)

usb0      Link encap:Ethernet  HWaddr 22:05:2C:1B:73:F2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# 
# ifconfig usb0 up
# 
# udhcpc -i usb0
udhcpc: started, v1.27.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
^C
# 

获取ip一直这样。。。
udhcpc: sending discover

检查了一下/usr/share/udhcpc/default.script这个文件也存在

# cat /usr/share/udhcpc/default.script
#!/bin/sh

# udhcpc script edited by Tim Riker <Tim@Rikers.org>

[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1

RESOLV_CONF="/etc/resolv.conf"
[ -e $RESOLV_CONF ] || touch $RESOLV_CONF
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"

case "$1" in
	deconfig)
		/sbin/ifconfig $interface up
		/sbin/ifconfig $interface 0.0.0.0

		# drop info from this interface
		# resolv.conf may be a symlink to /tmp/, so take care
		TMPFILE=$(mktemp)
		grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE
		cat $TMPFILE > $RESOLV_CONF
		rm -f $TMPFILE

		if [ -x /usr/sbin/avahi-autoipd ]; then
			/usr/sbin/avahi-autoipd -k $interface
		fi
		;;

	leasefail|nak)
		if [ -x /usr/sbin/avahi-autoipd ]; then
			/usr/sbin/avahi-autoipd -wD $interface --no-chroot
		fi
		;;

	renew|bound)
		if [ -x /usr/sbin/avahi-autoipd ]; then
			/usr/sbin/avahi-autoipd -k $interface
		fi
		/sbin/ifconfig $interface $ip $BROADCAST $NETMASK

		if [ -n "$router" ] ; then
			echo "deleting routers"
			while route del default gw 0.0.0.0 dev $interface 2> /dev/null; do
				:
			done

			for i in $router ; do
				route add default gw $i dev $interface
			done
		fi

		# drop info from this interface
		# resolv.conf may be a symlink to /tmp/, so take care
		TMPFILE=$(mktemp)
		grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE
		cat $TMPFILE > $RESOLV_CONF
		rm -f $TMPFILE

		# prefer rfc3359 domain search list (option 119) if available
		if [ -n "$search" ]; then
			search_list=$search
		elif [ -n "$domain" ]; then
			search_list=$domain
		fi

		[ -n "$search_list" ] &&
			echo "search $search_list # $interface" >> $RESOLV_CONF

		for i in $dns ; do
			echo adding dns $i
			echo "nameserver $i # $interface" >> $RESOLV_CONF
		done
		;;
esac

HOOK_DIR="$0.d"
for hook in "${HOOK_DIR}/"*; do
    [ -f "${hook}" -a -x "${hook}" ] || continue
    "${hook}" "${@}"
done

exit 0
# 
# 

使用AT命令都可以获取到模块ip

echo ATE0 > /dev/ttyUSB3

# cat /dev/ttyUSB3 &
# 
# echo ATE0 > /dev/ttyUSB3
ATE0
# 
# echo ATI > /dev/ttyUSB3
AirM2M_720SG_V290_LTE_AT
OK
# 
# echo AT+CSTT="CMNET" > /dev/ttyUSB3
OK
# echo AT+CIICR > /dev/ttyUSB3
# 
CONNECT
OK
# echo AT+CIFSR > /dev/ttyUSB3
# 
10.152.249.168
#

正确识别4G驱动!

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr AC:00:00:CE:B4:38  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 92:E6:A8:7C:97:DE  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# 
# udhcpc -i eth0
udhcpc: started, v1.27.1
[ 1398.968142] musb-hdrc musb-hdrc.1.auto: int hwep alloc failed for 1x16
ifconfig: SIOCSIFFLAGS: No space left on device
udhcpc: sending discover
udhcpc: sending select for 192.168.0.100
udhcpc: lease of 192.168.0.100 obtained, lease time 86400
deleting routers
adding dns 192.168.0.1
# 
# 
# ping 123.149.232.30
PING 123.149.232.30 (123.149.232.30): 56 data bytes
64 bytes from 123.149.232.30: seq=0 ttl=118 time=1473.042 ms
64 bytes from 123.149.232.30: seq=2 ttl=118 time=847.767 ms
64 bytes from 123.149.232.30: seq=3 ttl=118 time=554.274 ms
^C
--- 123.149.232.30 ping statistics ---
4 packets transmitted, 3 packets received, 25% packet loss
round-trip min/avg/max = 554.274/958.361/1473.042 ms
# 

=================================================================

荔枝派TF卡支持合宙4G模块系统镜像(usb支持adb,rdins,串口等)
F1C100S_RNDIS_HOST_4G_Module.7z

#67 Re: 全志 SOC » V3S挖坑EC20 » 2021-01-12 22:09:20

为什么不用RNDIS?Gobi太老了

#70 Re: 全志 SOC » 在小智S3开发板上添加两个GPIO PB12/PB13 (Linux4.13), 但是却失败, 大家帮我找下问题 » 2020-11-24 09:46:36

JasonWoo 说:

可以写个模块,在模块里先释放这个pin,然后重新申请一遍。或者在kernel里加点printk定位下问题呗。

大帅 说:

这么神奇!!!
我也遇到同样的问题了,在f1c600有两路pwm,PA2和PE6, PA2始终是错误,PE6正常:
root@TinaLinux:/# echo 0 > sys/class/pwm/pwmchip0/export
sh: write error: Resource busy
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# echo 1 > sys/class/pwm/pwmchip0/export
root@TinaLinux:/#
同样的配置和驱动,在dts和sys_config.fex里面检查了很多次,配置没有冲突了,另外pwm的驱动移植到内核4.15跑起来两路pwm都正常,降低一下tina版本编译出来在c600上面跑两路也正常,
奇怪了,为什么在当前的tina3.5下面不行呢???


root@TinaLinux:/# cat tmp/pwm
platform/1c21000.pwm, 2 PWM devices
pwm-0   (lcd                 ): requested enabled
pwm-1   ((null)              ):

#71 Re: 全志 SOC » 在小智S3开发板上添加两个GPIO PB12/PB13 (Linux4.13), 但是却失败, 大家帮我找下问题 » 2020-11-24 09:42:09

大帅 说:

这么神奇!!!
我也遇到同样的问题了,在f1c600有两路pwm,PA2和PE6, PA2始终是错误,PE6正常:
root@TinaLinux:/# echo 0 > sys/class/pwm/pwmchip0/export
sh: write error: Resource busy
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# echo 1 > sys/class/pwm/pwmchip0/export
root@TinaLinux:/#
同样的配置和驱动,在dts和sys_config.fex里面检查了很多次,配置没有冲突了,另外pwm的驱动移植到内核4.15跑起来两路pwm都正常,降低一下tina版本编译出来在c600上面跑两路也正常,
奇怪了,为什么在当前的tina3.5下面不行呢???


root@TinaLinux:/# echo 0 > sys/class/pwm/pwmchip0/export
root@TinaLinux:/#
睡了一觉,解决了。

#72 Re: 全志 SOC » 在小智S3开发板上添加两个GPIO PB12/PB13 (Linux4.13), 但是却失败, 大家帮我找下问题 » 2020-11-24 00:08:49

这么神奇!!!
我也遇到同样的问题了,在f1c600有两路pwm,PA2和PE6, PA2始终是错误,PE6正常:
root@TinaLinux:/# echo 0 > sys/class/pwm/pwmchip0/export
sh: write error: Resource busy
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# echo 1 > sys/class/pwm/pwmchip0/export
root@TinaLinux:/#
同样的配置和驱动,在dts和sys_config.fex里面检查了很多次,配置没有冲突了,另外pwm的驱动移植到内核4.15跑起来两路pwm都正常,降低一下tina版本编译出来在c600上面跑两路也正常,
奇怪了,为什么在当前的tina3.5下面不行呢???

#73 Re: 全志 SOC » 发布一个主线F1C100S固件,5寸800x480,包含ucgui,adb,tslib,ns2009电阻触摸 » 2020-07-16 18:23:51

费了老大劲儿,再来一个视频:
用螺丝刀,食指,看来都不够粗啊,

#75 全志 SOC » 发布一个主线F1C100S固件,5寸800x480,包含ucgui,adb,tslib,ns2009电阻触摸 » 2020-07-14 18:00:37

大帅
回复: 8

buildroot:root,licheepi

正确使用adb姿势:
./work/run_adbd.sh

正确演示ucgui姿势:
./work/ucgui-emblinux

触摸库:
./work/run_export_tslib.sh

固件,此处下载 f1c100s_20200714-1743.rar

包含烧写批处理,此处下载 f1c100s.rar

gui演示:

ucgui的颜色不对,还没有研究明白,正常颜色运行的在这看:
https://whycan.cn/t_3316.html

adb在win7下面驱动识别正常,但是不能发现adb device, 在虚拟机Ubuntu里面adb使用正常,可以看这里:
https://whycan.cn/t_4876.html

ns2009触摸使用演示可以看这里:
https://whycan.cn/t_4908.html
2009触摸有飞线,触摸点会跳,还没有研究明白怎么解决。

#77 全志 SOC » nano移植驱动ns2009,触摸测试效果有飞线 » 2020-07-14 15:56:57

大帅
回复: 6

1. 使用内核的2007触摸驱动,
2. 填nano硬件i2c坑上拉电阻,
3. 触摸使用中断模式,跳线增加ns2009中断,使用PE3口,
4. buildroot编译tslib,

求解:
1.触摸测试的飞线,怎么解决?
2.测试的时候nano板子,发热特别厉害,是怎么回事?

手术后的nano:
000000.jpg

1测试写字:
11111111.jpg
2测试画圈:
222222222.jpg
3测试画点:
33333333.jpg

#79 Re: 全志 SOC » 趁晕哥跑路赶紧发帖求助:adb驱动正常,但是device not found » 2020-07-10 11:16:34

# [   51.276001] g_ffs gadget: high-speed config #1: FunctionFS + RNDIS
[  299.120687] g_ffs gadget: high-speed config #2: FunctionFS + ECM

发现在win7和Ubuntu下面,licheepi串口的消息不一样:
win7    : #1: FunctionFS + RNDIS
Ubuntu: #2: FunctionFS + ECM

win7 adb版本:
E:\桌面\platform-tools_r30.0.3-windows\platform-tools>adb version
Android Debug Bridge version 1.0.41
Version 30.0.3-6597393
Installed as E:\桌面\platform-tools_r30.0.3-windows\platform-tools\adb.exe

Ubuntu adb版本:
# osboxes@osboxes:~$ adb version
Android Debug Bridge version 1.0.32
osboxes@osboxes:~$

#80 Re: 全志 SOC » 趁晕哥跑路赶紧发帖求助:adb驱动正常,但是device not found » 2020-07-10 10:55:55

smartcar 说:

我用别人的固件是没有问题,由于要写一个驱动,没有别人的系统源码,自己从0移植了一套。

#81 Re: 全志 SOC » 趁晕哥跑路赶紧发帖求助:adb驱动正常,但是device not found » 2020-07-10 10:53:49

还遇见一个问题,usb插拔一个,电脑就失败不出来了, 只能licheepi 重启 再搞一次adb脚本 才能识别, 这是为啥?

#82 Re: 全志 SOC » 趁晕哥跑路赶紧发帖求助:adb驱动正常,但是device not found » 2020-07-10 10:46:00

哇酷小二 说:

把软件包装上,然后先把手机adb测试成功再接开发板。

首先想到的是不是win7下面原来使用的adb比较老,于是在下载一个:
ADB和Fastboot for Windows
https://dl.google.com/android/repository/platform-tools-latest-windows.zip

用这个还adb是不行,信息在下面图片里面有。

然后去虚拟机里安装adb工具试试,一顿操作之后,可以使用了!

疑问: 有没有办法可以在win7下面使用adb?

即可起俺要焚香更衣,斋戒沐浴,叩等大佬赐教  big_smile 

QQ截图20200710103036.jpg

#83 Re: 全志 SOC » F1C100S接上USB后反应 » 2020-07-10 10:00:43

又找了一台笔记本来测试:

笔记本系统win7旗舰sp1,一共有4个usb口,
测试发现:
1) 4个usb口都能正常驱动usb转串口设备。
2) 但是只有下面照片中标注的usb3和usb4能正常识别licheepi nano全志f1c100芯片,
      当licheepi进入FEL模式时插入usb1和usb2,系统连叮咚声音都没有,没有任何反应!

疑惑: 这是道理? 主板的这个几个usb口物理硬件上不一样么?
_20200710094800.jpg

#84 Re: 全志 SOC » F1C100S接上USB后反应 » 2020-07-10 09:10:57

俺也遇到这样的问题:

在公司的电脑win7 专业sp1,licheepi nano 必须要先短接flash的2-4管脚,然后用排针上面5v上电进入FEL模式,必须最后再插入usb线,电脑方能识别出芯片!!!

疑问1:不知道为什么住在海景别墅里面的大佬们,可以先短接flash的2-4管教,然后直接深深插入usb,电脑就识别出芯片了,然俺的就不行???

疑问2:在家里的电脑win7 旗舰版sp1上面装驱动,使用同样的操作姿势,电脑就是不能识别出芯片! 怀疑是系统的问题,然后msdn上搞个win7专业sp1重装系统,在纯洁的系统上,使用同样的操作姿势,还是不能识别出芯片,f1c100s进入FEL模式后,插入usb线电脑连叮咚声音都没有!!!

无数次的操作,usb的屁股都快插爆了,可恼哇可恼 mad 。。。

特此俺是沐浴更衣,焚香斋戒,虔诚来海景别墅大门口求教。

#85 Re: 全志 SOC » 趁晕哥跑路赶紧发帖求助:adb驱动正常,但是device not found » 2020-07-10 08:47:20

一大早,在虚拟机上试试,结果很扫兴。。。

QQ截图20200710084551.jpg

接下来奈何?

#87 Re: 全志 SOC » 趁晕哥跑路赶紧发帖求助:adb驱动正常,但是device not found » 2020-07-09 23:47:41

哇酷小二 说:

1. 换台电脑试一试

2. 挂载到 VMWARE + Ubuntu 试一试, 看是否正常.

这个电脑设别F1C600的adb是没有问题.
明天在虚拟机里试试.

#88 Re: 全志 SOC » 趁晕哥跑路赶紧发帖求助:adb驱动正常,但是device not found » 2020-07-09 18:33:48

取消下面两项试试:

Device Drivers > USB support > USB Gadget Support
   
   [ ]     RNDIS

   [ ]       Include configuration with RNDIS (Ethernet) 

编译再烧写看看:
# modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 iSerialNumber="buildroot"
[  203.119624] g_ffs: Unknown symbol rndis_borrow_net (err 0)
[  203.127150] g_ffs: Unknown symbol rndis_borrow_net (err 0)
modprobe: can't load module g_ffs (kernel/drivers/usb/gadget/legacy/g_ffs.ko): unknown symbol in module, or unknown parameter

很明显失败了!!!

#89 Re: 全志 SOC » F1C100S linux-4.15 无法软件重启的问题原因 » 2020-07-09 12:56:31

# reboot
# Stopping network: OK
Saving random seed... done.
Stopping logging: OK
umount: devtmpfs busy - remounted read-only
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to   20.550344 reboot: Restarting system
   21.549981 Reboot failed -- System halted


修改设备树: (DockerLicheepi下面)
/work/c600/2.kernel/linux-f1c100s-480272lcd-test/arch/arm/boot/dts/suniv.dtsi

wdt: watchdog@1c20ca0 {

            compatible = "allwinner,sun6i-a31-wdt";

            reg = <0x01c20ca0 0x20>;

              };

修改为:
wdt: watchdog@1c20ca0 {

            compatible = "allwinner,sun6i-a31-wdt";

            reg = <0x01c20ca0 0x20>;

                        status = "okay";
              };

修改之后编译内核dts:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 dtbs

上面不能解决问题!!!


==============================================================================
要是在配置linux内核时,未使能看门狗,而在系统restart的时候,主要是利用取消喂狗,来触发看门狗超时,从而引发复位。
    选择 → Device Drivers → Watchdog Timer Support  → WatchDog Timer Driver Core 和 Allwinner SoCs watchdog support

root@daeadcd74263:/work/c600/2.kernel/linux-f1c100s-480272lcd-test# make ARCH=arm menuconfig
---> Device Drivers
     * Watchdog Timer Support  --->
          ---> *   WatchDog Timer Driver Core
          ...
          ---> <*>   Allwinner SoCs watchdog support

保存退出再编译内核
root@daeadcd74263:/work/c600/2.kernel/linux-f1c100s-480272lcd-test# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4


问题解决了:

# 
# reboot
# Stopping network: OK
Saving random seed... done.
Stopping logging: OK
umount: devtmpfs busy - remounted read-only
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to[   21.795427] reboot: Restarting system

U-Boot SPL 2018.01 (Jul 08 2020 - 03:26:27)
DRAM: 32 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 (Jul 08 2020 - 03:26:27 +0000) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 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

In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
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 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fa000, end 816ff144 ... OK

Starting kernel ...

#90 全志 SOC » 趁晕哥跑路赶紧发帖求助:adb驱动正常,但是device not found » 2020-07-09 11:39:07

大帅
回复: 14

昨天刚移植的系统,增加了adb,开机进shell里手动执行下面指令:
modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 iSerialNumber="buildroot"
mkdir -p /dev/usb-ffs/adb
mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
adbd &

然后插入usb,电脑也识别出adb设备了,但是在cmd里面adb shell错误:error: device not found
这是为啥?
插入usb之后提示:
[   87.222118] g_ffs gadget: high-speed config #1: FunctionFS + RNDIS
是RNDIS影响的么?


1. 这是插入usb电脑驱动:
11.png

2. adb shell:
Microsoft Windows XP [版本 6.1.7601]
(C) 版权所有 1985-2001 Microsoft Corp.

F:\Lichee Nano\扩展\adb shell>adb shell
* daemon not running. starting it now *
* daemon started successfully *
error: device not found

3. 开机启动log:

# 
U-Boot SPL 2018.01 (Jul 08 2020 - 03:26:27)
DRAM: 32 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 (Jul 08 2020 - 03:26:27 +0000) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 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

In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
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 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fa000, end 816ff130 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano (root@daeadcd74263) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #8 Tue Jul 7 03:34:50 UTC 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: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22668K/32768K available (6144K kernel code, 240K rwdata, 1444K rodata, 1024K init, 249K bss, 10100K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 241 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 250 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.000045] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000110] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000644] Console: colour dummy device 80x30
[    0.000729] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070230] pid_max: default: 32768 minimum: 301
[    0.070537] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070576] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.071988] CPU: Testing write buffer coherency: ok
[    0.073611] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076117] devtmpfs: initialized
[    0.082791] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.082854] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.083105] pinctrl core: initialized pinctrl subsystem
[    0.085048] NET: Registered protocol family 16
[    0.086441] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.088217] cpuidle: using governor menu
[    0.114189] SCSI subsystem initialized
[    0.114514] usbcore: registered new interface driver usbfs
[    0.114689] usbcore: registered new interface driver hub
[    0.114878] usbcore: registered new device driver usb
[    0.115300] pps_core: LinuxPPS API ver. 1 registered
[    0.115326] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.115387] PTP clock support registered
[    0.115896] Advanced Linux Sound Architecture Driver Initialized.
[    0.117367] clocksource: Switched to clocksource timer
[    0.143820] NET: Registered protocol family 2
[    0.145201] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.145278] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.145328] TCP: Hash tables configured (established 1024 bind 1024)
[    0.145579] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.145632] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.146079] NET: Registered protocol family 1
[    0.147257] RPC: Registered named UNIX socket transport module.
[    0.147296] RPC: Registered udp transport module.
[    0.147313] RPC: Registered tcp transport module.
[    0.147328] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.149611] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.151372] Initialise system trusted keyrings
[    0.151939] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.167018] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.169373] NFS: Registering the id_resolver key type
[    0.169456] Key type id_resolver registered
[    0.169478] Key type id_legacy registered
[    0.169591] jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
[    0.183954] Key type asymmetric registered
[    0.183995] Asymmetric key parser 'x509' registered
[    0.184189] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.184220] io scheduler noop registered
[    0.184237] io scheduler deadline registered
[    0.185024] io scheduler cfq registered (default)
[    0.185058] io scheduler mq-deadline registered
[    0.185077] io scheduler kyber registered
[    0.186155] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.195669] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.382501] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.389244] console [ttyS0] disabled
[    0.409492] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.889289] console [ttyS0] enabled
[    0.900051] panel-simple panel: panel supply power not found, using dummy regulator
[    0.938039] brd: module loaded
[    0.959194] loop: module loaded
[    0.963055] SCSI Media Changer driver v0.25 
[    0.970823] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.975603] 4 ofpart partitions found on MTD device spi0.0
[    0.981194] Creating 4 MTD partitions on "spi0.0":
[    0.986006] 0x000000000000-0x000000100000 : "u-boot"
[    0.993682] 0x000000100000-0x000000110000 : "dtb"
[    1.000935] 0x000000110000-0x000000510000 : "kernel"
[    1.008420] 0x000000510000-0x000001000000 : "rootfs"
[    1.016399] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.023053] ehci-platform: EHCI generic platform driver
[    1.028627] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.034846] ohci-platform: OHCI generic platform driver
[    1.040543] usbcore: registered new interface driver usb-storage
[    1.047767] i2c /dev entries driver
[    1.107494] sunxi-mmc 1c0f000.mmc: base:0x3474c5ef irq:19
[    1.114960] usbcore: registered new interface driver usbhid
[    1.120655] usbhid: USB HID core driver
[    1.142202] sun4i-codec 1c23c00.codec: ASoC: Failed to create component debugfs directory
[    1.154898] sun4i-codec 1c23c00.codec: Codec <-> 1c23c00.codec mapping ok
[    1.170129] NET: Registered protocol family 17
[    1.174794] Key type dns_resolver registered
[    1.181519] Loading compiled-in X.509 certificates
[    1.197136] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc073a258)
[    1.206032] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073953c)
[    1.213809] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.220461] [drm] No driver support for vblank timestamp query.
[    1.274475] Console: switching to colour frame buffer device 60x34
[    1.297793] sun4i-drm display-engine: fb0:  frame buffer device
[    1.304921] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.314088] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.326074] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.332038] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.342196] hub 1-0:1.0: USB hub found
[    1.346159] hub 1-0:1.0: 1 port detected
[    1.353146] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.370531] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.377285] vcc3v3: disabling
[    1.380374] ALSA device list:
[    1.383350]   #0: Loopback 1
[    1.386268]   #1: F1C100s Audio Codec
[    1.390908] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.399624] cfg80211: failed to load regulatory.db
[    1.502386] random: crng init done
[    2.465482] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    2.473507] devtmpfs: mounted
[    2.481232] Freeing unused kernel memory: 1024K
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

Welcome to Buildroot
Lichee login: root
Password: 
# 
# 
# ls
# cd /
# ls
bin      lib      media    proc     sbin     usr
dev      lib32    mnt      root     sys      var
etc      linuxrc  opt      run      tmp
# 
# 
# modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 iSerialNumber="buildroot"
[   47.826561] file system registered
# 
# mkdir -p /dev/usb-ffs/adb
# 
# mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
# 
# adbd &
# 
# install_listener('tcp:5037','*smartsocket*')
[   73.867570] read descriptors
[   73.870542] read strings
[   73.873285] using random self ethernet address
[   73.877892] using random host ethernet address
[   73.882405] using random self ethernet address
[   73.886849] using random host ethernet address
[   73.892646] usb0: HOST MAC 5e:9e:62:f6:5a:b5
[   73.897026] usb0: MAC e2:63:4f:78:06:04
[   73.901264] g_ffs gadget: g_ffs ready
[   87.222118] g_ffs gadget: high-speed config #1: FunctionFS + RNDIS

#

#92 Re: 全志 SOC » [求助]无法识别lichee nano 板子 » 2020-07-06 15:42:24

救活了,焊接掉的norflash 用XTW100烧个固件,再焊接上居然又活了。。。 真奇葩的操作!

另外我这个nano自打打手,让电脑识别的操作步骤是:先短接norflash管教,然后用外部5v上电(必须不是插入usb线!!),然后断开短接norflash(继续外部5V供电),最后插入usb线连到电脑上才能正常识别出设备!!!

简直了更奇葩的骚操作。。。

为什么我的nano不能像你们的那样,短接norflash,直接插USB线就可以识别出来???

#93 Re: 全志 SOC » [求助]无法识别lichee nano 板子 » 2020-07-06 10:17:21

smartcar 说:

怀疑吹的时候把隔壁电阻电容或其他元件吹出问题了。

我去,这个板子也没有丝印,也对不上元器件位置,怎么想办法换换阻容元件呢?

#94 Re: 全志 SOC » [求助]无法识别lichee nano 板子 » 2020-07-06 09:50:00

路人甲 说:

F1C600 在哪里, 我没看到呢

这是识别的600,
QQ截图2020070609自知则知之4924.jpg

#95 全志 SOC » [求助]无法识别lichee nano 板子 » 2020-07-06 09:38:54

大帅
回复: 5

这个板子玩一阵跑的挺欢腾的,
上周把F1C600板子上的norflash用热吹枪吹下来,吹到lichee nano上面,看cpu不一样能不能跑得起来,结果没跑起来。。。
接着就又把原来正常的norflash又吹到licheepi nano上了,

自从开启了抓狂模式。。。

电脑上怎么也识别不了licheepi nano了,不知道硬件哪里影响了?
短接norflash的1&4脚,2&4脚,1&2脚,芯片都快捣烂了,就是不能识别,驱动也装过来换过去,最后把norflash焊掉插usb还是不识别,
用F1C600的一个板测试了一下电脑得驱动没有问题,
licheepi咋这么顽固,不知道坛里高手能否给点指点,看看nano板子上是不是哪里有问题?
QQ截图20200706093021.jpg
QQ截图20200706092846.jpg
_20200706093808.jpg

#96 Re: 全志 SOC » [求助] 无法识别新买的 lichee nano 板子 » 2020-07-06 09:19:06

unturned3 说:

你插入usb的时候,spiflash的脚1 是保持接地的吗?
我自己试的时候,就是把脚1 接地,插USB,把脚1 接地的线给断开,然后就行了。

接地了,不行,我把norflash焊掉也不行。。。识别的未知设备usb id 是00 00,不知道硬件哪里出问题了。。。。

#97 Re: 全志 SOC » [求助] 无法识别新买的 lichee nano 板子 » 2020-07-04 17:07:59

为啥用家里的电脑win7旗舰版 sp1识别不了licheepi nano F1c100s?
操作先短接spiflash管脚,然后插入usb,电脑只有叮咚一声,设备管理器里没有发现任何新设备?

家里两台电脑都是这个系统,这是win7系统的问题么?

#98 Re: 全志 SOC » 修改了printk打印等级,为什么就不能开机了? » 2020-07-02 18:50:14

gxp 说:

你是在哪里修改啊?

在\tina\target\allwinner\sitar-cuckoo\configs\env-3.10.cfg里面

不知道与在kernel_menuconfig取消这个有关系没有?  [ ]  Console on SUNXI UART port

#99 全志 SOC » 修改了printk打印等级,为什么就不能开机了? » 2020-07-02 18:22:37

大帅
回复: 2

修改打印等级
想看看启动时候驱动的printk
想确定下,加载驱动的时候,能不能读取文件

只有loglevel=0时,功能正常,开机正常,7和8就不能开机了,这是什么道理?



#kernel command arguments
enforcing=1
earlyprintk=sunxi-uart,0x01c25000
initcall_debug=0
console=ttyS0,115200
nor_root=/dev/mtdblock4
nand_root=/dev/nandd
mmc_root=/dev/mmcblk0p7
init=/sbin/init
rdinit=/rdinit
loglevel=7
#loglevel=8
#loglevel=0

#100 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » emwin/touchgfx/lvgl嵌入式GUI测试 » 2020-06-06 15:56:38

无法访问此网站 找不到 v.youku.com 的服务器 IP 地址。
尝试运行 Windows 网络诊断。
DNS_PROBE_FINISHED_NXDOMAIN

#102 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2020-06-05 10:49:17

大帅 说:

俺是这么干的更狠一些,看着应该没什么错,我再试试你的,感觉不像是a的问题。
https://whycan.cn/files/members/1398/QQ图片20200604104033.png


卧槽,卧槽,丢塔喽木~~~
问题原来一直是空间分配的太小了。。。。。。 __Gui_NumBytes__=8192000

#103 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2020-06-04 10:45:45


俺是这么干的更狠一些,看着应该没什么错,我再试试你的,感觉不像是a的问题。
QQ图片20200604104033.png

#105 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2020-05-18 17:39:14

regbbs 说:

@大帅 ,只需要改一个地方,不行就是你改的地方不对。我用的是那个master的库测试的。

大佬可否告知下邮箱?
帮我试下.a,分析了几天感觉好像不在.a的问题上 sad

#106 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2020-05-15 17:29:17

regbbs 说:

@大帅 ,只需要改一个地方,不行就是你改的地方不对。我用的是那个master的库测试的。

越搞不定,越想搞!! big_smile

我用的和你的库一样, 动了这一处,难道不对? smile
QQ截图20200515172342.jpg

#107 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2020-05-14 16:50:20

regbbs 说:

其实只要看下arm汇编,以及对照下970的手册,查找下对应函数的功能,自己就可以搞定。
毕竟emwin这个涉及到商业产品。

百思不得其解。。。
参照regbbs的思路修改了一处,重新编译,
为啥俺的就是申请不到内存空间给gui?

void GUI_X_Config(void) {
	
  printf("GUI_X_Config()\n");

  static U32 aMemory[GUI_NUMBYTES / 4];

  GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);

  GUI_SetDefaultFont(GUI_FONT_6X8);
  
  unsigned int GetNumFreeBytes;
  GetNumFreeBytes = GUI_ALLOC_GetNumUsedBlocks();
  printf("GUI_ALLOC_GetNumUsedBlocks()=0x%x\n",GetNumFreeBytes);

  GUI_ALLOC_DATATYPE i = GUI_ALLOC_GetNumFreeBytes();
  printf("%d = GUI_ALLOC_GetNumFreeBytes().\n", i);	
  if ( i < (1024L * 2200) ){    //if ( i <RECOMMENDED_MEMORY) { //(1024L * 2200)
	printf("Not enough memory available.\n");
    return;
  }
}

编译gcc:arm-2014.05/bin/arm-none-linux-gnueabi-gcc
运行结果:

# ./GUIDemo 
uVideoSize = 0x177000
var.xres = 0x320
var.yres = 0x1e0
pVideoBuffer = 0xb6e78000
Main Task thread
WM_SetCreateFlags(WM_CF_MEMDEV)
GUI_Init()
GUI_X_Config()
GUI_ALLOC_GetNumUsedBlocks()=0x0
0 = GUI_ALLOC_GetNumFreeBytes().
Not enough memory available.
LCD_X_Config()
### g_xres=800 g_yres=480 g_bits_per_pixel=32
LCD_GetSwapXY()
No LCD calibration
800, 480, 32
0=GUI_Init()
WM_MULTIBUF_Enable(1)
GUIDEMO_Main()
GUIDEMO_Main()
Not enough memory available.
# 

#108 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2020-05-11 15:53:53

regbbs 说:

确实是有检测是否是Nuvoton的代码。但是跳过后,会出现 Illegal instruction。还没用查找到具体是哪个地方出现的这个。
https://whycan.cn/files/members/3640/em.png

流弊,继续跟进!!!

#109 Re: 全志 SOC » 请问有没有大神搞定了f1c100s的主线kernel4.19下的声卡驱动?[13楼@wammaw1314搞定声卡驱动,欢迎测试] » 2020-05-11 09:10:50

pajoke 说:

13楼的音频驱动,音频输出已验证,可以使用。
音频输入没有验证。
内核:5.6.11

方便提供一个固件么?测试一下手飞的硬件

#110 全志 SOC » 求分享一个f1c100s带声卡alsa的固件,俺测试一下硬件 » 2020-05-09 13:34:32

大帅
回复: 1

求分享一个f1c100s带声卡alsa的固件,俺测试一下硬件

#111 Re: 全志 SOC » 主线4.19 增加声卡驱动,启动失败了? » 2020-05-09 09:43:05

经过以上几处修改,可以正常开机,可以正常识别声卡。

#112 Re: 全志 SOC » 主线4.19 增加声卡驱动,启动失败了? » 2020-05-09 09:33:02

[    1.469081] Waiting for root device /dev/mtdblock3...
[  195.813232] random: crng init done
开机启动失败:

修改源码设备树,增加spi0分区信息:
增加设备树spi0下面分区信息:
            partitions {
                    compatible = "fixed-partitions";
                    #address-cells = <0x1>;
                    #size-cells = <0x1>;

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

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

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

                    partition@510000 {
                        label = "rootfs";
                        reg = <0x510000 0xaf0000>;
                    };
                };

#113 Re: 全志 SOC » 主线4.19 增加声卡驱动,启动失败了? » 2020-05-09 09:28:27

编译过程中的错误,需要修改源码如下:

1.linux_patch\drivers\dma\Makefile屏蔽mediatek和ti

#obj-y += mediatek/

obj-y += qcom/

#obj-y += ti/

obj-y += xilinx/

2.linux_patch\drivers\dma\Kconfig屏蔽mediatek和ti

source "drivers/dma/bestcomm/Kconfig"


#source "drivers/dma/mediatek/Kconfig"


source "drivers/dma/qcom/Kconfig"


source "drivers/dma/dw/Kconfig"


source "drivers/dma/hsu/Kconfig"


source "drivers/dma/sh/Kconfig"


#source "drivers/dma/ti/Kconfig"

3. linux_patch\sound\soc\sunxi\suniv-codec.c结构成员use_pmdown_time修改为pmdown_time

.pmdown_time    = 1,  /*.use_pmdown_time    = 1,*/

#115 Re: 全志 SOC » f1c100s/200s图形化烧录工具 » 2020-05-09 09:06:25

装chrome了吗? 依赖于chrome浏览器

装了,我电脑就这一个浏览器。

#117 Re: 全志 SOC » 求教:log日志的Linux version 4.15.0-rc8-licheepi-nano在内核代码里哪地方定义? » 2020-05-08 11:36:40

哇酷小二 说:

用grep搜源码目录,我记得是脚本生成

惭愧。。。。

查找指令用错了,找到了!

Binary file drivers/net/mii.ko matches
Binary file drivers/net/usb/rtl8150.mod.o matches
Binary file drivers/net/usb/rtl8150.ko matches
Binary file arch/arm/boot/Image matches
Binary file .tmp_vmlinux1 matches
include/config/kernel.release:1:4.15.0-rc8-licheepi-nano
include/generated/utsrelease.h:1:#define UTS_RELEASE "4.15.0-rc8-licheepi-nano"
Binary file init/version.o matches
Binary file kernel/sys.o matches
Binary file kernel/module.o matches
Binary file .tmp_vmlinux2 matches
Binary file vmlinux matches
Binary file crypto/echainiv.mod.o matches
Binary file crypto/echainiv.ko matches
Binary file vmlinux.o matches

#118 全志 SOC » 求教:log日志的Linux version 4.15.0-rc8-licheepi-nano在内核代码里哪地方定义? » 2020-05-08 11:20:39

大帅
回复: 2

# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version  4.15.0-rc8-licheepi-nano

log日志的Linux version  4.15.0-rc8-licheepi-nano在内核代码里哪地方定义?

find . -name "*4.15.0-rc8-licheepi-nano*"
怎么搜索不到?

再次搜索只能在设备树里找到一些
find . -name "*licheepi*"
./arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
./arch/arm/boot/dts/sun5i-a13-licheepi-one.dts
./arch/arm/boot/dts/.suniv-f1c100s-licheepi-nano.dtb.dts.tmp
./arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts
./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
./arch/arm/boot/dts/.suniv-f1c100s-licheepi-nano.dtb.cmd
./arch/arm/boot/dts/.suniv-f1c100s-licheepi-nano.dtb.d.pre.tmp
./arch/arm/boot/dts/.suniv-f1c100s-licheepi-nano.dtb.d.dtc.tmp
./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb

#119 Re: 全志 SOC » f1c100s/200s图形化烧录工具 » 2020-05-07 15:13:30

F:\gosunxifel>gosunxifel.exe
2020/05/07 15:12:47 config.go 44 F://gosunxifel
2020/05/07 15:12:47 main.go 15 Running with CPUs:4
2020/05/07 15:12:47 main.go 19 app-version:v0.0.1
2020/05/07 15:12:47 ui.go 37 exec: "": executable file not found in %PATH%
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x74b159]

goroutine 1 [running]:
main.(*Myweb).Run(0xb5ff00)
        F:/go_work/src/gosunxifel/ui.go:45 +0x49
main.main()
        F:/go_work/src/gosunxifel/main.go:31 +0x95

F:\gosunxifel>

#120 全志 SOC » PhoenixSuit的image是怎么生成的? 有bin转image工具么? » 2020-05-06 16:08:47

大帅
回复: 3

PhoenixSuit的image是怎么生成的? 有bin转image工具么?

#121 全志 SOC » 主线4.19 增加声卡驱动,启动失败了? » 2020-04-30 12:02:49

大帅
回复: 5

参考: https://whycan.cn/t_2041.html#p39583

针对主线kernel4.19,我增加了声卡驱动,原来正常的启动的固件uboot和rootfs没有修改,编译后zImage和dtb打包烧写后启动失败,求指点,这大致是什么原因?

U-Boot SPL 2018.01-00050-g85fc4ff3d1-dirty (Sep 01 2019 - 16:37:09)
DRAM: 32 MiB
SPL: Unsupported Boot Device!
Trying to boot from sunxi SPI


U-Boot 2018.01-00050-g85fc4ff3d1-dirty (Sep 01 2019 - 16:37:09 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
Using default environment

Setting up a 800x480 lcd console (overscan 0x0)
In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
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 0x60000, size 0x10000
SF: 65536 bytes @ 0x60000 Read: OK
Uncompressed size: 385078 = 0x5E036
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80ea4000, end 80ea9825 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano (root@d8328ec61965) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #2 Mon Apr 27 02:08:11 UTC 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: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2  vt.global_cursor_default=0
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22668K/32768K available (6144K kernel code, 239K rwdata, 1420K rodata, 1024K init, 247K bss, 10100K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 240 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 248 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.000050] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000119] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000766] Console: colour dummy device 80x30
[    0.000863] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070244] pid_max: default: 32768 minimum: 301
[    0.070555] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070598] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072060] CPU: Testing write buffer coherency: ok
[    0.074002] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076711] devtmpfs: initialized
[    0.084927] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.085003] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.085268] pinctrl core: initialized pinctrl subsystem
[    0.087349] NET: Registered protocol family 16
[    0.089420] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.091474] cpuidle: using governor menu
[    0.122661] SCSI subsystem initialized
[    0.123064] usbcore: registered new interface driver usbfs
[    0.123223] usbcore: registered new interface driver hub
[    0.123454] usbcore: registered new device driver usb
[    0.123977] pps_core: LinuxPPS API ver. 1 registered
[    0.124005] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.124074] PTP clock support registered
[    0.124637] Advanced Linux Sound Architecture Driver Initialized.
[    0.126328] clocksource: Switched to clocksource timer
[    0.155472] NET: Registered protocol family 2
[    0.157174] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.157255] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.157306] TCP: Hash tables configured (established 1024 bind 1024)
[    0.157664] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.157737] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.158279] NET: Registered protocol family 1
[    0.159565] RPC: Registered named UNIX socket transport module.
[    0.159605] RPC: Registered udp transport module.
[    0.159621] RPC: Registered tcp transport module.
[    0.159636] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.161973] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.164008] Initialise system trusted keyrings
[    0.164613] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.183212] NFS: Registering the id_resolver key type
[    0.183304] Key type id_resolver registered
[    0.183325] Key type id_legacy registered
[    0.197632] Key type asymmetric registered
[    0.197677] Asymmetric key parser 'x509' registered
[    0.197904] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.197940] io scheduler noop registered
[    0.197958] io scheduler deadline registered
[    0.198778] io scheduler cfq registered (default)
[    0.198808] io scheduler mq-deadline registered
[    0.198826] io scheduler kyber registered
[    0.200180] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.210474] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.402120] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.409690] console [ttyS0] disabled
[    0.429972] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 27, base_baud = 6250000) is a 16550A
[    0.900221] console [ttyS0] enabled
[    0.914714] panel-simple panel: panel supply power not found, using dummy regulator
[    0.958972] brd: module loaded
[    0.984794] loop: module loaded
[    0.988969] SCSI Media Changer driver v0.25

#122 Re: 全志 SOC » 为啥PhoenixSuit不识别f1c100s,而sunxi-fel.exe可以? » 2020-04-30 11:51:09

九霄云外 说:

作为代理和原厂出来的,很负责任的说,PhoenixSuit对全志所有平台通用,没有限制的说法; 识别不到是没检测到芯片进入FEL模式吧

可以用烧PhoenixSuit烧F1C100S?
确实进入FEL模式了,sunxitool都可以烧。

#123 Re: 全志 SOC » 为啥PhoenixSuit不识别f1c100s,而sunxi-fel.exe可以? » 2020-04-30 09:44:58

达克罗德 说:

限制了f1c100s,但200s可以

换驱动也是一样!!!
原来F1C100S不能用哦!!!!
4.jpg

#124 全志 SOC » 为啥PhoenixSuit不识别f1c100s,而sunxi-fel.exe可以? » 2020-04-30 09:29:24

大帅
回复: 16

电脑显示的驱动:
3.jpg

sunxi-fel.exe可以识别出来:
1.jpg

为啥PhoenixSuit识别不出来?
2.jpg

驱动不对?

#125 Re: 全志 SOC » 请问有没有大神搞定了f1c100s的主线kernel4.19下的声卡驱动?[13楼@wammaw1314搞定声卡驱动,欢迎测试] » 2020-04-27 10:05:04

编译错误:

结构体成员名不一样,这是为什么? 是内核不一样?还是Mesih Kilinc书写错误?

发现这个结构体没有成员.use_pmdown_time

static const struct snd_soc_component_driver sun8i_a23_codec_codec = {
    .controls        = sun8i_a23_codec_codec_controls,
    .num_controls        = ARRAY_SIZE(sun8i_a23_codec_codec_controls),
    .dapm_widgets        = sun8i_a23_codec_codec_widgets,
    .num_dapm_widgets    = ARRAY_SIZE(sun8i_a23_codec_codec_widgets),
    .idle_bias_on        = 1,
    .use_pmdown_time    = 1,
    .endianness        = 1,
    .non_legacy_dai_naming    = 1,
};

我的内核里结构体声明成员 是 pmdown_time:

/* component interface */
struct snd_soc_component_driver {
    const char *name;

    /* Default control and setup, added after probe() is run */
    const struct snd_kcontrol_new *controls;
    unsigned int num_controls;
    const struct snd_soc_dapm_widget *dapm_widgets;
    unsigned int num_dapm_widgets;
    const struct snd_soc_dapm_route *dapm_routes;
    unsigned int num_dapm_routes;

    int (*probe)(struct snd_soc_component *);
    void (*remove)(struct snd_soc_component *);
    int (*suspend)(struct snd_soc_component *);
    int (*resume)(struct snd_soc_component *);

    /* pcm creation and destruction */
    int (*pcm_new)(struct snd_soc_pcm_runtime *);
    void (*pcm_free)(struct snd_pcm *);

    /* component wide operations */
    int (*set_sysclk)(struct snd_soc_component *component,
              int clk_id, int source, unsigned int freq, int dir);
    int (*set_pll)(struct snd_soc_component *component, int pll_id,
               int source, unsigned int freq_in, unsigned int freq_out);
    int (*set_jack)(struct snd_soc_component *component,
            struct snd_soc_jack *jack,  void *data);

    /* DT */
    int (*of_xlate_dai_name)(struct snd_soc_component *component,
                 struct of_phandle_args *args,
                 const char **dai_name);
    int (*of_xlate_dai_id)(struct snd_soc_component *comment,
                   struct device_node *endpoint);
    void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type,
        int subseq);
    int (*stream_event)(struct snd_soc_component *, int event);
    int (*set_bias_level)(struct snd_soc_component *component,
                  enum snd_soc_bias_level level);

    const struct snd_pcm_ops *ops;
    const struct snd_compr_ops *compr_ops;

    /* probe ordering - for components with runtime dependencies */
    int probe_order;
    int remove_order;

    /* bits */
    unsigned int idle_bias_on:1;
    unsigned int suspend_bias_off:1;
    unsigned int pmdown_time:1; /* care pmdown_time at stop */
    unsigned int endianness:1;
    unsigned int non_legacy_dai_naming:1;
};
sound/soc/sunxi/suniv-codec.c:862:3: error: 'const struct snd_soc_component_driver' has no member named 'use_pmdown_time'; did you mean 'pmdown_time'?
  .use_pmdown_time = 1,
   ^~~~~~~~~~~~~~~
   pmdown_time
sound/soc/sunxi/suniv-codec.c:1170:3: error: 'const struct snd_soc_component_driver' has no member named 'use_pmdown_time'; did you mean 'pmdown_time'?
  .use_pmdown_time = 1,
   ^~~~~~~~~~~~~~~
   pmdown_time
sound/soc/sunxi/suniv-codec.c:1198:3: error: 'const struct snd_soc_component_driver' has no member named 'use_pmdown_time'; did you mean 'pmdown_time'?
  .use_pmdown_time = 1,
   ^~~~~~~~~~~~~~~
   pmdown_time
sound/soc/sunxi/suniv-codec.c:1427:3: error: 'const struct snd_soc_component_driver' has no member named 'use_pmdown_time'; did you mean 'pmdown_time'?
  .use_pmdown_time = 1,
   ^~~~~~~~~~~~~~~
   pmdown_time

#126 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » ZLG开源 GUI 引擎 AWTK 1.1 发布 » 2019-12-05 21:15:45

各路大神,这是什么错误啊?

root@osboxes:/work/EmbedSky/AWTK/awtk-linux-fb# scons
Traceback (most recent call last):
  File "/usr/local/bin/scons", line 195, in <module>
    import SCons.Script
  File "/usr/local/lib/scons/SCons/Script/__init__.py", line 94, in <module>
    from . import Main
  File "/usr/local/lib/scons/SCons/Script/Main.py", line 1016
    except SCons.Errors.StopError as e:
         ^
SyntaxError: invalid syntax
root@osboxes:/work/EmbedSky/AWTK/awtk-linux-fb#

#127 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » ZLG开源 GUI 引擎 AWTK 1.1 发布 » 2019-12-05 13:53:48

折腾几个晚上没有编译过去遇见各种各样的问题,什么编码问题改成utf-8,后来编译还是有错,最后可能是Ubuntu16.4自动的python2.2版本太低了,还没有到上测试。

#128 Re: 全志 SOC » 荔枝派Nano使用gcc-linaro-7.2.1进行交叉编译得到的可执行文件,一运行就"segmentation fault" » 2019-12-04 16:45:54

大帅 说:

@@还不会用gdb~~

用arm-none-linux-gnueabi-gcc编译可以运行,但是emwin申请不到栈,就换Linux-gcc试试,一试就撞墙了~~

#130 Re: 全志 SOC » 荔枝派Nano使用gcc-linaro-7.2.1进行交叉编译得到的可执行文件,一运行就"segmentation fault" » 2019-12-04 16:33:47

还能这么玩 说:

‘--with-arch=armv5te’   ====>    ‘-march=armv5te’

试过之后错误变了:~~~~~~makefile没有加-static
# ./NuvotonGUIDemo
Segmentation fault

#132 Re: 全志 SOC » 荔枝派Nano使用gcc-linaro-7.2.1进行交叉编译得到的可执行文件,一运行就"segmentation fault" » 2019-12-04 15:25:56

晕哥 说:

arm-linux-gnueabi-gcc --with-arch=armv4 --static

编译的时候, 加上这个指令试一试。

或者:

arm-linux-gnueabi-gcc --with-arch=armv5te --static

error: unrecognized command line option ‘--with-arch=armv5te’; did you mean ‘-march=armv5te’?

root@osboxes:/work/Lichee/helloword/emWin/Sample/GUIDemo# make
/work/Lichee/helloword/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc --with-arch=armv5te -MD -O2 -D__Gui_NumBytes__=512000 -I. -I../../Config -I../../Include -Itslib -c Application/GUIDEMO_Automotive.c -o Application/GUIDEMO_Automotive.o
arm-linux-gnueabi-gcc: error: unrecognized command line option ‘--with-arch=armv5te’; did you mean ‘-march=armv5te’?
Makefile:34: recipe for target 'Application/GUIDEMO_Automotive.o' failed
make: *** [Application/GUIDEMO_Automotive.o] Error 1

#133 Re: 全志 SOC » 荔枝派Nano使用gcc-linaro-7.2.1进行交叉编译得到的可执行文件,一运行就"segmentation fault" » 2019-12-04 15:20:56

@晕哥
我下载这个怎么有没有ARMv5?
用这个编译运行
# ./NuvotonGUIDemo
Illegal instruction

root@osboxes:/work/Lichee/helloword/emWin/Sample/GUIDemo# cd /work/Lichee/helloword/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/
root@osboxes:/work/Lichee/helloword/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin# ./arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=./arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/work/Lichee/helloword/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../libexec/gcc/arm-linux-gnueabi/7.4.1/lto-wrapper
Target: arm-linux-gnueabi
Configured with: '/home/tcwg-buildslave/workspace/tcwg-make-release_0/snapshots/gcc.git~linaro-7.4-2019.02/configure' SHELL=/bin/bash --with-mpc=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libmudflap --enable-lto --enable-shared --without-included-gettext --enable-nls --with-system-zlib --disable-sjlj-exceptions --enable-gnu-unique-object --enable-linker-build-id --disable-libstdcxx-pch --enable-c99 --enable-clocale=gnu --enable-libstdcxx-debug --enable-long-long --with-cloog=no --with-ppl=no --with-isl=no --disable-multilib --with-float=soft --with-mode=thumb --with-tune=cortex-a9 --with-arch=armv7-a --enable-threads=posix --enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function --with-build-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/sysroots/arm-linux-gnueabi --with-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabi/libc --enable-checking=release --disable-bootstrap --enable-languages=c,c++,fortran,lto --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabi --prefix=/home/tcwg-buildslave/workspace/tcwg-make-release_0/_build/builds/destdir/x86_64-unknown-linux-gnu
Thread model: posix
gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)
root@osboxes:/work/Lichee/helloword/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin#

#135 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-04 12:48:28

armstrong 说:

sorry,你不能使用nuvoton里的LCDConf.c,要自己适配一个。
用这个模板即可,稍微改一下就行的。
比如你制作了自己的GUIDRV_Template16_API或者GUIDRV_Template32_API,然后把这个替换LCDConf.c里的这里
    if (g_bits_per_pixel == 32)
    GUI_DEVICE_CreateAndLink(&GUIDRV_Template32_API, GUICC_M888, 0, 0);
    else
    GUI_DEVICE_CreateAndLink(&GUIDRV_Template16_API, GUICC_M565, 0, 0);
模板:
https://whycan.cn/files/members/1592/GUIDRV_Template_c.txt

为什么要自己适配呢?因为nuvoton改写了emWin源码,把库里的GUIDRV_LIN_32/GUIDRV_LIN_16改成依赖ge2d的了。
自己适配一个就不用它们,自己来实现一个在内存块里绘制点、线、面的驱动程序。当然这并不复杂,因为emWin有模板。

@armstrong
哇呀呀,万分的感谢大佬,~~ 又有动力继续搞了,哈哈

#136 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-03 13:46:42

armstrong 说:

s3c2410/s3c2440是armv4t;
s3c2416才是跟f1c100s一样的,跟nuvoton也是一样的。

@armstrong
大神我在f1c100上面试了: 提示打不开/dev/ge2d,没有硬件加速。。。

另外我编译的时候用的是arm-none-linux-gnueabi-gcc不知道影响不?

# ./NuvotonGUIDemo
uVideoSize = 0x177000
var.xres = 0x320
var.yres = 0x1e0
pVideoBuffer = 0xb6d8f000
Main Task thread
WM_SetCreateFlags(WM_CF_MEMDEV)
GUI_Init()
GUI_X_Config()
GUI_ALLOC_GetNumUsedBlocks()=0x0
LCD_X_Config()
### g_xres=800 g_yres=480 g_bits_per_pixel=32
LCD_GetSwapXY()
LCD_SetVRAMAddrEx(0, (void *)pVideoBuffer)
No LCD calibration
Cannot open ge2d!
^C
#
#

#137 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-02 22:32:45

armstrong 说:

如果是裸机开发,就用NXP最近发布的V5.50;如果是linux应用程序,就用nuvoton发布的V5.48k!
完美!这两个厂商发布的库,都比ST的版本新,而且它们没有做任何限制,ARM内核一致就可以用。

突然想起来,是不是arm9架构不一样?  ARM920T <--> ARM926EJ-S

#138 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-02 20:39:37

armstrong 说:

潘多拉魔盒早就打开了,可以通用的emWin库有:
裸机: keil自带的,NXP发布的。
Linux:Nuvoton发布的。

大神这个你在别的cpu上跑过么,我在吃灰的2440上跑还是之前的错误。。。~~~~迷茫了

#139 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-02 16:00:30

armstrong 说:

还记得某位大神分享的emWin演示吗?它用的就是nuvoton发布的emWin库,运行几天几夜不死机。
https://whycan.cn/t_2689.html

谢谢大神,下载下来晚上回去试试~~

#140 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-02 14:20:36

win32prog 说:

@大帅 是不是因为绑定了新唐什么id, 然后就故意挂了。

上面的大神不是说没有限制么,另外好像新塘芯片没有id,
现在只待大神解惑,
或者晚上闲了回去再试试大神说的这个版本,

#141 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-02 13:45:28

armstrong 说:

emwin只需要fb0映射得到的一个虚拟内存指针,这个指针交给emwin,剩下的事情emwin自己能搞定。所有绘图函数emwin自带的。

@armstrong
大神我好像找到了,是这个版本么?
#define GUI_VERSION 548112

#142 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-02 13:41:42

@armstrong 这是我在另外一个贴里的求助~~

//
// Recommended memory to run the sample with adequate performance
//
#define RECOMMENDED_MEMORY (1024L * 200)//(1024L * 2200)

void GUIDEMO_Main(void) {
	
   printf("GUIDEMO_Main.1()\n");
	
  #if GUI_WINSUPPORT
    FRAMEWIN_SKINFLEX_PROPS Framewin_Props;
  #endif
  #if GUIDEMO_USE_AUTO_BK
    U32                     NumFreeBytes;
    int                     BitsPerPixel;
  #endif
  
  //
  // Check if recommended memory for the sample is available
  //
  if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
    GUI_ErrorOut("Not enough memory available."); 
	
	U32 GetNumFreeBytes = GUI_ALLOC_GetNumFreeBytes();
	printf("GUI_ALLOC_GetNumFreeBytes()=0x%x\n",GetNumFreeBytes);
	printf("Not enough memory available.\n");
    return;
  }
  printf("GUIDEMO_Main.2()\n");

[root@EmbedSky sky]# chmod 777 GUIDemo
[root@EmbedSky sky]# ./GUIDemo
uVideoSize = 0x25800
var.xres = 0x140
var.yres = 0xf0
pVideoBuffer = 0x40001000
Main Task thread
MainTask()
GUI_Init()
GUIDEMO_Main.1()
GUI_ALLOC_GetNumFreeBytes()=0x0
Not enough memory available.
[root@EmbedSky sky]#

为什么我编译新塘的emwin运行后老是这里申请不到内存呢?
下面是配置的emwin内存大小

#define GUI_NUMBYTES  (5 * 1024 * 1024) //0x1000   //0x20000

static U32 aMemory[GUI_NUMBYTES / 4]; 
#define GUI_BLOCKSIZE 0x100
/*********************************************************************
*
*       Public code
*
**********************************************************************
*/
/*********************************************************************
*
*       GUI_X_Config
*
* Purpose:
*   Called during the initialization process in order to set up the
*   available memory for the GUI.
*/
void GUI_X_Config(void) {
  //
  // 32 bit aligned memory area
  //
  // static U32 aMemory[GUI_NUMBYTES / 4];
  //
  // Assign memory to emWin
  //
  GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
  
  //设置由存储器管理系统分配的存储块的平均尺寸
    GUI_ALLOC_SetAvBlockSize(GUI_BLOCKSIZE); //块平均尺寸
	
  //
  // Set default font
  //
  GUI_SetDefaultFont(GUI_FONT_6X8);
}

#143 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-02 13:28:59

armstrong 说:

emwin只需要fb0映射得到的一个虚拟内存指针,这个指针交给emwin,剩下的事情emwin自己能搞定。所有绘图函数emwin自带的。

能共享下新塘的V5.48k么?或者告知下在哪个下载,我在新塘github下的是5.46
我用的是#define GUI_VERSION 546081
用这个编译后运行,不知道GUI_Init()怎么没有调用这些函数GUI_X_Config();LCD_X_Config();

我手动加上这些函数,发现GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);不论申请多大的空间都是失败,
并且查询下GUI_ALLOC_GetNumFreeBytes() 一直是等于0.
if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
    GUI_ErrorOut("Not enough memory available.");
    return;
  }

往高手能指点迷津~~

#146 Re: 全志 SOC » 感谢@晕哥邀请和测试,发布一个widora tiny200 480x272 5寸电阻屏TF卡固件, 开机跑 emwin,账号root,无密码 » 2019-11-22 21:39:14

路漫漫 说:

欢迎大家测试,但是因为工作关系不方便回复,请大家谅解。

大家对固件有需求或者意见可以到下方跟帖留言,我在后面再改进,发布新版本。

//
// Recommended memory to run the sample with adequate performance
//
#define RECOMMENDED_MEMORY (1024L * 200)//(1024L * 2200)

void GUIDEMO_Main(void) {
	
   printf("GUIDEMO_Main.1()\n");
	
  #if GUI_WINSUPPORT
    FRAMEWIN_SKINFLEX_PROPS Framewin_Props;
  #endif
  #if GUIDEMO_USE_AUTO_BK
    U32                     NumFreeBytes;
    int                     BitsPerPixel;
  #endif
  
  //
  // Check if recommended memory for the sample is available
  //
  if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
    GUI_ErrorOut("Not enough memory available."); 
	
	U32 GetNumFreeBytes = GUI_ALLOC_GetNumFreeBytes();
	printf("GUI_ALLOC_GetNumFreeBytes()=0x%x\n",GetNumFreeBytes);
	printf("Not enough memory available.\n");
    return;
  }
  printf("GUIDEMO_Main.2()\n");

[root@EmbedSky sky]# chmod 777 GUIDemo
[root@EmbedSky sky]# ./GUIDemo
uVideoSize = 0x25800
var.xres = 0x140
var.yres = 0xf0
pVideoBuffer = 0x40001000
Main Task thread
MainTask()
GUI_Init()
GUIDEMO_Main.1()
GUI_ALLOC_GetNumFreeBytes()=0x0
Not enough memory available.
[root@EmbedSky sky]#

为什么我编译新塘的emwin运行后老是这里申请不到内存呢?
下面是配置的emwin内存大小

#define GUI_NUMBYTES  (5 * 1024 * 1024) //0x1000   //0x20000

static U32 aMemory[GUI_NUMBYTES / 4]; 
#define GUI_BLOCKSIZE 0x100
/*********************************************************************
*
*       Public code
*
**********************************************************************
*/
/*********************************************************************
*
*       GUI_X_Config
*
* Purpose:
*   Called during the initialization process in order to set up the
*   available memory for the GUI.
*/
void GUI_X_Config(void) {
  //
  // 32 bit aligned memory area
  //
  // static U32 aMemory[GUI_NUMBYTES / 4];
  //
  // Assign memory to emWin
  //
  GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
  
  //设置由存储器管理系统分配的存储块的平均尺寸
    GUI_ALLOC_SetAvBlockSize(GUI_BLOCKSIZE); //块平均尺寸
	
  //
  // Set default font
  //
  GUI_SetDefaultFont(GUI_FONT_6X8);
}

#147 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-11-20 22:51:48

晕哥 说:

安装工具链:


编译指令:


终于在V3s@linux 系统跑起来了,虽然没有画面。


打包好的文件在 QQ群 544762792 附件:


只能编译链接运行,并不能看到任何界面。

@晕哥:我下载下来看了,emwin里面的都没有fb驱动画点实现,怎么显示界面?

#148 Re: 全志 SOC » 尝试从零构建F1C100s开发环境 » 2019-11-09 14:59:45

谢谢分享,可以制作成一个教材了。

#150 Re: 全志 SOC » 求助F1c100s声卡问题 » 2019-10-28 15:18:41

kekemuyu 说:
大帅 说:
晕哥 说:

可能在包涵的 dtsi 文件里面



在\f1c500s_kernel\sound\soc\里面发现suniv文件夹,好像是他自己增加的,官方的名字是sunxi,

\f1c500s_kernel\sound\soc\suniv\下面,他自己写了几个文件:
miyoo.c 
Makefile
Kconfig

好像这才是F1c100s的codec驱动,目前不懂,推测的。

对就是这个,不过得研究一下源码,我编译成ko后,安装老是出错

@kekemuyu 老兄,你安装出错,错误是啥? 是不是自动创建设备节点的时候错了?

#151 Re: 全志 SOC » 求助F1c100s声卡问题 » 2019-10-25 21:40:43

\f1c500s_kernel\sound\soc\suniv\下面,他自己写了几个文件:

好像这才是F1c100s的codec驱动,目前不懂,推测的。

对就是这个,不过得研究一下源码,我编译成ko后,安装老是出错

感觉只是编译ko不行吧,我猜测的,
你也是用在f1c100上么?
是不是500s和100s的codec的寄存器不一样,miyoo.c代码需要修改呢?

#152 Re: 全志 SOC » 求助F1c100s声卡问题 » 2019-10-25 21:29:37

傅伟清 说:

https://whycan.cn/files/members/1833/QQ图片20191025190053.png
这是tina的声卡开机日志,司徒的手撸的,没深入研究过,而且没法直接上100s的

0. 我看的miyoo.c作者是不是司徒大佬?
1. 你不是弄好了么?
2. 没法直接上100s,意思是这个驱动是f1c500的,需要修改驱动源码才能在f1c100上用是么?
3. tina声卡,是指tinyalsa吧, 不明白tinyalsa和alsa的区别,是不是如果底层硬件驱动好了话,这两都可以用没有啥区别?

刚未入门的小白,一下问得有点多,先谢谢大佬们的耐心解答! 

#153 Re: 全志 SOC » 求助F1c100s声卡问题 » 2019-10-25 17:59:10

晕哥 说:

可能在包涵的 dtsi 文件里面



在\f1c500s_kernel\sound\soc\里面发现suniv文件夹,好像是他自己增加的,官方的名字是sunxi,

\f1c500s_kernel\sound\soc\suniv\下面,他自己写了几个文件:
miyoo.c 
Makefile
Kconfig

好像这才是F1c100s的codec驱动,目前不懂,推测的。

#154 Re: 全志 SOC » 求助F1c100s声卡问题 » 2019-10-25 17:52:08

晕哥 说:

可能在包涵的 dtsi 文件里面

我把dtb转为dts,dtsi会全部展开,里面并没有codec,


suniv-f1c100s-licheepi-nano-800480.dtb ---> suniv-f1c100s-licheepi-nano-800480.dts
<code>
/dts-v1/;

/ {
    #address-cells = <0x1>;
    #size-cells = <0x1>;
    interrupt-parent = <0x1>;
    model = "Lichee Pi Nano";
    compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s", "allwinner,suniv";

    clocks {
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        ranges;

        clk-24M {
            #clock-cells = <0x0>;
            compatible = "fixed-clock";
            clock-frequency = <0x16e3600>;
            clock-output-names = "osc24M";
            phandle = <0x6>;
        };

        clk-32k {
            #clock-cells = <0x0>;
            compatible = "fixed-clock";
            clock-frequency = <0x8000>;
            clock-output-names = "osc32k";
            phandle = <0xb>;
        };

        clk-100M {
            #clock-cells = <0x0>;
            compatible = "fixed-clock";
            clock-frequency = <0x5f5e100>;
            clock-output-names = "fake-100M";
        };
    };

    cpus {
        #address-cells = <0x0>;
        #size-cells = <0x0>;

        cpu {
            compatible = "arm,arm926ej-s";
            device_type = "cpu";
        };
    };

    display-engine {
        compatible = "allwinner,suniv-display-engine";
        allwinner,pipelines = <0x2>;
        status = "okay";
    };

    soc {
        compatible = "simple-bus";
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        ranges;

        sram-controller@1c00000 {
            compatible = "allwinner,sun4i-a10-sram-controller";
            reg = <0x1c00000 0x30>;
            #address-cells = <0x1>;
            #size-cells = <0x1>;
            ranges;

            sram@10000 {
                compatible = "mmio-sram";
                reg = <0x10000 0x1000>;
                #address-cells = <0x1>;
                #size-cells = <0x1>;
                ranges = <0x0 0x10000 0x1000>;

                sram-section@0 {
                    compatible = "allwinner,sun4i-a10-sram-d";
                    reg = <0x0 0x1000>;
                    status = "okay";
                    phandle = <0x13>;
                };
            };
        };

        lradc@1c23400 {
            compatible = "allwinner,sun4i-a10-lradc-keys";
            reg = <0x1c23400 0x400>;
            interrupts = <0x16>;
            status = "okay";
            vref-supply = <0x3>;

            button@200 {
                label = "Volume Up";
                linux,code = <0x73>;
                channel = <0x0>;
                voltage = <0x30d40>;
            };

            button@400 {
                label = "Volume Down";
                linux,code = <0x72>;
                channel = <0x0>;
                voltage = <0x61a80>;
            };

            button@600 {
                label = "Select";
                linux,code = <0x161>;
                channel = <0x0>;
                voltage = <0x927c0>;
            };

            button@800 {
                label = "Start";
                linux,code = <0x160>;
                channel = <0x0>;
                voltage = <0xc3500>;
            };
        };

        spi@1c05000 {
            compatible = "allwinner,suniv-spi", "allwinner,sun8i-h3-spi";
            reg = <0x1c05000 0x1000>;
            interrupts = <0xa>;
            clocks = <0x4 0x11 0x4 0x11>;
            clock-names = "ahb", "mod";
            resets = <0x4 0x4>;
            status = "okay";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            pinctrl-names = "default";
            pinctrl-0 = <0x5>;

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

                partitions {
                    compatible = "fixed-partitions";
                    #address-cells = <0x1>;
                    #size-cells = <0x1>;

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

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

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

                    partition@510000 {
                        label = "rootfs";
                        reg = <0x510000 0xaf0000>;
                    };
                };
            };
        };

        spi@1c06000 {
            compatible = "allwinner,suniv-spi", "allwinner,sun8i-h3-spi";
            reg = <0x1c06000 0x1000>;
            interrupts = <0xb>;
            clocks = <0x4 0x12 0x4 0x12>;
            clock-names = "ahb", "mod";
            resets = <0x4 0x5>;
            status = "disabled";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
        };

        lcd-controller@1c0c000 {
            compatible = "allwinner,suniv-tcon";
            reg = <0x1c0c000 0x1000>;
            interrupts = <0x1d>;
            clocks = <0x4 0x15 0x4 0x39 0x6>;
            clock-names = "ahb", "tcon-ch0", "tcon-ch1";
            clock-output-names = "tcon-pixel-clock";
            resets = <0x4 0x8>;
            reset-names = "lcd";
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <0x7>;

            ports {
                #address-cells = <0x1>;
                #size-cells = <0x0>;

                port@0 {
                    #address-cells = <0x1>;
                    #size-cells = <0x0>;
                    reg = <0x0>;

                    endpoint@0 {
                        reg = <0x0>;
                        remote-endpoint = <0x8>;
                        phandle = <0x16>;
                    };
                };

                port@1 {
                    #address-cells = <0x1>;
                    #size-cells = <0x0>;
                    reg = <0x1>;

                    endpoint@0 {
                        reg = <0x0>;
                        remote-endpoint = <0x9>;
                        phandle = <0x17>;
                    };
                };
            };
        };

        mmc@1c0f000 {
            compatible = "allwinner,suniv-mmc", "allwinner,sun7i-a20-mmc";
            reg = <0x1c0f000 0x1000>;
            clocks = <0x4 0xe 0x4 0x28 0x4 0x2a 0x4 0x29>;
            clock-names = "ahb", "mmc", "output", "sample";
            resets = <0x4 0x1>;
            reset-names = "ahb";
            interrupts = <0x17>;
            pinctrl-names = "default";
            pinctrl-0 = <0xa>;
            status = "okay";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            vmmc-supply = <0x3>;
            bus-width = <0x4>;
            broken-cd;
        };

        mmc@1c10000 {
            compatible = "allwinner,suniv-mmc", "allwinner,sun7i-a20-mmc";
            reg = <0x1c10000 0x1000>;
            clocks = <0x4 0xf 0x4 0x2b 0x4 0x2d 0x4 0x2c>;
            clock-names = "ahb", "mmc", "output", "sample";
            resets = <0x4 0x2>;
            reset-names = "ahb";
            interrupts = <0x18>;
            status = "disabled";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
        };

        clock@1c20000 {
            compatible = "allwinner,suniv-ccu";
            reg = <0x1c20000 0x400>;
            clocks = <0x6 0xb>;
            clock-names = "hosc", "losc";
            #clock-cells = <0x1>;
            #reset-cells = <0x1>;
            phandle = <0x4>;
        };

        interrupt-controller@1c20400 {
            compatible = "allwinner,suniv-ic";
            reg = <0x1c20400 0x400>;
            interrupt-controller;
            #interrupt-cells = <0x1>;
            phandle = <0x1>;
        };

        pinctrl@1c20800 {
            compatible = "allwinner,suniv-pinctrl";
            reg = <0x1c20800 0x400>;
            interrupts = <0x26 0x27 0x28>;
            clocks = <0x4 0x24 0x6 0xb>;
            clock-names = "apb", "hosc", "losc";
            gpio-controller;
            interrupt-controller;
            #interrupt-cells = <0x3>;
            #gpio-cells = <0x3>;
            phandle = <0xd>;

            spi0-pins-pc {
                pins = "PC0", "PC1", "PC2", "PC3";
                function = "spi0";
                phandle = <0x5>;
            };

            lcd-rgb666-pins {
                pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", "PD20", "PD21";
                function = "lcd";
                phandle = <0x7>;
            };

            rtp-pins {
                pins = "PA0", "PA1", "PA2", "PA3";
                function = "rtp";
                phandle = <0xe>;
            };

            uart-pins-pe {
                pins = "PE0", "PE1";
                function = "uart0";
                phandle = <0x10>;
            };

            uart-pins-pe78 {
                pins = "PE7", "PE8";
                function = "uart2";
                phandle = <0x11>;
            };

            i2c0 {
                pins = "PE11", "PE12";
                function = "i2c0";
                phandle = <0xc>;
            };

            mmc0-pins {
                pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
                function = "mmc0";
                phandle = <0xa>;
            };

            pwm0 {
                pins = "PE12";
                function = "pwm0";
            };

            pwm1 {
                pins = "PE6";
                function = "pwm1";
                phandle = <0xf>;
            };
        };

        i2c@1C27000 {
            compatible = "allwinner,sun6i-a31-i2c";
            reg = <0x1c27000 0x400>;
            interrupts = <0x7>;
            clocks = <0x4 0x21>;
            resets = <0x4 0x14>;
            pinctrl-names = "default";
            pinctrl-0 = <0xc>;
            status = "okay";
            #address-cells = <0x1>;
            #size-cells = <0x0>;

            rtc@51 {
                compatible = "nxp,pcf8563";
                reg = <0x51>;
            };

            touchscreen@5d {
                compatible = "goodix,gt911";
                reg = <0x5d>;
                interrupt-parent = <0xd>;
                interrupts = <0x4 0x3 0x2>;
                pinctrl-names = "default";
                irq-gpios = <0xd 0x4 0x3 0x0>;
                reset-gpios = <0xd 0x4 0x9 0x0>;
                touchscreen-swapped-x-y;
            };

            touchscreen@14 {
                compatible = "goodix,gt911";
                reg = <0x14>;
                interrupt-parent = <0xd>;
                interrupts = <0x4 0x3 0x2>;
                pinctrl-names = "default";
                irq-gpios = <0xd 0x4 0x3 0x0>;
                reset-gpios = <0xd 0x4 0x9 0x0>;
                touchscreen-swapped-x-y;
            };
        };

        rtp@1c24800 {
            compatible = "allwinner,sun4i-a10-ts";
            reg = <0x1c24800 0x100>;
            interrupts = <0x14>;
            allwinner,ts-attached;
            #thermal-sensor-cells = <0x0>;
            pinctrl-names = "default";
            pinctrl-0 = <0xe>;
            status = "okay";
        };

        pwm@1c21000 {
            compatible = "allwinner,sun7i-a20-pwm";
            reg = <0x1c21000 0xc>;
            clocks = <0x6>;
            #pwm-cells = <0x3>;
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <0xf>;
        };

        timer@1c20c00 {
            compatible = "allwinner,suniv-timer";
            reg = <0x1c20c00 0x90>;
            interrupts = <0xd>;
            clocks = <0x6>;
        };

        watchdog@1c20ca0 {
            compatible = "allwinner,sun6i-a31-wdt";
            reg = <0x1c20ca0 0x20>;
            interrupts = <0x10>;
            status = "okay";
        };

        serial@1c25000 {
            compatible = "snps,dw-apb-uart";
            reg = <0x1c25000 0x400>;
            interrupts = <0x1>;
            reg-shift = <0x2>;
            reg-io-width = <0x4>;
            clocks = <0x4 0x25>;
            resets = <0x4 0x17>;
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <0x10>;
            rts-gpio = <0xd 0x4 0x9 0x0>;
            rs485-rts-active-high;
            rs485-rts-delay = <0x0 0x0>;
            linux,rs485-enabled-at-boot-time;
        };

        serial@1c25400 {
            compatible = "snps,dw-apb-uart";
            reg = <0x1c25400 0x400>;
            interrupts = <0x2>;
            reg-shift = <0x2>;
            reg-io-width = <0x4>;
            clocks = <0x4 0x26>;
            resets = <0x4 0x18>;
            status = "disabled";
        };

        serial@1c25800 {
            compatible = "snps,dw-apb-uart";
            reg = <0x1c25800 0x400>;
            interrupts = <0x3>;
            reg-shift = <0x2>;
            reg-io-width = <0x4>;
            clocks = <0x4 0x27>;
            resets = <0x4 0x19>;
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <0x11>;
            rts-gpio = <0xd 0x4 0xa 0x0>;
            rs485-rts-active-high;
            rs485-rts-delay = <0x0 0x0>;
            linux,rs485-enabled-at-boot-time;
        };

        usb@1c13000 {
            compatible = "allwinner,suniv-musb";
            reg = <0x1c13000 0x400>;
            clocks = <0x4 0x13>;
            resets = <0x4 0x6>;
            interrupts = <0x1a>;
            interrupt-names = "mc";
            phys = <0x12 0x0>;
            phy-names = "usb";
            extcon = <0x12 0x0>;
            allwinner,sram = <0x13 0x1>;
            status = "okay";
            dr_mode = "otg";
        };

        phy@1c13400 {
            compatible = "allwinner,suniv-usb-phy";
            reg = <0x1c13400 0x10>;
            reg-names = "phy_ctrl";
            clocks = <0x4 0x30>;
            clock-names = "usb0_phy";
            resets = <0x4 0x0>;
            reset-names = "usb0_reset";
            #phy-cells = <0x1>;
            status = "okay";
            usb0_id_det-gpio = <0xd 0x4 0x2 0x0>;
            phandle = <0x12>;
        };

        display-frontend@1e00000 {
            compatible = "allwinner,suniv-display-frontend";
            reg = <0x1e00000 0x20000>;
            interrupts = <0x1e>;
            clocks = <0x4 0x1b 0x4 0x38 0x4 0x35>;
            clock-names = "ahb", "mod", "ram";
            resets = <0x4 0xe>;
            status = "disabled";
            phandle = <0x2>;

            ports {
                #address-cells = <0x1>;
                #size-cells = <0x0>;

                port@1 {
                    #address-cells = <0x1>;
                    #size-cells = <0x0>;
                    reg = <0x1>;

                    endpoint@0 {
                        reg = <0x0>;
                        remote-endpoint = <0x14>;
                        phandle = <0x15>;
                    };
                };
            };
        };

        display-backend@1e60000 {
            compatible = "allwinner,suniv-display-backend";
            reg = <0x1e60000 0x10000>;
            reg-names = "be";
            interrupts = <0x1f>;
            clocks = <0x4 0x1a 0x4 0x37 0x4 0x36>;
            clock-names = "ahb", "mod", "ram";
            resets = <0x4 0xd>;
            reset-names = "be";
            assigned-clocks = <0x4 0x37>;
            assigned-clock-rates = <0x11e1a300>;

            ports {
                #address-cells = <0x1>;
                #size-cells = <0x0>;

                port@0 {
                    #address-cells = <0x1>;
                    #size-cells = <0x0>;
                    reg = <0x0>;

                    endpoint@0 {
                        reg = <0x0>;
                        remote-endpoint = <0x15>;
                        phandle = <0x14>;
                    };
                };

                port@1 {
                    #address-cells = <0x1>;
                    #size-cells = <0x0>;
                    reg = <0x1>;

                    endpoint@0 {
                        reg = <0x0>;
                        remote-endpoint = <0x16>;
                        phandle = <0x8>;
                    };
                };
            };
        };
    };

    aliases {
        serial0 = "/soc/serial@1c25000";
        serial2 = "/soc/serial@1c25800";
        spi0 = "/soc/spi@1c05000";
    };

    chosen {
        stdout-path = "serial0:115200n8";
    };

    panel {
        compatible = "okaya,rs800480t-7x0gp", "simple-panel";
        #address-cells = <0x1>;
        #size-cells = <0x0>;

        port@0 {
            reg = <0x0>;
            #address-cells = <0x1>;
            #size-cells = <0x0>;

            endpoint@0 {
                reg = <0x0>;
                remote-endpoint = <0x17>;
                phandle = <0x9>;
            };
        };
    };

    vcc3v3 {
        compatible = "regulator-fixed";
        regulator-name = "vcc3v3";
        regulator-min-microvolt = <0x325aa0>;
        regulator-max-microvolt = <0x325aa0>;
        phandle = <0x3>;
    };
};

</code>

#155 Re: 全志 SOC » 求助F1c100s声卡问题 » 2019-10-25 17:45:06

晕哥 说:

1. 不知道,你对你一下代码吧, 只要花点时间应该可以搞定
2. 应该是驱动没怼好

我发现他的设备树里有codec相关的,suniv-f1c500s-miyoo.dts
&codec {
    status = "okay";
};

而我当前板子里的dtb里面没有codec相关,可能是这个原因么?

#156 Re: 全志 SOC » 求助F1c100s声卡问题 » 2019-10-25 15:47:56

晕哥 说:

司徒的miyoo kernel 可以播放声音: https://github.com/qq516333132/f1c500s_kernel

前面 @傅伟清 已经放弃治疗了, 改用 tina3.x

1. 这个问题是出在哪里了?内核么?

2. @傅伟清 已经放弃了,用tinyalsa可以了么,意思是alsa在这个nano上不行,还是哪里不对?

#157 全志 SOC » 求助F1c100s声卡问题 » 2019-10-25 15:06:53

大帅
回复: 18

Nano板子开机没有识别出硬件声卡,这个问题该如何下手解决?
[    3.626561] ALSA device list:
[    3.629602]   #0: Loopback 1

# ls -lh /sys/firmware/devicetree/base/
total 0
-r--r--r--    1 root     root           4 Jan  1 00:00 #address-cells
-r--r--r--    1 root     root           4 Jan  1 00:00 #size-cells
drwxr-xr-x    2 root     root           0 Jan  1 00:00 aliases
drwxr-xr-x    2 root     root           0 Jan  1 00:00 chosen
drwxr-xr-x    5 root     root           0 Jan  1 00:00 clocks
-r--r--r--    1 root     root          63 Jan  1 00:00 compatible
drwxr-xr-x    3 root     root           0 Jan  1 00:00 cpus
drwxr-xr-x    2 root     root           0 Jan  1 00:00 display-engine
-r--r--r--    1 root     root           4 Jan  1 00:00 interrupt-parent
drwxr-xr-x    2 root     root           0 Jan  1 00:00 memory
-r--r--r--    1 root     root          15 Jan  1 00:00 model
-r--r--r--    1 root     root           1 Jan  1 00:00 name
drwxr-xr-x    3 root     root           0 Jan  1 00:00 panel
drwxr-xr-x   24 root     root           0 Jan  1 00:00 soc
drwxr-xr-x    2 root     root           0 Jan  1 00:00 vcc3v3
# 
# ls /dev/snd -l
total 0
crw-rw----    1 root     audio     116,   0 Jan  1 00:00 controlC0
crw-rw----    1 root     audio     116,  24 Jan  1 00:00 pcmC0D0c
crw-rw----    1 root     audio     116,  16 Jan  1 00:00 pcmC0D0p
crw-rw----    1 root     audio     116,  25 Jan  1 00:00 pcmC0D1c
crw-rw----    1 root     audio     116,  17 Jan  1 00:00 pcmC0D1p
crw-rw----    1 root     audio     116,  33 Jan  1 00:00 timer
# 
# cat /proc/asound/cards
 0 [Loopback       ]: Loopback - Loopback
                      Loopback 1
# 
# cat /proc/asound/devices
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 17: [ 0- 1]: digital audio playback
 24: [ 0- 0]: digital audio capture
 25: [ 0- 1]: digital audio capture
 33:        : timer
# 
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
# 


开机日志:
==========================================================================

# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-licheepi-nano+ (root@ubuntu) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)) #42 Sat Aug 24 10:33:10 EDT 2019
[    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] On node 0 totalpages: 8192
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2  vt.global_cursor_default=0
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22672K/32768K available (6144K kernel code, 236K rwdata, 1412K rodata, 1024K init, 245K bss, 10096K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 237 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 246 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.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000109] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000636] Console: colour dummy device 80x30
[    0.000734] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070236] pid_max: default: 32768 minimum: 301
[    0.070566] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070620] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072227] CPU: Testing write buffer coherency: ok
[    0.073955] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076584] devtmpfs: initialized
[    0.084820] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.084896] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.085175] pinctrl core: initialized pinctrl subsystem
[    0.087484] NET: Registered protocol family 16
[    0.088935] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.091036] cpuidle: using governor menu
[    0.120649] SCSI subsystem initialized
[    0.121052] usbcore: registered new interface driver usbfs
[    0.121213] usbcore: registered new interface driver hub
[    0.121457] usbcore: registered new device driver usb
[    0.121985] pps_core: LinuxPPS API ver. 1 registered
[    0.122015] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.122093] PTP clock support registered
[    0.122693] Advanced Linux Sound Architecture Driver Initialized.
[    0.124967] clocksource: Switched to clocksource timer
[    0.153741] NET: Registered protocol family 2
[    0.155448] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.155541] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.155606] TCP: Hash tables configured (established 1024 bind 1024)
[    0.155968] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.156047] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.156591] NET: Registered protocol family 1
[    0.157910] RPC: Registered named UNIX socket transport module.
[    0.157956] RPC: Registered udp transport module.
[    0.157974] RPC: Registered tcp transport module.
[    0.157990] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.160374] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.162305] Initialise system trusted keyrings
[    0.162842] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.181402] NFS: Registering the id_resolver key type
[    0.181505] Key type id_resolver registered
[    0.181526] Key type id_legacy registered
[    0.181657] jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
[    0.197288] Key type asymmetric registered
[    0.197333] Asymmetric key parser 'x509' registered
[    0.197560] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.197596] io scheduler noop registered
[    0.197617] io scheduler deadline registered
[    0.198467] io scheduler cfq registered (default)
[    0.198505] io scheduler mq-deadline registered
[    0.198526] io scheduler kyber registered
[    0.199909] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.210220] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.395428] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.402690] console [ttyS0] disabled
[    0.422975] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 27, base_baud = 6250000) is a 16550A
[    0.905055] console [ttyS0] enabled
[    0.931427] 1c25800.serial: ttyS2 at MMIO 0x1c25800 (irq = 28, base_baud = 6250000) is a 16550A
[    0.948607] panel-simple panel: panel supply power not found, using dummy regulator
[    0.958138] SCSI Media Changer driver v0.25 
[    0.966575] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.972330] 4 ofpart partitions found on MTD device spi0.0
[    0.977959] Creating 4 MTD partitions on "spi0.0":
[    0.982777] 0x000000000000-0x000000100000 : "u-boot"
[    0.990467] 0x000000100000-0x000000110000 : "dtb"
[    0.997997] 0x000000110000-0x000000510000 : "kernel"
[    1.005613] 0x000000510000-0x000001000000 : "rootfs"
[    1.013867] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.020544] ehci-platform: EHCI generic platform driver
[    1.026193] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.032428] ohci-platform: OHCI generic platform driver
[    1.038194] usbcore: registered new interface driver usb-storage
[    1.046467] input: 1c23400.lradc as /devices/platform/soc/1c23400.lradc/input/input0
[    1.056980] input: 1c24800.rtp as /devices/platform/soc/1c24800.rtp/input/input1
[    1.065461] i2c /dev entries driver
[    3.125051] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[    3.131614] rtc-pcf8563 0-0051: pcf8563_write_block_data: err=-110 addr=0e, data=03
[    3.139325] rtc-pcf8563 0-0051: pcf8563_probe: write error
[    3.144934] rtc-pcf8563: probe of 0-0051 failed with error -5
[    3.153188] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    3.215112] sunxi-mmc 1c0f000.mmc: base:0xcffafbc9 irq:20
[    3.222947] usbcore: registered new interface driver usbhid
[    3.228666] usbhid: USB HID core driver
[    3.251896] NET: Registered protocol family 17
[    3.256750] Key type dns_resolver registered
[    3.263278] Loading compiled-in X.509 certificates
[    3.280221] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739cb8)
[    3.289139] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0738f9c)
[    3.296925] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.303536] [drm] No driver support for vblank timestamp query.
[    3.502927] Console: switching to colour frame buffer device 100x30
[    3.541741] sun4i-drm display-engine: fb0:  frame buffer device
[    3.548986] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    3.558294] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    3.570331] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    3.576273] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    3.586688] hub 1-0:1.0: USB hub found
[    3.590637] hub 1-0:1.0: 1 port detected
[    3.596699] hctosys: unable to open rtc device (rtc0)
[    3.602256] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.619720] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    3.626561] ALSA device list:
[    3.629602]   #0: Loopback 1
[    3.633417] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    3.642148] cfg80211: failed to load regulatory.db
[    3.736825] random: crng init done
[    5.307121] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    5.316115] devtmpfs: mounted
[    5.326284] Freeing unused kernel memory: 1024K
[   14.927256] file system registered
[   15.229620] uart closed, irq=27 ..................... 
[   16.252087] read descriptors
[   16.255210] read strings
[   16.258031] g_ffs gadget: g_ffs ready
# 
# 

#158 全志 SOC » 处女帖:将dtb文件反编译成dts文件 » 2019-10-25 10:12:10

大帅
回复: 2

要使用的工具dtc
操作方法:
1.位置在:kernel目录/scripts/dtc/dtc下面,将dtc工具拷贝到交叉工具链所在的bin目录下,使用dtc -help查看是否成功。
2.也可以使用apt install device-tree-compiler直接将dtc工具安装到Ubuntu下,使用dtc -help查看是否成功。

root@osboxes:/work/Lichee/git-image# ls
linux-f1c100s-480272lcd-test  linux-f1c100s-480272lcd-test.zip  suniv-f1c100s-licheepi-nano-800480.dtb

使用转化命令:(譬如:要将suniv-f1c100s-licheepi-nano-800480.dtb转换为dts)
dtc -I dtb -O dts -o ./f1c100s-licheepi-nano-800480.dts ./suniv-f1c100s-licheepi-nano-800480.dtb

root@osboxes:/work/Lichee/git-image# ls
f1c100s-licheepi-nano-800480.dts  linux-f1c100s-480272lcd-test.zip
linux-f1c100s-480272lcd-test      suniv-f1c100s-licheepi-nano-800480.dtb


==========================================================================
安装时,会出现一下的情况:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
重启Ubuntu解决。

#163 Re: 全志 SOC » 分享一个 5寸的 800x480 的 f1c100s 固件, 感谢 @xm1994, 调试串口UART0 (PB8/PB9) » 2019-09-26 16:28:34

-----------------------------------------------
16M spiflash adb & emwin 版本下载: suniv_f1c100s_w25q128_usb_adb_emwin_20190901.7z

大佬这个音频的驱动可以正常使用么?
/dev/dsp 没有声音
移植了alsa,aplay也没有声音
硬件连接是我在nano板子上的HPL HPR MICIN 分别串联电容接到线控耳机上。

nano的音频操作很困扰~

#164 Re: 全志 SOC » 分享一个 5寸的 800x480 的 f1c100s 固件, 感谢 @xm1994, 调试串口UART0 (PB8/PB9) » 2019-09-18 08:34:55

-----------------------------------------------
16M spiflash adb & emwin 版本下载: suniv_f1c100s_w25q128_usb_adb_emwin_20190901.7z


可以提供下这个固件里面的emwin源码么? 或者库么?

表情:=)

#165 Re: 全志 SOC » 分享一个 5寸的 800x480 的 f1c100s 固件, 感谢 @xm1994, 调试串口UART0 (PB8/PB9) » 2019-09-17 18:05:04

晕哥 说:

https://whycan.cn/t_2860.html#p23405

应该是用了错误的工具链,或者使用了默认的配置,导致生成arm9无法识别的指令集

试一试这个: arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2


谢谢晕哥,可以了!

# ls
hello        helloword.c
# ./hello
Hello World!
#

#166 Re: 全志 SOC » 分享一个 5寸的 800x480 的 f1c100s 固件, 感谢 @xm1994, 调试串口UART0 (PB8/PB9) » 2019-09-17 17:23:53

晕哥 说:

如果你的 c编译和制作文件系统的c编译不一致, 那么用静态链接:

arm-linux-gnueabi-gcc -o hello helloword.c -static

1.编译
root@e57c70d751e4:/work/helloword# arm-linux-gnueabi-gcc -o hello helloword.c -static
root@e57c70d751e4:/work/helloword# ls
hello  helloword.c
静态编译出来3.88M的hello

2.adb push运行:
# ./hello
Illegal instruction
# ls -l hello
-rwxrwxrwx    1 root     root       4063920 Sep 17  2019 hello

还是运行不了,变成Illegal instruction错误!

helloword.c
#include<stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}

#167 Re: 全志 SOC » 分享一个 5寸的 800x480 的 f1c100s 固件, 感谢 @xm1994, 调试串口UART0 (PB8/PB9) » 2019-09-17 16:26:08

-----------------------------------------------
16M spiflash adb & emwin 版本下载: suniv_f1c100s_w25q128_usb_adb_emwin_20190901.7z

烧写这个固件,我用gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi:
arm-linux-gnueabi-gcc -o hello helloword.c  ,编译一个helloword,adb push到板子上运行,
# ./hello
Segmentation fault
怎么不能正常运行?

这个固件应该是什么gcc编译一个helloword?
小白请教大佬

页脚

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

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