T113 在boot阶段关闭PWM7 在内核启动打开PWM7 配置如下 但是在uboot 和linux启动都没有开启背光
现在在uboot和linux测量PD22管脚电压都是0 各位大佬 帮我看下哦
我的配置如下uboot-board.dts
&pwm7_pin_a {
pins = "PD22";
function = "pwm7";
muxsel = <5>;
drive-strength = <10>;
bias-pull-up;
};
&pwm7_pin_b {
pins = "PD22";
muxsel = <5>;
function = "gpio_out";
bias-pull-up;
};
&pwm7 {
pinctrl-names = "active", "sleep";
pinctrl-0 = <&pwm7_pin_a>;
pinctrl-1 = <&pwm7_pin_b>;
status = "okay";
};
内核配置如下
pwm7_pin_a: pwm7@0 {
pins = "PD22";
function = "pwm7";
muxsel = <5>;
drive-strength = <10>;
bias-pull-up;
};
pwm7_pin_b: pwm7@1 {
pins = "PD22";
function = "gpio_out";
bias-pull-up;
};
&pwm7 {
pinctrl-names = "active", "sleep";
pinctrl-0 = <&pwm7_pin_a>;
pinctrl-1 = <&pwm7_pin_b>;
status = "okay";
};
下面是打印信息 问下各位大佬有遇到吗
[350]Jump to second Boot.
M/TC: OP-TEE version: 6aef7bb2-dirty (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Fri Jul 23 09:25:11 UTC 2021 arm
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.61 (root@ubuntu) (arm-openwrt-linux-muslgnueabi-gcc.bin (OpenWrt/Linaro GCC 6.4-2017.11 2017-11) 6.4.1, GNU ld (GNU Binutils) 2.27) #430 SMP PREEMPT Sat May 3 14:19:26 UTC 2025
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: sun8iw20
[ 0.000000] printk: bootconsole [earlycon0] enabled
▒[ 0.484278] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 0.493563] CPU0: stopping
[ 0.496603] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.61 #430
[ 0.503432] Hardware name: Generic DT based system
[ 0.508827] [<c010df0c>] (unwind_backtrace) from [<c010a690>] (show_stack+0x10/0x14)
[ 0.517520] [<c010a690>] (show_stack) from [<c076b610>] (dump_stack+0x88/0xa4)
[ 0.525627] [<c076b610>] (dump_stack) from [<c010c2d4>] (handle_IPI+0xe4/0x180)
[ 0.533833] [<c010c2d4>] (handle_IPI) from [<c034255c>] (gic_handle_irq+0x70/0x78)
[ 0.542329] [<c034255c>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8)
[ 0.550721] Exception stack(0xc0c01f40 to 0xc0c01f88)
[ 0.556390] 1f40: 00000838 c7aba534 00000000 c0114820 00000001 c0c00000 c0c04e24 c0c04e60
[ 0.565566] 1f60: c0c57000 c7bff540 c0b2a0c0 00000000 00000001 c0c01f90 c0107fc8 c0107fb8
[ 0.574737] 1f80: 60000013 ffffffff
[ 0.578654] [<c01021cc>] (__irq_svc) from [<c0107fb8>] (arch_cpu_idle+0x1c/0x38)
[ 0.586955] [<c0107fb8>] (arch_cpu_idle) from [<c013d588>] (do_idle+0xd4/0x128)
[ 0.595158] [<c013d588>] (do_idle) from [<c013d86c>] (cpu_startup_entry+0x18/0x1c)
[ 0.603654] [<c013d86c>] (cpu_startup_entry) from [<c0b00c80>] (start_kernel+0x360/0x3ec)
[ 0.612830] [<c0b00c80>] (start_kernel) from [<00000000>] (0x0)
[ 0.619468] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
谢谢了,可以,
我使用的是GPADC0
这是我配置&gpadc {
channel_num = <1>;
channel_select = <0x01>;
channel_data_select = <0>;
wakeup-source;
status = "okay";
}; 因为不要按键检测的 我只要通过ADC检测电压 所以其他的按键和比较都没有设置
下面启动时候打印的信息 在设备里面有event1
[ 1.227429] sunxi_gpadc_init,2151, success
[ 1.235486] sunxi_key_init: get key count failed
[ 1.235495] sunxi_gpadc_setup: get channel compare select failed
[ 1.247434] sunxi_gpadc_setup: get channel compare low data select failed
[ 1.255059] sunxi_gpadc_setup: get channel compare hig data select failed
[ 1.262689] sunxi_gpadc_setup: get channel scan data failed
[ 1.268964] sunxi_gpadc_setup:get channel0_compare_lowdata err!
[ 1.275617] sunxi_gpadc_setup:get channel0_compare_higdata err!
[ 1.282507] input: sunxi-gpadc0 as /devices/virtual/input/input1
是在应用程序里面操作吗?
我就在应用程序里面 主要是下面这代码 而且我是放在while里面都没有加延时
if(ioctl(PrintfFd,HELL3_READ,&s_stdata) < 0)
{
close(PrintfFd);
PrintfFd = -1;
printf(" PrintfFd ioctl error\n");
}
//printf("s_stdata.buff[0]:%d\n",s_stdata.buff[0]);
s_stdata1.buff[0] = s_stdata.buff[0];
s_stdata1.buff[1] = 0;
if(ioctl(PRINTFIO_FD,HELLO_WRITE,&s_stdata1)< 0)
{
close(PRINTFIO_FD);
PRINTFIO_FD = -1;
printf(" PRINTFIO_FD ioctl error\n");
};
全志T113芯片 ts_calibrate 提示ts_setup没有找到
ts_
ts_calibrate ts_harvest ts_print_mt ts_test ts_uinput
ts_finddev ts_print ts_print_raw ts_test_mt ts_verify
root@TinaLinux:/# ts_
ts_calibrate ts_harvest ts_print_mt ts_test ts_uinput
ts_finddev ts_print ts_print_raw ts_test_mt ts_verify
root@TinaLinux:/# ts_calibrate
ts_setup: No such file or directory
root@TinaLinux:/# ts_test
ts_open: No such file or directory
这是还需要设置什么吗
我在这个目录/target/allwinner/t113-bingpi_m2/busybox-init-base-files/etc/init.d/rc.modules 的脚本中添加了自启动执行程序会启动失败 报错如下 ,但是 系统启动 我单独进这个目录执行程序 又可以执行成功 这是哪里有问题吗啊
Error loading shared library libQt5Widgets.so.5: No such file or directory (needed by /ysc/Printf_Machine)
Error loading shared library libQt5Gui.so.5: No such file or directory (needed by /ysc/Printf_Machine)
Error loading shared library libQt5Core.so.5: No such file or directory (needed by /ysc/Printf_Machine)
Trying to connect to SWUpdate...
Error relocating /ysc/Printf_Machine: _ZNK7QWidget6metricEN12QPaintDevice17PaintDeviceMetricE: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget10leaveEventEP6QEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZN15QAbstractButton7setTextERK7QString: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget13keyPressEventEP9QKeyEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget11tabletEventEP12QTabletEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZThn8_NK7QWidget7devTypeEv: symbol not found
Error relocating /ysc/Prin[ 5.921800] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
tf_Machine: _ZN7QWidget10closeEventEP11QCloseEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZThn8_NK7QWidget6me[ 5.926053] file system registered
tricEN12QPaintDevice17PaintDeviceMetricE: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QObject10timerEventEP11QTimerEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZThn8_NK7QWidget11paintEngineEv: symbol not found
Error relo[ 5.962073] configfs-gadget 4100000.udc-controller: failed to start g1: -19
cating /ysc/Printf_Machine: _ZN7QObject16disconnectNotifyERK11QMetaMethod: symbol not found
Error relocating /ysc/Printf_Machine: _ZThn8_NK7QWidget11initPainterEP8QPainter: symbol not found
Error relocating /ysc/Printf_Machine: _ZNK7QObject10objectNameEv: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QObject10childEventEP11QChildEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget14setWindowTitleERK7QString: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget13focusOutEventEP11QFocusEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZNK7QWidget17hasHeightForWidthEv: symbol not found
Error relocating /ysc/Printf_Machine: _ZN11QPushButtonC1EP7QWidget: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget14dragLeaveEventEP15QDragLeaveEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZN11QMainWindowC2EP7QWidget6QFlagsIN2Qt10WindowTypeEE: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget18focusNextPrevChildEb: symbol not found
Error relocating /ysc/Printf_Machine: _ZN6QLabel7setTextERK7QString: symbol not found
报错内容如下
root@ysc-virtual-machine:/home/D211/d211# m
Source is not built yet : /home/D211/d211/source/uboot-2021.10
>>> uboot 2021.10 kconfig-package-merge-config
GEN Makefile
***
*** Can't find default configuration "arch/../configs/d211_per1_defconfig"!
***
make[3]: *** [/home/D211/d211/source/uboot-2021.10/scripts/kconfig/Makefile:96: d211_per1_defconfig] Error 1
make[2]: *** [/home/D211/d211/source/uboot-2021.10/Makefile:569: d211_per1_defconfig] Error 2
make[1]: *** [Makefile:177: sub-make] Error 2
make: *** [package/uboot/uboot.mk:295: /home/D211/d211/output/d211_ota_emmc/build/uboot-2021.10/.stamp_dotconfig] Error 2
各位大佬看下哦哦,
1:编译最后感觉是有什么配置对
Starting logging: OK
Starting mdev...
modprobe: can't change directory to '/lib/modules': No such file or directory
Initializing random number generator... [ 5.415389] ------------[ cut here ]------------
[ 5.420169] WARNING: CPU: 0 PID: 88 at drivers/mtd/spi-nor/spi-nor.c:1182 spi_nor_write+0x138/0x1b4
[ 5.429257] Writing at offset 164 into a NOR page. Writing partial pages may decrease reliability and increase wear of NOR flash.
[ 5.429263] Modules linked in:
[ 5.443975] CPU: 0 PID: 88 Comm: rm Not tainted 4.10.15-licheepi-zero+ #1
[ 5.450750] Hardware name: Allwinner sun8i Family
[ 5.455479] [<c010e3bc>] (unwind_backtrace) from [<c010b158>] (show_stack+0x10/0x14)
[ 5.463222] [<c010b158>] (show_stack) from [<c0346ce4>] (dump_stack+0x84/0x98)
[ 5.470445] [<c0346ce4>] (dump_stack) from [<c011b7f4>] (__warn+0xe8/0x100)
[ 5.477402] [<c011b7f4>] (__warn) from [<c011b844>] (warn_slowpath_fmt+0x38/0x48)
[ 5.484880] [<c011b844>] (warn_slowpath_fmt) from [<c04538e4>] (spi_nor_write+0x138/0x1b4)
[ 5.493145] [<c04538e4>] (spi_nor_write) from [<c02fc224>] (jffs2_flash_write+0x70/0x78)
[ 5.501234] [<c02fc224>] (jffs2_flash_write) from [<c02f246c>] (jffs2_mark_node_obsolete+0x478/0x5bc)
[ 5.510446] [<c02f246c>] (jffs2_mark_node_obsolete) from [<c02f5c90>] (jffs2_do_unlink+0x240/0x2f4)
[ 5.519482] [<c02f5c90>] (jffs2_do_unlink) from [<c02ef9b0>] (jffs2_unlink+0x44/0x8c)
[ 5.527307] [<c02ef9b0>] (jffs2_unlink) from [<c01fce14>] (vfs_unlink+0xb8/0x19c)
[ 5.534785] [<c01fce14>] (vfs_unlink) from [<c02008a8>] (do_unlinkat+0x218/0x280)
[ 5.542264] [<c02008a8>] (do_unlinkat) from [<c0107640>] (ret_fast_syscall+0x0/0x3c)
[ 5.550061] ---[ end trace 542b7352f6becd42 ]---
done.
Starting network: OK
2 我低uboot里面配置
#define CONFIG_BOOTCOMMAND "sf probe 0; " \
"sf read 0x41800000 0x100000 0x10000; " \
"sf read 0x41000000 0x110000 0x400000; " \
"bootz 0x41000000 - 0x41800000"
#define CONFIG_BOOTARGS "console=ttyS0,115200 earlyprintk panic=5 rootwait " \
"mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2 vt.global_cursor_default=0"
#include <configs/sunxi-common.h>
/////////////
使能 Enable graphical uboot console on HDMI, LCD or VGA │ │
│ │ [ ] VGA via LCD controller support │ │
│ │ (x:800,y:480,depth:18,pclk_khz:33000,le:86,ri:160,up:30,lo:24,hs:1,vs:1,sync:3,vmode:0) LCD pan│ │
│ │ (1) LCD panel display clock phase │ │
│ │
同时在Linux里面dtsi里面的chosen加了下面的
simplefb_lcd: framebuffer@0 {
compatible = "allwinner,simple-framebuffer",
"simple-framebuffer";
allwinner,pipeline = "de0-lcd0";
clocks = <&ccu CLK_BUS_TCON0>, <&display_clocks 0>,
<&display_clocks 6>, <&ccu CLK_TCON0>;
status = "disabled";
};
在pio里面加了如下
lcd_rgb666_pins_a: lcd-rgb666-pe {
pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5",
"PE6", "PE7", "PE8", "PE9", "PE10", "PE11",
"PE12", "PE13", "PE14", "PE15", "PE16", "PE17",
"PE18", "PE19", "PE23", "PE24";
function = "lcd0";
};
但是目前来设备树里面没有看到有fb0类似的设备的
对比一下硬解和软解的命令
gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux ! h264parse ! omxh264dec ! autovideoconvert ! fbdevsink
gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux ! avdec_h264 ! autovideoconvert ! fbdevsink
硬解比软件多用了个gstreamer元件 h264parse
这是因为avdec_h264的sink(输入)视频流格式可以是avc和byte-stream 而omxh264dec的sink只能是byte-stream
而qtdemux的src(输出)的视频流格式是avc 所以 要用元件 h264parse 将avc转化为byte-stream 给omxh264dec 不然是无法解码的
我这里使用软解提示我没有avdec_h264现在没有播放成功是
无情一刀 说:https://whycan.com/files/members/1116/_20200924151151.png
就这样的 不知道在那里修改那个编译的版本
这个貌似就是C99支持不全,官方都用VS2017了,你何必折腾自己?
好吧 看来要装个装2017 还是2019 可以兼容波 和2013
用VS2013怎样移植littvGL,我现在用下载版本的是7.0 我现在都移植工程里面,
提示我还要安装一个编译工具 有点不懂 这个7.0版本的LVGL 必须要使用2017的VS吗
错误 1 error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...". C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets 64 5 lv_sim_visual_studio_sdl
shell脚本里面弄个计数器,满了就退出。
我在这里面加了这个country 不起作用,在脚本里面写没有连接成功的 不是很懂 ,麻烦你说的详细点哦哦
# cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
country=10
network={
ssid="iPhone7p"
psk="wo1003676315"
key_mgmt=WPA-PSK WPA-EAP IEEE8021X NONE
priority=5
}
使用wifi如果是当前里面设置了密码错误,下一次启动的时候 就会是一直在连接导致程序不能执行和触摸
udhcpc: sending discover
[ 173.980781] RTL8723BS: nolinked power save leave
udhcpc: sending discover
[ 175.639335] RTL8723BS: nolinked power save enter
[ 180.860817] RTL8723BS: nolinked power save leave
[ 182.519460] RTL8723BS: nolinked power save enter
[ 187.740708] RTL8723BS: nolinked power save leave
[ 189.399334] RTL8723BS: nolinked power save enter
[ 194.620788] RTL8723BS: nolinked power save leave
[ 196.279352] RTL8723BS: nolinked power save enter
udhcpc: sending discover
udhcpc: sending discover
[ 201.500849] RTL8723BS: nolinked power save leave
[ 203.159462] RTL8723BS: nolinked power save enter
udhcpc: sending discover
[ 208.380802] RTL8723BS: nolinked power save leave
[ 210.039339] RTL8723BS: nolinked power save enter
#insmod r8723bs.ko
[ 2.343619] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[ 2.355911] RTL8723BS: module init start
[ 2.355948] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[ 2.355958] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[ 2.356111] RTL8723BS: module init ret =0# wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf -B
wlan0: Unsupported driver 'nl80211'
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
Could not read interface wlan0 flags: No such device
WEXT: Could not set interface 'wlan0' UP
wlan0: Failed to initialize driver interface啊,我的怎么会出现这种问题,没有生成 wlan0
你好问下 你当时这个问题是怎么解决的啊
多点信息啊,加载驱动是什么情况。
[ 14.695000] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[ 14.712216] RTL8723BS: module init start
[ 14.716157] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[ 14.723295] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[ 14.743011] pnetdev = c30f7000
[ 17.062401] RTL8723BS: rtw_ndev_init(wlan0)
[ 17.138082] RTL8723BS: module init ret =0
和这个帖子是一样的情况 但是不知道 我要弄什么文件进去
https://whycan.cn/t_604_27.html
但是用ifconfig -a 下面又有wlan0
# ifconfig -a
eth0 Link encap:Ethernet HWaddr 02:01:46:EC:EC:AA
inet addr:192.168.0.10 Bcast:192.168.255.255 Mask:255.255.0.0
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)
Interrupt:38
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:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:352 (352.0 B) TX bytes:352 (352.0 B)
usb0 Link encap:Ethernet HWaddr 82:9E:1C:3B:22:52
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)
wlan0 Link encap:Ethernet HWaddr 00:E0:4C:B7:23:00
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)
#
我看了路由器 里面没有用完IP地址 但是我去ifconfig wlan0 up的时候就是报错出现
ifconfig: SIOCSIFFLAGS: Operation not permitted这样的
Could not set interface wlan0 flags (UP): Operation not permitted
Could not set interface wlan0 flags (UP): Operation not permitted
nl80211: Could not set interface 'wlan0' UP
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=4 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x889105e1 (mode change)
wlan0: Failed to initialize driver interface
Failed to add interface wlan0
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
Off-channel: Clear pending Action frame TX (pending_action_tx=(nil)
udhcpc: started, v1.29.2
ifconfig: SIOCSIFFLAGS: Operation not permitted
ifconfig: SIOCSIFFLAGS: Operation not permitted
udhcpc: sending discover
udhcpc: sendto: Network is down
来研究下
# insmod /usr/lib/r8723bs.ko
[ 952.243349] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[ 952.260150] RTL8723BS: module init start
[ 952.264092] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[ 952.271227] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[ 952.290744] pnetdev = c1317800
[ 954.610905] RTL8723BS: rtw_ndev_init(wlan0)
[ 954.715967] RTL8723BS: module init ret =0
加载库出现这样的 没有问题
完成了 我用的是这个
QString WifiList::GetCurrwlan0IpAddr(QString str)
{
QString filename = "/V3S/wifi_file/Wifi_Addr";
QFile file(filename);
if(!file.open(QIODevice::ReadOnly))
{
qDebug()<<"!file.open(FileName) error";
return NULL;
}
QTextStream stream(&file);
QString ReadLineStr = stream.readLine();
if(ReadLineStr == NULL)
{
return NULL;
}
QStringList str3= ReadLineStr.split("/",QString::SkipEmptyParts);
QStringList str= str3[0].split("/",QString::SkipEmptyParts);
QStringList str1 = str[0].split(" ",QString::SkipEmptyParts);
return str1[1];*/
QString str1;
QList<QNetworkAddressEntry> list;
QHostAddress addr1;
QNetworkInterface addr = QNetworkInterface::interfaceFromName(str);
list = addr.addressEntries();
if(!list.isEmpty())
{
addr1 = list.at(0).ip();
str1 = addr1.toString();
CurrConnectWifiIP = str1;
//IPAddres = CurrConnectWifiIP;
}
qDebug()<<str1;
return str1;
}
但是有一个问题就是 如何设置有线网络逇优先级是最高啊 用route是设置不管用
GPIO KEY 按键驱动(轮询): https://whycan.cn/t_2393.html#p18258
GPIO KEY 按键驱动(中断): https://whycan.cn/t_2393.html#p18270
根本不需要自己动手, Linux自带光环
是啊 就想把这个按键驱动通过代码形式,可以运行起来,晕哥你能帮我看看那个代码吗
PB3 有没有被其他功能占用?
没有被其他的占用 但是我按下去的时候有进到中断里面 ,就是在QT层去读取的时候有错误
[ 224.167890] Mapped int 44
[ 224.170614] genirq: Flags mismatch irq 44. 00000002 (PB3_int) vs. 00000002 (PB3_int)
[ 224.178386] Irq Request failure
open event0 error
[ 226.711062] interrupt received (irq: 44)
[ 226.715010] gpio pin is low
[ 227.053878] interrupt received (irq: 44)
[ 227.057826] gpio pin is low
和这个对比测试一下: https://whycan.cn/t_1261.html
就是按着你那个去写的 只是加了一个字符设备 通过读取字符设备获取状态
主要是在
int led_open(struct inode *inode, struct file *filp)
{
int ret;
int err;
if (gpio_request(PB3_GPIO, GPIO_INT_NAME ))
{
printk("PB3_GPIO request failure: %s\n", GPIO_INT_NAME );
return -1;
}
if ( (irq_any_gpio = gpio_to_irq(PB3_GPIO)) < 0 ) {
printk("PB3_GPIO to IRQ mapping failure %s\n",GPIO_INT_NAME );
return -1;
}
printk(KERN_NOTICE "Mapped int %d\n", irq_any_gpio);
if (request_irq(irq_any_gpio,(irq_handler_t ) r_irq_handler, IRQF_TRIGGER_FALLING , GPIO_INT_NAME, NULL))
{
printk("Irq Request failure\n");
return -1;
}
printk("led_open == ok\n");
return 0;
}
我在Qt上面去Open设备的时候一到这里就就就进去了 if (gpio_request(PB3_GPIO, GPIO_INT_NAME )) 就返回负一了
这个代码是通过晕哥那个中断驱动的帖子该了
#include <linux/major.h>
#include <linux/slab.h>
#include <asm/fb.h>
#include <linux/uaccess.h>
#define DEVICE "myKey"
#define PB3_GPIO 35 //PB3 35=32*1+3
#define GPIO_INT_NAME "PB3_int"
#define GPIO_HIGH gpio_get_value(PB3_GPIO)
#define GPIO_LOW (gpio_get_value(PB3_GPIO) == 0)
short int irq_any_gpio = 0;
int count =0;
struct class *key_dev_class = NULL;
struct class_device *key_dev_class_dev = NULL;
enum { falling, rising } type;
static irqreturn_t r_irq_handler(int irq, void *dev_id)
{
count++;
printk(KERN_DEBUG "interrupt received (irq: %d)\n", irq);
if (irq == gpio_to_irq(PB3_GPIO))
{
type = GPIO_LOW ? falling : rising;
if(type == falling)
{
printk("gpio pin is low\n");
}
else
printk("gpio pin is high\n");
}
return IRQ_HANDLED;
}
int led_open(struct inode *inode, struct file *filp)
{
int ret;
int err;
if (gpio_request(PB3_GPIO, GPIO_INT_NAME ))
{
printk("PB3_GPIO request failure: %s\n", GPIO_INT_NAME );
return -1;
}
if ( (irq_any_gpio = gpio_to_irq(PB3_GPIO)) < 0 ) {
printk("PB3_GPIO to IRQ mapping failure %s\n",GPIO_INT_NAME );
return -1;
}
printk(KERN_NOTICE "Mapped int %d\n", irq_any_gpio);
if (request_irq(irq_any_gpio,(irq_handler_t ) r_irq_handler, IRQF_TRIGGER_FALLING , GPIO_INT_NAME, NULL))
{
printk("Irq Request failure\n");
return -1;
}
printk("led_open == ok\n");
return 0;
}
static int key_dev_read(struct file *filp, char __user *buff, size_t count, loff_t *offp)
{
unsigned long err ;
printk("Enter key_dev_read == %d\n",type);
buff[0] = type;
//err = copy_to_user(buff,&type,1,1);
printk("copy_to_user == %d\n",buff[0]);
//return err ? -EFAULT : 0;
return 0;
}
int r_int_release(struct inode *inode, struct
free_irq(gpio_to_irq(PB3_GPIO), NULL);
gpio_free(PB3_GPIO);
return 0;
}
struct file_operations led_fops ={
.owner = THIS_MODULE,
.open = led_open,
.release = r_int_release,
.read = key_dev_read
};
struct miscdevice led_dev ={
.minor = MISC_DYNAMIC_MINOR,//minor是这个混杂设备的次设备号,由系统自动配置,
.name = DEVICE, //.name 设备名
.fops = &led_fops
};
void r_int_config(void)
{
int ret;
ret = misc_register(&led_dev);//注册驱动程序时采用misc_register函数注册,此函数中会自动创建设备节点,即设备文件
if(ret)
{
printk("error: cannot register misc.\n");
return ret;
}
return 0;
}
static void __exit Key_exit(void)
{
misc_deregister(&led_dev);//杂项设备的注销过程,其实就是注册过程的逆向过程
printk("mise-deregister %s\n", DEVICE);
}
int init_module(void)
{
printk("<1>Hello World\n");
r_int_config();
return 0;
}
module_init(init_module); // Do some better naming
module_exit(Key_exit);
MODULE_AUTHOR("ysc201995"); // 驱动程序的作者
MODULE_DESCRIPTION("Key")
https://github.com/torvalds/linux/blob/master/drivers/input/touchscreen/ads7846.c
input_register_device()
注册成为 event 设备
主要注册设备是还好解决 不知道怎么和寄存器的状态值关联上
http://www.levetop.cn/data/LT7381_BFDS_V10_CH.pdf
是这个吗?
GPIO 与矩阵键盘
提供可程序化的 GPIO 或 5*5 矩阵键盘接口。
支持长按键及重复键功能。
提供按键唤醒。
就是这个文档 我现在的按键是接在LT7381的GPIOA0的
上面这个菜单怎么进入?
上面那个菜单是 https://whycan.cn/t_583.html 从这里下载过来的文档 里面的介绍文档,
看了驱动就是这个文件 然后在我新修改 添加的 我里面也都有
https://stackoverflow.com/questions/18053330/qt-for-embedded-linux-hide-cursor-on-startup
Qt4 用这个方法试一试 :
QWSServer *server = QWSServer::instance(); if(server) { server->setCursorVisible(false); }
我的是Qt5的版本 关键是我用ft5x06的触摸不会出现 就是用hy46的就会有鼠标箭头 所以我觉得跟QT没有关心 应该是内核里面的鼠标箭头
主要是下面这个中断 他们是先读取完了后
另外一个函数/hy46xx_report_value(hy46xx_ts)去上报坐标点,所以我吧这个函数屏蔽了
static irqreturn_t hy46xx_ts_interrupt(int irq, void *dev_id)
{
struct hy46xx_ts_data *hy46xx_ts = dev_id;
disable_irq_nosync(hy46xx_ts->irq);
hy46xx_read_Touchdata(hy46xx_ts);
//hy46xx_report_value(hy46xx_ts);
enable_irq(hy46xx_ts->irq);
return IRQ_HANDLED;
}
在hy46xx_read_Touchdata里面直接读取到了一个坐标点我就上报如下图
出现的可能性 一直点着不动的时候 不断数据上报不及时 ,
现在虽然可以跑起来了 但是不不知道为什么左上角总有一个鼠标箭头标志
晕哥 说:https://whycan.cn/t_2758.html#p22291
这个链接没看吗?
###根据实际情况填写###
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_CONFFILE='/etc/ts.conf'
export TSLIB_FBDEVICE='/dev/fb0'
export TSLIB_PLUGINDIR='/usr/lib/ts'
export TSLIB_TSDEVICE='/dev/input/event0'ts_calibrate
ts_test看了啊 我现在是要只要校正和ts_test所以我就添加了 这两个,
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_TSDEVICE='/dev/input/event0'
改了fb1了
https://whycan.cn/t_2758.html#p22291
这个链接没看吗?
###根据实际情况填写###
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_CONFFILE='/etc/ts.conf'
export TSLIB_FBDEVICE='/dev/fb0'
export TSLIB_PLUGINDIR='/usr/lib/ts'
export TSLIB_TSDEVICE='/dev/input/event0'ts_calibrate
ts_test
看了啊 我现在是要只要校正和ts_test所以我就添加了 这两个,
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_TSDEVICE='/dev/input/event0'
是有两个屏幕 因为以前是用的ft5x06触摸芯片运行QT没有问题 另外一个屏幕就是上次用的SPIlt7381的 现在要用hy46触摸芯片
当我使用ts_test event0 这个的时候比如打印出来出 842 87 255 和我在内核里面打印读取到的坐标不一样
ts_calibrate event0 这个校正 只要执行了就可以了吗啊 要不要在屏幕上点击 主要是没有看到需要校正的地方
ts_calibrate event0
xres = 1024, yres = 600
^Csignal 2 caught
# ts_calibrate event0^C
# ts_test event0
[ 72.746494] id=0 event=0 x=86 y=46
[ 72.749945] event->touch_point == 1
[ 72.753434] x ==86 y = 46,pressure = 5
19123.588199: 842 87 255
[ 72.776197] id=0 event=2 x=86 y=46
[ 72.779670] event->touch_point == 1
[ 72.783159] x ==86 y = 46,pressure = 5
19123.617915: 842 87 0
[ 72.790433] id=0 event=2 x=86 y=46
[ 72.793843] event->touch_point == 1
[ 72.797329] x ==86 y = 46,pressure = 5
[ 72.805772] id=0 event=1 x=86 y=46
[ 72.809258] event->touch_point == 1
[ 72.812745] uppoint ==0
[ 76.760685] id=0 event=0 x=277 y=64
[ 76.764188] event->touch_point == 1
[ 76.767716] x ==277 y = 64,pressure = 5
19127.602569: 791 200 255
[ 76.790343] id=0 event=2 x=277 y=64
[ 76.793850] event->touch_point == 1
[ 76.797339] x ==277 y = 64,pressure = 5
19127.632232: 791 200 0[ 76.804705] id=0 event=2 x=277 y=64
[ 76.808370] event->touch_point == 1
[ 76.811988] x ==277 y = 64,pressure = 5
出现这样的 但是我看了下 QT这一块还是没有跳转
evtest event0
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "hy46xx_ts"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 325 (BTN_TOOL_FINGER)
Event code 328 (BTN_TOOL_QUINTTAP)
Event code 330 (BTN_TOUCH)
Event code 333 (BTN_TOOL_DOUBLETAP)
Event code 334 (BTN_TOOL_TRIPLETAP)
Event code 335 (BTN_TOOL_QUADTAP)
Event type 3 (EV_ABS)
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 4
Event code 48 (ABS_MT_TOUCH_MAJOR)
Value 0
Min 0
Max 255
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 799
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 1279
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Properties:
Property type 0 (INPUT_PROP_POINTER)
Property type 3 (INPUT_PROP_SEMI_MT)
Testing ... (interrupt to exit)
[ 198.325866] id=0 event=0 x=448 y=258
[ 198.329494] event->touch_point == 1
[ 198.332986] x ==448 y = 258,pressure = 5
Event: time 5464.167411, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 10
Event: time 5464.167411, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 448
Event: time 5464.167411, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 258
Event: tim[ 198.355623] id=0 event=2 x=448 y=258
e 5464.167411, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event:[ 198.362928] event->touch_point == 1
time 5464.167411, type 1 (EV_KEY), code 330 (BTN_TOUCH), value [ 198.371959] x ==448 y = 258,pressure = 5
1
Event: time 5464.167411, -------------- SYN_REPORT ----------[ 198.384905] id=0 event=2 x=448 y=258
--
Event: time 5464.211917, ++++++++++++++ SYN_MT_REPORT ++++++[ 198.390644] event->touch_point == 1
++++++
Event: time 5464.211917, -------------- SYN_REPORT -----[ 198.399665] x ==448 y = 258,pressure = 5
-------
Event: time 5464.239598, ++++++++++++++ SYN_MT_REPORT ++++++++++[ 198.412649] id=0 event=1 x=448 y=258
++
Event: time 5464.239598, -------------- SYN_REPORT ---------[ 198.419058] event->touch_point == 1
---
[ 198.428209] uppoint ==0
Event: time 5464.261470, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 5464.261470, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event: time 5464.261470, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 5464.261470, -------------- SYN_REPORT ------------
hy46系列的触摸 能读取到了坐标 也执行到上报坐标函数 我在触摸的屏幕的时候 在内核驱动能打印出触摸的坐标,但是就是好像没有上报成功样
下面是打印的坐标数据
[ 518.357043] event->touch_point == 1
[ 518.360605] x ==358 y = 255,pressure = 5
[ 518.368459] id=0 event=2 x=358 y=255
[ 518.372045] event->touch_point == 1
[ 518.375532] x ==358 y = 255,pressure = 5
[ 518.383471] id=0 event=2 x=354 y=259
[ 518.387064] event->touch_point == 1
[ 518.390631] x ==354 y = 259,pressure = 5
[ 518.398486] id=0 event=2 x=354 y=259
[ 518.402073] event->touch_point == 1
[ 518.405560] x ==354 y = 259,pressure = 5
[ 518.413428] id=0 event=2 x=352 y=262
[ 518.417021] event->touch_point == 1
[ 518.420581] x ==352 y = 262,pressure = 5
[ 518.428386] id=0 event=2 x=352 y=262
[ 518.431970] event->touch_point == 1
[ 518.435465] x ==352 y = 262,pressure = 5
[ 518.443339] id=0 event=2 x=350 y=265
[ 518.446934] event->touch_point == 1
[ 518.450518] x ==350 y = 265,pressure
先执行下面的操作试一试:
ifconfig wlan0 down
ifconfig wlan0 up
我刚才测试了 我先关掉down然后再去up
再去wpa_supplicant -B -d -i wlan0 -c /etc/wpa_supplicant.conf
但是最后提示 rtw_cfg80211_indicate_connect(wlan0) BSS not found !!
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=4 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Daemonize..
# [ 1430.786314] RTL8723BS: rtw_set_802_11_connect(wlan0) fw_state = 0x00000008
[ 1430.839610] RTL8723BS: start auth
[ 1430.856589] RTL8723BS: auth success, start assoc
[ 1430.875720] RTL8723BS: rtw_cfg80211_indicate_connect(wlan0) BSS not found !!!!!!!!!!!!!!!!!!!!!!!!!=================
[ 1430.882866] RTL8723BS: assoc success
[ 1431.075391] RTL8723BS: send eapol packet
[ 1431.104322] RTL8723BS: send eapol packet
[ 1431.109102] RTL8723BS: set pairwise key camid:4, addr:24:05:0f:15:a4:3d, kid:0, type:AES
[ 1431.120049] RTL8723BS: set group key camid:5, addr:24:05:0f:15:a4:3d, kid:1, type:AES
^C
# ^C
原来那个断开了吗?
我断开了 我添加的网络已经在配置文件里面了
# cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
network={
ssid="ysc666"
scan_ssid=1
psk="123456789"
key_mgmt=WPA-PSK WPA-EAP IEEE8021X NONE
priority=5
disabled=1
}
network={
ssid="ysc6666"
psk="123456789"
key_mgmt=NONE
}
这是我当时的操作方式
使能添加的网络 就是会一直在在寻找中
[ 113.908728] RTL8723BS: nolinked power save enter
[ 119.130118] RTL8723BS: nolinked power save leave
[ 120.788636] RTL8723BS: nolinked power save enter
[ 126.010061] RTL8723BS: nolinked power save leave
[ 127.668764] RTL8723BS: nolinked power save enter
[ 132.890154] RTL8723BS: nolinked power save leave
[ 134.548622] RTL8723BS: nolinked power save enter
我记得wpa_supplilcant是放到后台运行的,如果重新连接,要将程序kill,然后重新运行
因为我在wpa_supplicant.conf这个里面已经写了一个固定的wifi了 每次一运行就是里面这个
我现在就是list_networks里面有一个wifi的名称
然后我在添加了一个 步骤如下
wpa_cli -iwlan0 add_network
wpa_cli -iwlan0 set_network 1 ssid '"ysc6666"'
wpa_cli -iwlan0 set_network 1 key_mgmt NONE
wpa_cli -iwlan0 set_network 1 psk '"123456789"'
wpa_cli -iwlan0 select_network 1
wpa_cli -iwlan0 enable_network 1
发现还是连接不上
就是就是在连接状态中
[53299.588530] RTL8723BS: nolinked power save enter
[53304.809933] RTL8723BS: nolinked power save leave
[53306.468435] RTL8723BS: nolinked power save enter
我这里增加了了一个网络 设置都提示ok了
当时使能该网络时候 还是上一个网络 没有变过来
# wpa_cli -iwlan0 enable_network 1
OK
# wpa_cli -iwlan0 status
bssid=24:05:0f:15:a4:3d
freq=2437
ssid=ysc666
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=172.27.207.4
address=34:c3:d2:72:5f:9d
uuid=428074a1-f7e2-5b02-ab7a-4587c5e08f87
# wpa_cli -iwlan0 list_networks
network id / ssid / bssid / flags
0 ysc666 any [CURRENT]
1 mate20 any
# driver_atheros_event_wireless: scan result event - SIOCGIWSCAN
-/bin/sh: driver_atheros_event_wireless:: not found
#
我在wpa_supplicant.conf 这里面写的是连接ysc666
当这个ysc666连接上了的时候,我用iw wlan0 disconnect去断开 然后连接其他的连接不上
再去连接iw wlan0 connect ysc666 也是连接不上 ,是不是操作有问题哦
# iw wlan0 disconnect
# [ 219.368912] RTL8723BS: nolinked power save enter
#
# iw dev wlan0 link
Connected to 24:05:0f:15:a4:3d (on wlan0)
SSID: ysc666
freq: 2437
command failed: No such file or directory (-2)
# iw wlan0 connect ysc666
command failed: Operation already in progress (-114)
呵呵,我来说一下吧,V3s用无线有坑,折磨了我两天,暂时没有完全解决
驱动无线网卡,要要将rf switch选项打开,不打开用不了,主线内核的网络选项里面无线的坑是什么呢?
V3s使用2.4G网络,估计有干扰,不传输数据,用着还行,我有个传输mp3数据流的程序,持续传输128kbps的mp3流,用V3s无线接收,几秒中 后就中断,播放的音乐流断了
试了8723bs,ralink3070,ralink5572,2.4都有问题,用ralink5572的5G频段,就完全正常,无线路由器距离接收器才2~3米,即使有干扰也不应该这样的,而且5572的2.4G有问题,5G就正常,明显是V3s自身的干扰。
刚才将rf switch 配置了后是可以了 如果我不想在wpa里面写死要连接的wifi名称 就是通过手动输入名称和密码,
这里我按照配置
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
ssid="yscysc"
scan_ssid=1
key_mgmt=WPA-EAP WPA-PSK IEEE8021X NONE
pairwise=TKIP CCMP
group=CCMP TKIP WEP104 WEP40
psk="wo123456"
priority=5
我也是按着下面去执行的
insmod /usr/lib/r8723bs.ko #加入驱动
ifconfig wlan0 up #开启wifi
wpa_supplicant -B -d -i wlan0 -c /etc/wpa_supplicant.conf #搜索wifi
udhcpc -i wlan0 #连接wifi
全部执行完后 一直重复下面的
udhcpc: started, v1.29.2
udhcpc: sending discover
[ 1408.600053] RTL8723BS: nolinked power save leave
udhcpc: sending discover
[ 1410.258634] RTL8723BS: nolinked power save enter
udhcpc: sending discover
[ 1415.480081] RTL8723BS: nolinked power save leave
[ 1417.148671] RTL8723BS: nolinked power save enter
[ 1422.370061] RTL8723BS: nolinked power save leave
[ 1424.028762] RTL8723BS: nolinked power save enter
[ 1429.250045] RTL8723BS: nolinked power save leave
[ 1430.908619] RTL8723BS: nolinked power save enter
udhcpc: sending discover
[ 1436.130098] RTL8723BS: nolinked power save leave
[ 1437.788625] RTL8723BS: nolinked power save enter
udhcpc: sending discover
udhcpc: sending discover
[ 1443.010061] RTL8723BS:
现在打印出来的数据是一直这样 但是我打开手机也没有看到设置的名称
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='0'
ap_scan=1
Priority group 5
id=0 ssid='yscysc'
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x197120
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0104
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=040b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=040c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=040d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=090a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=090b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=090c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=090d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0409506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=7f506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0801
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0a07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0a11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0a1a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=1101
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=1102
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0505
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0500
rfkill: Cannot open RFKILL control device
nl80211: RFKILL status not available
netlink: Operstate: ifindex=4 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
wlan0: Own MAC address: 34:c3:d2:72:5f:9d
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlan0: Setting scan request: 0.100000 sec
wlan0: WPS: UUID based on MAC address: 428074a1-f7e2-5b02-ab7a-4587c5e08f87
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
ctrl_interface_group=0
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=4 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Daemonize..
# [ 190.698618] RTL8723BS: nolinked power save enter
[ 195.930008] RTL8723BS: nolinked power save leave
[ 197.588765] RTL8723BS: nolinked power save enter
^C
# ^C
# ^C
# udhcpc -i wlan0
udhcpc: started, v1.29.2
udhcpc: sending discover
[ 202.810082] RTL8723BS: nolinked power save leave
[ 204.468618] RTL8723BS: nolinked power save enter
udhcpc: sending discover
udhcpc: sending discover
[ 209.690083] RTL8723BS: nolinked power save leave
[ 211.348617] RTL8723BS: nolinked power save enter
[ 216.569874] RTL8723BS: nolinked power save leave
[ 218.228921] RTL8723BS: nolinked power save enter
[ 223.450070] RTL8723BS: nolinked power save leave
[ 225.108620] RTL8723BS: nolinked power save enter
[ 230.330032] RTL8723BS: nolinked power save leave
udhcpc: sending discover
[ 231.988593] RTL8723BS: nolinked power save enter
udhcpc: sending discover
[ 237.210008] RTL8723BS: nolinked power save leave
udhcpc: sending discover
[ 238.868745] RTL8723BS: nolinked power save enter
主要是加载了驱动文件,去配置网络的时候报错
# insmod /ysc/r8723bs.ko
[14702.449054] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[14702.465661] RTL8723BS: module init start
[14702.469711] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[14702.476753] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[14702.488273] pnetdev = c32de800
[14702.548722] RTL8723BS: rtw_ndev_init(wlan0)
[14702.659718] RTL8723BS: module init ret =0
# ifconfig wlan0 up
[14722.227935] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[14722.235809] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[14722.245574] Request firmware failed with error 0xfffffffe
ifconfig: SIOCSIFFLAGS: Operation not permitted
#
/dev下面有event1 我在驱动里面将那个读取中断按钮的给去掉了
error = sun4i_lradc_load_dt_keymap(dev, lradc);
if (error)
return error;
驱动能起来了 在/dev/input/event1 有这个文件。
就是读取的数据还是不对,不知道哪里还有问题
还有一个问题就是不知道为什么这里的code会不一致了 (这里是我引用层打印出来)
2222ev.type= 3 ev.code= 47 ev.value= 2
2222ev.type= 3 ev.code= 53 ev.value= 53
2222ev.type= 3 ev.code= 54 ev.value= 6
2222ev.type= 3 ev.code= 47 ev.value= 3
evtest 可以测试那四个按键:
# evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: 1c22800.lradc Select the device event number [0-0]: 0 Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100 Input device name: "1c22800.lradc" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 114 (KEY_VOLUMEDOWN) Event code 115 (KEY_VOLUMEUP) Event code 352 (KEY_OK) Event code 353 (KEY_SELECT) Properties: Testing ... (interrupt to exit) Event: time 2663.260991, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1 Event: time 2663.260991, -------------- SYN_REPORT ------------ Event: time 2663.471909, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0 Event: time 2663.471909, -------------- SYN_REPORT ------------ Event: time 2666.354566, type 1 (EV_KEY), code 353 (KEY_SELECT), value 1 Event: time 2666.354566, -------------- SYN_REPORT ------------ Event: time 2666.565488, type 1 (EV_KEY), code 353 (KEY_SELECT), value 0 Event: time 2666.565488, -------------- SYN_REPORT ------------ Event: time 2667.424816, type 1 (EV_KEY), code 352 (KEY_OK), value 1 Event: time 2667.424816, -------------- SYN_REPORT ------------ Event: time 2667.620117, type 1 (EV_KEY), code 352 (KEY_OK), value 0 Event: time 2667.620117, -------------- SYN_REPORT ------------ Event: time 2668.139619, type 1 (EV_KEY), code 352 (KEY_OK), value 1 Event: time 2668.139619, -------------- SYN_REPORT ------------ Event: time 2668.311484, type 1 (EV_KEY), code 352 (KEY_OK), value 0 Event: time 2668.311484, -------------- SYN_REPORT ------------
你这个evtest测试代码是内核里面吗
https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/sun8i-v3s.dtsi
lradc: lradc@1c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x400>;
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};请问你有什么疑问?
dts和.config 里面不要去配置吗 只要配置这个dtsi 就可以了是吧
我刚才在dts里面设置了状态为ok了
我是参考这个去 http://blog.itpub.net/31529886/viewspace-2169066/
分配Swap虚拟内存 分配了free -m 还是为0
然后在 cat /proc/meminfo 里面的swap也是为了
在运行QT的过程了 我定义了一个QLabel 然后我拖动这个QLabel 就会出现下面这个问题 我拖动的过程中只是改变QLabel的位置
aule1=== 0 vaule2 5
MoveCon[ 83.303626] input_mt_report_slot_state
trol X== 0 Y === 5
[ 83.313179] touchscreen_report_pos
[ 83.318503] i2c i2c-0: mv64xxx_i2c_fsm: Ctlr Error -- state: 0x2, status: 0x0, addr: 0x38, flags: 0x0
[ 83.327746] edt_ft5x06 0-0038: Unable to fetch data, error: -5
[ 83.337297] x=== 154 y===72 id === 0 down == 1
[ 83.341776] input_mt_report_slot_state
[ 83.345705] touchscreen_report_pos
[ 83.349597] edt_ft5x06 0-0038: Unable to fetch data, error: -6
今天来试试 里面的都按照该了
出来的还是
Setting up a 1024x600 lcd console (overscan 0x0)
dotclock: 46000kHz = 46000kHz: (1 * 3MHz * 92) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dfff36 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
就一直是这样的了
那跑起来显示什么
-Boot 2017.01-rc2-00073-gdd6e874-dirty (Jul 04 2019 - 19:01:27 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 1024x600 lcd console (overscan 0x0)
dotclock: 46000kHz = 46000kHz: (1 * 3MHz * 92) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dfff36 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
就这样啥也不显示了
晕哥 说:去把 earlyprink 开起来: https://whycan.cn/t_2402.html
看log才知道什么问题.
跟你里面的问题是一样的 还是一样的
Uncompressing Linux... done, booting the kernel.
我以前可以跑起来的就是这个0x01c28000地址
CONFIG_DEBUG_UART_PHYS=0x01c28000
CONFIG_DEBUG_UART_VIRT=0xf1c28000
去把 earlyprink 开起来: https://whycan.cn/t_2402.html
看log才知道什么问题.
跟你里面的问题是一样的
我以前可以跑起来的就是这个0x01c28000地址
CONFIG_DEBUG_UART_PHYS=0x01c28000
CONFIG_DEBUG_UART_VIRT=0xf1c28000
当然需要, menuconfig 然后进入 filesystem,然后杂项,勾选 jffs2
加上了 出现启动不了 就是一直在Starting kernel ...
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Jul 04 2019 - 19:01:27 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 1024x600 lcd console (overscan 0x0)
dotclock: 46000kHz = 46000kHz: (1 * 3MHz * 92) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dfff36 ... OK
Starting kernel ...
看 JFFS2 有没有编译进去.
[ 0.053635] NET: Registered protocol family 1
[ 0.520722] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.529909] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.532383] random: fast init done
[ 0.536428] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
没有编译进去 需要在设置下吗
[ 0.024304] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.024324] PTP clock support registered
[ 0.024558] Advanced Linux Sound Architecture Driver Initialized.
[ 0.026438] clocksource: Switched to clocksource arch_sys_counter
[ 0.037419] NET: Registered protocol family 2
[ 0.038003] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.038036] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.038060] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.038196] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038244] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038465] NET: Registered protocol family 1
[ 0.039062] RPC: Registered named UNIX socket transport module.
[ 0.039079] RPC: Registered udp transport module.
[ 0.039085] RPC: Registered tcp transport module.
[ 0.039091] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.041262] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.050195] NFS: Registering the id_resolver key type
[ 0.050250] Key type id_resolver registered
[ 0.050258] Key type id_legacy registered
[ 0.051297] random: fast init done
[ 0.054232] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.054254] io scheduler noop registered
[ 0.054262] io scheduler deadline registered
[ 0.054522] io scheduler cfq registered (default)
[ 0.054534] io scheduler mq-deadline registered
[ 0.054541] io scheduler kyber registered
#define CONFIG_BOOTCOMMAND "sf probe 0; " \
"sf read 0x41800000 0x100000 0x10000; " \
"sf read 0x41000000 0x110000 0x400000; " \
"bootz 0x41000000 - 0x41800000"
#define CONFIG_BOOTARGS "console=ttyS0,115200 earlyprintk panic=5 rootwait " \
"mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=/dev/mtdblock3 rw rootfstype=jffs2 vt.global_cursor_default=0"
1. 看的 bootargs 的 root 参数是什么
2. 检查是否生成了 mtdX/mtdblockX 分区
3. 检查分区里面的根文件系统是否正常
分区正常出来了
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.16-licheepi-zero+ (root@ubuntu) (gcc version 6.1.1 20160711 (Linaro GCC 6.1-2016.08)) #8 SMP Thu Jul 4 18:34:46 PDT 2019
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3d07000 s33868 r8192 d23476 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15660
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2 vt.global_cursor_default=0
[ 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: 52660K/63136K available (6144K kernel code, 232K rwdata, 1452K rodata, 1024K init, 264K bss, 10476K 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 : 0xc4000000 - 0xff800000 ( 952 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3da8000 ( 61 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a3a0c0 ( 233 kB)
[ 0.000000] .bss : 0xc0a41868 - 0xc0a83b2c ( 265 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000009] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000021] Switching to timer-based delay loop, resolution 41ns
[ 0.000185] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000417] Console: colour dummy device 80x30
[ 0.000455] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000472] pid_max: default: 32768 minimum: 301
[ 0.000600] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000616] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001231] CPU: Testing write buffer coherency: ok
[ 0.001611] /cpus/cpu@0 missing clock-frequency property
[ 0.001633] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002076] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002260] Hierarchical SRCU implementation.
[ 0.002783] smp: Bringing up secondary CPUs ...
[ 0.002796] smp: Brought up 1 node, 1 CPU
[ 0.002806] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002813] CPU: All CPU(s) started in SVC mode.
[ 0.003591] devtmpfs: initialized
[ 0.006841] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.007128] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.007155] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.007322] pinctrl core: initialized pinctrl subsystem
[ 0.008217] random: get_random_u32 called from bucket_table_alloc+0xf4/0x244 with crng_init=0
[ 0.008361] NET: Registered protocol family 16
[ 0.008897] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.010164] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.010182] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.023537] SCSI subsystem initialized
[ 0.023849] usbcore: registered new interface driver usbfs
[ 0.023925] usbcore: registered new interface driver hub
[ 0.024022] usbcore: registered new device driver usb
[ 0.024272] pps_core: LinuxPPS API ver. 1 registered
[ 0.024284] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.024306] PTP clock support registered
[ 0.024543] Advanced Linux Sound Architecture Driver Initialized.
[ 0.026451] clocksource: Switched to clocksource arch_sys_counter
[ 0.037466] NET: Registered protocol family 2
[ 0.038057] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.038092] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.038115] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.038246] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038295] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038517] NET: Registered protocol family 1
[ 0.039115] RPC: Registered named UNIX socket transport module.
[ 0.039133] RPC: Registered udp transport module.
[ 0.039139] RPC: Registered tcp transport module.
[ 0.039146] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.041151] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.050043] NFS: Registering the id_resolver key type
[ 0.050098] Key type id_resolver registered
[ 0.050107] Key type id_legacy registered
[ 0.051157] random: fast init done
[ 0.054133] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.054157] io scheduler noop registered
[ 0.054165] io scheduler deadline registered
[ 0.054419] io scheduler cfq registered (default)
[ 0.054431] io scheduler mq-deadline registered
[ 0.054438] io scheduler kyber registered
[ 0.058938] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.128681] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.132001] console [ttyS0] disabled
[ 0.152279] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[ 0.736463] console [ttyS0] enabled
[ 0.761500] 1c28800.serial: ttyS1 at MMIO 0x1c28800 (irq = 34, base_baud = 1500000) is a U6_16550A
[ 0.775020] m25p80 spi32766.0: mx25l12805d (16384 Kbytes)
[ 0.780557] spi32766.0: parser cmdlinepart: 4
[ 0.784912] 4 cmdlinepart partitions found on MTD device spi32766.0
[ 0.791201] Creating 4 MTD partitions on "spi32766.0":
[ 0.796344] 0x000000000000-0x000000100000 : "uboot"
[ 0.801886] 0x000000100000-0x000000110000 : "dtb"
[ 0.807119] 0x000000110000-0x000000510000 : "kernel"
[ 0.812435] 0x000000510000-0x000001000000 : "rootfs"
[ 0.818313] libphy: Fixed MDIO Bus: probed
[ 0.822914] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.828796] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.834507] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 0.840535] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 38000)
[ 0.850111] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.855768] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 0.863007] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 0.868673] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 0.875885] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 0.880854] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 0.887828] libphy: stmmac: probed
[ 0.893107] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.899767] ehci-platform: EHCI generic platform driver
[ 0.905289] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.910975] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.918931] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000
[ 0.946471] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.953720] hub 1-0:1.0: USB hub found
[ 0.957666] hub 1-0:1.0: 1 port detected
[ 0.962212] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.968517] ohci-platform: OHCI generic platform driver
[ 0.974064] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 0.980796] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 0.988761] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400
[ 1.061592] hub 2-0:1.0: USB hub found
[ 1.065412] hub 2-0:1.0: 1 port detected
[ 1.073038] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 1.082834] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.089736] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.094286] i2c /dev entries driver
[ 3.526457] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[ 3.532998] edt_ft5x06 0-0038: touchscreen probe failed
[ 3.538294] edt_ft5x06: probe of 0-0038 failed with error -110
[ 3.544937] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 3.606500] sunxi-mmc 1c0f000.mmc: base:0xc42dd000 irq:23
[ 3.613412] usbcore: registered new interface driver usbhid
[ 3.619084] usbhid: USB HID core driver
[ 3.624780] NET: Registered protocol family 17
[ 3.629458] Key type dns_resolver registered
[ 3.633910] Registering SWP/SWPB emulation handler
[ 3.644523] simple-framebuffer 43da8000.framebuffer: framebuffer at 0x43da8000, 0x258000 bytes, mapped to 0xc4480000
[ 3.655179] simple-framebuffer 43da8000.framebuffer: format=x8r8g8b8, mode=1024x600x32, linelength=4096
[ 3.677182] Console: switching to colour frame buffer device 128x37
[ 3.693078] simple-framebuffer 43da8000.framebuffer: fb0: simplefb registered!
[ 3.701660] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 3.713002] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 3.718841] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 3.727944] hub 3-0:1.0: USB hub found
[ 3.731800] hub 3-0:1.0: 1 port detected
[ 3.737041] using random self ethernet address
[ 3.741531] using random host ethernet address
[ 3.747124] usb0: HOST MAC 3a:34:80:a4:25:8f
[ 3.751444] usb0: MAC 22:25:e8:9a:98:76
[ 3.755320] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 3.762859] g_cdc gadget: g_cdc ready
[ 3.766891] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 16:49:37 UTC (60577)
[ 3.775436] vcc3v0: disabling
[ 3.778511] vcc5v0: disabling
[ 3.781482] ALSA device list:
[ 3.784444] No soundcards found.
[ 3.789191] VFS: Cannot open root device "31:03" or unknown-block(31,3): error -19
[ 3.796839] Please append a correct "root=" boot option; here are the available partitions:
[ 3.805187] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 3.813530] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.16-licheepi-zero+ #8
[ 3.820825] Hardware name: Allwinner sun8i Family
[ 3.825564] [<c010e58c>] (unwind_backtrace) from [<c010b290>] (show_stack+0x10/0x14)
[ 3.833313] [<c010b290>] (show_stack) from [<c066229c>] (dump_stack+0x84/0x98)
[ 3.840538] [<c066229c>] (dump_stack) from [<c011b6a8>] (panic+0xdc/0x248)
[ 3.847413] [<c011b6a8>] (panic) from [<c0901170>] (mount_block_root+0x188/0x25c)
[ 3.854891] [<c0901170>] (mount_block_root) from [<c0901364>] (mount_root+0x120/0x128)
[ 3.862799] [<c0901364>] (mount_root) from [<c09014b0>] (prepare_namespace+0x144/0x188)
[ 3.870796] [<c09014b0>] (prepare_namespace) from [<c0900dc0>] (kernel_init_freeable+0x1bc/0x1cc)
[ 3.879661] [<c0900dc0>] (kernel_init_freeable) from [<c0675174>] (kernel_init+0x8/0x108)
[ 3.887833] [<c0675174>] (kernel_init) from [<c0107618>] (ret_from_fork+0x14/0x3c)
[ 3.895407] Rebooting in 5 seconds..
VFS: Cannot open root device "31:03" or unknown-block(31,3): error -19
[ 3.796839] Please append a correct "root=" boot option; here are the available partitions:
[ 3.805187] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 3.813530] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.16-licheepi-zero+ #8
[ 3.820825] Hardware name: Allwinner sun8i Family
[ 3.825564] [<c010e58c>] (unwind_backtrace) from [<c010b290>] (show_stack+0x10/0x14)
[ 3.833313] [<c010b290>] (show_stack) from [<c066229c>] (dump_stack+0x84/0x98)
[ 3.840538] [<c066229c>] (dump_stack) from [<c011b6a8>] (panic+0xdc/0x248)
[ 3.847413] [<c011b6a8>] (panic) from [<c0901170>] (mount_block_root+0x188/0x25c)
[ 3.854891] [<c0901170>] (mount_block_root) from [<c0901364>] (mount_root+0x120/0x128)
[ 3.862799] [<c0901364>] (mount_root) from [<c09014b0>] (prepare_namespace+0x144/0x188)
[ 3.870796] [<c09014b0>] (prepare_namespace) from [<c0900dc0>] (kernel_init_freeable+0x1bc/0x1cc)
[ 3.879661] [<c0900dc0>] (kernel_init_freeable) from [<c0675174>] (kernel_init+0x8/0x108)
[ 3.887833] [<c0675174>] (kernel_init) from [<c0107618>] (ret_from_fork+0x14/0x3c)
[ 3.895407] Rebooting in 5 seconds..
我搜了一下, Booting Linux with rootfs on a JFFS2 File System
看是不是因为这样:
Step through the following procedure to enable a JFFS2 root filesystem in the sample networking configuration:
Modify the Linux kernel configuration to not include the rootfs into the uImage. For this, run make kmenuconfig in the project directory and uncheck (disable) the Initial RAM filesystem... option:
General setup --->
[ ] Initial RAM filesystem and RAM disk (initramfs/initrd) support你是不是勾上了 initramfs/initrd 这个根文件系统?
这个地方是不要勾选吗 我的内核突然就出现了和这个问题一样的 我这里是勾选了的
在linux下QT添加了libpoppler-qt5.so 去显示PDF 加载了这个库 总是报错
提示/usr/lib/x86_64-linux-gnu/libpoppler-qt5.so:-1: error: undefined reference to `QDebug::putString(QChar const*, unsigned long)'
本来QDebug里面就没有这个putString函数,但是我看了源码 都没地方有使用putString了
这个是编译这个libpoppler的库
https://blog.csdn.net/u010370871/article/details/80366695
这里就是使用这个库去显示pdf的例子
https://blog.csdn.net/yinyuchen1/article/details/77979965
各位大神
https://github.com/torvalds/linux/blob/master/drivers/staging/fbtft/fb_ssd1331.c
static struct fbtft_display display = {
.regwidth = 8,
.width = WIDTH,
.height = HEIGHT,
.gamma_num = GAMMA_NUM,
.gamma_len = GAMMA_LEN,
.gamma = DEFAULT_GAMMA,
.fbtftops = {
.write_register = write_reg8_bus8,
.init_display = init_display,
.set_addr_win = set_addr_win,
.set_gamma = set_gamma,
.blank = blank,
},
};就是 write_reg8_bus8
但是我自己写的那个lt7381我没有给这个write_register 赋函数啊
https://github.com/zanaster/fbtft
https://github.com/zanaster/fbtft/blob/master/fb_st7565.c
https://github.com/zanaster/fbtft/blob/master/fb_st7735r.c参考这些简单的SPI黑白液晶驱动, 按套路照葫芦画瓢,淘宝上面各种ST7565液晶挺多。
就是按照这些写的 现在就是一开始就SPI的模型不对了
https://github.com/torvalds/linux/blob/master/drivers/staging/fbtft/fbtft_device.c
static struct fbtft_device_display displays[]
这里有注册你的 LCD 吗?
我这里一直都注册了
现在发现就是SPI没有起来
这里判断name为假了 但是我在display数组中定义了
系统已经起来了 写随机数的时候有反应
但是我运行我的QT程序的时候 不显示图片 ,QT程序已经在运行了
[ 6.063284] mmc0: new high speed SD card at address 21e3
[ 6.069593] mmcblk0: mmc0:21e3 APPSD 121 MiB
[ 6.075617] mmcblk0: p1 p2
[ 6.107326] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 6.116473] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 6.147376] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in b_idle (80, <SessEnd), retry #0, port1 00000100
[ 6.405396] EXT4-fs (mmcblk0p2): recovery complete
[ 6.415142] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 6.423408] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 6.429725] devtmpfs: mounted
[ 6.434031] Freeing unused kernel memory: 1024K
[ 6.612024] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Starting mdev...
modprobe: can't change directory to '4.13.16-licheepi-zero+': No such file or directory
Initializing random number generator... done.
Starting network: OK
#
我这里就是设置为模式3的 手册上面空闲就是高的的
{
.name = "er_fblt7381",
.spi = &(struct spi_board_info){
.modalias = "fb_lt7381",
.max_speed_hz = 4000000,
.mode = SPI_MODE_3,
.platform_data = &(struct fbtft_platform_data)
{
.display = {
.buswidth = 8,
.backlight = 1,
.width = 800,
.height = 480,
},
.bgr = true,
.gpios = (const struct fbtft_gpio []) {
{ "reset", 148 },
{ },
{ },
{},
},
}
}
},
channel 2 对应的是时序图的SDO, 那个是虚线,应该是可以忽略的意思,这样看来那个脚可以不管的。
不是通道2 是那个通道1 你和他们资料对比下那个CLK 就可以看出 他们资料上空闲是高的 而我弄出来的波形 正好是低电平 中途还有一个是为高
https://github.com/torvalds/linux/blob/master/drivers/staging/fbtft/fb_ili9481.c
应该是仿照这个文件改,对照驱动芯片手册改
是的 我就是仿照这个文件改的, 寄存器和时序按照他们提供的STM32平台的代码 因为厂家说只要安装那个时序就可以了
void LT768_initial(struct fbtft_par *par)
{
LT768_PLL_Initial(par);
printk("55+++++++++++++++++++++++++++++++++++++++++\n");
LT768_SDRAM_initail(par,MCLK);
printk("66+++++++++++++++++++++++++++++++++++++++++\n");
Set_LCD_Panel(par);
printk("77+++++++++++++++++++++++++++++++++++++++++\n");
}
static int init_display(struct fbtft_par *par)
{
printk("11+++++++++++++++++++++++++++++++++++++++++\n");
par->fbtftops.reset(par);
//printk("22+++++++++++++++++++++++++++++++++++++++++\n");
//msleep(100);
//Lt7381_HW_Reset(par);
printk("33+++++++++++++++++++++++++++++++++++++++++\n");
System_Check_Temp(par);
printk("44+++++++++++++++++++++++++++++++++++++++++\n");
msleep(100);
while(read_BusChar(par)&0x02);
LT768_initial(par);
return 0;
}
static struct fbtft_display display = {
.regwidth = 8,
.width = LCD_XSIZE_TFT,
.height = LCD_YSIZE_TFT,
.fbtftops = {
.init_display = init_display,
.set_addr_win = set_addr_win,
//.set_var = set_var,
},
};
FBTFT_REGISTER_DRIVER(DRVNAME, "lt7381fb,lt7381LCD", &display);
MODULE_ALIAS("spi:" DRVNAME);
MODULE_ALIAS("platform:" DRVNAME);
MODULE_ALIAS("spi:lt7381LCD");
MODULE_ALIAS("platform:lt7381LCD");
MODULE_DESCRIPTION("FB driver for the RA8875 LCD Controller");
MODULE_AUTHOR("yangsichao");
MODULE_LICENSE("GPL");
那可能导致的问题太多了, 最终问题只是一个问题 -------------- 时序不正确.
你说的时序问题是SPI的时序问题 还是屏幕的初始化
SPI时序的话 我用是fbtft下面的那几个文件 fbtft-bus.c fbtft-core.c fbtft-sysfs.c 这几个文件我是没动过
唯一改过的就是fbtft_device 在display中加了自己的一个配置
{
.name = "er_fblt7381",
.spi = &(struct spi_board_info){
.modalias = "fb_lt7381",
.max_speed_hz = 32000000,
.mode = SPI_MODE_0,
.platform_data = &(struct fbtft_platform_data)
{
.display = {
.buswidth = 8,
.backlight = 1,
.width = 800,
.height = 480,
},
.bgr = true,
.gpios = (const struct fbtft_gpio []) {
{ "reset", 148 },
{ },
{ },
{},
},
}
}
},
然后就是Fb_lt7381就是关于屏幕的一些初始化 ,
我不是很清楚你说的这个时序是指的SPI 还是屏幕初始化的时序
对,可以写随机数看看 cat /dev/urandom > /dev/fbX
出现错误屏幕没有任何反应 是不是初始化还有问题了
# cat /dev/urandom > /dev/fb0
cat: write error: No space left on device
# [ 46.936106] set_addr_win WX = 0, HY == 0 == 799 478
# cat /dev/urandom > /dev/fb0
cat: write error: No space left on device
# [ 60.966237] set_addr_win WX = 0, HY == 0 == 799 478
# cat /dev/urandom > /dev/fb0
cat: write error: No space left on device
# [ 62.416096] set_addr_win WX = 0, HY == 0 == 799 478
因为我屏幕初始化的程序
下面的/while(read_BusChar(par)&0x02);这个将屏蔽了 也就是让这个这个初始化执行完
执行完init_display内核出现5秒重启 然后还有重启失败
static int init_display(struct fbtft_par *par)
{
printk("11+++++++++++++++++++++++++++++++++++++++++\n");
par->fbtftops.reset(par);
printk("22+++++++++++++++++++++++++++++++++++++++++\n");
msleep(100);
Lt7381_HW_Reset(par);
System_Check_Temp(par);
msleep(100);
//while(read_BusChar(par)&0x02);
LT768_initial(par);
return 0;
}
打印的信息
0.755885] 1c28800.serial: ttyS1 at MMIO 0x1c28800 (irq = 34, base_baud = 1500000) is a U6_16550A
[ 0.769379] fbtft_of_value: buswidth = 8
[ 0.773318] fbtft_of_value: rotate = 0
[ 0.778117] pdata->display.buswidth == 8par->startbyte = 0 =====-1
[ 0.784307] 11+++++++++++++++++++++++++++++++++++++++++
[ 0.926200] 22+++++++++++++++++++++++++++++++++++++++++
[ 1.286421] 22222read_BusChar(par)) == 255
[ 1.290593] !!!!!read_BusChar(par)&0x02) == 2
[ 1.295068] 22222read_BusChar(par)) == 255
[ 1.299269] !!!!!read_BusChar(par)&0x02) == 2
[ 1.303755] 22222read_BusChar(par)) == 255
[ 1.307944] !!!!!read_BusChar(par)&0x02) == 2
[ 1.312417] 22222read_BusChar(par)) == 255
[ 1.316596] !!!!!read_BusChar(par)&0x02) == 2
[ 1.321067] 22222read_BusChar(par)) == 255
[ 1.325221] !!!!!read_BusChar(par)&0x02) == 2
[ 1.329591] system_ok==0 && i==5 ==
[ 1.329591]
[ 1.566294] 22222read_BusChar(par)) == 255
[ 1.575580] !!!!!read_BusChar(par)&0x02) == 2
[ 1.580084] 22222read_BusChar(par)) == 255
[ 1.584241] !!!!!read_BusChar(par)&0x02) == 2
[ 1.588737] 22222read_BusChar(par)) == 255
[ 1.592893] !!!!!read_BusChar(par)&0x02) == 2
[ 1.597391] 22222read_BusChar(par)) == 255
[ 1.601545] !!!!!read_BusChar(par)&0x02) == 2
[ 1.606012] 22222read_BusChar(par)) == 255
[ 1.610189] !!!!!read_BusChar(par)&0x02) == 2
[ 1.614538] system_ok==0 && i==5 ==
[ 1.614538]
[ 1.846304] 22222read_BusChar(par)) == 255
[ 1.855595] !!!!!read_BusChar(par)&0x02) == 2
[ 1.860097] 22222read_BusChar(par)) == 255
[ 1.864254] !!!!!read_BusChar(par)&0x02) == 2
[ 1.868749] 22222read_BusChar(par)) == 255
[ 1.872903] !!!!!read_BusChar(par)&0x02) == 2
[ 1.877397] 22222read_BusChar(par)) == 255
[ 1.881551] !!!!!read_BusChar(par)&0x02) == 2
[ 1.886020] 22222read_BusChar(par)) == 255
[ 1.890198] !!!!!read_BusChar(par)&0x02) == 2
[ 1.894549] system_ok==0 && i==5 ==
[ 1.894549]
[ 2.126185] Return Curr System Check+++++
[ 2.276210] Unable to handle kernel NULL pointer dereference at virtual address 00000080
[ 2.284295] pgd = c0004000
[ 2.287021] [00000080] *pgd=00000000
[ 2.290602] Internal error: Oops: 5 [#1] SMP ARM
[ 2.295212] Modules linked in:
[ 2.298270] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.16-licheepi-zero+ #16
[ 2.305653] Hardware name: Allwinner sun8i Family
[ 2.310349] task: c382c000 task.stack: c3830000
[ 2.314889] PC is at sun6i_spi_transfer_one+0x1cc/0x36c
[ 2.320107] LR is at sun6i_spi_transfer_one+0x180/0x36c
[ 2.325324] pc : [<c0457cec>] lr : [<c0457ca0>] psr: 20000013
[ 2.331580] sp : c3831ab0 ip : c382c000 fp : 0020c498
[ 2.336797] r10: 00000001 r9 : c3a20800 r8 : c3a20400
[ 2.342014] r7 : c3831bfc r6 : 00000001 r5 : 00000001 r4 : c3a20728
[ 2.348530] r3 : 00000080 r2 : 00000081 r1 : 01c9c380 r0 : 00000000
[ 2.355049] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 2.362173] Control: 10c5387d Table: 4000406a DAC: 00000051
[ 2.367910] Process swapper/0 (pid: 1, stack limit = 0xc3830210)
[ 2.373907] Stack: (0xc3831ab0 to 0xc3832000)
[ 2.378260] 1aa0: c3a205b0 c01512a8 00000000 c3a20690
[ 2.386427] 1ac0: c389fe84 00000000 c3831bfc c3a20400 c3831bc4 c3a209c8 c3a20690 c3a20800
[ 2.394595] 1ae0: 0020c498 c0456230 c3831afc c067eca4 00000000 0020c498 c3a20800 66666667
[ 2.402763] 1b00: 60000013 c3a2062c c3a20400 c3831bc4 00000000 c0454044 c3a209c8 c3a20690
[ 2.410930] 1b20: c3a205b0 c0455cfc 00000fa0 c3deda40 c382c000 00000009 c3831bb8 c3a20800
[ 2.419098] 1b40: c3831bc4 00000000 c3a20400 c0454044 c3a209c8 c3a20690 c3a205c4 c0455fb4
[ 2.427265] 1b60: 00000000 60000013 00000000 00000000 c3831b70 c3831b70 00000000 c3a20800
[ 2.435432] 1b80: c3831bc4 00000080 00000046 ffffff8a 00000023 c39f5800 c080e4c4 c0455fdc
[ 2.443600] 1ba0: c3831bc4 c39f5b30 00000080 c03698a4 0349e000 c067ea20 c3831c00 c3831c00
[ 2.451768] 1bc0: c3831c00 c3831c30 c3831c30 c3a20800 00000000 c0453fa4 c3831b68 00000001
[ 2.459935] 1be0: 00000000 ffffff8d c3831be8 c3831be8 00000000 c3831bf4 c3831bf4 00000080
[ 2.468102] 1c00: 00000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.476269] 1c20: 00000000 00000000 00000802 00e4e1c0 c3831bc4 c3831bc4 c39f5b30 c3831c4e
[ 2.484436] 1c40: 00000000 c036a390 000000ff 00460000 00000002 c39f5b30 c39f5800 00000000
[ 2.492604] 1c60: c3a20800 c3a20800 00000000 c036adf0 c39f5b30 c036ae64 c39f5b30 c0367668
[ 2.500771] 1c80: c3951790 00000010 00000000 c3a20800 00000000 c01e0688 014080c0 00000000
[ 2.508938] 1ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.517104] 1cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.525271] 1ce0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.533438] 1d00: c0a13c88 c39f5b30 c0a13c88 c3a20800 c3951790 c3a20800 00000000 c0368540
[ 2.541606] 1d20: c3a20800 c0a13d00 00000000 00000000 c0a13d10 00000000 00000000 c0453a40
[ 2.549773] 1d40: c3a20800 c0a7aca4 00000000 c04137d8 00000000 c3831d88 c0413948 00000001
[ 2.557940] 1d60: c0a7ac80 00000000 00000000 c0411eb4 c387c76c c39b6fb8 c3a20800 c3a20834
[ 2.566108] 1d80: c0a2b9d8 c04134c8 c3a20800 00000001 c3a20800 c3a20808 c3a20800 c0a2b9d8
[ 2.574275] 1da0: 00000000 c0412b64 c3a20808 c3a20400 c3a20800 c0411030 00000080 c04579b0
[ 2.582443] 1dc0: 00000000 c3a20800 c3a20800 c3a20400 00000000 c389fe10 00000000 00000001
[ 2.590610] 1de0: 00000000 c045476c c3a20400 c3dfd8b0 c3a20800 c3dfd904 00000000 c04551c4
[ 2.598778] 1e00: 00000000 c041cc58 c080e4d0 c080e594 c3a20400 00e4e1c0 00000000 c3b185d0
[ 2.606945] 1e20: c3a20400 00000000 c389fe10 c3a20728 00000000 c093783c c3e02e80 c04554e0
[ 2.615113] 1e40: c3a20400 c389fe10 00000000 00000001 c3a20728 c045824c 00000000 c080ebe8
[ 2.623281] 1e60: c3a20728 c0a2bfb8 c389fe10 ffffffed c0a2bfb8 fffffdfb c0a2bfb8 c04150a8
[ 2.631448] 1e80: c389fe10 c0a7aca4 00000000 00000000 c0a2bfb8 c04137d8 c389fe10 c0a2bfb8
[ 2.639616] 1ea0: c389fe44 00000000 000000d8 00000007 c093783c c0413944 00000000 c0a2bfb8
[ 2.647784] 1ec0: c041388c c0411e0c c3825658 c389d4b4 c0a2bfb8 c3b16680 c0a29620 c0412d64
[ 2.655951] 1ee0: c080ebe8 00000000 c0a2bfb8 c0a2bfb8 c091c658 00000000 c0937834 c041421c
[ 2.664119] 1f00: ffffe000 c091c658 00000000 c01017bc c086ba38 000000d8 00000000 c0136f80
[ 2.672286] 1f20: 60000053 c086b2f4 00000000 00000006 00000006 c07e5f28 c07dbcc0 c07dc420
[ 2.680454] 1f40: c3e02eca c3e02ee3 c0a0b158 c0a41880 c0a41880 00000006 c0a41880 c0a41880
[ 2.688621] 1f60: c09476c8 000000d8 00000007 c0900da4 00000006 00000006 00000000 c09005ac
[ 2.696788] 1f80: 00000000 00000000 c067dd6c 00000000 00000000 00000000 00000000 00000000
[ 2.704955] 1fa0: 00000000 c067dd74 00000000 c0107618 00000000 00000000 00000000 00000000
[ 2.713121] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.721288] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 aae82ae8 aae8aae8
[ 2.729475] [<c0457cec>] (sun6i_spi_transfer_one) from [<c0456230>] (spi_transfer_one_message+0xbc/0x3e8)
[ 2.739034] [<c0456230>] (spi_transfer_one_message) from [<c0455cfc>] (__spi_pump_messages+0x3d8/0x504)
[ 2.748417] [<c0455cfc>] (__spi_pump_messages) from [<c0455fb4>] (__spi_sync+0x180/0x184)
[ 2.756586] [<c0455fb4>] (__spi_sync) from [<c0455fdc>] (spi_sync+0x24/0x3c)
[ 2.763632] [<c0455fdc>] (spi_sync) from [<c03698a4>] (fbtft_write_spi+0x84/0xe0)
[ 2.771110] [<c03698a4>] (fbtft_write_spi) from [<c036a390>] (LT768_PLL_Initial+0x180/0x190)
[ 2.779541] [<c036a390>] (LT768_PLL_Initial) from [<c036adf0>] (LT768_initial+0xc/0x2c)
[ 2.787536] [<c036adf0>] (LT768_initial) from [<c036ae64>] (init_display+0x54/0x5c)
[ 2.795189] [<c036ae64>] (init_display) from [<c0367668>] (fbtft_register_framebuffer+0xa8/0x274)
[ 2.804054] [<c0367668>] (fbtft_register_framebuffer) from [<c0368540>] (fbtft_probe_common+0x118/0x438)
[ 2.813525] [<c0368540>] (fbtft_probe_common) from [<c0453a40>] (spi_drv_probe+0x7c/0xac)
[ 2.821700] [<c0453a40>] (spi_drv_probe) from [<c04137d8>] (driver_probe_device+0x230/0x2e4)
[ 2.830132] [<c04137d8>] (driver_probe_device) from [<c0411eb4>] (bus_for_each_drv+0x60/0x94)
[ 2.838641] [<c0411eb4>] (bus_for_each_drv) from [<c04134c8>] (__device_attach+0xb0/0x114)
[ 2.846898] [<c04134c8>] (__device_attach) from [<c0412b64>] (bus_probe_device+0x84/0x8c)
[ 2.855068] [<c0412b64>] (bus_probe_device) from [<c0411030>] (device_add+0x3f4/0x580)
[ 2.862978] [<c0411030>] (device_add) from [<c045476c>] (spi_add_device+0x9c/0x134)
[ 2.870627] [<c045476c>] (spi_add_device) from [<c04551c4>] (spi_register_controller+0x484/0x768)
[ 2.879489] [<c04551c4>] (spi_register_controller) from [<c04554e0>] (devm_spi_register_controller+0x38/0x70)
[ 2.889392] [<c04554e0>] (devm_spi_register_controller) from [<c045824c>] (sun6i_spi_probe+0x21c/0x2ac)
[ 2.898776] [<c045824c>] (sun6i_spi_probe) from [<c04150a8>] (platform_drv_probe+0x50/0xb0)
[ 2.907121] [<c04150a8>] (platform_drv_probe) from [<c04137d8>] (driver_probe_device+0x230/0x2e4)
[ 2.915984] [<c04137d8>] (driver_probe_device) from [<c0413944>] (__driver_attach+0xb8/0xbc)
[ 2.924414] [<c0413944>] (__driver_attach) from [<c0411e0c>] (bus_for_each_dev+0x68/0x9c)
[ 2.932584] [<c0411e0c>] (bus_for_each_dev) from [<c0412d64>] (bus_add_driver+0x100/0x20c)
[ 2.940840] [<c0412d64>] (bus_add_driver) from [<c041421c>] (driver_register+0x78/0xf4)
[ 2.948839] [<c041421c>] (driver_register) from [<c01017bc>] (do_one_initcall+0x44/0x168)
[ 2.957015] [<c01017bc>] (do_one_initcall) from [<c0900da4>] (kernel_init_freeable+0x140/0x1cc)
[ 2.965707] [<c0900da4>] (kernel_init_freeable) from [<c067dd74>] (kernel_init+0x8/0x108)
[ 2.973881] [<c067dd74>] (kernel_init) from [<c0107618>] (ret_from_fork+0x14/0x3c)
[ 2.981445] Code: e3530000 e2832001 15842024 01a05003 (15d35000)
[ 2.987595] ---[ end trace 647f6c18eb91f309 ]---
[ 2.992250] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2.992250]
[ 3.001382] Rebooting in 5 seconds..
[ 9.005092] Reboot failed -- System halted
奇怪了, 这个问题和你的一模一样
我昨天实在没有办法了 下载了一个新的 将新的默认配置后config 放到有问题的linux里面 编译后 又好了
还是一样的 痛苦中啊
1.640000] No soundcards found.
[ 1.640000] Waiting for root device /dev/mmcblk0p2...
[ 1.680000] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.690000] mmc0: new high speed SD card at address 21b5
[ 1.700000] mmcblk0: mmc0:21b5 APPSD 121 MiB
[ 1.700000] mmcblk0: p1 p2
[ 1.740000] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.750000] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.770000] EXT4-fs (mmcblk0p2): recovery complete
[ 1.770000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.780000] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.790000] devtmpfs: mounted
[ 1.790000] Freeing unused kernel memory: 1024K
[ 1.820000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[ 1.820000]
[ 1.820000] CPU: 0 PID: 1 Comm: init Not tainted 4.13.16-licheepi-zero+ #3
[ 1.820000] Hardware name: Allwinner sun8i Family
[ 1.820000] [<c010a560>] (unwind_backtrace) from [<c0106458>] (show_stack+0x10/0x14)
[ 1.820000] [<c0106458>] (show_stack) from [<c067211c>] (dump_stack+0x84/0x98)
[ 1.820000] [<c067211c>] (dump_stack) from [<c0116ecc>] (panic+0xdc/0x248)
[ 1.820000] [<c0116ecc>] (panic) from [<c0119a34>] (do_exit+0xa68/0xa98)
[ 1.820000] [<c0119a34>] (do_exit) from [<c011a8b0>] (do_group_exit+0x3c/0xd0)
[ 1.820000] [<c011a8b0>] (do_group_exit) from [<c01245b8>] (get_signal+0x284/0x5cc)
[ 1.820000] [<c01245b8>] (get_signal) from [<c010591c>] (do_signal+0xc4/0x420)
[ 1.820000] [<c010591c>] (do_signal) from [<c0105e1c>] (do_work_pending+0x94/0xa4)
[ 1.820000] [<c0105e1c>] (do_work_pending) from [<c01024b4>] (slow_work_pending+0xc/0x20)
[ 1.820000] Rebooting in 5 seconds..
http://blog.csdn.net/qq_26093511/article/details/51841281
启动新内核出现错误:Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
查阅内核源码,才知道exitcode=0x00000004 代表的是 SIGILL (非法指令)
出现这个错误的原因是交叉编译器用的是EABI接口,所以内核也要用EABI接口才行
你的编译工具链有问题?
编译器工具我一直都是没有变过啊
以前都可以编译好好的
再贴出来看下
[ 1.650000] ALSA device list:
[ 1.650000] No soundcards found.
[ 1.650000] Waiting for root device /dev/mmcblk0p2...
[ 1.690000] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.700000] mmc0: new high speed SD card at address 21b5
[ 1.710000] mmcblk0: mmc0:21b5 APPSD 121 MiB
[ 1.710000] mmcblk0: p1 p2
[ 1.750000] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.760000] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.820000] EXT4-fs (mmcblk0p2): recovery complete
[ 1.830000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.840000] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.840000] devtmpfs: mounted
[ 1.850000] Freeing unused kernel memory: 1024K
[ 1.880000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[ 1.880000]
[ 1.880000] CPU: 0 PID: 1 Comm: init Not tainted 4.13.16-licheepi-zero+ #2
[ 1.880000] Hardware name: Allwinner sun8i Family
[ 1.880000] Backtrace:
[ 1.880000] [<c01061b8>] (dump_backtrace) from [<c0106470>] (show_stack+0x18/0x1c)
[ 1.880000] r6:60000093 r5:00000000 r4:c0a384dc
[ 1.880000] [<c0106458>] (show_stack) from [<c06b7a40>] (dump_stack+0x8c/0xa0)
[ 1.880000] [<c06b79b4>] (dump_stack) from [<c01163d4>] (panic+0xe4/0x250)
[ 1.880000] r6:c382fe54 r5:00000000 r4:c0a3eee8
[ 1.880000] [<c01162f4>] (panic) from [<c01191ec>] (do_exit+0xa6c/0xa9c)
[ 1.880000] r3:c3838000 r2:c383800c r1:00000004 r0:c07d7dbc
[ 1.880000] r7:c39b0700
[ 1.880000] [<c0118780>] (do_exit) from [<c011a0a0>] (do_group_exit+0x48/0xd8)
[ 1.880000] r7:c3838000
[ 1.880000] [<c011a058>] (do_group_exit) from [<c012453c>] (get_signal+0x290/0x5d8)
[ 1.880000] r7:c3838000 r6:00000000 r5:c3834504 r4:c382e000
[ 1.880000] [<c01242ac>] (get_signal) from [<c0105690>] (do_signal+0xcc/0x424)
[ 1.880000] r10:00000000 r9:c382e000 r8:b6fb9a38 r7:00000000 r6:c382ffb0 r5:c382fed0
[ 1.880000] r4:b6fb9a34
[ 1.880000] [<c01055c4>] (do_signal) from [<c0105ba4>] (do_work_pending+0x9c/0xac)
[ 1.880000] r10:00000000 r9:c382e000 r8:c0102704 r7:00900000 r6:c382ffb0 r5:c0102704
[ 1.880000] r4:c382e000
[ 1.880000] [<c0105b08>] (do_work_pending) from [<c0102574>] (slow_work_pending+0xc/0x20)
[ 1.880000] r6:b6fa2cf4 r5:00010034 r4:00000009
[ 1.880000] Rebooting in 5 seconds..
那就试一试我这个能用的 https://whycan.cn/t_2039.html
一步一步替换
我刚才测试了下 用你以前的那个V3s_TFCard可以跑起来 所以就是linux还是有问题
[ 1.223824] Waiting for root device /dev/mmcblk0p2...
[ 1.252209] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.262226] mmc0: new high speed SD card at address 21b5
[ 1.268233] mmcblk0: mmc0:21b5 APPSD 121 MiB
[ 1.274106] mmcblk0: p1 p2
[ 1.286309] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.295355] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.354336] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in b_idle (80, <SessEnd), retry #0, port1 00000100
[ 1.757558] EXT4-fs (mmcblk0p2): recovery complete
[ 1.808605] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.816819] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.823002] devtmpfs: mounted
[ 1.827303] Freeing unused kernel memory: 1024K
[ 1.996536] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Starting mdev...
modprobe: can't change directory to '4.13.0-licheepi-zero+': No such file or directory
Initializing random number generator... done.
Starting network: OK
#
[ 1.600000] No soundcards found.
[ 1.600000] Waiting for root device /dev/mmcblk0p2...
[ 1.640000] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.650000] mmc0: new high speed SD card at address 21b5
[ 1.660000] mmcblk0: mmc0:21b5 APPSD 121 MiB
[ 1.660000] mmcblk0: p1 p2
[ 1.700000] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.710000] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.930000] EXT4-fs (mmcblk0p2): recovery complete
[ 1.940000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.950000] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.960000] devtmpfs: mounted
[ 1.970000] Freeing unused kernel memory: 1024K
[ 2.000000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[ 2.000000]
[ 2.000000] CPU: 0 PID: 1 Comm: init Not tainted 4.13.16-licheepi-zero+ #6
[ 2.000000] Hardware name: Allwinner sun8i Family
[ 2.000000] Backtrace:
[ 2.000000] [<c01061b8>] (dump_backtrace) from [<c0106470>] (show_stack+0x18/0x1c)
[ 2.000000] r6:60000093 r5:00000000 r4:c0a37b9c
[ 2.000000] [<c0106458>] (show_stack) from [<c0692c00>] (dump_stack+0x8c/0xa0)
[ 2.000000] [<c0692b74>] (dump_stack) from [<c01164b4>] (panic+0xe4/0x250)
[ 2.000000] r6:c382fe54 r5:00000000 r4:c0a3e2e4
[ 2.000000] [<c01163d4>] (panic) from [<c01192cc>] (do_exit+0xa6c/0xa9c)
[ 2.000000] r3:c3838000 r2:c383800c r1:00000004 r0:c07d3168
[ 2.000000] r7:c39a8700
[ 2.000000] [<c0118860>] (do_exit) from [<c011a180>] (do_group_exit+0x48/0xd8)
[ 2.000000] r7:c3838000
[ 2.000000] [<c011a138>] (do_group_exit) from [<c012461c>] (get_signal+0x290/0x5d8)
[ 2.000000] r7:c3838000 r6:00000000 r5:c3834504 r4:c382e000
[ 2.000000] [<c012438c>] (get_signal) from [<c0105690>] (do_signal+0xcc/0x424)
[ 2.000000] r10:00000000 r9:c382e000 r8:b6f45a38 r7:00000000 r6:c382ffb0 r5:c382fed0
[ 2.000000] r4:b6f45a34
[ 2.000000] [<c01055c4>] (do_signal) from [<c0105ba4>] (do_work_pending+0x9c/0xac)
[ 2.000000] r10:00000000 r9:c382e000 r8:c0102704 r7:00900000 r6:c382ffb0 r5:c0102704
[ 2.000000] r4:c382e000
[ 2.000000] [<c0105b08>] (do_work_pending) from [<c0102574>] (slow_work_pending+0xc/0x20)
[ 2.000000] r6:b6f2ecf4 r5:00010034 r4:00000009
[ 2.000000] Rebooting in 5 seconds..
这个是昨天重新下载了一个 我刚才
make clean
make distclean
scripts/sign-file
scripts/sign-file.c:25:30: fatal error: openssl/opensslv.h: 没有那个文件或目录
compilation terminated.
scripts/Makefile.host:101: recipe for target 'scripts/sign-file' failed
make[1]: *** [scripts/sign-file] Error 1
Makefile:561: recipe for target 'scripts' failed
make: *** [scripts] Error 2
root@ubuntu:/opt/yscTwoScr/linux3/linux#
https://github.com/torvalds/linux/blob/master/drivers/staging/fbtft/fbtft.h
#define write_reg(par, ...) \
((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
主要是这些例子里面有他自己的一套规则 我不想用他的那个结构 他的那套让看不懂 模糊,我在内核里面配置了使能Spi 然后想通过spi写寄存器地址,
他这里是往ili9341中写数据 了 我现在是在/dev下面spi都还没有看到
随便找个kernel的drivers目录里的Makefile, 瞄一眼就会改了
多一眼都不需要
刚才看了好久 这样我在drivers下的Makefile也要加载我添加的驱动的路径哦哦
就像这样哦哦
obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
obj-$(CONFIG_NUBUS) += nubus/
obj-y += macintosh/
obj-$(CONFIG_IDE) += ide/
obj-$(CONFIG_SCSI) += scsi/
obj-y += nvme/
obj-$(CONFIG_ATA) += ata/
obj-$(CONFIG_TARGET_CORE) += target/
obj-$(CONFIG_MTD) += mtd/
无情一刀 说:那就让他执行 15 次就退出(break), 别 return, 让他继续执行下面的语句。
有个朋友也是这种情况, 换卡解决了。
我也感觉是跟卡有关系啊 你说的改这里是让他初始化卡15次吗
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (May 16 2019 - 19:00:22 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, 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
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
=>
现在我用SD启动 出现上面的问题
流程就是, 先做一张能启动的 TF卡 : https://whycan.cn/t_561.html
然后把卡插入读卡器, 用Ubuntu Linux dd 出文件备份:
dd if=/dev/sdX of=x.bin
烧录就是执行反向操作了:
dd if=x.bin of=/dev/sdX
你说的dd出文件备份 是将TF里面的东西全部拷贝出来成为一个bin文件 然后在反向操作
你的操作有问题吧,dd烧我这个:
不是很明白你说的那个dd
无情一刀 说:晕哥 说:其他的按这个帖子操作: https://whycan.cn/t_561.html
上面的已经有分区了, 看是不是要卸载,然后删除, 新建分区走一波。
现在可以烧写到SDnand了 但是重启的时候时候发现啥都没有 ,然后在去连接USB的时候死活都不回弹出那个图标响的一声
那是因为你把 uboot 烧到了 sd nand,导致从sd nand启动了系统,所以没有进fel
我烧写SDnand时候就跟烧写SD卡一样的
其他的按这个帖子操作: https://whycan.cn/t_561.html
上面的已经有分区了, 看是不是要卸载,然后删除, 新建分区走一波。
现在可以烧写到SDnand了 但是重启的时候时候发现啥都没有 ,然后在去连接USB的时候死活都不回弹出那个图标响的一声
无情一刀 说:晕哥 说:看这个: https://whycan.cn/t_2449.html (V3s/S3通过USB启动 Linux,并且把SD NAND/TF卡挂载为电脑U盘, 然后可以通过dd或Win32DiskImager任烧写)
现在在windows下是出来了盘符,好像这个内存卡进不来虚拟机里面 ,
麻烦你发一个win2DiskImage给我 哦这里下载: https://sourceforge.net/projects/win32diskimager/files/Archive/
VMWare 找到右下角对应的图标,然后挂载,才会被虚拟机控制。
我如果是想通过USB 启动我的启动程序 只要对应的文件放到哪个目录下就可以了是吧
看这个: https://whycan.cn/t_2449.html (V3s/S3通过USB启动 Linux,并且把SD NAND/TF卡挂载为电脑U盘, 然后可以通过dd或Win32DiskImager任烧写)
现在在windows下是出来了盘符,好像这个内存卡进不来虚拟机里面 ,
麻烦你发一个win2DiskImage给我 哦
如果你的根文件系统就在 sd nand, 只要设置u-boot的 bootargs root=/dev/mmcblk0pX 参数就可以了
如果你的根文件系统在 spi nor, 那么就要挂载 /dev/mmcblk0pX 到 某个目录(比如/mnt/nandX)
然后, 运行的时候设置 Qt 相关的环境变量到 /mnt/nandX/YYYYY 即可.
1:现在就是主要是SDnand是已经焊在板子上了,而且我插上USB电脑是读取不到SDnand盘符的。
2 现在主要是SDnand是已经焊在板子上了,所以V3S启动只能放在16M里面了(当然也包括了文件系统) 然后我的QT库和工程就放在SDnand里面,所以我就想直接把buildroot里面的target目录直接放在SDnand里面,这样就QT就直接可以去运行了
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (May 15 2019 - 19:46:33)
DRAM: 64 MiB
Trying to boot from sunxi SPI
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (May 15 2019 - 19:46:33 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
### ERROR ### Please RESET the board ###
转自: https://whycan.cn/t_2360.html#p17976
https://whycan.cn/files/members/3/QQ20190421194526.jpg
在店主的耐心教导之下, 终于搞定 FT5336 电容触摸屏:
1. 店主建议修改电阻:
R15 --> 1.5K
R16 --> 1.5K
R29 --> 3.3K我实际修改:
R15 --> 1.2K
R16 --> 1.2K
R29 --> 3.7K2. 断开 R23 电阻, R21与R23的交叉点飞线到核心板的 PWM0(PB4), 这样FT5336的中断脚就是 EINT4, 复位脚是 PE23.
3. dts 修改:
&i2c0 {
status = "okay";ft6x06@38 {
compatible = "focaltech,ft6236";
reg = <0x38>;
interrupt-parent = <&pio>;
interrupts = <1 4 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&pio 4 23 GPIO_ACTIVE_LOW>;
touchscreen-size-x = <480>;
touchscreen-size-y = <854>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
};};
4. 驱动添加:
CONFIG_TOUCHSCREEN_EDT_FT5X06=y
5. Linux 启动 log 信息:
[ 1.161482] i2c /dev entries driver
[ 1.494509] input: EP0110M09 as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0038/input/input1
晕哥 麻烦你把这个你配置的 interrupt-parent = <&pio>;贴出来我对比下 ,
我以前配置和也是和你一样的 ,我以前一直申请不了中断是不是和那几个电阻有关系了
荔枝派zero默认用 ns2009驱动了,你恢复源码重新编译就可以,或者直接烧本站的固件。
是的 哈哈 大早上就是重新编译了下 可以跑起来了 然后QT里面放了一个工程也可以了
没有 /dev/input/eventX ? 驱动勾了 NS2009 吗? 有没有日志?
这ns2009肯定勾选了
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 16 2019 - 00:35:03 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, 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: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
reading zImage
3988448 bytes read in 256 ms (14.9 MiB/s)
reading sun8i-v3s-licheepi-zero.dtb
11936 bytes read in 25 ms (465.8 KiB/s)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dffe9f ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.16-licheepi-zero+ (root@ubuntu) (gcc version 6.1.1 20160711 (Linaro GCC 6.1-2016.08)) #7 SMP Wed Dec 12 18:47:23 PST 2018
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33868 r8192 d23476 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15883
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_cursor_default=0
[ 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: 53568K/64036K available (6144K kernel code, 228K rwdata, 1460K rodata, 1024K init, 264K bss, 10468K 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 : 0xc4000000 - 0xff800000 ( 952 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3e89000 ( 62 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a39300 ( 229 kB)
[ 0.000000] .bss : 0xc0a40ae4 - 0xc0a82cec ( 265 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000021] Switching to timer-based delay loop, resolution 41ns
[ 0.000190] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000415] Console: colour dummy device 80x30
[ 0.000451] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000467] pid_max: default: 32768 minimum: 301
[ 0.000590] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000605] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001200] CPU: Testing write buffer coherency: ok
[ 0.001569] /cpus/cpu@0 missing clock-frequency property
[ 0.001593] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002005] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002185] Hierarchical SRCU implementation.
[ 0.002699] smp: Bringing up secondary CPUs ...
[ 0.002712] smp: Brought up 1 node, 1 CPU
[ 0.002722] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002728] CPU: All CPU(s) started in SVC mode.
[ 0.003497] devtmpfs: initialized
[ 0.006599] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006884] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006909] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.007087] pinctrl core: initialized pinctrl subsystem
[ 0.007939] random: get_random_u32 called from bucket_table_alloc+0xf4/0x244 with crng_init=0
[ 0.008079] NET: Registered protocol family 16
[ 0.008540] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009657] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009675] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.022584] SCSI subsystem initialized
[ 0.022869] usbcore: registered new interface driver usbfs
[ 0.022959] usbcore: registered new interface driver hub
[ 0.023055] usbcore: registered new device driver usb
[ 0.023302] pps_core: LinuxPPS API ver. 1 registered
[ 0.023311] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.023334] PTP clock support registered
[ 0.023548] Advanced Linux Sound Architecture Driver Initialized.
[ 0.025390] clocksource: Switched to clocksource arch_sys_counter
[ 0.036184] NET: Registered protocol family 2
[ 0.036762] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.036796] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.036819] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.036944] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.036992] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.037200] NET: Registered protocol family 1
[ 0.037767] RPC: Registered named UNIX socket transport module.
[ 0.037787] RPC: Registered udp transport module.
[ 0.037793] RPC: Registered tcp transport module.
[ 0.037799] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.039695] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.048561] NFS: Registering the id_resolver key type
[ 0.048612] Key type id_resolver registered
[ 0.048619] Key type id_legacy registered
[ 0.048664] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.050154] random: fast init done
[ 0.052966] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.052990] io scheduler noop registered
[ 0.052999] io scheduler deadline registered
[ 0.053280] io scheduler cfq registered (default)
[ 0.053293] io scheduler mq-deadline registered
[ 0.053299] io scheduler kyber registered
[ 0.057674] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.126636] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.129857] console [ttyS0] disabled
[ 0.150130] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[ 0.734147] console [ttyS0] enabled
[ 0.759177] 1c28800.serial: ttyS1 at MMIO 0x1c28800 (irq = 34, base_baud = 1500000) is a U6_16550A
[ 0.772665] m25p80 spi32766.0: mx25l12805d (16384 Kbytes)
[ 0.778192] spi32766.0: parser cmdlinepart: 0
[ 0.782548] spi32766.0: parser ofpart: 0
[ 0.787516] libphy: Fixed MDIO Bus: probed
[ 0.792100] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.798033] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.803753] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 0.809820] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 38000)
[ 0.819397] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.825054] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 0.832295] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 0.837962] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 0.845175] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 0.850146] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 0.857132] libphy: stmmac: probed
[ 0.862449] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.869108] ehci-platform: EHCI generic platform driver
[ 0.874624] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.880320] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.888255] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000
[ 0.915409] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.922646] hub 1-0:1.0: USB hub found
[ 0.926607] hub 1-0:1.0: 1 port detected
[ 0.931120] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.937423] ohci-platform: OHCI generic platform driver
[ 0.942969] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 0.949713] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 0.957677] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400
[ 1.030528] hub 2-0:1.0: USB hub found
[ 1.034359] hub 2-0:1.0: 1 port detected
[ 1.041556] usbcore: registered new interface driver cdc_acm
[ 1.047318] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.055485] usbcore: registered new interface driver usb-storage
[ 1.061631] usbcore: registered new interface driver usbserial
[ 1.068806] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.075712] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.080257] i2c /dev entries driver
[ 1.085694] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.145572] sunxi-mmc 1c0f000.mmc: base:0xc407d000 irq:23
[ 1.152524] usbcore: registered new interface driver usbhid
[ 1.158198] usbhid: USB HID core driver
[ 1.164201] NET: Registered protocol family 17
[ 1.168886] Key type dns_resolver registered
[ 1.173287] Registering SWP/SWPB emulation handler
[ 1.183555] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4400000
[ 1.194252] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[ 1.212516] Console: switching to colour frame buffer device 100x30
[ 1.224975] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[ 1.233553] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.244933] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.250775] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.259862] hub 3-0:1.0: USB hub found
[ 1.263726] hub 3-0:1.0: 1 port detected
[ 1.270247] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:26:01 UTC (1561)
[ 1.278767] vcc3v0: disabling
[ 1.281744] vcc5v0: disabling
[ 1.284709] ALSA device list:
[ 1.287732] No soundcards found.
[ 1.294029] Waiting for root device /dev/mmcblk0p2...
[ 1.333125] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.343353] mmc0: new high speed SD card at address b368
[ 1.349323] mmcblk0: mmc0:b368 NCard 961 MiB
[ 1.355089] mmcblk0: p1 p2
[ 1.386575] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.395618] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.841219] EXT4-fs (mmcblk0p2): recovery complete
[ 1.994781] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.002988] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.009995] devtmpfs: mounted
[ 2.014263] Freeing unused kernel memory: 1024K
[ 2.165150] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Starting mdev...
modprobe: can't change directory to '4.13.16-licheepi-zero+': No such file or directory
Initializing random number generator... done.
Starting network: OK
Welcome to Buildroot
buildroot login:
意思是你执行的Qt程序后面加 -platform linuxfb
qt.qpa.plugin: Could not load the Qt platform plugin "linuxfb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vnc.
Aborted
./analogclock -platform linuxfb
我我现在用的是根问系统是buildroot下面的那个target 我在终端窗口去查找这个analogclock 的时候 发现没有这个
然后执行上面./analogclock -platform linuxfb 就会没有找到
在lib中有这个plugin 环境变量也设置路径
qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vnc.
Aborted
步骤没有错的 git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental
那可以你在这个基础上改吧.
下载新uboot 烧写进去了uboot是起来 就是一直这样了
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 16 2019 - 00:23:47 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, 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: phy interface0
eth0: ethernet@1c30000
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...
reading /sun8i-v3s-licheepi-zero.dtb
11868 bytes read in 25 ms (462.9 KiB/s)
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
BOOTP broadcast 1
DHCP client bound to address 192.168.0.168 (4 ms)
*** Warning: no boot file name; using 'C0A800A8.img'
Using ethernet@1c30000 device
TFTP from server 192.168.1.1; our IP address is 192.168.0.168
Filename 'C0A800A8.img'.
Load address: 0x41000000
Loading: T T
无情一刀 说:晕哥 说:这有点尴尬,烧我的固件不会酱紫?
下载你的没有问题
那单独烧我固件的 uboot 试一试?
U-Boot 2017.01-rc2-00075-gec3f3ba-dirty (Dec 15 2017 - 14:00:51 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, 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: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
reading zImage
** Unable to read file zImage **
reading sun8i-v3s-licheepi-zero-dock.dtb
12545 bytes read in 27 ms (453.1 KiB/s)
=>
无情一刀 说:晕哥 说:这有点尴尬,烧我的固件不会酱紫?
下载你的没有问题
那单独烧我固件的 uboot 试一试?
好的 下午试试
我刚才烧写刚下载的uboot 打印的信息是下面 这个新的uboot 我就修改了DRAM和CU时钟
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:56:13 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: c2, 20, 18
*** Warning - spi_flash_probe() 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
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
reading /sun8i-v3s-licheepi-zero.dtb
11872 bytes read in 25 ms (462.9 KiB/s)
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
这有点尴尬,烧我的固件不会酱紫?
我都按照上面的修改了
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
就那个代码里面一直在读取了
CONFIG_DRAM_CLK=166
CONFIG_SYS_CLK_FREQ=800000000试一试这样.
无语了 还是这样
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:13:26)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:13:26 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
### ERROR ### Please RESET the board ###
还是很难起来 我现在在uboot是 不是昨天下载的
设置时钟为2的时候打印是下面的信息
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 18:25:24)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 18:25:24 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
### ERROR ### Please RESET the board ###
然后代码也改了后是打印下面
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 18:37:28)
DRAM: 64 MiB
Trying to boot from MMC1
换了一张卡后打印的信息又不一样了
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 02:37:00)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 02:37:00 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
### ERROR ### Please RESET the board ###
这块板子,这张卡烧我做的固件正常?
这个卡是烧的我自己的固件
另外一张卡烧的你固件打印信息如下
U-Boot SPL 2017.01-rc2-00075-gec3f3ba-dirty (Dec 15 2017 - 14:00:51)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2017.01-rc2-00075-gec3f3ba-dirty (Dec 15 2017 - 14:00:51 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, 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-00075-gec3f3ba-dirty (Dec 15 2017 - 14:00:51 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, 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: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
reading zImage
4016104 bytes read in 641 ms (6 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
** Unable to read file sun8i-v3s-licheepi-zero-dock.dtb **
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
=>
我的sun8i.h的设置文件是下面设置的 求大神看看啊
#define CONFIG_BOOTCOMMAND "setenv bootm_boot_mode sec; " \
"load mmc 0:1 0x41000000 zImage; " \
"load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb; " \
"bootz 0x41000000 - 0x41800000;"
#define CONFIG_BOOTARGS "console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_cursor_default=0"
无情一刀 说:U-Boot SPL 2017.01-rc2-00075-gec3f3ba-dirty (Dec 15 2017 - 14:00:51)
DRAM: 64 MiB
Trying to boot from MMC1spl: mmc init failed with error: -110
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###这是荔枝派开发板?
我只在自己做的板子上发现这个问题,可能是布线或者电源问题
有没有可能在板子上没有这个/dev/mmcblk0p2 而我uboot里面于是从这里去读取
关键是两个板子都是这个问题 一样的 电源的话 我用USB供电
晕哥
我在sun8i.h中配置的是
#define CONFIG_BOOTCOMMAND "setenv bootm_boot_mode sec; " \
"load mmc 0:1 0x41000000 zImage; " \
"load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero.dtb; " \
"bootz 0x41000000 - 0x41800000;"
#define CONFIG_BOOTARGS "console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_cursor_default=0"
5. 烧录TF卡启动盘: 【视频分享】制作荔枝派Zero开发板(全志V3s) TF/SD卡启动盘
1) 删除TF卡所有分区
2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
3) 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, sun8i-v3s-licheepi-zero-dock.dtb拷贝到 这个分区
4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
现在是可以跑起来了 只是有些卡总是提示上面的那个问题 然后又不能建立分区
无情一刀 说:晕哥 说:https://whycan.cn/t_2039.html
https://whycan.cn/t_561.html那你烧录我这两个 TF卡固件试一试了
我刚才试了这个 V3s_TFCard.7z 还是一样的起不来
TF卡插入电脑Linux, 有没有两个磁盘?
有两个磁盘的 我现在用的是那时候买的荔枝派小型开发板测试
https://whycan.cn/t_2039.html
https://whycan.cn/t_561.html那你烧录我这两个 TF卡固件试一试了
我刚才试了这个 V3s_TFCard.7z 还是一样的起不来
TF卡的优先顺序高于 SPI NOR FLASH, 你得检查一下 uboot 确实烧到了 TF 卡, 用 dd 命令从 TF 卡读回来比较一下, 用 beyond compare
不过为了保险起见, 最好把 flash 前面几个扇区随便写点什么, 让他没办法启动.
好的 明天来试试 ,TF卡在Windows下要不要先格式化哦哦 还有那个顺序 是先写Ubuntu的文件到sdb 还是先分区后再去写了 我记得以前用TF可以启动了
是的, TF卡/SD NAND/eMMC 就按这个帖子做就 OK:
我今天下午就是按照这个帖子去配置了,插卡了好像一直是从flash里面启动的,我flash里面以前也弄 了启动文件,就是一直从flash启动,最可恨的就是还不打印信息,都不好将flash里面的启动文件给擦除,这会有冲突吗 我flash里面也有启动文件
这就尴尬了,应该是代码没有改到位吧,或者执行有问题
这是我下面的修改的地方 修改后 我make 还有就是make install
#define CMD_WRITE_ENABLE 0x06
#define SPI_FLASH_16MB_BOUN 0x1000000
# define CMD_BANKADDR_BRWR 0x17 //only SPANSION flash use it
# define CMD_BANKADDR_BRRD 0x16
# define CMD_EXTNADDR_WREAR 0xC5
# define CMD_EXTNADDR_RDEAR 0xC8
size_t bank_curr = 0;
void aw_fel_spiflash_write_helper(feldev_handle *dev,
uint32_t offset, void *buf, size_t len,
size_t erase_size, uint8_t erase_cmd,
size_t program_size, uint8_t program_cmd)
{
uint8_t *buf8 = (uint8_t *)buf;
size_t max_chunk_size = dev->soc_info->scratch_addr - dev->soc_info->spl_addr;
size_t cmd_idx, bank_sel;
if (max_chunk_size > 0x1000)
max_chunk_size = 0x1000;
uint8_t *cmdbuf = malloc(max_chunk_size);
cmd_idx = 0;
prepare_spi_batch_data_transfer(dev, dev->soc_info->spl_addr);
//add bank support
{
cmd_idx = 0;
bank_sel = offset /SPI_FLASH_16MB_BOUN;
if (bank_sel == bank_curr)
goto bar_end;
/* Emit write enable command */
cmdbuf[cmd_idx++] = 0;
cmdbuf[cmd_idx++] = 1;
cmdbuf[cmd_idx++] = CMD_WRITE_ENABLE;
/* Emit write bank */
cmdbuf[cmd_idx++] = 0;
cmdbuf[cmd_idx++] = 2;
cmdbuf[cmd_idx++] = CMD_EXTNADDR_WREAR;
cmdbuf[cmd_idx++] = offset >> 24;
/* Emit wait for completion */
cmdbuf[cmd_idx++] = 0xFF;
cmdbuf[cmd_idx++] = 0xFF;
/* Emit the end marker */
cmdbuf[cmd_idx++] = 0;
cmdbuf[cmd_idx++] = 0;
aw_fel_write(dev, cmdbuf, dev->soc_info->spl_addr, cmd_idx);
aw_fel_remotefunc_execute(dev, NULL);
bar_end:
bank_curr = bank_sel;
}
cmd_idx = 0;
free(cmdbuf);
}
你是不是烧 32M了, 只少 u-boot 试一试.
或者试一下 这个: https://whycan.cn/t_444.html
----------------------------------------------------------------------
以下是 2018-12-19 更新 (16楼):为了不再给大家造成困扰,我把文件重新整理了 V3s 和 F1C100s 两个文件夹,
晕哥用的那个在windows下可以烧写程序 有信息出来
转载看云的文章: sunxi-fel增加对16M以上Flash的支持
由于SPI flash 的地址是24bit,也就是最大16M 地址空间,所以对于32M flash,需要增加bank切换支持。
uboot中有CONFIG_SPI_FLASH_BAR选项可以使能bank切换。
但是sunxi-fel中尚未支持,所以下载的时候超出16M会循环覆盖掉。
这里介绍对sunxi-fel增加16M以上flash支持的方法。
u-boot的支持
drivers/mtd/spi/spi_flash.cstatic int write_bar(struct spi_flash *flash, u32 offset) { u8 cmd, bank_sel; int ret; bank_sel = offset / (SPI_FLASH_16MB_BOUN << flash->shift); if (bank_sel == flash->bank_curr) goto bar_end; cmd = flash->bank_write_cmd; ret = spi_flash_write_common(flash, &cmd, 1, &bank_sel, 1); if (ret < 0) { debug("SF: fail to write bank register\n"); return ret; } bar_end: flash->bank_curr = bank_sel; return flash->bank_curr; }
sunxi-fel的支持
fel-spiflash.c#define CMD_WRITE_ENABLE 0x06 #define SPI_FLASH_16MB_BOUN 0x1000000 # define CMD_BANKADDR_BRWR 0x17 //only SPANSION flash use it # define CMD_BANKADDR_BRRD 0x16 # define CMD_EXTNADDR_WREAR 0xC5 # define CMD_EXTNADDR_RDEAR 0xC8 size_t bank_curr = 0; void aw_fel_spiflash_write_helper(feldev_handle *dev, uint32_t offset, void *buf, size_t len, size_t erase_size, uint8_t erase_cmd, size_t program_size, uint8_t program_cmd) { uint8_t *buf8 = (uint8_t *)buf; size_t max_chunk_size = dev->soc_info->scratch_addr - dev->soc_info->spl_addr; size_t cmd_idx, bank_sel; if (max_chunk_size > 0x1000) max_chunk_size = 0x1000; uint8_t *cmdbuf = malloc(max_chunk_size); cmd_idx = 0; prepare_spi_batch_data_transfer(dev, dev->soc_info->spl_addr); //add bank support { cmd_idx = 0; bank_sel = offset /SPI_FLASH_16MB_BOUN; if (bank_sel == bank_curr) goto bar_end; /* Emit write enable command */ cmdbuf[cmd_idx++] = 0; cmdbuf[cmd_idx++] = 1; cmdbuf[cmd_idx++] = CMD_WRITE_ENABLE; /* Emit write bank */ cmdbuf[cmd_idx++] = 0; cmdbuf[cmd_idx++] = 2; cmdbuf[cmd_idx++] = CMD_EXTNADDR_WREAR; cmdbuf[cmd_idx++] = offset >> 24; /* Emit wait for completion */ cmdbuf[cmd_idx++] = 0xFF; cmdbuf[cmd_idx++] = 0xFF; /* Emit the end marker */ cmdbuf[cmd_idx++] = 0; cmdbuf[cmd_idx++] = 0; aw_fel_write(dev, cmdbuf, dev->soc_info->spl_addr, cmd_idx); aw_fel_remotefunc_execute(dev, NULL); bar_end: bank_curr = bank_sel; } cmd_idx = 0;
重新编译sunxi-fel后就可以烧录32M flash了~
你这里是修改了深哦哦就32M的可以了哦哦
无情一刀 说:晕哥 说:都是Qt的核心库,动态链接库。
你的 Flash 多大, 是 JFFS2 根文件系统吗? 根文件系统分配的flash空间多大?
是的 就是跟文件系统 主要是现在flash 总的只有16M
那装下 Qt 有点难度啊,
得了解一下 squashfshttps://whycan.cn/t_2179.html
https://whycan.cn/t_2170.html如果上面还不行就得剪裁 Qt5了,
如果上面还不行就得剪裁 Qt4了.
就是因为内存太小了
你说的剪裁QT是什么意思啊 我用QT编译好了工程 直接放到V3S板子里面去 就可以显示了吧????
我现在就是想的就是用SDnand去启动用个128M,
无情一刀 说:显示那个MakeFIla文件里面的编译环境是
CC = arm-linux-gnueabihf-gcc -lts
CXX = arm-linux-gnueabihf-g++ -lts 这个但是外面去编译的总是提示file not recognized: File format not recognized这样库错误
昨天远程帮你看过了,
就是你编译出来的 Qt 工具链有问题
https://blog.csdn.net/u011113596/article/details/80325081你编译时候参数没设置好,
所以编译出来是 x86_amd64 的。
我现在的QT工具链有问题 那我现在是不是要重新安装QT 工具,
我现在用qmake 了 也出现了Makefile
在MakeFIle里面修改了这两处就编译不通过 以前的是gcc 和g++
CC = arm-linux-gnueabihf-gcc -lts
CXX = arm-linux-gnueabihf-g++ -lts
出现的错误是
root@ubuntu:/home/share/KADIBCM_GUI/KADIBCM_GUI/KADIBCM_GUI# make
g++ -Wl,-O1 -Wl,-rpath,/opt/Qt5.4.1/5.4/gcc_64 -Wl,-rpath,/opt/Qt5.4.1/5.4/gcc_64/lib -o KADIBCM_GUI tmp/obj/main.o tmp/obj/mainwindow.o tmp/obj/moc_mainwindow.o -L/home/share/opt/Qt5.4.1/5.4/gcc_64/lib -lQt5Widgets -L/opt/Qt5.4.1/5.4/gcc_64/lib -lQt5Gui -lQt5Core -lGL -lpthread
/usr/bin/ld: tmp/obj/main.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: tmp/obj/main.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: tmp/obj/main.o: Relocations in generic ELF (EM: 40)
tmp/obj/main.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:205: recipe for target 'KADIBCM_GUI' failed
make: *** [KADIBCM_GUI] Error 1
我从那个帖子中没有看到关于QT操作的
我现在编译了我改了
CC = arm-linux-gnueabihf-gcc -lts
CXX = arm-linux-gnueabihf-g++ -lts
我只要将对于的指令添加到pack.sh里面 比如
mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -d rootfs/ -o jffs2.img
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs
/opt/sunxi-tools/sunxi-fel -p spiflash-write 0 /opt/u-boot/u-boot-sunxi-with-spl.bin
/opt/sunxi-tools/sunxi-fel -p spiflash-write 0x0100000 /opt/linux/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dtb
/opt/sunxi-tools/sunxi-fel -p spiflash-write 0x0110000 /opt/linux/arch/arm/boot/zImage
/opt/sunxi-tools/sunxi-fel -p spiflash-write 0x0510000 /opt/jffs2.img
//这下面的路径
tar czvf /var/www/html/files.tgz jffs2.bin output/build/uboot-v3s-spi-experimental/u-boot-sunxi-with-spl.bin output/images/env.bin output/images/sun8i-v3s-licheepi-zero-dock.dtb output/images/zImage//至于这里将路径改下
###压缩###
tar czvf /var/www/html/flash.tgz flash_32m.bin
还有一个文件就是pre_build.sh 这个文件不知道具体是干什么用的
pack.sh
###pack.sh### ###编译qt demo 程序 --- 模拟时钟, 并拷贝到文件系统### cd /opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/examples/gui/analogclock /opt/buildroot-2018.08.2/output/host/bin/qmake analogclock.pro make cp analogclock /opt/buildroot-2018.08.2/output/target/usr/bin/ -rf ###删除旧系统### cd /opt/buildroot-2018.08.2/ rm jffs2.bin -rf rm flash_32m.bin -rf ###复制一个去除登陆提示的inittab### cp output/images/inittab output/target/etc/inittab ###添加一个启动脚本 (模拟时钟)### echo "/usr/bin/analogclock -platform linuxfb" > output/target/etc/profile.d/startup.sh ###wifi初始脚本### cp output/images/wpa_supplicant.conf output/target/etc/ -rf ###复制rtl8723的固件### mkdir output/target/lib/firmware/rtlwifi/ -p cp output/images/rtl8723bs_nic.bin output/target/lib/firmware/rtlwifi/ -rf cp output/images/mdev.conf output/target/etc/ -rf cp output/images/automount.sh output/target/sbin/ -rf chmod +x output/target/sbin/ ###生成jffs2文件系统 mkfs.jffs2 -s 0x1000 -e 0x10000 --pad=0x19F0000 -d output/target/ -o jffs2.bin ###初始化flash烧录文件, 大小32M dd if=/dev/zero bs=1M count=32 | tr "\000" "\377" > flash_32m.bin ###拷贝u-boot, dtb,kernel, filesystem### dd if=notrunc if=output/build/uboot-v3s-spi-experimental/u-boot-sunxi-with-spl.bin of=flash_32m.bin seek=0 dd if=notrunc if=output/images/env.bin of=flash_32m.bin bs=$((0xF8000)) seek=1 dd if=notrunc if=output/images/sun8i-v3s-licheepi-zero-dock.dtb of=flash_32m.bin bs=$((0x100000)) seek=1 dd if=notrunc if=output/images/zImage of=flash_32m.bin bs=$((0x110000)) seek=1 dd if=notrunc if=jffs2.bin of=flash_32m.bin bs=$((0x610000)) seek=1 tar czvf /var/www/html/files.tgz jffs2.bin output/build/uboot-v3s-spi-experimental/u-boot-sunxi-with-spl.bin output/images/env.bin output/images/sun8i-v3s-licheepi-zero-dock.dtb output/images/zImage ###压缩### tar czvf /var/www/html/flash.tgz flash_32m.bin
这个脚本是要将我烧写的 u-boot, dtb,kernel, filesystem 全部以命令的形式 输入脚本中 最后脚本生成flash_32m.bin 然后就可以通过只烧写flash_32m.bin这个就可以了
晕哥 说:主线u-boot + 主线linux的话,只要改 u-boot 的配置参数就可以了,
V3s 也是这样。
主线u-boot + 官方Bsp Linux的话,是需要同时修改u-boot & kernel ?
只需要修改Uboot就可以了
如果你是修改尺寸 可能那个fbuffer会报错 就是因为如果是启动出现CONFIG_SUNXI_MAX_FB_SIZE的内存不够修改u-boot/include/configs/sunxi-common.h/CONFIG_SUNXI_MAX_FB_SIZE的中的大小 uboot默认设置为2M 我已修改为4M(在309 行)
#ifndef CONFIG_MACH_SUN8I_V3S
#define CONFIG_SUNXI_MAX_FB_SIZE (16 << 20)
#else
#define CONFIG_SUNXI_MAX_FB_SIZE (2 << 20)
#endif缓冲区不够,还有在代码里面修改为4M就可以了
就是在这里修改
无情一刀 说:晕哥 说:可能你要自己编译一个了, 那个只能 f1c100s 用
你这有这方面的资料吗 就是关于编译Windows下载V3S程序的工具 ,不知道怎么去编译
你是要编译过程吗:
你的这个工具是不是可以下载V3S在Windows下
echo 0 > /sys/class/pwm/pwmchip0/export
echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/period
echo 500000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
echo 1 > /sys/class/pwm/pwmchip0/export
echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/period
echo 200000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable
为什么这两句 不一样哦哦 一个 0 一个1
echo 0 > /sys/class/pwm/pwmchip0/export
echo 1 > /sys/class/pwm/pwmchip0/export
这里是不是代表两个PWM
晕哥 说:PWM背光亮度可以在这里调: https://whycan.cn/t_1693.html
这样是在终端命令输入 ,如果是我不在终端输入,直接把那几句写在脚本中可以吗
就是从启动的时候就去设置了我想要的PWM亮度
PWM背光亮度可以在这里调: https://whycan.cn/t_1693.html
这样是在终端命令输入 ,如果是我不在终端输入,直接把那几句写在脚本中可以吗
看起来,你写错了一个字符, 仔细对照了一下,又是对的。
是你自己编译的,还是下载的?
https://whycan.cn/t_993.html 我安装晕哥这个帖子去下载的软件 用的事16M以下的烧写工具
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Dec 12 2018 - 00:12:10)
DRAM: 64 MiB
Trying to boot from sunxi SPI
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Dec 12 2018 - 00:12:10 -0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 800x600 lcd console (overscan 0x0)
dotclock: 48000kHz = 48000kHz: (1 * 3MHz * 96) / 6
In: serial@01c28800
Out: serial@01c28800
Err: serial@01c28800
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Dec 12 2018 - 00:12:10 -0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 800x600 lcd console (overscan 0x0)
dotclock: 48000kHz = 48000kHz: (1 * 3MHz * 96) / 6
In: serial@01c28800
Out: serial@01c28800
Err: serial@01c28800
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dffe59 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.16-licheepi-zero+ (root@ubuntu) (gcc version 6.1.1 20160711 (Linaro GCC 6.1-2016.08)) #3 SMP Tue Dec 11 22:42:28 PST 2018
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3e0a000 s33868 r8192 d23476 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15790
[ 0.000000] Kernel command line: console=ttyS2,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2 vt.global_cursor_default
[ 0.000000] Booting kernel: `' invalid for parameter `vt.global_cursor_default'
[ 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: 53192K/63660K available (6144K kernel code, 229K rwdata, 1464K rodata, 1024K init, 264K bss, 10468K 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 : 0xc4000000 - 0xff800000 ( 952 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3e2b000 ( 62 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a39400 ( 229 kB)
[ 0.000000] .bss : 0xc0a40ae4 - 0xc0a82cec ( 265 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000020] Switching to timer-based delay loop, resolution 41ns
[ 0.000197] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000429] Console: colour dummy device 80x30
[ 0.000466] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000480] pid_max: default: 32768 minimum: 301
[ 0.000610] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000624] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001232] CPU: Testing write buffer coherency: ok
[ 0.001608] /cpus/cpu@0 missing clock-frequency property
[ 0.001632] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002059] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002235] Hierarchical SRCU implementation.
[ 0.002734] smp: Bringing up secondary CPUs ...
[ 0.002749] smp: Brought up 1 node, 1 CPU
[ 0.002759] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002765] CPU: All CPU(s) started in SVC mode.
[ 0.003541] devtmpfs: initialized
[ 0.006724] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.007017] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.007043] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.007211] pinctrl core: initialized pinctrl subsystem
[ 0.008123] random: get_random_u32 called from bucket_table_alloc+0xf4/0x244 with crng_init=0
[ 0.008261] NET: Registered protocol family 16
[ 0.008771] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009985] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.010005] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.023162] SCSI subsystem initialized
[ 0.023456] usbcore: registered new interface driver usbfs
[ 0.023523] usbcore: registered new interface driver hub
[ 0.023617] usbcore: registered new device driver usb
[ 0.023896] pps_core: LinuxPPS API ver. 1 registered
[ 0.023906] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.023929] PTP clock support registered
[ 0.024147] Advanced Linux Sound Architecture Driver Initialized.
[ 0.026029] clocksource: Switched to clocksource arch_sys_counter
[ 0.037049] NET: Registered protocol family 2
[ 0.037654] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.037691] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.037713] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.037832] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.037880] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038092] NET: Registered protocol family 1
[ 0.038685] RPC: Registered named UNIX socket transport module.
[ 0.038705] RPC: Registered udp transport module.
[ 0.038711] RPC: Registered tcp transport module.
[ 0.038717] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.040685] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.049627] NFS: Registering the id_resolver key type
[ 0.049678] Key type id_resolver registered
[ 0.049686] Key type id_legacy registered
[ 0.049732] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.051243] random: fast init done
[ 0.054154] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.054177] io scheduler noop registered
[ 0.054186] io scheduler deadline registered
[ 0.054474] io scheduler cfq registered (default)
[ 0.054485] io scheduler mq-deadline registered
[ 0.054491] io scheduler kyber registered
[ 0.058946] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.128461] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.131677] console [ttyS2] disabled
[ 0.151955] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 33, base_baud = 1500000) is a U6_16550A
[ 0.749453] console [ttyS2] enabled
[ 0.757531] m25p80 spi32766.0: mx25l12805d (16384 Kbytes)
[ 0.763517] spi32766.0: parser ofpart: 0
[ 0.768504] libphy: Fixed MDIO Bus: probed
[ 0.773108] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.779031] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.784744] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 0.790814] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 38000)
[ 0.800393] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.806137] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 0.813353] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 0.819034] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 0.826265] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 0.831224] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 0.838221] libphy: stmmac: probed
[ 0.843353] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.850012] ehci-platform: EHCI generic platform driver
[ 0.855577] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.861267] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.869204] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000
[ 0.896045] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.903259] hub 1-0:1.0: USB hub found
[ 0.907212] hub 1-0:1.0: 1 port detected
[ 0.911742] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.918043] ohci-platform: OHCI generic platform driver
[ 0.923593] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 0.930324] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 0.938286] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400
[ 1.011222] hub 2-0:1.0: USB hub found
[ 1.015054] hub 2-0:1.0: 1 port detected
[ 1.022268] usbcore: registered new interface driver cdc_acm
[ 1.028029] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.036185] usbcore: registered new interface driver usb-storage
[ 1.042325] usbcore: registered new interface driver usbserial
[ 1.049534] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.056440] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.060990] i2c /dev entries driver
[ 1.066497] edt_ft5x06_ts_probe-0---
[ 1.070086] edt_ft5x06_ts_probe-0++++
[ 1.073748] edt_ft5x06_ts_probe-0++++
[ 1.077516] edt_ft5x06_ts_probe-0 ==== 0
[ 1.406051] tsdata->reset_gpio == ok
[ 1.409637] edt_ft5x06_ts_probe-reset_gpio ==== -1014918624
[ 1.415216] inputinputinput====
[ 1.418462] inputinputinput22====
[ 1.421859] --------------
[ 1.427404] edt_ft5x06_ts_readwrite == 0 23 56
[ 1.432412] edt_ft5x06_ts_readwrite222 == 0
[ 1.437075] edt_ft5x06_ts_readwrite3333 == 0
[ 1.441340] --------------error == 0
[ 1.444908] inputinputinput33====
[ 1.448321] inputinputinput44====
[ 1.451725] inputinputinput55====
[ 1.457958] edt_ft5x06_ts_get_parameters00000000
[ 1.462569] inputinputinput88====
[ 1.465967] inputinputinput66====
[ 1.469389] inputinputinput77====
[ 1.472810] client->name = edt-ft5x06,client->irq = 41
[ 1.478521] input: EP0700M09 as /devices/platform/soc/1c2b000.i2c/i2c-1/1-0038/input/input0
[ 1.488160] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.556077] sunxi-mmc 1c0f000.mmc: base:0xc407d000 irq:23
[ 1.563018] usbcore: registered new interface driver usbhid
[ 1.568689] usbhid: USB HID core driver
[ 1.574393] NET: Registered protocol family 17
[ 1.579085] Key type dns_resolver registered
[ 1.583514] Registering SWP/SWPB emulation handler
[ 1.594141] simple-framebuffer 43e2b000.framebuffer: framebuffer at 0x43e2b000, 0x1d4c00 bytes, mapped to 0xc4480000
[ 1.604805] simple-framebuffer 43e2b000.framebuffer: format=x8r8g8b8, mode=800x600x32, linelength=3200
[ 1.624541] Console: switching to colour frame buffer device 100x37
[ 1.638503] simple-framebuffer 43e2b000.framebuffer: fb0: simplefb registered!
[ 1.647146] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.658581] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.664348] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.673491] hub 3-0:1.0: USB hub found
[ 1.677475] hub 3-0:1.0: 1 port detected
[ 1.683881] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:32 UTC (32)
[ 1.692220] vcc3v0: disabling
[ 1.695198] vcc5v0: disabling
[ 1.698229] ALSA device list:
[ 1.701194] No soundcards found.
[ 1.707693] VFS: Cannot open root device "31:03" or unknown-block(31,3): error -19
[ 1.715295] Please append a correct "root=" boot option; here are the available partitions:
[ 1.723721] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 1.732068] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.16-licheepi-zero+ #3
[ 1.739363] Hardware name: Allwinner sun8i Family
[ 1.744102] [<c010e58c>] (unwind_backtrace) from [<c010b290>] (show_stack+0x10/0x14)
[ 1.751849] [<c010b290>] (show_stack) from [<c06715fc>] (dump_stack+0x84/0x98)
[ 1.759074] [<c06715fc>] (dump_stack) from [<c011b6a8>] (panic+0xdc/0x248)
[ 1.765950] [<c011b6a8>] (panic) from [<c0901170>] (mount_block_root+0x188/0x25c)
[ 1.773426] [<c0901170>] (mount_block_root) from [<c0901364>] (mount_root+0x120/0x128)
[ 1.781336] [<c0901364>] (mount_root) from [<c09014b0>] (prepare_namespace+0x144/0x188)
[ 1.789331] [<c09014b0>] (prepare_namespace) from [<c0900dc0>] (kernel_init_freeable+0x1bc/0x1cc)
[ 1.798197] [<c0900dc0>] (kernel_init_freeable) from [<c06844d4>] (kernel_init+0x8/0x108)
[ 1.806368] [<c06844d4>] (kernel_init) from [<c0107618>] (ret_from_fork+0x14/0x3c)
[ 1.813942] Rebooting in 5 seconds..
用 ev_test 或者 直接 cat /dev/input/eventX 呢? 有没有数据?如果这样也没有,检查看是否进入了驱动的中断
进去一看 发现input下面有两个event0 和event1 我以前一直读取的是event0 所以一直读取不到
这是我的配置文件
&i2c0 {
status = "okay";
goodix_gt911_2:goodix_gt911_2@5d{
compatible = "goodix,gt911";
reg = <0x5d>;
interrupt-parent = <&pio>;
interrupts = <1 3 IRQ_TYPE_EDGE_FALLING>;
reset = <&pio 1 2 GPIO_ACTIVE_LOW>;
irq-gpios = <&pio 1 3 GPIO_ACTIVE_LOW>;
};
};
无情一刀 说:晕哥 说:SD卡和 SD NAND 用同一组 SDIO口吗?
哈哈 我这个USB接了串口和SD卡 所以不行 只能使用其中之一 ,
晕哥 碰到很奇怪的问题 为什么我sun8i-v3s-licheepi-zero.dtb这个文件删除了
然后再去 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs 去编译获取dtb文件 就是死活都不会生成dtb了好奇 USB 怎么接了串口和SD卡的?
先执行touch .config, 再执行 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs 呢?
你说的这个touch .config 没有这个命令吧 我刚才试了下 找不到命令
无情一刀 说:刚才里面的这个lv_task_handler函数具体是干什么用的了
lv_task_handler() 一定要调用, 否则GUI 不能被驱动, 相当于单片鸡的晶振.
https://github.com/littlevgl/lvgl
Porting
In the simplest case you need 5 things:Call lv_tick_inc(x) every x milliseconds in a Timer or Task (x should be between 1 and 10)
Register a function which can copy a pixel array to an area of the screen.
Register a function which can read an input device. (E.g. touch pad)
Copy lv_conf_templ.h as lv_conf.h and set at least LV_HOR_RES, LV_VER_RES and LV_COLOR_DEPTH.
Call lv_task_handler() periodically every few milliseconds. For a detailed description visit https://github.com/littlevgl/lvgl/wiki/Porting Or check the Porting tutorial
是的 刚开始就是没有加 怎么画都没有用
无情一刀 说:晕哥 说:是要在v3s上显示吗?
是的就在V3S上显示
只是显示图片到 framebuffer 上面用这个程序 https://github.com/bcarmo-caio/fbv
如果不合适可以在 fbv 上面继续修改.
可以在 buildroot 里面勾选,然后编译就可以了。
如果是单独的是操作framebuffer 这个没有问题 现在是用的littlevgl 库区操作 不知道怎么去调用函数
这是一个链接错误,应该是缺 libSDL2.a 库文件
我里面是有SDL2这个文件夹的 在usr/include/下 路劲也加了
无情一刀 说:vmware 菜单上有个关机键
现在就是 开机还是这个界面 根本进不去 资料也没有 弄不出来了