页次: 1
那个帖子就是我发的。。。是晕哥喊我来帮你解决这个问题。首先你对spi屏了解稍微有点欠缺,dc引脚是必不可少的,我当时帖子里使用wp是因为当时那一组spi引脚是分配给spi nand的。改用屏的时候就没有改名字。wp确实就是dc脚,spi屏与nand不同,不能缺少dc引脚,除非你是使用9bit模式驱动,但这更复杂,因此 你还是配置dc引脚,厂家给的手册上会写rs等等,你仔细查看手册,控制写入命令/数据的那个脚就是dc脚,没有是无法初始化屏的,初始化进程必须检测有没有这些硬件,如果没有就会返回报错,报错位置大概率是gpio问题!te引脚是个好东西,但是它不是必须的 它是处理撕裂问题的最佳选手。因此 可以不配置te引脚,cs引脚 也不是必须的,它可以在屏端直接对地10K电阻 保持活动状态,但spi引脚注册必须有cs引脚 因此 这个脚必须注册 用不用就看你了。reset-gpios = <&pio PD 4 1 1 2 1> 采用这种写法是正确的,不用考虑。还有就是 你想生成fb0 事实上 跟你接不接屏没多大关系,只要代码中 设备树中描述完整且正确 就会有fb0 因此 你可以先完全抛开 屏的实际硬件,先将设备树关于硬件描述的部分补全,驱动随便指向一个 st7789 之类的驱动程序 ,生成了fb0 代表显示通路已经打通,下一步就是 配置硬件实际连接,保证硬件无误后,就是测试驱动代码的下发。。即修改驱动程序代码。添加debug打印。这部分就很好做了。
总结就是 你想驱动spi屏,需要整理清楚步骤,逐步进行,不可能一步到位。尤其是缺乏基本概念常识情况下,还希望你能按部就班,一步一步来。
第一:按你所说,你并不了解设备树,也不理解设备树,但不妨碍照搬,我这里解释一下你的疑惑,设备树gpio的注册格式 是看linux内核版本的。原厂的sdk内核是4.9版本,因此需要“许多参数”,与原帖子里面是一样的并没有错误。linux4.9以后的版本gpio注册格式就是你写的这样的了。
第二:你能看到gpio注册错误的提示说明离正确驱动不远了。但是吧,我就不理解了你注释掉DC引脚的申请是为啥,spi屏如果没有了DC引脚怎么初始化呢?可能计算机也不能理解这个做法,因此报错了?还有 reset-gpios 等等 这些引脚的名字 其实是可以自己定义的,但是要跟驱动里面获取引脚信息的引脚名字定义相同。你要改名字 也要先找到 引用这些引脚的代码看一下定义的名字。只要名字统一 就可以正确使用。但不建议修改代码中定义的名字。
note:原帖中的修改是可行的,除非你没有按照原帖做以至于没有fb0,最好先打通通路,再说修改,别路不通就改,还不知道为啥改。
是因为你compatible = "sitronix,st77916";指向错误。借你个chatgpt3.5 它能帮你解 https://39rh47.aitianhu1.top/#/chat/1728471009371 决一下问题。
情况如下:I2C 从设备是 BMP280 模块,通过arduino正确通讯时候 截取的I2C数据 确定 模块 地址0x77(7bit)0xee(8bit) 最后一位读写位。
采用F403 模拟I2C通讯 读取ID 验证地址正确,I2C数据如下:
之后 采用硬件I2C 复用 PA9 PA10 为I2C2引脚,修改库初始化文件如下:
初始化如下:(串口输出显示,初始化成功)
读取ID函数如下:
但是串口输出显示 全部失败。
I2C数据如下:
尝试修改 设备地址0x76 0x77 0xec 0xee 都是这个波形,0xd0 是bmp280的ID寄存器地址。
请问 问题到底出在哪里呢?。。。
@lovexulu
插上后电脑设备管理器没有发现设备
这是电路图: http://xxxx:8080/board.zip
v3s是淘宝上买的,链接:https://item.taobao.com/item.htm?spm=a1z09.2.0.0.6e532e8disPi7J&id=640402624928&_u=o2jht9p3857
挨个检查v3s引脚焊接。相邻引脚是否有短路。用镊子轻微挑动管脚,有位移者为虚焊。拆除不必要的最小系统器件,保留 电源,TF卡,参考器件,管脚电源去耦电容。如果还不行,则更换dcdc芯片或拆下dcdc 采取外部供电以排除电源问题。另外pcb走线是否规范?是否遵循3W原则,是否关键信号有参考平面?
@lovexulu 大佬,我用了全志在线的的烧录固件体欧式烧录失败,是不是电路还存在这问题?
https://whycan.com/files/members/7430/~{]UEG4_X2UHNYA0998K~]2.png
参考D1哪吒开发板 烧录和编译
https://d1.docs.aw-ol.com/study/study_4compile/
lovexulu 说:@mysteryli
晕哥通知来填坑。。。非常感谢大佬指点,确实是选电阻的问题,手快焊多了也没看英文提示。现在应该正常了,找了论坛的帖子也没有看到测试固件,大神请问有固件测试下吗?
请看晕哥关于D1S的帖子下载sdk,还有开发文档编译即可。我这里给你个镜像测试吧。tina_d1-f133evb1_rgb800x480_uart0.img
驱动采用的这个:rtl8723DS_WiFi_linux_v5.13.5-29-g0dbf6713f.20210604_COEX20210106-3b3b.tar.gz
按照官方提供的手册,晕哥帖子中有:
https://whycan.com/t_7057.html
配置后编译可以通过,但在小板子上启动时报错截图如下:
求教各位大佬指点,该如何解决这个问题。
防止触摸电源部分导致悲剧,用3D打印做了个minipi外壳。共享出来。
STL文件下载minipibox.rar
参考了众多大佬的原理图,薅嘉立创羊毛嫖的4层板。
有wifi。
嘉立创的原理图及PCB文件
F1C100or200S-V2.rar
还请大佬们多多指教。。。
@司徒
谢谢大神指点,我仔细看了多次报错的信息,问题大多数都是在地址空间,以及空指针,等等,事实上这些数据并没有错误,应该是在传输过程中导致了数据变化,以至于引起报错,核心工作的数据来源1是tf卡,2是RAM,由于RAM封在内部,只要芯片不是不良品,基本不会出问题,SO 2.5v供电部分以及SVREF是可能引起RAM错误的原因, tf卡部分 走线有部分从 晶振 下穿过,虽然中间有分布地隔离,但不排除串扰存在,这也可能是引起问题的元凶。芯片供电部分 都有优化处理,尤其是核电 与 RAM。。应当没有问题。现在想改变 线路板晶振部分走线貌似无法测试。只能重新设计pcb。
注,还曾出过 数据对齐错误,不同步错误,还有同步陷阱?。。等奇葩错误,90%都是 指向错误地址。
TF卡启动正常,可进入系统,lichee pi的镜像。但登录后,或者未登录 几秒或者几十秒后就突然报错,错误代码如下:
[ 58.956348] Unable to handle kernel paging request at virtual address 00e27ffe
[ 58.970251] pgd = 3e9569a8
[ 58.976170] [00e27ffe] *pgd=00000000
[ 58.982974] Internal error: Oops: 1 [#1] ARM
[ 58.990477] Modules linked in:
[ 58.996756] CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.0-rc8-licheepi-nano+ #69
[ 59.010827] Hardware name: Allwinner suniv Family
[ 59.018981] PC is at current_kernel_time64+0x14/0x54
[ 59.027359] LR is at 0xc635f600
[ 59.033841] pc : [<c015273c>] lr : [<c635f600>] psr: 60000093
[ 59.046734] sp : c0a01e78 ip : 80000014 fp : ffffffff
[ 59.055311] r10: 0000000d r9 : 00000000 r8 : 00000000
[ 59.063849] r7 : 54566734 r6 : 8111c400 r5 : 0000071e r4 : c0a5fee0
[ 59.076836] r3 : 1c124780 r2 : 00e27f66 r1 : 00000000 r0 : 54567251
[ 59.090009] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
[ 59.103868] Control: 0005317f Table: 81bf8000 DAC: 00000053
[ 59.116235] Process swapper (pid: 0, stack limit = 0x630c7f43)
[ 59.128776] Stack: (0xc0a01e78 to 0xc0a02000)
[ 59.136574] 1e60: c0a0e5a0 1c124780
[ 59.151381] 1e80: c0a01e8c c0a2e360 00000001 d55553eb 00000014 c635f600 0000000d 60000093
[ 59.166276] 1ea0: 00000002 c015d068 c0a2e360 c0a0f6e0 d55553eb 00000014 c635f600 0000000d
[ 59.181215] 1ec0: 60000093 c015db64 00000001 c01517dc c0a0fe40 c0a0f6e0 c0a0fe40 c635f600
[ 59.196238] 1ee0: 0000000d c01519f8 0000000d c0a2e360 c635f600 c0151000 00000001 c0a0fe40
[ 59.211335] 1f00: b9b348ef c635f600 0000000d 0000000d c0a2e360 c635f600 0000000d c015e3dc
[ 59.226656] 1f20: 00000000 00000000 00000002 c0136df0 ba4a3400 0000000d 00000000 c0a09ad0
[ 59.242115] 1f40: c1836018 b9b19d80 0000000d 00000000 464e627f 7ffffff2 0c845880 00000000
[ 59.257604] 1f60: c0a01fa4 c0a3ac60 c0a3ac20 ffffffff c0a03020 c1fb43e0 c0924a28 00053177
[ 59.273208] 1f80: 00000000 c015e884 c0a3ac60 c013cc5c 00000000 c0a3ac60 c0a3ac20 ffffffff
[ 59.288897] 1fa0: c0a03020 c1fb43e0 c0924a28 00053177 00000000 c013d044 c0a3ac60 c0900bdc
[ 59.304624] 1fc0: ffffffff ffffffff 00000000 c090066c 00000000 c0924a28 00000000 c090032c
[ 59.320511] 1fe0: 00000053 00003135 00000000 80e60000 41069265 00000000 00000000 00000000
[ 59.336479] [<c015273c>] (current_kernel_time64) from [<c0a2e360>] (0xc0a2e360)
[ 59.351565] Code: e59f2044 e592c020 e31c0001 1a00000d (e1c249d8)
[ 59.365409] ---[ end trace dfeaa377ff9c4cf9 ]---
[ 59.373951] Kernel panic - not syncing: Attempted to kill the idle task!
[ 59.388368] Rebooting in 5 seconds..
[ 65.376176] Reboot failed -- System halted
各位大神看看是哪里的问题?!
前段时间一直折腾spi驱动小屏,后来成功由framebuffer驱动,但是并不支持硬解。想显示自己的东西需要学习向frambuffer写入数据以驱动fb0显示。
为了提高刷新解决无硬解问题,设置开启lcd硬驱动,挂载为fb0.将设备树spi驱动屏挂载为fb1,写脚本程序将fb0显示缓冲数据映射至fb1,可使刷新率达到最高40pfs以上。占用cpu10%。同样,想显示自己的东西需要向fb0的缓冲区写入数据。
最后一种办法最简单,挂载spi接口设备,为此设备自己写屏驱动,想显示啥就显示啥,这种方法类似于单片机配置spi接口写接口驱动程序。但不同的是可以调动linux资源数据,可以用python写驱动。
以上纯属个人见解,不正之处还望指教。
经过几天的突击学习。终于可以在这块1.14寸spi屏上看到启动log了。运行了几个dome。还行,最高刷新帧率能达到55+(白屏)。这几天也是汤坑无数,有硬件问题,更多的是软件问题,设备树,驱动程序,等等,现在还有些问题我还解决不了,再努力学习吧,这几天也让我从一个萌新蜕变成了一个小白。。特此记录一下。
主要问题如下:1、硬件连接RST->PE7,DC->PE10,CS->GND,其他按照spi标准接就行。
2、设备树添加节点,io口描述,节点中要有使能。
3、由于添加PE7,PE10需要额外申请gpio,申请gpio的程序代码目前版本中存在问题。
4、目前版本中st7789v的驱动伽马矫正存在问题,有色差。且针对1.14寸屏有显示坐标偏差,行偏52,列偏40。
参照这位大牛的博客。https://www.cnblogs.com/listenscience/p/13619930.html
我也是问了很多问题才解决的。
至于下一个目标。。另开一帖吧。。
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 0b, 40, 18
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
Setting up a 800x600 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
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
280 bytes read in 15 ms (17.6 KiB/s)
## Executing script at 80c50000
reading suniv-f1c100s-licheepi-nano.dtb
7642 bytes read in 26 ms (286.1 KiB/s)
reading zImage
3890544 bytes read in 324 ms (11.5 MiB/s)
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 80e60000, end 80e64dd9 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.2.0lovexulu+ (xulu@xulu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #36 Sun Sep 13 15:38:27 CST 2020
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Nano
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw
[ 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: 22704K/32768K available (6144K kernel code, 235K rwdata, 1468K rodata, 1024K init, 227K bss, 10064K reserved, 0K cma-reserved, 0K highmem)
[ 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/0x42c with crng_init=0
[ 0.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000116] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000652] Console: colour dummy device 80x30
[ 0.001022] printk: console [tty0] enabled
[ 0.001114] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[ 0.050272] pid_max: default: 32768 minimum: 301
[ 0.050648] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.050712] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.052275] CPU: Testing write buffer coherency: ok
[ 0.054479] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.056587] devtmpfs: initialized
[ 0.061699] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.061854] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.062203] pinctrl core: initialized pinctrl subsystem
[ 0.064370] NET: Registered protocol family 16
[ 0.066172] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.068036] cpuidle: using governor menu
[ 0.116178] SCSI subsystem initialized
[ 0.116653] usbcore: registered new interface driver usbfs
[ 0.116873] usbcore: registered new interface driver hub
[ 0.117116] usbcore: registered new device driver usb
[ 0.117624] pps_core: LinuxPPS API ver. 1 registered
[ 0.117703] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.118316] Advanced Linux Sound Architecture Driver Initialized.
[ 0.119872] clocksource: Switched to clocksource timer
[ 0.148068] NET: Registered protocol family 2
[ 0.149587] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[ 0.149777] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.150012] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.150106] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.150504] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.150617] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.151188] NET: Registered protocol family 1
[ 0.153503] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.155596] Initialise system trusted keyrings
[ 0.156278] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[ 0.176860] Key type asymmetric registered
[ 0.176971] Asymmetric key parser 'x509' registered
[ 0.177196] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.177271] io scheduler mq-deadline registered
[ 0.177303] io scheduler kyber registered
[ 0.179187] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[ 0.188151] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.362437] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.367751] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[ 0.369458] printk: console [ttyS0] disabled
[ 0.389798] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[ 0.773212] printk: console [ttyS0] enabled
[ 0.780829] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 0.797530] SCSI Media Changer driver v0.25
[ 0.803239] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[ 0.816111] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.822865] ehci-platform: EHCI generic platform driver
[ 0.828420] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.834809] ohci-platform: OHCI generic platform driver
[ 0.840574] usbcore: registered new interface driver usb-storage
[ 0.847576] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.856802] i2c /dev entries driver
[ 0.862001] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 0.900111] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 0.909242] usbcore: registered new interface driver usbhid
[ 0.915035] usbhid: USB HID core driver
[ 0.919136] fbtft_of_value: buswidth = 8
[ 0.923227] fbtft_of_value: debug = 0
[ 0.926928] fbtft_of_value: rotate = 0
[ 0.930765] fbtft_of_value: fps = 30
[ 0.964446] mmc0: host does not support reading read-only switch, assuming write-enable
[ 0.977216] mmc0: new high speed SDHC card at address 0215
[ 0.987284] mmcblk0: mmc0:0215 APPSD 7.66 GiB
[ 0.994926] mmcblk0: p1 p2
[ 1.513392] random: fast init done
[ 1.538761] Console: switching to colour frame buffer device 30x16
[ 1.547601] graphics fb0: fb_st7789v frame buffer, 240x135, 63 KiB video memory, 4 KiB buffer memory, fps=33, spi1.0 at 32 MHz
[ 1.576700] NET: Registered protocol family 17
[ 1.583043] Key type dns_resolver registered
[ 1.595093] Loading compiled-in X.509 certificates
[ 1.613793] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 1.628405] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[ 1.642265] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0737d54)
[ 1.653259] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc07369ac)
[ 1.662601] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.670770] [drm] No driver support for vblank timestamp query.
[ 1.680782] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.693769] sun4i-drm display-engine: fb1: sun4i-drmdrmfb frame buffer device
[ 1.703805] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.718147] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.725621] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.741756] hub 1-0:1.0: USB hub found
[ 1.747590] hub 1-0:1.0: 1 port detected
[ 1.755985] using random self ethernet address
[ 1.761681] using random host ethernet address
[ 1.770154] usb0: HOST MAC d6:57:09:94:ba:ed
[ 1.775690] usb0: MAC da:67:1c:c9:fb:9a
[ 1.780803] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.789964] g_cdc gadget: g_cdc ready
[ 1.796507] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.820945] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.829573] ALSA device list:
[ 1.833723] #0: Loopback 1
[ 1.838422] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.849184] cfg80211: failed to load regulatory.db
[ 1.881413] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.891821] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.901297] devtmpfs: mounted
[ 1.909298] Freeing unused kernel memory: 1024K
[ 1.915263] Run /sbin/init as init process
[ 2.112724] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 2.154298] random: crng init done
Starting logging: OK
Initializing random number generator... done.
Welcome to Lichee Pi
Lichee login: root
Password:
# ls
littlevgl_demo
# cd /
# ls
bin lib media proc sbin usr
dev lib32 mnt root sys var
etc linuxrc opt run tmp
# cd sys
#
# ls
block class devices fs module
bus dev firmware kernel power
# cd class
# ls
backlight graphics mmc_host scsi_changer thermal
bdi i2c-adapter mtd scsi_device tty
block i2c-dev net scsi_disk udc
bsg ieee80211 phy scsi_generic vc
dma input power_supply scsi_host vtconsole
drm leds pps sound
extcon mem pwm spi_master
gpio misc regulator spidev
# cd spidev
# ls
# cd ..
# cd spi_master
# ls
spi1
SPI1应该是加载了,可为什么没有显示呢??
[ 1.547683] graphics fb0: fb_st7789v frame buffer, 240x135, 63 KiB video memory, 4 KiB buffer memory, fps=33, spi0.0 at 32 MHz
[ 1.576839] NET: Registered protocol family 17
[ 1.583143] Key type dns_resolver registered
[ 1.595225] Loading compiled-in X.509 certificates
[ 1.613810] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 1.628404] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[ 1.642288] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0737d54)
[ 1.653617] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc07369ac)
[ 1.662968] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.671143] [drm] No driver support for vblank timestamp query.
[ 1.681118] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
重新修改设备树配置检查spi都打开了。多了这些启动信息。
这是引导启动的打印
U-Boot SPL 2018.01-05676-g00188782ee (Aug 09 2018 - 18:49:43)
DRAM: 32 MiB
Trying to boot from MMC1
U-Boot 2018.01-05676-g00188782ee (Aug 09 2018 - 18:49:43 +0800) Allwinner Techno logy
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 0b, 40, 18
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
Setting up a 800x600 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
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
280 bytes read in 15 ms (17.6 KiB/s)
## Executing script at 80c50000
reading suniv-f1c100s-licheepi-nano.dtb
7629 bytes read in 26 ms (286.1 KiB/s)
reading zImage
3893392 bytes read in 339 ms (11 MiB/s)
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 80e60000, end 80e64dcc ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.2.0-licheepi-nano+ (xulu@xulu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #35 Sat Sep 12 21:59:15 CST 2020
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Nano
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=tty0 console=ttyS0,115200 panic=5 ro otwait root=/dev/mmcblk0p2 rw
[ 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: 22704K/32768K available (6144K kernel code, 235K rwdata, 1468K rodata, 1024K init, 227K bss, 10064K reserved, 0K cma-reserved, 0K highmem )
[ 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/0x42c wit h crng_init=0
[ 0.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478 484971ns
[ 0.000115] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_ idle_ns: 79635851949 ns
[ 0.000682] Console: colour dummy device 80x30
[ 0.001052] printk: console [tty0] enabled
[ 0.001143] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[ 0.050264] pid_max: default: 32768 minimum: 301
[ 0.050659] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.050720] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.052286] CPU: Testing write buffer coherency: ok
[ 0.054542] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.056641] devtmpfs: initialized
[ 0.061635] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma x_idle_ns: 19112604462750000 ns
[ 0.061785] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.062131] pinctrl core: initialized pinctrl subsystem
[ 0.064329] NET: Registered protocol family 16
[ 0.066129] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.067960] cpuidle: using governor menu
[ 0.116196] SCSI subsystem initialized
[ 0.116626] usbcore: registered new interface driver usbfs
[ 0.116822] usbcore: registered new interface driver hub
[ 0.117114] usbcore: registered new device driver usb
[ 0.117613] pps_core: LinuxPPS API ver. 1 registered
[ 0.117683] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giome tti <giometti@linux.it>
[ 0.118228] Advanced Linux Sound Architecture Driver Initialized.
[ 0.119780] clocksource: Switched to clocksource timer
[ 0.147870] NET: Registered protocol family 2
[ 0.149379] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[ 0.149565] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.149650] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.149719] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.150261] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.150394] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.150968] NET: Registered protocol family 1
[ 0.153310] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.155409] Initialise system trusted keyrings
[ 0.156075] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[ 0.176686] Key type asymmetric registered
[ 0.176785] Asymmetric key parser 'x509' registered
[ 0.177002] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2 52)
[ 0.177080] io scheduler mq-deadline registered
[ 0.177117] io scheduler kyber registered
[ 0.178967] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[ 0.187697] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driv er
[ 0.361335] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.366603] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc -pe not found, using dummy regulator
[ 0.368304] printk: console [ttyS0] disabled
[ 0.388646] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 22, base_baud = 62 50000) is a 16550A
[ 0.772373] printk: console [ttyS0] enabled
[ 0.780014] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc -pd not found, using dummy regulator
[ 0.796461] SCSI Media Changer driver v0.25
[ 0.802224] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.808824] ehci-platform: EHCI generic platform driver
[ 0.814462] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.820843] ohci-platform: OHCI generic platform driver
[ 0.826538] usbcore: registered new interface driver usb-storage
[ 0.833675] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.842852] i2c /dev entries driver
[ 0.847962] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc -pf not found, using dummy regulator
[ 0.886100] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 0.895287] usbcore: registered new interface driver usbhid
[ 0.901068] usbhid: USB HID core driver
[ 0.919168] NET: Registered protocol family 17
[ 0.923978] Key type dns_resolver registered
[ 0.930832] Loading compiled-in X.509 certificates
[ 0.946578] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc -pd not found, using dummy regulator
[ 0.958077] sun4i-backend 1e60000.display-backend: Couldn't find matching fro ntend, frontend features disabled
[ 0.968947] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0 737d54)
[ 0.977915] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc07 369ac)
[ 0.985764] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 0.992460] [drm] No driver support for vblank timestamp query.
[ 1.000048] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.033529] mmc0: host does not support reading read-only switch, assuming wr ite-enable
[ 1.038115] mmc0: new high speed SDHC card at address 0215
[ 1.041519] mmcblk0: mmc0:0215 APPSD 7.66 GiB
[ 1.044127] mmcblk0: p1 p2
[ 1.052718] Console: switching to colour frame buffer device 60x34
[ 1.111751] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device
[ 1.127776] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto su pply vcc not found, using dummy regulator
[ 1.150973] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.164543] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.182144] hub 1-0:1.0: USB hub found
[ 1.190157] hub 1-0:1.0: 1 port detected
[ 1.199400] using random self ethernet address
[ 1.207941] using random host ethernet address
[ 1.217884] usb0: HOST MAC ee:41:df:22:12:d3
[ 1.226312] usb0: MAC da:b5:dd:01:37:54
[ 1.234061] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.248894] g_cdc gadget: g_cdc ready
[ 1.257207] cfg80211: Loading compiled-in X.509 certificates for regulatory d atabase
[ 1.279347] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.293454] ALSA device list:
[ 1.300137] #0: Loopback 1
[ 1.307422] platform regulatory.0: Direct firmware load for regulatory.db fai led with error -2
[ 1.323223] cfg80211: failed to load regulatory.db
[ 1.643964] random: fast init done
[ 2.265942] EXT4-fs (mmcblk0p2): recovery complete
[ 2.568393] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. O pts: (null)
[ 2.583707] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.597935] devtmpfs: mounted
[ 2.609009] Freeing unused kernel memory: 1024K
[ 2.617236] Run /sbin/init as init process
[ 2.806112] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting logging: OK
Initializing random number generator... [ 3.086239] random: dd: uninitialized urandom read (512 bytes read)
done.
Welcome to Lichee Pi
Lichee login: root
Password:
@lovexulu 已经执行成功了, 这个指令是编译所有 dtb 文件.
看起来是成功了,可是在dts文件夹下并没有dtd文件生成。
重新下载了一个linux源码就可以了。也不知道什么原因,重新编译后已经可以正确引导启动,但st7789v仍然无法驱动,设备树以及代码部分已经参考 https://www.cnblogs.com/listenscience/p/13619930.html 这个修改过了,并正确编译镜像,在启动过程中没发现有st7789加载。。。
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4
无法生成设备树dtb文件。但也没报错?!
执行如下:
root@xulu:/home/xulu/uliunx/linux# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
root@xulu:/home/xulu/uliunx/linux#
lovexulu 说:嗯我下载了主线liunx进行编译,配置输出选择st7789v,但编译报错。
其实吧,我觉得吧,编译报错这个事还是得调才知道毕竟每个人的编译环境呀,工具呀什么的都有差异。而且你刚入门,可以先学习学习别人怎么玩的。
驱动SPI的显示屏的例子有很多。学习的话,刚好可以尝试自己写下驱动。
萌新啊,刚从单片机过来,对这块基本上啥都不懂,没有什么概念框架,别说写驱动了,系统构成,下载步骤,都还没搞清除。说不定有数据手册跑裸机还能当单片机用。。。。。应该还是对系统不了解,对linux系统不够了解,通过昨天一天突击,总算了解了一点点启动过程,理论上的启动过程,慢慢学习吧,编译错误先放一下。
今天尝试编译linux5.8,居然成了。。。。
页次: 1