似乎是lcd时钟配置的问题,
.timing =
{
.pixel_clock_hz = 9210200,
.h_front_porch = 4,
.h_back_porch = 8,
.h_sync_len = 41,
.v_front_porch = 4,
.v_back_porch = 2,
.v_sync_len = 10,
.h_sync_active = 0,
.v_sync_active = 0,
.den_active = 1,
.clk_active = 1,
.backcolor = 0xFFFFFFFF,
},
使用这个配置驱动4.3寸屏没有问题,不懂为什么是9210200 ,7寸800x480应该怎么配置
烧录方式1:flashtoram
tools\mksunxi.exe .\rtthread.bin
tools\sunxi-fel.exe spl .\rtthread.bin
tools\sunxi-fel.exe -p write 0x80000000 .\rtthread.bin
tools\sunxi-fel.exe exec 0x80000000
烧录方式2:flashtospi
tools\mksunxi.exe .\rtthread.bin
tools\sunxi-fel.exe -p spiflash-write 0 .\rtthread.bin
两种方式在lichee nano都能正常烧录并运行程序
方式2在自己板子可以烧录,程序似乎并没有运行,方式1在自己板子无法烧录,提示usb_bulk_send() errorr -7:Operation timed out
请大佬们分析一下这是什么问题,是ddr没有运行起来吗?该从哪里下手,ddr 2.5v供电是有的,svref是通过两个150K的电阻从2.5v分压的
static void lcd_fb_flush(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p)
{
uint32_t x;
uint32_t y;
uint32_t location = 0;
uint32_t tick;
lv_color_t *fbp = (lv_color_t *)info.framebuffer;
//LOG_D("flush x1=%d, x2=%d, y1=%d, y2=%d", area->x1, area->x2, area->y1, area->y2);
tick = rt_tick_get();
for (y = area->y1; y <= area->y2; y++)
{
for (x = area->x1; x <= area->x2; x++)
{
location = x + y * info.width;
fbp[location].full = color_p->full;
color_p++;
}
}
//LOG_D("interval=%d,width=%d,height=%d",rt_tick_get()-tick, area->x2 - area->x1 +1 , area->y2-area->y1+1);
lv_disp_flush_ready(disp_drv);
}
f1c100s裸奔跑lvgl,20帧cpu占用接近50%,刷屏能否用dma实现?但是看这个填充函数不是连续的内存,怎么用dma实现呢
有没有刷屏加速的办法,目前20帧刷屏RGB565 CPU占用40%左右, ARGB888 CPU占用48%左右。我看颜色填充不是连续的内存填充,这样用dma怎么实现
static void lcd_fb_flush(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p)
{
uint32_t x;
uint32_t y;
uint32_t location = 0;
lv_color_t *fbp = (lv_color_t *)info.framebuffer;
//LOG_D("flush x1=%d, x2=%d, y1=%d, y2=%d", area->x1, area->x2, area->y1, area->y2);
for (y = area->y1; y <= area->y2; y++)
{
for (x = area->x1; x <= area->x2; x++)
{
location = x + y * info.width;
fbp[location].full = color_p->full;
color_p++;
}
}
lv_disp_flush_ready(disp_drv);
}
版本4.9.170
但是我看你发的地址 https://elixir.bootlin.com/linux/v4.9/source/drivers/input/touchscreen/of_touchscreen.c 这里面4.9.170 是有touchscreen-inverted-x 这些参数的
void touchscreen_parse_properties(struct input_dev *input, bool multitouch)
{
struct device *dev = input->dev.parent;
unsigned int axis;
unsigned int maximum, fuzz;
bool data_present;
input_alloc_absinfo(input);
if (!input->absinfo)
return;
axis = multitouch ? ABS_MT_POSITION_X : ABS_X;
data_present = touchscreen_get_prop_u32(dev, "touchscreen-size-x",
input_abs_get_max(input,
axis) + 1,
&maximum) |
touchscreen_get_prop_u32(dev, "touchscreen-fuzz-x",
input_abs_get_fuzz(input, axis),
&fuzz);
if (data_present)
touchscreen_set_params(input, axis, maximum - 1, fuzz);
axis = multitouch ? ABS_MT_POSITION_Y : ABS_Y;
data_present = touchscreen_get_prop_u32(dev, "touchscreen-size-y",
input_abs_get_max(input,
axis) + 1,
&maximum) |
touchscreen_get_prop_u32(dev, "touchscreen-fuzz-y",
input_abs_get_fuzz(input, axis),
&fuzz);
if (data_present)
touchscreen_set_params(input, axis, maximum - 1, fuzz);
axis = multitouch ? ABS_MT_PRESSURE : ABS_PRESSURE;
data_present = touchscreen_get_prop_u32(dev,
"touchscreen-max-pressure",
input_abs_get_max(input, axis),
&maximum) |
touchscreen_get_prop_u32(dev,
"touchscreen-fuzz-pressure",
input_abs_get_fuzz(input, axis),
&fuzz);
if (data_present)
touchscreen_set_params(input, axis, maximum, fuzz);
}
EXPORT_SYMBOL(touchscreen_parse_properties);
原来解析属性函数没有touchscreen-inverted-x 这些关键字
使用命令xrandr -o left 出现下面提示
X Error of failed request :BadMatch(invalid attributes)
Major opcode of failed request :140 (RANDR)
Minor opcode of failed request :2(RRSetScreenConfig)
Serial number of failed request :14
Current serial number in output stream: 14
使用rgb接口的液晶屏 和 hdmi 接显示器都是一样的效果,求助
edt-ft5x06.c编译进去了,设备树也添加了,但是竟然没反应。同一个i2c上挂在的其他设备都有log出来
[ 3.301947] rtc-ds1307: probe of 3-0068 failed with error -5
[ 3.312606] rtc-pcf8563 3-0051: rtc core: registered rtc-pcf8563 as rtc0
即便ft5426不存在,是不是也有下面这句log出来
probing for EDT FT5x06 I2C 或者 touchscreen probe failed 之类的
但是什么都没有,这是什么原因
请问ft5426驱动和ft5406兼容吗?
这设备树有没有毛病
ft5426: ft5426@38 {
compatible = "edt,edt-ft5406","edt,edt-ft5x06";
reg = <0x38>;
pinctrl-names = "default";
//pinctrl-0 = <&pinctrl_tsc>;
interrupt-parent = <&pio>;
interrupts = < PF 5 IRQ_TYPE_EDGE_FALLING>;
interrupt-gpios = <&pio PF 5 6 0xffffffff 0xffffffff 0>;
reset-gpios = <&pio PF 6 1 0xffffffff 0xffffffff 1>;
status = "okay";
};
你这不是gpios设备树参数太多咩。报错了呗, 你用的sdk应该和他们用的不同,具体gpios的配置情况可以参考已有的例子,如果没有的话可以找下
Documentation\devicetree\bindings 下面对设备树描述的txt看例子怎么使用设备树。就拿贴子上晕哥说的那个buildroot-tiny200 这个的来说,你看你这句
gpios = <&pio 5 5 GPIO_ACTIVE_LOW>; 你这个应该就是这个sdk里面设备树写法。这个&pio中的pio你可以在suniv-f1c100s.dtsi这里找到pio的配置,其中就有compatible = "allwinner,suniv-f1c100s-pinctrl"这个。然后你在Documentation\devicetree\bindings这里面搜索"allwinner,suniv-f1c100s-pinctrl"你就可以打开allwinner,sunxi-pinctrl.txt。这里面就说明了每个参数是什么,并且有一个demo示例。不同的SDK是略有不同的。我知道的tina就不同。
多谢,搞定
tsc2007: tsc2007@48 {
compatible = "ti,tsc2007";
reg = <0x48>;
interrupt-parent = <&pio>;
interrupts = < 5 5 IRQ_TYPE_EDGE_FALLING>;
gpios = <&pio 5 5 GPIO_ACTIVE_LOW>;
ti,x-plate-ohms = <180>;
status = "okay";
};
中断用的PF5,照着 https://whycan.com/t_6318.html 配置的设备树,结果报错,求解
[ 8.826962] OF: /soc@03000000/twi@0x05002c00/tsc2007@48: arguments longer than property
[ 8.836297] tsc2007 3-0048: GPIO not specified in DT (of_get_gpio returned -22)
[ 8.838913] input: TSC2007 Touchscreen as /devices/platform/soc/twi3/i2c-3/3-0048/input/input2
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.1.105 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::34c9:e3ff:fef1:b805 prefixlen 64 scopeid 0x20<link>
ether 36:c9:e3:f1:b8:05 txqueuelen 1000 (Ethernet)
RX packets 35 bytes 4506 (4.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 33 bytes 4826 (4.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 53
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 108 bytes 8582 (8.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 108 bytes 8582 (8.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[ 9.523637] sunxi-gmac gmac1 eth0: eth0: Type(6) PHY ID 0007c0f1 at 0 IRQ poll (gmac1-0:00)
[ 9.536922] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 12.630207] sunxi-gmac gmac1 eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 12.630245] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 29.963738] sunxi-gmac gmac1 eth0: Link is Down
1. linux通过用户层接口操作PWM,
操作方法:
https://www.kernel.org/doc/Documentation/pwm.txt全志系列PWM的驱动实现:
https://github.com/torvalds/linux/blob/master/drivers/pwm/pwm-sun4i.c2. 模拟也应该可以, 但是非常占用CPU, 既不准,而且速度慢.
问题1: 主要问题在输出脉冲的个数,接口没提供
问题2: 低频几百K以下应该对cpu影响不大
root@hj-virtual-machine:/home/hj# sunxi-fel ver
AWUSBFEX soc=00001663(F1C100s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
root@hj-virtual-machine:/home/hj# sunxi-fel spiflash-info
usb_bulk_send() ERROR -1: Input/Output Error
root@hj-virtual-machine:/home/hj# sunxi-fel ver
usb_bulk_send() ERROR -1: Input/Output Error
root@hj-virtual-machine:/home/hj#
root@hj-virtual-machine:/home/hj# sunxi-fel ver
AWUSBFEX soc=00001663(F1C100s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
root@hj-virtual-machine:/home/hj# sudo sunxi-fel -p read 0x20000000 10240 read.dat
root@hj-virtual-machine:/home/hj# sunxi-fel ver
AWUSBFEX soc=00001663(F1C100s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
root@hj-virtual-machine:/home/hj#
读写都不行
root@hj-virtual-machine:/home/hj# sunxi-fel ver
AWUSBFEX soc=00001663(F1C100s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
root@hj-virtual-machine:/home/hj# sudo sunxi-fel -p spiflash-read 0x0 1024 read.dat
usb_bulk_send() ERROR -1: Input/Output Error
root@hj-virtual-machine:/home/hj# sunxi-fel ver
usb_bulk_send() ERROR -1: Input/Output Error
自己画了个板子,usb能识别,但是烧写报错是怎么回事
root@hj-virtual-machine:/home/hj# sunxi-fel ver
AWUSBFEX soc=00001663(F1C100s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
root@hj-virtual-machine:/home/hj# sudo sunxi-fel -p spiflash-write 0 u-boot/u-boot-sunxi-with-spl.bin
usb_bulk_send() ERROR -1: Input/Output Error
RTL8188CUS不一会就崩了
# [ 161.648051] ntpd invoked oom-killer: gfp_mask=0x14200ca(GFP_HIGHUSER_MOVABLE), nodemask=(null), order=0, oom_score_adj=0
[ 161.693209] CPU: 0 PID: 147 Comm: ntpd Not tainted 4.15.0-rc8-licheepi-nano+ #43
[ 161.723707] Hardware name: Allwinner suniv Family
[ 161.740579] [<c010e8e4>] (unwind_backtrace) from [<c010ba2c>] (show_stack+0x10/0x14)
[ 161.771515] [<c010ba2c>] (show_stack) from [<c0187b0c>] (dump_header.constprop.4+0x60/0x1d0)
[ 161.803480] [<c0187b0c>] (dump_header.constprop.4) from [<c01871d8>] (oom_kill_process+0x234/0x48c)
[ 161.835946] [<c01871d8>] (oom_kill_process) from [<c0187708>] (out_of_memory+0xe0/0x438)
[ 161.867979] [<c0187708>] (out_of_memory) from [<c018bce0>] (__alloc_pages_nodemask+0x804/0xb60)
[ 161.900879] [<c018bce0>] (__alloc_pages_nodemask) from [<c0184ed0>] (filemap_fault+0x2d0/0x578)
[ 161.933817] [<c0184ed0>] (filemap_fault) from [<c01a7ca0>] (__do_fault+0x18/0x80)
[ 161.965700] [<c01a7ca0>] (__do_fault) from [<c01ab7c0>] (handle_mm_fault+0x3f0/0x92c)
[ 161.998624] [<c01ab7c0>] (handle_mm_fault) from [<c010f2a0>] (do_page_fault+0x130/0x378)
[ 162.031745] [<c010f2a0>] (do_page_fault) from [<c0101328>] (do_PrefetchAbort+0x38/0x9c)
[ 162.064656] [<c0101328>] (do_PrefetchAbort) from [<c010c984>] (ret_from_exception+0x0/0x1c)
[ 162.097955] Exception stack(0xc1e73fb0 to 0xc1e73ff8)
[ 162.115819] 3fa0: 0000000e bedbb8bc 00000000 00000000
[ 162.148704] 3fc0: 00000000 00000000 00573570 0000008e 00000000 00000000 0000008e 00000002
[ 162.181191] 3fe0: bedbb850 bedbb540 b6f3c790 0050414c 00000010 ffffffff
[ 162.211740] Mem-Info:
[ 162.211778] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.254733] active_anon:130 inactive_anon:4 isolated_anon:0
[ 162.254733] active_file:1 inactive_file:1 isolated_file:0
[ 162.254733] unevictable:0 dirty:0 writeback:0 unstable:0
[ 162.254733] slab_reclaimable:163 slab_unreclaimable:923
[ 162.254733] mapped:2 shmem:10 pagetables:19 bounce:0
[ 162.254733] free:123 free_pcp:0 free_cma:0
[ 162.377340] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.405425] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.433485] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.461456] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.489403] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.517127] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.545009] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.573060] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.601513] Node 0 active_anon:520kB inactive_anon:16kB active_file:4kB inactive_file:4kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:8kB dirty:0kB writeback:0kB shmem:40kB writeback_tmp:0kB unstable:0kB all_unreclaimable? yes
[ 162.601565] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.709827] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.738856] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.768143] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
[ 162.797809] rtl_usb: Pending RX skbuff queue full! (qlen: 64)
比如以下设备树中,gt911为何要两个,地址0x5d 和 0x14是怎么确定的,为什么是0x5d和0x14?
&i2c0 {
pinctrl-0 = <&i2c0_pins>;
pinctrl-names = "default";
status = "okay";
gt9115d: touchscreen@5d {
compatible = "goodix,gt911";
reg = <0x5d>;
interrupt-parent = <&pio>;
interrupts = <4 3 IRQ_TYPE_EDGE_FALLING>; /* (PE3) */
pinctrl-names = "default";
pinctrl-0 = <&ts_reset_pin>;
irq-gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>; /* (PE3) */
reset-gpios = <&pio 4 9 GPIO_ACTIVE_HIGH>; /* RST (PE9) */
touchscreen-swapped-x-y;
};
gt91114: touchscreen@14 {
compatible = "goodix,gt911";
reg = <0x14>;
interrupt-parent = <&pio>;
interrupts = <4 3 IRQ_TYPE_EDGE_FALLING>; /* (PE3) */
pinctrl-names = "default";
pinctrl-0 = <&ts_reset_pin>;
irq-gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>; /* (PE3) */
reset-gpios = <&pio 4 9 GPIO_ACTIVE_HIGH>; /* RST (PE9) */
touchscreen-swapped-x-y;
};
};
再比如以下设备树,0x48,0x40,0x4a 是怎么来的,还有一个i2c0可以同时接三个设备吗
&i2c0 {
status = "okay";
ns2009: ns2009@48 {
compatible = "nsiway,ns2009";
reg = <0x48>;
};
sht21: sht21@40 {
compatible = "sht21";
reg = <0x40>;
};
atmel_mxt_ts@4a {
compatible = "atmel,atmel_mxt_ts";
reg = <0x4a>;
/*interrupt-parent = <&pio>;
interrupts = <6 5 IRQ_TYPE_LEVEL_LOW>;*/ //省引脚,使用轮训方式
};
};
那手动设置 ip 地址,替代前面 udhcp 动态获取, 然后再ping试一试。
先不管IP地址,扫描不到wifi热点
# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1408 (1.3 KiB) TX bytes:1408 (1.3 KiB)
usb0 Link encap:Ethernet HWaddr AE:3B:CC:4F:66:BA
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr AC:D0:74:1B:8D:F3
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
# iw dev wlan0 scan
#
用rtl8723bs就能扫描到
# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1704 (1.6 KiB) TX bytes:1704 (1.6 KiB)
usb0 Link encap:Ethernet HWaddr AE:3B:CC:4F:66:BA
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr CC:D2:9B:4B:8C:CD
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
# iw dev wlan0 scan | grep SSID
SSID: MERCURY_56C9C2
SSID: TP-LINK_B105A9
SSID: makecool
SSID: WWW
SSID: ChinaNet-iRwn
SSID: ChinaNGB-1309
SSID: chuanchuan
SSID: ChinaNGB-lj1Ety
#
坛子都翻遍了,模块加载了,wlan0也有,就是连不了网啊
第二条的效果
# wpa_supplicant -Dwext -B -d -i wlan0 -c /etc/wpa_supplicant.conf
wpa_supplicant v2.7
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' 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='wheel'
ap_scan=1
Priority group 5
id=0 ssid='makecool'
WEXT: cfg80211-based driver detected
wext: interface wlan0 phy: phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0x1f flags 0x0
WEXT: Driver: eagle_sdio
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
wlan0: Own MAC address: ac:d0:74:1b:8d:f3
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=4 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_key: alg=0 key_idx=5 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_countermeasures
wlan0: RSN: flushing PMKID list in the driver
wlan0: Setting scan request: 0.100000 sec
wlan0: WPS: UUID based on MAC address: 95c55a43-c537-5b49-bee3-37dfa4fe11de
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
ctrl_interface_group=10 (from group name 'wheel')
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Daemonize..
#
# udhcpc -i wlan0
udhcpc: started, v1.29.3
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
^C
# ^C
# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr AC:D0:74:1B:8D:F3
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#
wpa_supplicant -Dnl80211 -B -d -i wlan0 -c /etc/wpa_supplicant.conf
wpa_supplicant -Dwext -B -d -i wlan0 -c /etc/wpa_supplicant.conf再试一下这两个命令?
第一条的效果
# wpa_supplicant -Dnl80211 -B -d -i wlan0 -c /etc/wpa_supplicant.conf
wpa_supplicant v2.7
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'nl80211' 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='wheel'
ap_scan=1
Priority group 5
id=0 ssid='makecool'
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: Using driver-based off-channel TX
nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0xb6c777c0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=040b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=040c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=040d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=090a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=090b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=090c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=090d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=0409506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=7f506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=0801
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=0a07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=0a11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=1101
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=1102
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=0505
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c777c0 match=0500
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
netlink: Operstate: ifindex=3 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: ac:d0:74:1b:8d:f3
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 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: 95c55a43-c537-5b49-bee3-37dfa4fe11de
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=10 (from group name 'wheel')
P2P: Add operating class 81
P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b
P2P: Own listen channel: 81:11
P2P: Random operating channel: 81:1
P2P: initialized
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11
P2P: cli_channels:
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Daemonize..
# udhcpc -i wlan0
udhcpc: started, v1.29.3
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
^C
# ^C
#
另外一个问题,为啥一开机模块就自动加载了,还没有执行insmod 或 modprobe
[ 3.071688] gs_console_connect: port num [0] is not support console
Starting syslogd: OK
Starting klogd: OK
Starting mdev...
[ 8.563000] mmc0: card 0001 removed
Initializing random number generator... [ 8.688207] mmc0: queuing unknown CIS tuple 0x01 (3 bytes)
[ 8.718713] mmc0: queuing unknown CIS tuple 0x1a (5 bytes)
[ 8.734048] mmc0: queuing unknown CIS tuple 0x1b (8 bytes)
[ 8.749245] mmc0: queuing unknown CIS tuple 0x80 (1 bytes)
[ 8.759284] mmc0: queuing unknown CIS tuple 0x81 (1 bytes)
done.
[ 8.773712] mmc0: queuing unknown CIS tuple 0x82 (1 bytes)
[ 8.791094] mmc0: new high speed SDIO card at address 0001
Starting network: OK
Welcome to Buildroot
buildroot login:
Welcome to Buildroot
buildroot login: root
Password:
#
# lsmod
Module Size Used by Not tainted
esp8089 61440 0
#
按照坛子里找葫芦画瓢,无法联网
# wpa_supplicant -B -d -i wlan0 -c /etc/wpa_supplicant.conf
wpa_supplicant v2.7
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='wheel'
ap_scan=1
Priority group 5
id=0 ssid='makecool'
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: Using driver-based off-channel TX
nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0xb6c407c0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=040a
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=040b
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=040c
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=040d
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=090a
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=090b
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=090c
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=090d
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=0409506f9a09
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=6): 04 09 50 6f 9a 09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=7f506f9a09
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=5): 7f 50 6f 9a 09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=0801
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 08 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=06
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=0a07
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 0a 07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=0a11
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 0a 11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=1101
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 11 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=1102
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 11 02
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=0505
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 05 05
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xb6c407c0 match=0500
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 05 00
nl80211: Failed to register Action frame processing - ignore for now
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
netlink: Operstate: ifindex=3 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: ac:d0:74:1b:8d:f3
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0 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: 95c55a43-c537-5b49-bee3-37dfa4fe11de
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
Using existing control interface directory.
ctrl_interface_group=10 (from group name 'wheel')
ctrl_iface bind(PF_UNIX) failed: Address in use
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.
Failed to add interface wlan0
wlan0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=00:00:00:00:00:00 reason=3 state=DISCONNECTED
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wlan0: WPA: Clear old PMK and PTK
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
Off-channel: Clear pending Action frame TX (pending_action_tx=0
Remove interface wlan0 from radio phy0
Remove radio phy0
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x3e4c8f49 (mode change)
# udhcpc -i wlan0
udhcpc: started, v1.29.3
udhcpc: sending discover
^C
# ^C
#
现在变这样了
Starting syslogd: OK
Starting klogd: OK
Starting mdev...
[ 7.996061] esp8089: module is already loaded
[ 8.011213] esp8089: module is already loaded
modprobe: can't load module esp8089 (kernel/drivers/net/wireless/esp8089/esp8089.ko): Invalid argument
Initializing random number generator... done.
Starting network: OK
官网下载的也不行
# insmod esp8089.ko
[ 40.658175] esp8089: version magic '4.15.0-next-20180202-licheepi-nano+ mod_unload ARMv5 p2v8 ' should be '4.15.0-rc8-licheepi-nano+ mod_unload ARMv5 p2v8 '
[ 40.687681] esp8089: version magic '4.15.0-next-20180202-licheepi-nano+ mod_unload ARMv5 p2v8 ' should be '4.15.0-rc8-licheepi-nano+ mod_unload ARMv5 p2v8 '
insmod: can't insert 'esp8089.ko': invalid module format
我是下载 https://github.com/Lichee-Pi/esp8089.git 源码编译的
# insmod esp8089.ko
[ 4442.485946] esp8089: version magic '4.15.0-rc8-licheepi-nano+ mod_unload ARMv7 p2v8 ' should be '4.15.0-rc8-licheepi-nano+ mod_unload ARMv5 p2v8 '
[ 4442.505252] esp8089: version magic '4.15.0-rc8-licheepi-nano+ mod_unload ARMv7 p2v8 ' should be '4.15.0-rc8-licheepi-nano+ mod_unload ARMv5 p2v8 '
insmod: can't insert 'esp8089.ko': invalid module format
这是怎么回事,ARMv7 和 ARMv5 是哪里决定的
buildroot使用外部编译工具链,会导致panic,使用内部工具链,则可以正常启动。
Toolchain设置
1. Toolchain type (External toolchain) --->
2. Toolchain (Custom toolchain)
3. Toolchain origin (Pre-installed toolchain)
4. (/opt/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi) Toolchain
5. (arm-linux-gnueabi) Toolchain prefix
6. External toolchain gcc version (7.x) --->
7. External toolchain kernel headers series (4.10.x)
8. External toolchain C library (glibc/eglibc)
9. [//*] Toolchain has SSP support? (NEW)
10.[//*] Toolchain has RPC support? (NEW)
问题:
1. 按照上面设置编译出来,运行会导致panic,如下,什么原因
[ 1.786977] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[ 1.795787] devtmpfs: mounted
[ 1.805273] Freeing unused kernel memory: 1024K
[ 2.074266] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2.074266]
[ 2.083419] CPU: 0 PID: 1 Comm: init Not tainted 4.15.0-rc8-licheepi-nano+ #5
[ 2.090537] Hardware name: Allwinner suniv Family
[ 2.095323] [<c010e550>] (unwind_backtrace) from [<c010b6a8>] (show_stack+0x10/0x14)
[ 2.103079] [<c010b6a8>] (show_stack) from [<c0116878>] (panic+0xb8/0x230)
[ 2.109958] [<c0116878>] (panic) from [<c0118034>] (do_exit+0x96c/0x9a4)
[ 2.116659] [<c0118034>] (do_exit) from [<c0118bb8>] (do_group_exit+0x3c/0xb4)
[ 2.123877] [<c0118bb8>] (do_group_exit) from [<c0121758>] (get_signal+0x144/0x558)
[ 2.131537] [<c0121758>] (get_signal) from [<c010a934>] (do_signal+0xc4/0x404)
[ 2.138766] [<c010a934>] (do_signal) from [<c010ae3c>] (do_work_pending+0xb8/0xcc)
[ 2.146335] [<c010ae3c>] (do_work_pending) from [<c0107d48>] (slow_work_pending+0xc/0x20)
[ 2.154500] Rebooting in 5 seconds..
[ 8.133732] Reboot failed -- System halted
2. 使用外部工具链时,设置8. External toolchain C library (glibc/eglibc)必须选择glibc/eglibc ,不然编译会报错c lib选择错误,这是为何
3. 使用外部工具链时,设置7. External toolchain kernel headers series (4.10.x) 必须选择4.10.x , 我选4.15.x会报错显示预期是4.15,实际是4.10,
这个4.10.x是由哪里决定的?
4. 如果使用内部工具链,则设置8中的C library 随便选哪个都可以编译通过,而且系统可以正常运行,原因何在
2.编辑 awtk_config.py 设置工具链的路径
TSLIB_LIB_DIR='/opt/28x/tslib/lib'
TSLIB_INC_DIR='/opt/28x/tslib/include'
TOOLS_PREFIX='/opt/28x/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-linux-'
按照步骤2改成
#for prebuild tslib
TSLIB_LIB_DIR='/opt/28x/tslib/lib'
TSLIB_INC_DIR='/opt/28x/tslib/include'
TOOLS_PREFIX='/opt/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-'
#TOOLS_PREFIX='/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-'
#for pc build
TOOLS_PREFIX=''
TSLIB_LIB_DIR=''
OS_FLAGS='-g -Wall '
发现TOOLS_PREFIX有两次赋值
.hsync_start = 800 + 88,
.hsync_end = 800 + 88 + 80,
.htotal = 800 + 88 + 80 + 88,
.vsync_start = 480 + 10,
.vsync_end = 480 + 10 + 25,
.vtotal = 480 + 10 + 25 + 10,
1. 这些后面加的是什么意思
2..bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,这个参数是什么意思,硬件上一般接法不应该是RGB666吗,这个RGB888为啥还能正常显示?如果硬件设计时使用的RGB565,可以省出两个IO口,这个时候应该怎么修改
panel-simple.c里面
static const struct drm_display_mode lg_lb070wv8_mode = {
.clock = 33246,
.hdisplay = 800,
.hsync_start = 800 + 88,
.hsync_end = 800 + 88 + 80,
.htotal = 800 + 88 + 80 + 88,
.vdisplay = 480,
.vsync_start = 480 + 10,
.vsync_end = 480 + 10 + 25,
.vtotal = 480 + 10 + 25 + 10,
.vrefresh = 60,
};
static const struct panel_desc lg_lb070wv8 = {
.modes = &lg_lb070wv8_mode,
.num_modes = 1,
.bpc = 16,
.size = {
.width = 151,
.height = 91,
},
.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
};
应该改哪个
找 dts 文件, 关于 panel 那段代码
panel: panel {
compatible = "lg,lb070wv8", "simple-panel";
#address-cells = <1>;
#size-cells = <0>;
enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
panel_input: endpoint@0 {
reg = <0>;
remote-endpoint = <&tcon0_out_lcd>;
};
};
};
panel里面哪有分辨率一说
1. https://github.com/torvalds/linux.git
2. https://github.com/Icenowy/linux.git
3. https://github.com/Lichee-Pi/linux.git
看到坛子里用torvalds Icenowy Lichee-Pi分支,总是各有各的问题,为什么我们不自己维护一个分支,把填的坑及时提交上去,这样坑越来越少,免得每个人都跟着挖一遍坑
烧 https://whycan.cn/t_2689.html 这个固件,可以成功启动,然后只替换我自己的kernel ,无法启动了
烧 https://whycan.cn/t_2689.html 这个固件,可以成功启动
U-Boot SPL 2018.01-05684-gb7dcb96-dirty (Jul 21 2019 - 21:23:17)
DRAM: 32 MiB
SPL: Unsupported Boot Device!
Trying to boot from sunxi SPI
U-Boot 2018.01-05684-gb7dcb96-dirty (Jul 21 2019 - 21:23:17 -0400) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Whycan Pi Nano
DRAM: 32 MiB
Using default environment
Setting up a 800x480 lcd console (overscan 0x0)
In: serial@1c25000
Out: serial@1c25000
Err: serial@1c25000
Hit any key to stop autoboot: 0
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
device 0 offset 0x60000, size 0x10000
SF: 65536 bytes @ 0x60000 Read: OK
Error: Bad gzipped data
There is no valid bmp file at the given address
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 80ea4000, end 80ea8f2a ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.15.0-licheepi-nano+ (root@ubuntu) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)) #41 Sun Jul 21 21:25:38 EDT 2019
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Nano
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] random: fast init done
烧录是按照设备树里分区来烧录的
sudo sunxi-fel -p spiflash-write 0x64000 arch/arm/boot/zImage
partitions
{
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0
{
label = "u-boot";
reg = <0x000000 0x58000>;
read-only;
};
partition@60000
{
label = "dtb";
reg = <0x60000 0x4000>;
read-only;
};
partition@64000
{
label = "kernel";
reg = <0x64000 0x400000>;
read-only;
};
partition@464000
{
label = "rootfs";
reg = <0x464000 0x390000>;
};
};
有成功进入过kernel,后来烧录几次不知道怎么就不行了。这个跟文件系统有没有关系
1 Uboot配置 boot arguments中加入earlyprintk
console=ttyS0, console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2 earlyprintk
2 Kernel配置
[//*] Kernel debugging
[//*] Kernel low-level debugging functions (read help!)
Kernel low-level debugging port (Kernel low-level debugging via 8250 UART) --->
(0x01c28000) Physical base address of debug UART
(0xf1c28000) Virtual base address of debug UART
[//*] Early printk
重新编译uboot kenel烧写,开始在starting kernel,不自动重启了
U-Boot SPL 2018.01 (Oct 26 2019 - 10:51:41)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
U-Boot 2018.01 (Oct 26 2019 - 10:51:41 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
device 0 offset 0x60000, size 0x4000
SF: 16384 bytes @ 0x60000 Read: OK
device 0 offset 0x64000, size 0x400000
SF: 4194304 bytes @ 0x64000 Read: OK
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 816fb000, end 816fff26 ... OK
Starting kernel ...
没有earlyprintk的log出来,是不是哪里要改代码
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
device 0 offset 0x60000, size 0x4000
SF: 16384 bytes @ 0x60000 Read: OK
device 0 offset 0x64000, size 0x400000
SF: 4194304 bytes @ 0x64000 Read: OK
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 816fb000, end 816fff26 ... OK
Starting kernel ...
U-Boot SPL 2018.01 (Oct 25 2019 - 19:18:22)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
走到starting kernel一直不断重启,什么情况
./../misc/create_inode.c: At top level:
./../misc/create_inode.c:399:18: error: conflicting types for ‘copy_file_range’
static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
^~~~~~~~~~~~~~~
In file included from ./../misc/create_inode.c:19:0:
/usr/include/unistd.h:1110:9: note: previous declaration of ‘copy_file_range’ was here
ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
^~~~~~~~~~~~~~~
Makefile:422: recipe for target 'create_inode.o' failed
make[3]: *** [create_inode.o] Error 1
make[3]: *** 正在等待未完成的任务....
make[3]: 离开目录“/home/hj/buildroot-2017.08/output/build/host-e2fsprogs-1.43.4/debugfs”
Makefile:404: recipe for target 'all-progs-recursive' failed
make[2]: *** [all-progs-recursive] Error 1
make[2]: 离开目录“/home/hj/buildroot-2017.08/output/build/host-e2fsprogs-1.43.4”
Makefile:339: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: 离开目录“/home/hj/buildroot-2017.08/output/build/host-e2fsprogs-1.43.4”
package/pkg-generic.mk:227: recipe for target '/home/hj/buildroot-2017.08/output/build/host-e2fsprogs-1.43.4/.stamp_built' failed
make: *** [/home/hj/buildroot-2017.08/output/build/host-e2fsprogs-1.43.4/.stamp_built] Error 2
这是什么问题
如果你用的内核不是4.19版本,要在配置里面选一下对应的版本,不然有奇奇怪怪的问题
1. git clone https://github.com/Icenowy/linux.git --depth=1 -b f1c100s-480272lcd-test 是什么版本
2. 我用buildroot-2017.08编译出来生成的rootfs.tar文件有90M左右,rootfs.jffs2有50M多,这是什么原因?这个版本的buildroot编译有时通过,有时报错,奇奇怪怪的,clean后再编译也不行
3.buildroot-2019.02.6编译出来rootfs.tar大小2.5M,rootfs.jffs2大小1.1M,哪些地方决定了编译出来的大小差异这么大
4.编译生成rootfs.tar文件后,怎么变成镜像文件,坛子里的看不懂,小白没有linux基础,能说得更简单一些就好了