页次: 1
也查看了其它的dtsi文件,都再没有出现pg11的定义和引用,咋回事呢?
pitft: pitft@0{
compatible = "sitronix,st7789v";
reg = <0>;
status = "disabled";
spi-max-frequency = <50000000>;
rotate = <90>;
fps = <33>;
buswidth = <8>;
dc-gpios = <&pio 0 1 GPIO_ACTIVE_HIGH>; /* PA1 */
/*reset-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; */
/*PG11*/
led-gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
debug = <0x0>;
};
错误提示如下:
40.183249] sun8i-h3-pinctrl 1c20800.pinctrl: pin PG11 already requested by leds; cannot claim for mytestleds
[ 40.193749] sun8i-h3-pinctrl 1c20800.pinctrl: pin-203 (mytestleds) status -22
[ 40.201243] sun8i-h3-pinctrl 1c20800.pinctrl: could not request pin 203 (PG11) from group PG11 on device 1c20800.pinctrl
[ 40.212667] mytest-led mytestleds: Error applying setting, reverse things back
[ 40.232025] mytest-led: probe of mytestleds failed with error -22
4.13-y 驱动和设备树已经默认打开了以太网,
用 ifconfig eth0 up 打开
设置ip:
ifconfig eth0 192.168.1.99
为何配置了USB 串口之后,就找不到eth0了?
Makefile 里面加
obj-y += ch341.o进一步的话也要修改 config 那个文件。
我在drivers/serial/目录下的Makefile文件中,发现是有该编译指令的,具体如下:,比较奇怪的是,为什么没有编译?谢谢。
obj-$(CONFIG_USB_SERIAL_AIRCABLE) += aircable.o
obj-$(CONFIG_USB_SERIAL_ARK3116) += ark3116.o
obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o
obj-$(CONFIG_USB_SERIAL_CH341) += ch341.o
在内核配置菜单中,没有看到340的驱动。
--- USB Serial Converter support │ │
│ │ [*] USB Serial Console device support │ │
│ │ [*] USB Generic Serial Driver │ │
│ │ < > USB Serial Simple Driver │ │
│ │ < > USB AIRcable Bluetooth Dongle Driver │ │
│ │ < > USB ARK Micro 3116 USB Serial Driver │ │
│ │ < > USB Belkin and Peracom Single Port Serial Driver │ │
│ │ < > USB Winchiphead CH341 Single Port Serial Driver │ │
│ │ < > USB ConnectTech WhiteHEAT Serial Driver │ │
│ │ < > USB Digi International AccelePort USB Serial Driver │ │
│ │ < > USB CP210x family of UART Bridge Controllers │ │
│ │ < > USB Cypress M8 USB Serial Driver │ │
│ │ < > USB Empeg empeg-car Mark I/II Driver │ │
│ │ < > USB FTDI Single Port Serial Driver │ │
│ │ < > USB Handspring Visor / Palm m50x / Sony Clie Driver │ │
│ │ < > USB PocketPC PDA Driver │ │
│ │ < > USB IR Dongle Serial Driver │ │
│ │ < > USB Inside Out Edgeport Serial Driver │ │
│ │ < > USB Inside Out Edgeport Serial Driver (TI devices) │ │
│ │ < > USB Fintek F81232 Single Port Serial Driver │ │
│ │ < > USB Fintek F81532/534 Multi-Ports Serial Driver │ │
│ │ < > USB Garmin GPS driver │ │
│ │ < > USB IPWireless (3G UMTS TDD) Driver │ │
│ │ < > USB Infinity USB Unlimited Phoenix Driver │ │
│ │ < > USB Keyspan PDA Single Port Serial Driver │ │
│ │ < > USB Keyspan USA-xxx Serial Driver │ │
│ │ < > USB KL5KUSB105 (Palmconnect) Driver │ │
│ │ < > USB KOBIL chipcard reader │ │
│ │ < > USB MCT Single Port Serial Driver │ │
│ │ < > USB Metrologic Instruments USB-POS Barcode Scanner Driver │ │
│ │ < > USB Moschip 7720 Serial Driver │ │
│ │ < > USB Moschip 7840/7820 USB Serial Driver │ │
│ │ < > USB Moxa UPORT Serial Driver │ │
│ │ < > USB Navman GPS device │ │
│ │ <*> USB Prolific 2303 Single Port Serial Driver │ │
│ │ < > USB Ours Technology Inc. OTi-6858 USB To RS232 Bridge Controller │ │
│ │ < > USB Qualcomm Auxiliary Serial Port Driver │ │
│
不要从板上取电插入,先排除电源问题。
先插入,然后启动系统。仍然有这个问题,用lsusb命令查看得到:
/: Bus 09.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
|__ Port 1: Dev 2, If 0, Class=, Driver=, 12M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
然后,ls /dev/ 命令,查看多了很多没有用的tty文件,如下图所示
tyb6 ptyq6 ptyv6 stdout ttya6 ttyp6 ttyu6 ttyz6
ptyb7 ptyq7 ptyv7 tty ttya7 ttyp7 ttyu7 ttyz7
ptyb8 ptyq8 ptyv8 tty0 ttya8 ttyp8 ttyu8 ttyz8
ptyb9 ptyq9 ptyv9 tty1 ttya9 ttyp9 ttyu9 ttyz9
ptyba ptyqa ptyva tty10 ttyaa ttypa ttyua ttyza
ptybb ptyqb ptyvb tty11 ttyab ttypb ttyub ttyzb
ptybc ptyqc ptyvc tty12 ttyac ttypc ttyuc ttyzc
ptybd ptyqd ptyvd tty13 ttyad ttypd ttyud ttyzd
ptybe ptyqe ptyve tty14 ttyae ttype ttyue ttyze
ptybf ptyqf ptyvf tty15 ttyaf ttypf ttyuf ttyzf
ptyc0 ptyr0 ptyw0 tty16 ttyb0 ttyq0 ttyv0 urandom
ptyc1 ptyr1 ptyw1 tty17 ttyb1 ttyq1 ttyv1 vcs
ptyc2 ptyr2 ptyw2 tty18 ttyb2 ttyq2 ttyv2 vcs1
ptyc3 ptyr3 ptyw3 tty19 ttyb3 ttyq3 ttyv3 vcs2
ptyc4 ptyr4 ptyw4 tty2 ttyb4 ttyq4 ttyv4 vcs3
ptyc5 ptyr5 ptyw5 tty20 ttyb5 ttyq5 ttyv5 vcs4
ptyc6 ptyr6 ptyw6 tty21 ttyb6 ttyq6 ttyv6 vcs5
ptyc7 ptyr7 ptyw7 tty22 ttyb7 ttyq7 ttyv7 vcs6
ptyc8 ptyr8 ptyw8 tty23 ttyb8 ttyq8 ttyv8 vcsa
ptyc9 ptyr9 ptyw9 tty24 ttyb9 ttyq9 ttyv9 vcsa1
ptyca ptyra ptywa tty25 ttyba ttyqa ttyva vcsa2
ptycb ptyrb ptywb tty26 ttybb ttyqb ttyvb vcsa3
ptycc ptyrc ptywc tty27 ttybc ttyqc ttyvc vcsa4
ptycd ptyrd ptywd tty28 ttybd ttyqd ttyvd vcsa5
ptyce ptyre ptywe tty29 ttybe ttyqe ttyve vcsa6
ptycf ptyrf ptywf tty3 ttybf ttyqf ttyvf watchdog
ptyd0 ptys0 ptyx0 tty30 ttyc0 ttyr0 ttyw0 watchdog0
@raspberryman
你好,请问,为何在nano neo pi 下,只有这些信息,谢谢了。
1c02000.dma-controller/ 1c1d400.usb/ 1c2b400.i2c/
1c0c000.lcd-controller/ 1c20800.pinctrl/ 1c30000.ethernet/
1c0f000.mmc/ 1c20c00.timer/ 1c40000.gpu/
1c14000.eeprom/ 1c20ca0.watchdog/ 1c68000.spi/
1c19000.usb/ 1c22800.i2s/ 1ee0000.hdmi/
1c19400.phy/ 1c22c00.codec/ 1f00000.rtc/
1c1a000.usb/ 1c25000.ths/ 1f015c0.codec-analog/
1c1a400.usb/ 1c28000.serial/ 1f02c00.pinctrl/
1c1b000.usb/ 1c28400.serial/
1c1b400.usb/ 1c28800.serial/
执行命令 cat /proc/tty/drivers的结果中包含/dev/ttyUSB信息。
root@LIYANGQUN:~# cat /proc/tty/drivers
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
g_serial /dev/ttyGS 245 0-3 serial
usbserial /dev/ttyUSB 188 0-511 serial
acm /dev/ttyACM 166 0-255 serial
serial /dev/ttyS 4 64-71 serial
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
unknown /dev/tty 4 1-63 console
Bus 008 Device 001: ID 1d6b:0001
Bus 005 Device 001: ID 1d6b:0002
Bus 007 Device 001: ID 1d6b:0001
Bus 004 Device 001: ID 1d6b:0002
Bus 006 Device 001: ID 1d6b:0001
Bus 003 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
Bus 001 Device 001: ID 1d6b:0002
Bus 009 Device 001: ID 1d6b:0002
不知道啥意思啊
参考了这篇文章进行uboot编译。
https://blog.csdn.net/qq_41839588/article/details/130000855?spm=1001.2014.3001.5502
uboot利用下面命令下载的:
git clone https://github.com/friendlyarm/u-boot.git -b sunxi-v2017.x --depth 1
执行了make nanopi-neo-deconfig命令
然后执行make命令,
出现了如下的错误提示:
board/sunxi/board.c:791:9: error: void value not ignored as it ought to be
ret = eeprom_read(0x51, 0xfa, mac_addr, sizeof(mac_addr));
搜索了一下,也没有看到解决办法,请问该如何解决?
ttyN,N通常为1~6,是虚拟控制台,可按Ctrl + Alt + Fn 切换。Getty on tty1应该是rootfs生成时默认就有了。
有可能tty1就是指向的ttyS0,可以试下删除你添加的Getty on ttyS0
应该是多配了一个tty1文件,删除了,就可以了,但仍然提示
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
我现在重新给unmininimized下,试试看。
可以添加多个echo,先定位出问题的是哪个命令
另外,你的启动系统是systemd,然后又保留并使用了sysvinit?怎么搞这么复杂?
Starting OpenBSD Secure Shell server...
Starting Permit User Sessions...
[ OK ] Finished Permit User Sessions.
[ OK ] Started Getty on tty1.
[ OK ] Started Getty on ttyS0.
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Finished Remove Stale Onli…ext4 Metadata Check Snapshots.
[ OK ] Started Dispatcher daemon for systemd-networkd.
这是启动的最后几行文字,为什么会getty on tty1呢,没有配置过这个tty1啊。我现在的串口名字是ttyS0.
bootargs 参数如下:
setenv bootargs 'console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk1p2 rw rootfstype=ext4 earlyprintk rw vt.global_cursor_default=0'
应该是启动脚本所使用的控制台(tty)不太对,试下换到/dev/tty1看看
谢谢提醒,我的配置配的是ttyS0,具体配置信息如下:
ln -s /lib/systemd/system/getty\@.service /etc/systemd/system/getty.target.wants/getty\@ttyS0.service
我们可以创建/etc/init/ttyS0.conf文件,并写入如下的内容:
start on stopped rc or RUNLEVEL=[12345]
stop on runlevel [!12345]
respawn
exec /sbin/getty -L 115200 ttyS0 vt102
把vt102后来去掉了。请问,是这里配置的原因吗?
另外,请问,如何切换到/dev/tty1呢?
启动后,发现下面错误提示:
elcome to Ubuntu 20.04.1 LTS (GNU/Linux 4.14.111-gec36a7d5-dirty armv7l)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
-bash: cannot set terminal process group (337): Inappropriate ioctl for device
-bash: no job control in this shell
然后就死机了,请问怎么解决啊? 谢谢。
出现这个错误了。我将buildroot文件系统,改为了Ubuntu 20.04 制作的根文件系统,我直接将文件系统的所有文件解压缩到 sd卡上的第二个分区上面,
现在启动的时候,提示找不到 /linuxrc ,我用的启动参数为:
setenv bootargs 'console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk1p2 rw rootfstype=ext4 earlyprintk rw init=/linuxrc vt.global_cursor_default=0'
然后不停重启。如果把其中的init=/linux 去掉,则出现错误为:
tarting init: /sbin/init exists but couldn't execute it (error -8)
[ 3.909914] Starting init: /bin/sh exists but couldn't execute it (error -8)
请大神帮忙指导以下,谢谢啦。
ttyS2和另外一台电脑相连,可以发送数据,但是在开发板执行命令 cat /proc/interrupts 结果如下,看不到ttyS2的信息。
44: 771 GIC-0 32 Level ttyS0
46: 4 GIC-0 34 Level
当讲bootarg参数中的console改为console=ttyS2时,看到ttyS2的名字,却看不到ttyS0的名字,请问,是什么原因呢?
谢谢。
dmesg | grep ttyS的信息如下:
dmesg |grep ttyS
[ 0.000000] Kernel command line: console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk1p2 rw rootfstype=ext4 earlyprintk rw init=/linuxrc vt.global_cursor_default=0
[ 0.282565] console [ttyS0] disabled
[ 0.302794] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 44, base_baud = 1500000) is a U6_16550A
[ 1.002488] console [ttyS0] enabled
[ 1.028684] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 45, base_baud = 1500000) is a U6_16550A
[ 1.058341] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 46, base_baud = 1500000) is a U6_16550A
[ 1.089951] 1c28c00.serial: ttyS3 at MMIO 0x1c28c00 (irq = 47, base_baud = 1500000) is a
按照网上的教程以及本站的相关资料,我修改了nano-pi相关的dts文件,配置了uart2的信息,其它的没有动,按照
https://cloud.tencent.com/developer/article/2311017?areaId=106001
这里的方式操作的。
但现在问题是
当我查看 /proc/interrupts 下面的信息的时候,只看到ttyS0的信息,而看不到ttyS1的信息,如下所示,而我看到别人的正常情况下,可以看到ttyS1之类信息的。
44: 3986 GIC-0 32 Level ttyS0
45: 1782 GIC-0 33 Level
46: 986 GIC-0 34 Level
47: 1006 GIC-0 35 Level
同时,目前,只有一根串口线,如何测试这个/dev/ttyS1或者S2串口是可用的?
谢谢。
u-boot、内核以及文件系统按照网上的教程重新编译了。而且,该TF卡之前用官方的img文件启动是没有问题的。按照进程将TF卡分为kernel区,FAT16,和文件系统,EXT4格式,然后使用梦里dd 将u-boot复制到 8k处,然后使用sudo cp命令将内核及文件系统拷贝到/dev/username/KERNEL分区。
u-boot中,在.h文件配置了启动参数。请问,如何找到这两个文件呢?谢谢。
启动过程及软硬件信息如下:
U-Boot SPL 2017.11 (Oct 27 2023 - 18:39:32)
DRAM: 256 MiB(408MHz)
CPU Freq: 408MHz
memory test: 1
Pattern 55aa Writing...Reading...OK
Trying to boot from MMC1
Boot device: sd
U-Boot 2017.11 (Oct 27 2023 - 18:39:32 +0800) Allwinner Technology
CPU: Allwinner H3 (SUN8I 1680)
Model: FriendlyElec NanoPi H3
DRAM: 256 MiB
CPU Freq: 1008MHz
MMC: SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: No ethernet found.
BOARD: nanopi-neo
starting USB...
No controllers found
Hit any key to stop autoboot: 0
** Unable to read file zImage **
** Unable to read file sun8i-v3s-licheepi-zero-dock.dtb **
https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO/zh
我按照上述文档,下载了相关镜像文件,friendlycore-xenial_3.4_armhf.tar文件,将其中的img文件烧录到sd卡上,但是却无法启动。
文档里面说的很粗糙,不知道是不是没有少些uboot的原因还是什么啊?
谢谢。
页次: 1