您尚未登录。

#1 Re: 全志 SOC » f1c100s驱动rgb屏求助 » 2024-04-03 10:34:58

已经解决无法亮屏幕的问题,总结一下:
屏幕参数配置中的:sync:0,vmode:0 这2个不用管。
在以下参数中,
CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:18,pclk_khz:30000,le:16,ri:209,up:22,lo:22,hs:30,vs:1,sync:0,vmode:0"
一个不同分辨率的屏幕,可以尝试只修改x:1024,y:600的值,如果不行再尝试修改其他值。

fbset

mode "1024x600-0"
        # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
        geometry 1024 600 1024 600 32
        timings 0 0 0 0 0 0 0
        accel false
        rgba 8/16,8/8,8/0,0/0
endmode

上面这个是对的。要测试屏幕可以使用fb-test指令,也可以在命令行输入fb然后按2次tab键,会弹出支持的指令。

然后总结一下我的屏幕为什么没有起来,因为我的用的SD卡启动,而我的板子原本还有spi nand flash,flash中还有一个完整的系统。
buildroot-tiny200刚clone下来时只,启动参数在board/widora/mangopi/r3/devicetree/linux/devicetree.dts中,只有一个。

bootargs = "console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs overlayfsdev=/dev/mtdblock3";

上面这个启动参数可以让uboot,内核,设备树等从SD卡中加载。但是根文件系统是从spi flash中加载的。我的问题就出现在根文件系统没有正确加载上。
而如果要从SD卡启动,要设置参数如下

bootargs = "console=ttyS0,115200 earlyprintk rootwait init=/preinit root=/dev/mmcblk0p3";

下面把2个启动参数一起贴出来。

//for NAND or Nor
	//bootargs = "console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs overlayfsdev=/dev/mtdblock3";
//for sd-card
  	bootargs = "console=ttyS0,115200 earlyprintk rootwait init=/preinit root=/dev/mmcblk0p3";

这个方法我是从这个帖子上找到的:
https://whycan.com/t_9403.html

其实对于我这个板子来说,只需要修改屏幕参数中的,x y的分辨率,然后从SD卡启动就修改启动参数就可以了。如果仍然要把程序烧录到spi flash中的启动参数都不用修改。

#2 Re: 全志 SOC » 模仿stm32标准库风格写的库文件(f1c100s/f1c200s),且已移植了rt-thread、lvgl、fatfs、cherryusb » 2024-04-03 10:17:28

@acom2024

对的,我那个只是下载到内存,如果要下载到spi_nor flash,xboot不是也支持吗,但是不支持下载到nand flash,如果要下载到nand flash,可以尝试用nand flash的uboot,让板子进入fel模式,然后下载nand flash的uboot,让芯片进入dfu模式,然后通过dfu工具下载你的文件,这样看看行不行。或者让xboot支持nand flash,这样要找一个支持nand flash的源码移植。

#3 Re: 全志 SOC » f1c100s驱动rgb屏求助 » 2024-04-02 08:42:20

我的这个屏幕也没有起来,我用的是cherry pi的,用的是buildroot_tiny200这个SDK,屏幕是1024*600的RGB屏,但是都没有亮屏,我用板子原来自带的img可以亮屏,只是分辨率不对。然后不知道从哪里下手了。

U-Boot SPL 2020.07 (Apr 01 2024 - 17:21:31 +0800)
DRAM: 64 MiB
Trying to boot from MMC1


U-Boot 2020.07 (Apr 01 2024 - 17:21:31 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM:  64 MiB
MMC:   mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 1024x600 lcd console (overscan 0x0)
In:    serial
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Card did not respond to voltage select!
unrecognized JEDEC id bytes: ff, c8, f1
Failed to initialize SPI flash at 0:0 (error -2)
List of MTD devices:
* spi-nand0
  - device: spi-nand@1
  - parent: spi@1c05000
  - driver: spi_nand
  - type: NAND flash
  - block size: 0x20000 bytes
  - min I/O: 0x800 bytes
  - OOB size: 64 bytes
  - OOB available: 31 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
=========================
Boot Device: mmc0
Boot Slot 0: mmc0
Boot Slot 1: spi-nand
=========================
## Error: "splash_mmc0" not defined
Unknown command 'bmp' - try 'help'
gpio: pin 134 (gpio 134) value is 1
switch to partitions #0, OK
mmc0 is current device
Booting from MMC0...
4326664 bytes read in 700 ms (5.9 MiB/s)
## Loading kernel from FIT Image at 81000000 ...
   Using 'conf@0' configuration
   Trying 'kernel@0' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x810000cc
     Data Size:    4309200 Bytes = 4.1 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80000000
     Entry Point:  0x80000000
     Hash algo:    crc32
     Hash value:   14001dca
   Verifying Hash Integrity ... crc32+ OK
## Loading fdt from FIT Image at 81000000 ...
   Using 'conf@0' configuration
   Trying 'fdt@0' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x8141c280
     Data Size:    15666 Bytes = 15.3 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   61472816
   Verifying Hash Integrity ... crc32+ OK
   Booting using the fdt blob at 0x8141c280
   Loading Kernel Image
   Loading Device Tree to 817f9000, end 817ffd31 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.99 (jasher@ubuntu-20-04) (gcc version 8.4.0 (Buildroot -g21de572-dirty)) #2 Mon Apr 1 17:24:31 CST 2024
[    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: Widora MangoPi R3
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x82800000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 15660
[    0.000000] Kernel command line: console=ttyS0,115200 rootwait init=/preinit root=/dev/mtdblock2 rootfstype=squashfs overlayfsdev=/dev/mtdblock3 net.ifnames=0 vt.global_cursor_default=0
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 36332K/63136K available (6144K kernel code, 248K rwdata, 1676K rodata, 1024K init, 225K bss, 10420K reserved, 16384K cma-reserved)
[    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.000000] random: get_random_bytes called from start_kernel+0x254/0x444 with crng_init=0
[    0.000050] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000147] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000904] Console: colour dummy device 80x30
[    0.001014] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070272] pid_max: default: 32768 minimum: 301
[    0.070800] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070849] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.072787] CPU: Testing write buffer coherency: ok
[    0.074973] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076201] devtmpfs: initialized
[    0.088106] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.088173] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.092937] pinctrl core: initialized pinctrl subsystem
[    0.095594] NET: Registered protocol family 16
[    0.100925] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.103139] cpuidle: using governor menu
[    0.143965] SCSI subsystem initialized
[    0.144385] usbcore: registered new interface driver usbfs
[    0.144562] usbcore: registered new interface driver hub
[    0.144725] usbcore: registered new device driver usb
[    0.145178] mc: Linux media interface: v0.10
[    0.145299] videodev: Linux video capture interface: v2.00
[    0.145419] pps_core: LinuxPPS API ver. 1 registered
[    0.145438] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.145499] PTP clock support registered
[    0.146576] ion_parse_dt_heap_common: id 4 type 4 name cma align 1000
[    0.147527] Advanced Linux Sound Architecture Driver Initialized.
[    0.149977] clocksource: Switched to clocksource timer
[    0.152069] simple-framebuffer 83da8000.framebuffer: framebuffer at 0x83da8000, 0x258000 bytes, mapped to 0x(ptrval)
[    0.152128] simple-framebuffer 83da8000.framebuffer: format=x8r8g8b8, mode=1024x600x32, linelength=4096
[    0.193823] Console: switching to colour frame buffer device 128x37
[    0.233631] simple-framebuffer 83da8000.framebuffer: fb0: simplefb registered!
[    0.263932] thermal_sys: Registered thermal governor 'step_wise'
[    0.264694] NET: Registered protocol family 2
[    0.266274] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.266364] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.266424] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.266475] TCP: Hash tables configured (established 1024 bind 1024)
[    0.266790] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.266860] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.267415] NET: Registered protocol family 1
[    0.270277] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.272072] Initialise system trusted keyrings
[    0.272711] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.294824] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.295463] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.416041] Key type asymmetric registered
[    0.416079] Asymmetric key parser 'x509' registered
[    0.416253] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.416280] io scheduler mq-deadline registered
[    0.416296] io scheduler kyber registered
[    0.431574] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.455343] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.461622] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    0.462958] printk: console [ttyS0] disabled
[    0.483293] 1c25400.serial: ttyS0 at MMIO 0x1c25400 (irq = 26, base_baud = 6250000) is a 16550A
[    0.950675] printk: console [ttyS0] enabled
[    0.965746] SCSI Media Changer driver v0.25
[    0.971761] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[    0.984856] spi-nand spi0.0: GigaDevice SPI NAND was found.
[    0.990580] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.000506] 5 fixed-partitions partitions found on MTD device spi0.0
[    1.006867] Creating 5 MTD partitions on "spi0.0":
[    1.011810] 0x000000000000-0x000000100000 : "u-boot"
[    1.023765] 0x000000100000-0x000000600000 : "kernel"
[    1.029321] random: fast init done
[    1.055731] 0x000000600000-0x000003000000 : "rom"
[    1.228622] 0x000003000000-0x000004000000 : "vendor"
[    1.299953] 0x000004000000-0x000007000000 : "overlay"
[    1.495509] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.502182] ehci-platform: EHCI generic platform driver
[    1.507794] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.514120] ohci-platform: OHCI generic platform driver
[    1.519894] usbcore: registered new interface driver usb-storage
[    1.526963] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.541010] i2c /dev entries driver
[    1.545147] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    1.558988] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    1.570174] sun4i-csi 1cb0000.csi: Packed (RAW) format enabled.
[    1.578077] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.588079] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.626525] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.636106] usbcore: registered new interface driver usbhid
[    1.641808] usbhid: USB HID core driver
[    1.646018] sunxi-cedar 1c0e000.video-codec: sunxi cedar version 0.01alpha
[    1.653379] sunxi-cedar 1c0e000.video-codec: cedar-ve the get irq is 19
[    1.665481] debugfs: Directory '1c23c00.codec' with parent 'F1C100s Audio Codec' already present!
[    1.680766] sun4i-codec 1c23c00.codec: Codec <-> 1c23c00.codec mapping ok
[    1.696932] NET: Registered protocol family 17
[    1.701633] Key type dns_resolver registered
[    1.707224] Loading compiled-in X.509 certificates
[    1.725195] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.743649] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.750505] ALSA device list:
[    1.753495]   #0: F1C100s Audio Codec
[    1.757860] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.766614] cfg80211: failed to load regulatory.db
[    1.781227] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    1.799487] devtmpfs: mounted
[    1.808637] Freeing unused kernel memory: 1024K
[    1.813429] Run /preinit as init process
[    1.821793] random: crng init done
[    1.827366] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.923850] mmc0: new high speed SDHC card at address 211d
[    1.931679] mmcblk0: mmc0:211d APPSD 7.50 GiB
[    2.061352]  mmcblk0: p1 p2 p3
[    4.217523] jffs2: Empty flash at 0x0083c6ac ends at 0x0083c800
[    4.227962] jffs2: Empty flash at 0x0083dc18 ends at 0x0083e000
[    4.235989] jffs2: Empty flash at 0x0083f424 ends at 0x0083f800
[    4.575055] jffs2: Empty flash at 0x00fe0c18 ends at 0x00fe1000
[    4.630890] jffs2: Empty flash at 0x00fe2418 ends at 0x00fe2800
[    4.684284] jffs2: Empty flash at 0x00fe3c18 ends at 0x00fe4000
[    4.732680] jffs2: Empty flash at 0x00fe6880 ends at 0x00fe7000
[    4.778417] jffs2: Empty flash at 0x00fe84d8 ends at 0x00fe8800
[    4.821923] jffs2: Empty flash at 0x00fe9cd8 ends at 0x00fea000
[    4.860439] jffs2: Empty flash at 0x00fec94c ends at 0x00fed000
[    4.967520] overlayfs: upper fs does not support tmpfile.
[    4.973105] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Populating /dev using udev: [    6.218369] udevd[91]: starting version 3.2.9
[    6.458319] udevd[92]: starting eudev-3.2.9
done
[    9.711082] jffs2: notice: (57) check_node_data: wrong data CRC in data node at 0x00feda88: read 0x1b0ad847, calculated 0xa81b08bd.
Initializing random number generator: OK
Saving random seed: [   10.148232] jffs2: notice: (57) check_node_data: wrong data CRC in data node at 0x00febf74: read 0x1b0ad847, calculated 0xa80a68d8.
OK
Starting network: OK
Starting uMTPrd: [   11.795507] file system registered
[   12.085871] read descriptors
[   12.088823] read strings
OK

Welcome to Widora MangoPi R3
mangopi-r3 login: [   13.498014] configfs-gadget gadget: high-speed config #1: c

fbset 指令显示如下:

# fbset

mode "1024x600-0"
        # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
        geometry 1024 600 1024 600 32
        timings 0 0 0 0 0 0 0
        accel false
        rgba 8/16,8/8,8/0,0/0
endmode

#4 Re: 全志 SOC » f1c100s驱动rgb屏求助 » 2024-04-01 16:09:43

有没有人说一下屏幕参数配置中的:sync:0,vmode:0 这2个的具体含义?我找了好久没有找到,只看到有人说跟视频有关。

#5 Re: 全志 SOC » [已解决]荔枝派nano Archlinux 下编译 u-boot 求助 » 2024-03-20 18:57:12

/usr/include/libfdt_env.h:27:30: error: conflicting types for ‘fdt64_t’ 错误

这是u-boot在编译本机程序(使用 HOSTCC)时出现的,出现这个问题是因为你的系统版本太新了, 然后系统中的 libfdt 是比较新的,u-boot 版本比较老,而 libfdt 库改动过,u-boot 调用该库时出现兼容问题,实际上 u-boot 内置有libfdt,你把系统新的 libfdt-dev 删除,u-boot 就会调用源代码自带的旧的 libfdt, 所以只需下面命令然后重新编译:

sudo apt-get remove libfdt-dev

后面想重新安装只需:

sudo apt-get install libfdt-dev

原文链接:https://www.jianshu.com/p/ad3619db9b3d

#6 Re: 全志 SOC » 模仿stm32标准库风格写的库文件(f1c100s/f1c200s),且已移植了rt-thread、lvgl、fatfs、cherryusb » 2024-02-27 16:23:04

@BlinkWee
解决了因为这个板子的SPI NAND Flash还不被sunxi-fel支持,因为我用xfel烧录时提示不支持这个nor flash,所以无法下载到spiflash中,另外我目前所用的fel是xboot的xfel,感觉好用一点,我用xboot的烧录ddr指令:sudo xfel ddr; sudo xfel write 0x80000000 f1c200s_library.bin; sudo xfel exec 0x80000000;这个指令测试了代码,是OK的,串口有输出:
F1C200S demo test!
---------------------------
其他功能还没有测试,只是初步跑起来。

#7 Re: 全志 SOC » 模仿stm32标准库风格写的库文件(f1c100s/f1c200s),且已移植了rt-thread、lvgl、fatfs、cherryusb » 2024-02-26 19:57:39

我买了一个LC-PI-200S的板子,使用了这个库,下载也成功了,编译和下载截图

22.png

但是看不到串口打印,不知道有没有大佬指导一下,新手入坑。

串口硬件方面我也排查了,硬件上使用的是PA2,PA3作为串口输出,代码里面也是用这个,

但是串口无法输出,是怎么回事呢?

页脚

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

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