您尚未登录。

#1 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » ubuntu 18.04 重设 mysql 服务器密码 » 2020-08-28 22:35:44

感谢楼主分享, 一楼那个重置 root 密码的命令行可以用.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
mysql>
mysql> select authentication_string from user;
+-------------------------------------------+
| authentication_string                     |
+-------------------------------------------+
|                                           |
| *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| *384DF59F36979048940D28EE1FB7B068A79D5FDD |
+-------------------------------------------+
4 rows in set (0.00 sec)

mysql>
mysql>
mysql> select User,authentication_string from user;
+------------------+-------------------------------------------+
| User             | authentication_string                     |
+------------------+-------------------------------------------+
| root             |                                           |
| mysql.session    | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| mysql.sys        | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| debian-sys-maint | *384DF59F36979048940D28EE1FB7B068A79D5FDD |
+------------------+-------------------------------------------+
4 rows in set (0.00 sec)

mysql> UPDATE mysql.user SET authentication_string = PASSWORD('whycan') WHERE user = 'root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1

mysql> select authentication_string from user;
+-------------------------------------------+
| authentication_string                     |
+-------------------------------------------+
| *FAFBF4B590C56408440484A17E27C30A2635F64A |
| *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| *384DF59F36979048940D28EE1FB7B068A79D5FDD |
+-------------------------------------------+
4 rows in set (0.00 sec)
$ sudo mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.31-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> UPDATE mysql.user SET authentication_string = PASSWORD('whycan') WHERE user = 'root';
Query OK, 0 rows affected, 1 warning (0.01 sec)
Rows matched: 1  Changed: 0  Warnings: 1

mysql> UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> exit
Bye

Ubuntu18.04安装mysql默认是没有密码设置的菜单, 装好之后mysql是空密码.

跑完上面的命令之后, 执行 service apache2 restart 就可以使用新密码了.

#4 Re: 全志 SOC » <starting USB No controllers found>介决办法 » 2020-08-26 22:03:43

tang6397 说:

1. f1c100s linux bsp 到licheepi nano logo 信息显示 <starting USB No controllers found>介决办法
2. git clone https://github.com/Icenowy/u-boot.git -b f1c100s-spiflash  加快下载速度办法

ARCH=arm make menuconfig

把USB选项都关了就行.

#5 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2020-08-26 21:55:45

这个垃圾戴尔电脑USB口对全志的USB OTG兼容性太差了, 动不动USB Gadget要重启电脑才有反应.

办公室几百块钱的主板都比这个戴尔好.


关机到最后蓝屏是日常操作.

#6 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2020-08-25 20:47:46

QQ截图20200825204057.png

QQ截图20200825204657.png


在朋友推荐下, 买了两根16G的DDR4 1.2V内存条,可以组成双通.

又忘记怎么拆机了, 赶紧打开视频看下: https://www.bilibili.com/video/BV1Xs411A7jz

跑3个vmware + ubuntu 18.04妥妥的, 浏览器窗口秒开.

#7 Re: 全志 SOC » v3s启动卡住,请大神指点 » 2020-06-18 18:23:52

zImage或者dtb 有问题或者不完整, 用这个逐个替换: https://whycan.cn/t_3400.html#p47841

#10 Re: 全志 SOC » F1c100s逆向了一下melis的TVD.DRV » 2020-03-31 16:07:45

在楼主和IDA面前,全志的底裤已经慢慢开始透明。

#11 Re: 全志 SOC » v3s vsftpd 配置 » 2020-03-31 14:30:15

啊,帮你顶一下,我的dropbear只能密码登录,密钥登录也没搞定。

#12 Re: 全志 SOC » A33核心板原理图和PCB » 2020-03-31 10:26:50

感谢楼主分享, 下载速度飞快。

#13 Re: 全志 SOC » EA3036芯片老烧大家帮我分析下。。 » 2020-03-31 10:26:20

杨飞武 说:

是这个问题。跳了一个大坑。

恭喜楼主成功解决问题。

#15 Re: 全志 SOC » v3s alsa 问题。 » 2020-03-30 17:45:20

可能驱动关的,手动调用就好了,我记得论坛有个帖子

#20 Re: Qt/MSVC/MINGW/C++/MFC/GTK+/Delphi/BCB » 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" » 2020-03-25 11:21:41

杨飞武 说:


已解决:
环境变量设置下就可以了。
QT_QPA_PLATFORM=linuxfb

写到哪个文件呢?

#22 Re: ESP32/ESP8266 » esp32 录音失败 » 2020-03-24 22:18:06

晕哥 说:

用 cooledit或者 audacity 软件打开录音软件,调整 单声道/双声道,不同的采样频率, 8/16bit都试一下。

看到这两个软件想起了以前玩 sox 处理话筒语音的旧事了。

#27 Re: 全志 SOC » F1C100S使用RTT RTATO工具device not found » 2020-03-16 16:16:31

我记得网站还有几个 f1c100s RTT的例程,你搜一下。

#28 Re: NB-IoT/2G模块/4G模块/GPRS模块/GPS/北斗 » 请教一下,GPS不用RTK,PPK,PPP定位精度能达到0.1M的样子吗? » 2020-03-16 15:17:09

如果真有,我认为有可能用了其他参照的技术实现,这些技术(或设备)只能在某些国家和地区使用,应该不是全球范围内的。

因为这种高精度级别的即使有,也不能开放民用,因为太危险,原因你懂得。

#30 Re: DSP » 公司急需DSP数字电源大牛 » 2020-03-05 14:54:43

羡慕月薪比房价高的城市

#32 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 从淘宝网购买时要小心 » 2020-02-28 16:50:32

同志们你们给外国人暴露这么多鸡密信息,以后战忽局的工作还怎么做,有没有考虑过后果?

#34 Re: 全志 SOC » 编译 V3s 2019 版本的 u-boot » 2020-02-27 12:14:20

enjoy 说:

谢谢,安装了;但还有错误
ARCH=arm make menuconfig
  LEX     scripts/kconfig/zconf.lex.c
/bin/sh: 1: flex: not found
make[1]: *** [scripts/Makefile.lib:218:scripts/kconfig/zconf.lex.c] 错误 127
make: *** [Makefile:539:menuconfig] 错误 2

大佬你要补基础知识了:

sudo apt-get install flex -y

#35 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 从删库(rm -rf /)到跑路系列 之一 » 2020-02-27 10:43:42

awfans 说:

https://www.zhihu.com/question/374518368


来自微盟官网的消息,微盟的业务系统数据库(包括主备)遭遇其公司运维人员的删除。目前微盟技术团队正在努力恢复数据,但数据恢复较慢。目前对新用户服务已经恢复正常,但老用户数据官方预计要到2月28日才有结果。

微盟这次事故有点大,
腾讯云差点因此背锅,
还好在腾讯云的帮助下恢复了比较早的备份数据,
据说微店用户一片哀嚎。

真是没想到一个上市公司,管理如此混乱,

我相信微盟不是最后一个。

#36 Re: 全志 SOC » sun8iw8p1(V3 V3s S3 S3L) 的 NMI中断驱动patch 和 dtsi修改 » 2020-02-27 10:41:08

aodzip 说:

这个就是产生个中断提示MPU该去读一下AXP209的寄存器了,具体是电源按钮被按下了啊,还是AC电源插入了啊,还是GPIO变化了啊,不是NMI负责的,NMI只负责提示MPU你该去看看AXP209发生了啥

原来如此,谢谢楼主热心解惑

#38 Re: 全志 SOC » sun8iw8p1(V3 V3s S3 S3L) 的 NMI中断驱动patch 和 dtsi修改 » 2020-02-27 10:12:31

aodzip 说:

就是让片子的NMI引脚可以正确产生中断信号的驱动。
这个引脚一般用来和AXP这种电源管理芯片通信用

具体通讯什么呢?休眠/唤醒吗?

#39 Re: 全志 SOC » f1c100s hardware cursor怎么弄?有参考资料? » 2020-02-27 10:11:17

全志官方 linux bsp 用了多层 framebuffer,
应用接口就是  /dev/fb0, /dev/fb1 这种形式,
是不是可以用来做 hardware cursor ?

#40 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 从删库(rm -rf /)到跑路系列 之一 » 2020-02-26 22:25:11

https://www.zhihu.com/question/374518368


来自微盟官网的消息,微盟的业务系统数据库(包括主备)遭遇其公司运维人员的删除。目前微盟技术团队正在努力恢复数据,但数据恢复较慢。目前对新用户服务已经恢复正常,但老用户数据官方预计要到2月28日才有结果。

#41 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 水一帖,突然发现我的左右手食指指纹都可以打开手机, 只要注册一个食指指纹就行。但是大拇指就不能注一送一. » 2020-02-22 21:32:48

演技担当黄晓明 说:

国产手机指纹匹配只要30%就认为合格,这个也是为什么出现橘子皮破解手机指纹密码的原因.你换苹果手机试试?

居然这么坑

#44 Re: 全志 SOC » lvgl移植到裸跑的f1c100s上 » 2020-02-04 18:36:57

lchjng 说:

你好,晕哥,请问楼主的那个参考程序,如何在win7的环境下用什么工具编译啊

https://whycan.cn/t_3649.html#p33367

编译软件下载: https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update
Linux 编译软件下载: gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2


编译软件可以用上面的gcc, windows/linux 版本都有,

make 在 linux自带, windows 的 msys 软件包也带 make.

#46 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-19 09:05:40

https://www.raspberrypi.org/forums/viewtopic.php?t=120785
http://blog.davidou.org/archives/1018

现在我想把屏幕旋转 90/270度, 死活没搞定, 参考上面两个链接, 修改  /boot/config.txt

display_rotate=1

lcd_rotate=1

这两种设置都不行。

#47 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-19 09:03:28

2019-11-19_085543.png

2019-11-19_085624.png

@Jmhh247 记得按17楼修改 /etc/fstab 文件, 然后看Linux启动日志,有没有启用swap分区。

#48 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-18 22:23:17

QQ图片20191118221429.jpg

花了10分钟, 在荔枝派zero V3s 上面把 debian firefox 启动了

cpu占用率 100%

#49 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-18 22:21:14

Debian GNU/Linux 8 awfans ttyS0

awfans login: [   15.660271] random: crng init done
[   25.520351] pcmanfm invoked oom-killer: gfp_mask=0x14200ca(GFP_HIGHUSER_MOVABLE), nodemask=0, order=0, oom_score_adj=0
[   25.531304] CPU: 0 PID: 311 Comm: pcmanfm Not tainted 4.10.2-licheepi-zero+ #15
[   25.538608] Hardware name: Allwinner sun8i Family
[   25.543348] [<c010e2fc>] (unwind_backtrace) from [<c010b098>] (show_stack+0x10/0x14)
[   25.551092] [<c010b098>] (show_stack) from [<c035abe4>] (dump_stack+0x84/0x98)
[   25.558318] [<c035abe4>] (dump_stack) from [<c01ee010>] (dump_header.constprop.4+0x6c/0x190)
[   25.566755] [<c01ee010>] (dump_header.constprop.4) from [<c01aca20>] (oom_kill_process+0x310/0x4fc)
[   25.575793] [<c01aca20>] (oom_kill_process) from [<c01acef4>] (out_of_memory+0xec/0x430)
[   25.583877] [<c01acef4>] (out_of_memory) from [<c01b13ac>] (__alloc_pages_nodemask+0xa64/0xa84)
[   25.592568] [<c01b13ac>] (__alloc_pages_nodemask) from [<c01d15b4>] (handle_mm_fault+0x718/0x9b0)
[   25.601437] [<c01d15b4>] (handle_mm_fault) from [<c0113cb4>] (do_page_fault+0x2b4/0x380)
[   25.609522] [<c0113cb4>] (do_page_fault) from [<c01012d8>] (do_DataAbort+0x3c/0xbc)
[   25.617171] [<c01012d8>] (do_DataAbort) from [<c010bedc>] (__dabt_usr+0x3c/0x40)
[   25.624556] Exception stack(0xc319dfb0 to 0xc319dff8)
[   25.629603] dfa0:                                     00000044 000000ff 00000044 b5ebe078
[   25.637772] dfc0: 0000007f b5396003 000000ff 0000033c b5b80000 b5b7e804 00001e00 000017fc
[   25.645938] dfe0: b6a29569 beeda4f0 b5ebc747 b5ebc748 80070030 ffffffff
[   25.652650] Mem-Info:
[   25.654946] active_anon:9777 inactive_anon:1043 isolated_anon:0
[   25.654946]  active_file:49 inactive_file:54 isolated_file:0
[   25.654946]  unevictable:0 dirty:0 writeback:0 unstable:0
[   25.654946]  slab_reclaimable:590 slab_unreclaimable:1281
[   25.654946]  mapped:139 shmem:1666 pagetables:221 bounce:0
[   25.654946]  free:229 free_pcp:4 free_cma:0
[   25.686918] Node 0 active_anon:39108kB inactive_anon:4172kB active_file:196kB inactive_file:216kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:556kB dirty:0kB writeback:0kB shmem:6664kB writeback_tmp:0kB unstable:0kB pages_scanned:1736 all_unreclaimable? yes
[   25.711157] Normal free:916kB min:924kB low:1152kB high:1380kB active_anon:39108kB inactive_anon:4172kB active_file:196kB inactive_file:216kB unevictable:0kB writepending:0kB present:64036kB managed:54652kB mlocked:0kB slab_reclaimable:2360kB slab_unreclaimable:5124kB kernel_stack:632kB pagetables:884kB bounce:0kB free_pcp:16kB local_pcp:16kB free_cma:0kB
[   25.742568] lowmem_reserve[]: 0 0 0
[   25.746075] Normal: 83*4kB (UE) 73*8kB (UE) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 916kB
[   25.757229] 1773 total pagecache pages
[   25.760978] 0 pages in swap cache
[   25.764288] Swap cache stats: add 0, delete 0, find 0/0
[   25.769521] Free swap  = 0kB
[   25.772396] Total swap = 0kB
[   25.775287] 16009 pages RAM
[   25.778076] 0 pages HighMem/MovableOnly
[   25.781904] 2346 pages reserved
[   25.785053] [ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oom_score_adj name
[   25.793586] [   80]     0    80     1845      175       6       0        0             0 systemd-journal
[   25.803078] [   91]     0    91     2446      108       5       0        0         -1000 systemd-udevd
[   25.812390] [  217]     0   217     1635      115       8       0        0         -1000 sshd
[   25.820923] [  218]     0   218    12499      313      15       0        0             0 NetworkManager
[   25.830319] [  220]     0   220     9653      338      12       0        0             0 ModemManager
[   25.839543] [  221]     0   221      714       47       5       0        0             0 cron
[   25.848074] [  225]     0   225      774       66       4       0        0             0 systemd-logind
[   25.857471] [  227]   105   227     1177      111       6       0        0          -900 dbus-daemon
[   25.866609] [  237]     0   237     8394      139      10       0        0             0 polkitd
[   25.875399] [  239]     0   239      496       30       5       0        0             0 agetty
[   25.884087] [  244]     0   244      451       29       4       0        0             0 agetty
[   25.892793] [  249]     0   249    10405      133      12       0        0             0 lightdm
[   25.901583] [  255]     0   255     8148     1385      16       0        0             0 Xorg
[   25.910112] [  268]     0   268     6676      150      11       0        0             0 lightdm
[   25.918901] [  276]     0   276     1031      173       5       0        0             0 systemd
[   25.927690] [  279]     0   279     1570      346       5       0        0             0 (sd-pam)
[   25.936566] [  282]     0   282     6219      230      12       0        0             0 lxsession
[   25.945529] [  297]     0   297      728       49       4       0        0             0 ssh-agent
[   25.954478] [  306]     0   306     4222      377      12       0        0             0 openbox
[   25.963269] [  308]     0   308     6370      219      12       0        0             0 lxpolkit
[   25.972147] [  310]     0   310     9938      513      17       0        0             0 lxpanel
[   25.980935] [  311]     0   311     9087     4005      21       0        0             0 pcmanfm
[   25.989724] [  318]     0   318      728       49       5       0        0             0 ssh-agent
[   25.998688] [  322]     0   322     3527       65       6       0        0             0 menu-cached
[   26.007841] Out of memory: Kill process 311 (pcmanfm) score 285 or sacrifice child
[   26.015442] Killed process 311 (pcmanfm) total-vm:36348kB, anon-rss:16004kB, file-rss:16kB, shmem-rss:0kB
[   26.609096] oom_reaper: reaped process 311 (pcmanfm), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB

Debian GNU/Linux 8 awfans  ttyS0

发现一启动就出现爆内存错误.

然后我把TF卡插回电脑ubuntu, 用gparted添加一个128M swap分区,

修改 /etc/fstab

/dev/mmcblk0p1 /boot vfat noatime 0 1
/dev/mmcblk0p2 / ext4 noatime 0 1
/dev/mmcblk0p3 swap swap defaults 0 0
proc /proc proc defaults 0 0

重新插入V3s启动:

[    3.546466] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    4.568043] Adding 131068k swap on /dev/mmcblk0p3.  Priority:-1 extents:1 across:131068k SS
[    4.637629] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

现在没有内存错误了.

#51 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-18 21:15:43

https://www.maketecheasier.com/enable-autologin-lightdm/

修改这个文件: /etc/lightdm/lightdm.conf

autologin-guest=false
autologin-user=root
autologin-user-timeout=0

就可以自动启动到桌面了

#54 Re: 全志 SOC » lcd的i2c初始化 » 2019-11-18 13:39:53

u-boot 里面操作 SPI/I2C 建议用 IO 口模拟, 一般在 board.c 里面直接写拉低/拉高 io 模拟即可。

#55 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-18 13:38:56

公司和家里都没找到USB键盘, 所以没有来得及测试登陆呢。

#58 Re: 全志 SOC » 无法安装模块 » 2019-11-17 18:23:30

我以前按照网站那个帖子, 主线Linux的ESP8089驱动能折腾跑起来, 也一会挂了,后来就没玩了.

#60 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-17 17:02:54

#cat /etc/fstab:

/dev/mmcblk0p1 /boot vfat noatime 0 1
/dev/mmcblk0p2 / ext4 noatime 0 1
#/dev/mmcblk0p3 swap swap defaults 0 0
proc /proc proc defaults 0 0

root@licheepi:~# grep swap -r /etc/

/etc/init/networking.conf:    check_network_swap() {
/etc/init/networking.conf:        [ -e /proc/swaps ] || return 0
/etc/init/networking.conf:                log_warning_msg "not deconfiguring network interfaces: network swap still mounted."
/etc/init/networking.conf:        done < /proc/swaps
/etc/init/networking.conf:    check_network_swap
/etc/init.d/checkfs.sh:. /lib/init/swap-functions.sh
/etc/init.d/checkfs.sh:         # Execute swapon command again, in case there are lvm
/etc/init.d/checkfs.sh:         # or md swap partitions.  fsck can suck RAM.
/etc/init.d/checkfs.sh:         swaponagain 'lvm and md'
/etc/init.d/mountall.sh:. /lib/init/swap-functions.sh
/etc/init.d/mountall.sh:        # Execute swapon command again, in case we want to swap to
/etc/init.d/mountall.sh:        swaponagain 'swapfile'
/etc/init.d/mountall.sh:        # Remount tmpfs filesystems; with increased VM after swapon,
/etc/init.d/mountall.sh:        # mount a tmpfs on /tmp.  We can now also determine swap size
/etc/init.d/checkroot.sh:       # Activate the swap device(s) in /etc/fstab. This needs to be done
/etc/init.d/checkroot.sh:                       [ "$VERBOSE" = no ] || log_warning_msg "Not activating swap as requested via bootoption noswap."
/etc/init.d/checkroot.sh:                       if [ "$swap_on_lv" = yes ]
/etc/init.d/checkroot.sh:                               [ "$VERBOSE" = no ] || log_warning_msg "Not activating swap on logical volume."
/etc/init.d/checkroot.sh:                       elif [ "$swap_on_file" = yes ]
/etc/init.d/checkroot.sh:                               [ "$VERBOSE" = no ] || log_warning_msg "Not activating swap on swapfile."
/etc/init.d/checkroot.sh:                       log_action_begin_msg "Activating swap"
/etc/init.d/checkroot.sh:                       swapon -a -e >/dev/null 2>&1
/etc/init.d/checkroot.sh:                       log_daemon_msg "Activating swap"
/etc/init.d/checkroot.sh:                       swapon -a -v
/etc/init.d/checkroot.sh:       # If / is read-write or swap is enabled, this script have done
/etc/init.d/checkroot.sh:       swapon=false
/etc/init.d/checkroot.sh:       if [ -f /proc/swaps ] ; then
/etc/init.d/checkroot.sh:           if [ "$(cat /proc/swaps |grep -v ^Filename)" ] ; then
/etc/init.d/checkroot.sh:               swapon=true
/etc/init.d/checkroot.sh:       if [ true = "$rootrw" ] || [ true = "$swapon" ] ; then
/etc/init.d/umountfs:# Short-Description: Turn off swap and unmount all local file systems.
/etc/init.d/umountfs:   # swap, to avoid running out of memory if the tmpfs filesystems
/etc/init.d/umountfs:   # Deactivate swap
/etc/init.d/umountfs:           log_action_begin_msg "Deactivating swap"
/etc/init.d/umountfs:           swapoff -a >/dev/null
/etc/init.d/umountfs:           log_daemon_msg "Will now deactivate swap"
/etc/init.d/umountfs:           swapoff -a -v
/etc/init.d/networking:check_network_swap() {
/etc/init.d/networking:    [ -e /proc/swaps ] || return 0
/etc/init.d/networking:     log_warning_msg "not deconfiguring network interfaces: network swap still mounted."
/etc/init.d/networking:    done < /proc/swaps
/etc/init.d/networking: check_network_swap
/etc/fstab:#/dev/mmcblk0p3 swap swap defaults 0 0

/proc/swaps 这文件啥也没有:
root@licheepi:~# cat /proc/swaps

Filename        

从上面看起来好像并没有启用 swap 文件.

#61 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-17 16:42:39

Jmhh247 说:

桌面能进去吗,我试了下进不去。(终端可以进)

看使用说明里有这句--“如果你需要测试桌面,请一定要挂载swap分区!!!!”

小白不知道怎么挂载swap分区,流下了没有技术的眼泪。。。

lichee_zero-Debian-LXDE_800_alpha 烧这个固件默认就有桌面了, 不用手动 swap, 如何做到的,我还在研究中.

#62 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-17 16:18:28

修改改这个文件 /etc/hostname 就可以把左上角的 LicheePi 改成你想要的名字了.

#63 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-16 22:55:31

root@LicheePi:~# ps -Af
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 08:05 ?        00:00:03 /sbin/init earlyprintk
root         2     0  0 08:05 ?        00:00:00 [kthreadd]
root         4     2  0 08:05 ?        00:00:00 [kworker/0:0H]
root         5     2  0 08:05 ?        00:00:00 [kworker/u2:0]
root         6     2  0 08:05 ?        00:00:00 [ksoftirqd/0]
root         7     2  0 08:05 ?        00:00:00 [rcu_sched]
root         8     2  0 08:05 ?        00:00:00 [rcu_bh]
root         9     2  0 08:05 ?        00:00:00 [migration/0]
root        10     2  0 08:05 ?        00:00:00 [lru-add-drain]
root        11     2  0 08:05 ?        00:00:00 [cpuhp/0]
root        12     2  0 08:05 ?        00:00:00 [kdevtmpfs]
root        13     2  0 08:05 ?        00:00:00 [netns]
root        14     2  0 08:05 ?        00:00:00 [oom_reaper]
root        15     2  0 08:05 ?        00:00:00 [writeback]
root        16     2  0 08:05 ?        00:00:00 [kcompactd0]
root        17     2  0 08:05 ?        00:00:00 [crypto]
root        18     2  0 08:05 ?        00:00:00 [bioset]
root        19     2  0 08:05 ?        00:00:00 [kblockd]
root        20     2  0 08:05 ?        00:00:00 [cfg80211]
root        22     2  0 08:05 ?        00:00:00 [watchdogd]
root        23     2  0 08:05 ?        00:00:00 [rpciod]
root        24     2  0 08:05 ?        00:00:00 [xprtiod]
root        25     2  0 08:05 ?        00:00:02 [kswapd0]
root        26     2  0 08:05 ?        00:00:00 [vmstat]
root        27     2  0 08:05 ?        00:00:00 [bioset]
root        28     2  0 08:05 ?        00:00:00 [nfsiod]
root        53     2  0 08:05 ?        00:00:00 [irq/23-sunxi-mm]
root        56     2  0 08:05 ?        00:00:00 [bioset]
root        57     2  0 08:05 ?        00:00:02 [mmcqd/0]
root        58     2  0 08:05 ?        00:00:00 [kworker/0:1H]
root        59     2  0 08:05 ?        00:00:00 [jbd2/mmcblk0p2-]
root        60     2  0 08:05 ?        00:00:00 [ext4-rsv-conver]
root        75     2  0 08:05 ?        00:00:00 [kworker/u2:1]
root        79     1  0 08:05 ?        00:00:00 /lib/systemd/systemd-journald
root        91     1  0 08:05 ?        00:00:00 /lib/systemd/systemd-udevd
root       217     1  0 08:06 ?        00:00:00 /usr/sbin/sshd -D
root       218     1  0 08:06 ?        00:00:00 /usr/sbin/NetworkManager --no-da
root       220     1  0 08:06 ?        00:00:00 /usr/sbin/ModemManager
root       223     1  0 08:06 ?        00:00:00 /usr/sbin/cron -f
root       225     1  0 08:06 ?        00:00:00 /lib/systemd/systemd-logind
message+   227     1  0 08:06 ?        00:00:00 /usr/bin/dbus-daemon --system --
root       237     1  0 08:06 ?        00:00:00 /usr/lib/policykit-1/polkitd --n
root       240     1  0 08:06 tty1     00:00:00 /sbin/agetty --noclear tty1 linu
root       244     1  0 08:06 ttyS0    00:00:00 /bin/login --
root       248     1  0 08:06 ?        00:00:00 /usr/sbin/lightdm
root       254   248  1 08:06 tty7     00:00:22 /usr/bin/X :0 -seat seat0 -auth
root       268   248  0 08:06 ?        00:00:00 lightdm --session-child 17 20
lightdm    272     1  0 08:06 ?        00:00:00 /lib/systemd/systemd --user
lightdm    275   272  0 08:06 ?        00:00:00 (sd-pam)
lightdm    278   268  1 08:06 ?        00:00:18 /usr/sbin/lightdm-gtk-greeter
root       285     1  0 08:06 ?        00:00:00 /lib/systemd/systemd --user
root       288   285  0 08:06 ?        00:00:00 (sd-pam)
root       293   244  0 08:06 ttyS0    00:00:00 -bash
root       298   248  0 08:06 ?        00:00:00 lightdm --session-child 13 20
root       303     2  0 08:16 ?        00:00:02 [kworker/0:2]
root       315     2  0 08:21 ?        00:00:00 [kworker/0:0]
root       316     2  0 08:26 ?        00:00:00 [kworker/0:1]
root       317   293  4 08:28 ttyS0    00:00:00 ps -Af

这个不知道怎么可以做到如此精简

root@LicheePi:~# df
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/root        1047676 906040     70368  93% /
devtmpfs           26812      0     26812   0% /dev
tmpfs              27324      0     27324   0% /dev/shm
tmpfs              27324   6668     20656  25% /run
tmpfs               5120      0      5120   0% /run/lock
tmpfs              27324      0     27324   0% /sys/fs/cgroup
/dev/mmcblk0p1     16334   4300     12034  27% /boot
tmpfs               5468      0      5468   0% /run/user/106
tmpfs               5468      0      5468   0% /run/user/0

#64 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-16 22:39:34

QQ图片20191116223733.jpg

感谢二楼的 @lalala 朋友, 终于跑起来了, 默认账号是 root, 密码是 toortoor

#65 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 请问 TI的 AM3358 最近会不会停产? » 2019-11-16 21:44:08

TI的芯片比较靠谱, 停产前都会出通知,而且提供替代方案, 在线中英文技术支持也很好.

#66 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-16 21:42:50

好, 我再换张卡试一下 lichee_zero-Debian-LXDE_800_alpha, 不明白再请教你.

#68 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-15 22:12:42

awfans
回复: 34

我试了

lichee_zero-Debian-LXDE_800_alpha.dd

lichee_zero-mindX_alpha.dd


各种错误, 根本无法启动.

#70 Re: Php/Nodejs/Web/HTML5/Javascript/微信开发/Python » 谷歌这个人机身份验证是什么原理?勾选一下checkbox就通过了。 » 2019-10-13 16:26:56

2019-10-13%2010-54-09屏幕截图.png

今天特意试了以下, 出现这个窗口后, 如果把鼠标拔了, 通过键盘触发那个checkbox, 就会一直触发那个图像验证码窗口了.

#71 Re: 全志 SOC » Debian 9.9 (stretch) 文件系统制作 » 2019-10-13 13:34:34

http://zero.lichee.pro/%E8%B4%A1%E7%8C%AE/article%201.html

rootfs-minX.tar.gz debian(包含桌面系统)

这个带桌面的 debian 压缩后才 200M 左右, 怎么做到的?

#74 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 推荐给大家一个不依赖其他第三方库的 png 解码库 » 2019-10-13 10:15:42

手动编译指令: g++ -I ./ lodepng.cpp examples/example_sdl.cpp -W -Wall -Wextra -ansi -pedantic -O3  -lSDL -o showpng

#76 Re: Nuvoton N32905/N32926/NUC972/N9H20/N9H26/N9H30 » nuc92 卡在 nuc970 mtd nand driver version: 20160331 » 2019-10-01 13:55:19

brd: module loaded
nuc970 mtd nand driver version: 20160331
NAND device: Manufacturer ID: 0xef, Chip ID: 0xf1 (Winbond NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
nand: SMRA size 64, 32
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01


感觉确实是 nand 驱动出问题了

#78 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 《分享!!!》stm32+freeRTOS+littlevgl的综合demo » 2019-09-12 22:50:57

太强大了, 请问圆角矩形怎么做到的, 算了, 我还是自己看代码好了

#80 Re: 全志 SOC » nano板子GT911触摸屏驱动问题 » 2019-09-11 19:27:14

很可能没有接上拉电阻, 确认一下.

#81 Re: 全志 SOC » 分享一个 V3s/H3 可用的 buildroot-2019.08 配置文件. » 2019-09-11 19:25:21

参考 https://whycan.cn/t_2294.html

编译一个 qt analogclock demo:

cd /opt/buildroot-2019.08-hf/output/build/qt5base-5.12.4/examples/widgets/widgets/analogclock 

/opt/buildroot-2019.08-hf/output/host/bin/qmake analogclock.pro

make

###复制到文件系统###
cp analogclock /opt/buildroot-2019.08-hf/output/target/usr/bin/

#82 全志 SOC » 分享一个 V3s/H3 可用的 buildroot-2019.08 配置文件. » 2019-09-11 19:20:55

awfans
回复: 5

配置文件下载: buildroot_201908_hf_20190911A_config.tgz

wget https://buildroot.org/downloads/buildroot-2019.08.tar.gz
mkdir /opt/buildroot-2019.08-hf -p
tar xvf buildroot-2019.08.tar.gz -C /opt/buildroot-2019.08-hf
cd /opt/buildroot-2019.08-hf
wget https://whycan.cn/files/members/713/buildroot_201908_hf_20190911A_config.tgz
tar xvf buildroot_201908_hf_20190911A_config.tgz -C /opt/buildroot-2019.08-hf

make menuconfig ###退出/保存
make   ###编译

#85 Re: ESP32/ESP8266 » 关于ESP32的内存不够的问题 » 2019-09-09 18:17:14

看起来是 该区域目标文件太大, 导致在 dram0_0_seg 段塞不下了?

#86 Re: 全志 SOC » LittlevGL最后如何打包到nano板子上自动运行的? » 2019-09-09 15:38:34

先不用管其他的, 你使用 buildroot 的 output/host/bin/arm-linux-gcc 编译 lvgl 就可以了。

#87 Re: 全志 SOC » Licheepi ZERO 下载flash镜像的问题 » 2019-09-09 11:12:33

文件系统有问题, 用 buildroot 重新做一个吧

#89 Re: Php/Nodejs/Web/HTML5/Javascript/微信开发/Python » 请问 pip install PyQt5 不成功, 这是什么错误? » 2019-09-09 10:36:46

from PyQt5.QtWidgets import *

app = QApplication([])
button = QPushButton('Click')


def on_button_clicked():
    alert = QMessageBox()
    alert.setText('You clicked the button!')
    alert.exec_()
	
	
button.clicked.connect(on_button_clicked)

button.show()
app.exec_()

一个简单的 Qt5 信号槽程序

#91 Re: 全志 SOC » LittlevGL最后如何打包到nano板子上自动运行的? » 2019-09-09 10:11:46

1. 首先用 crc32或者md5工具看下文件是否相同, 与电脑上的文件对比是否一致.
2. 如果一致, 用静态链接, gcc 的参数是 -static
3. 如果用静态链接没有问题, 那是你的rootfs里面的c库和littlevgl的c库不一致, 用同一个工具链编译即可。

#92 Re: Php/Nodejs/Web/HTML5/Javascript/微信开发/Python » 请问 pip install PyQt5 不成功, 这是什么错误? » 2019-09-09 09:13:35

抄个PyQt 程序玩玩: https://build-system.fman.io/pyqt5-tutorial

from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout
app = QApplication([])
window = QWidget()
layout = QVBoxLayout()
layout.addWidget(QPushButton('Top'))
layout.addWidget(QPushButton('Bottom'))
window.setLayout(layout)
window.show()
app.exec_()

跑起来了:
2019-09-09_090254.png

#94 Php/Nodejs/Web/HTML5/Javascript/微信开发/Python » 请问 pip install PyQt5 不成功, 这是什么错误? » 2019-09-09 07:42:44

awfans
回复: 6
     |█████████████████████           | 32.7MB 15kB/s eta 0
     |█████████████████████           | 32.7MB 15kB/s eta 0
     |█████████████████████           | 32.7MB 15kB/s eta 0
     |█████████████████████           | 32.7MB 15kB/s eta 0
     |█████████████████████           | 32.7MB 19kB/s eta 0
     |█████████████████████           | 32.7MB 19kB/s eta 0
     |█████████████████████           | 32.7MB 17kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 16kB/s eta 0
     |█████████████████████           | 32.8MB 16kB/s eta 0
     |█████████████████████           | 32.8MB 16kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 14kB/s eta 0
     |█████████████████████           | 32.8MB 15kB/s eta 0
     |█████████████████████           | 32.9MB 15kB/s eta 0
     |█████████████████████           | 32.9MB 20kB/s eta 0
     |█████████████████████           | 32.9MB 20kB/s eta 0
     |█████████████████████           | 32.9MB 20kB/s eta 0
     |█████████████████████           | 32.9MB 15kB/s eta 0
     |█████████████████████           | 32.9MB 12kB/s eta 0
     |█████████████████████           | 32.9MB 12kB/s eta 0
     |█████████████████████           | 32.9MB 12kB/s eta 0
     |█████████████████████           | 32.9MB 12kB/s eta 0
     |█████████████████████           | 33.0MB 12kB/s eta 0
     |█████████████████████           | 33.0MB 10kB/s eta 0
     |█████████████████████           | 33.0MB 10kB/s eta 0
     |█████████████████████           | 33.0MB 7.9kB/s eta
     |█████████████████████           | 33.0MB 7.4kB/s eta
     |█████████████████████           | 33.0MB 7.7kB/s eta
     |█████████████████████           | 33.0MB 7.7kB/s eta
     |█████████████████████           | 33.0MB 7.7kB/s eta
     |█████████████████████           | 33.0MB 7.7kB/s eta
     |█████████████████████           | 33.0MB 9.2kB/s eta
     |█████████████████████           | 33.1MB 9.2kB/s eta
     |█████████████████████           | 33.1MB 9.2kB/s eta
     |█████████████████████           | 33.1MB 10kB/s eta 0
     |█████████████████████           | 33.1MB 10kB/s eta 0
     |█████████████████████           | 33.1MB 10kB/s eta 0
     |█████████████████████           | 33.1MB 10kB/s eta 0
     |█████████████████████           | 33.1MB 29kB/s eta 0
     |█████████████████████           | 33.1MB 29kB/s eta 0
     |█████████████████████           | 33.1MB 24kB/s eta 0
     |█████████████████████           | 33.1MB 24kB/s eta 0
     |█████████████████████▌          | 33.2MB 24kB/s eta
     |█████████████████████▌          | 33.2MB 24kB/s eta
     |█████████████████████▌          | 33.2MB 26kB/s eta
     |█████████████████████▌          | 33.2MB 26kB/s eta
     |█████████████████████▌          | 33.2MB 26kB/s eta
     |█████████████████████▌          | 33.2MB 21kB/s eta
     |█████████████████████▌          | 33.2MB 21kB/s eta
     |█████████████████████▌          | 33.2MB 19kB/s eta
     |█████████████████████▌          | 33.2MB 19kB/s eta
     |█████████████████████▌          | 33.2MB 19kB/s eta
     |█████████████████████▌          | 33.3MB 22kB/s eta
     |█████████████████████▌          | 33.3MB 22kB/s eta
     |█████████████████████▌          | 33.3MB 22kB/s eta
     |█████████████████████▌          | 33.3MB 19kB/s eta
     |█████████████████████▌          | 33.3MB 19kB/s eta
     |█████████████████████▌          | 33.3MB 17kB/s eta
     |█████████████████████▌          | 33.3MB 17kB/s eta
     |█████████████████████▌          | 33.3MB 16kB/s eta
     |█████████████████████▌          | 33.3MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 14kB/s eta
     |█████████████████████▌          | 33.4MB 14kB/s eta
     |█████████████████████▌          | 33.4MB 14kB/s eta
     |█████████████████████▌          | 33.4MB 15kB/s eta
     |█████████████████████▌          | 33.4MB 15kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.4MB 16kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 14kB/s eta
     |█████████████████████▌          | 33.5MB 19kB/s eta
     |█████████████████████▌          | 33.5MB 16kB/s eta
     |█████████████████████▌          | 33.5MB 16kB/s eta
     |█████████████████████▌          | 33.5MB 15kB/s eta
     |█████████████████████▌          | 33.5MB 15kB/s eta
     |█████████████████████▌          | 33.6MB 15kB/s eta
     |█████████████████████▌          | 33.6MB 12kB/s eta
     |█████████████████████▌          | 33.6MB 12kB/s eta
     |█████████████████████▌          | 33.6MB 11kB/s eta
     |█████████████████████▌          | 33.6MB 11kB/s eta
     |█████████████████████▌          | 33.6MB 8.4kB/s eta
     |█████████████████████▌          | 33.6MB 8.4kB/s eta
     |█████████████████████▌          | 33.6MB 8.4kB/s eta
     |█████████████████████▌          | 33.6MB 10kB/s eta
     |█████████████████████▌          | 33.6MB 9.0kB/s eta
     |█████████████████████▌          | 33.7MB 9.0kB/s eta
     |█████████████████████▌          | 33.7MB 9.0kB/s eta
     |██████████████████████          | 33.7MB 9.0kB/s eta
     |██████████████████████          | 33.7MB 9.0kB/s eta
     |██████████████████████          | 33.7MB 9.0kB/s eta
     |██████████████████████          | 33.7MB 23kB/s eta
     |██████████████████████          | 33.7MB 23kB/s eta
     |██████████████████████          | 33.7MB 19kB/s eta
     |██████████████████████          | 33.7MB 19kB/s eta
     |██████████████████████          | 33.8MB 19kB/s eta
     |██████████████████████          | 33.8MB 19kB/s eta
     |██████████████████████          | 33.8MB 25kB/s eta
     |██████████████████████          | 33.8MB 25kB/s eta
     |██████████████████████          | 33.8MB 22kB/s eta
     |██████████████████████          | 33.8MB 16kB/s eta
     |██████████████████████          | 33.8MB 15kB/s eta
     |██████████████████████          | 33.8MB 15kB/s eta
     |██████████████████████          | 33.8MB 15kB/s eta
     |██████████████████████          | 33.8MB 15kB/s eta
     |██████████████████████          | 33.9MB 18kB/s eta
     |██████████████████████          | 33.9MB 18kB/s eta
     |██████████████████████          | 33.9MB 16kB/s eta
     |██████████████████████          | 33.9MB 16kB/s eta
     |██████████████████████          | 33.9MB 14kB/s eta
     |██████████████████████          | 33.9MB 14kB/s eta
     |██████████████████████          | 33.9MB 14kB/s eta
     |██████████████████████          | 33.9MB 19kB/s eta
     |██████████████████████          | 33.9MB 19kB/s eta
     |██████████████████████          | 33.9MB 12kB/s eta
     |██████████████████████          | 34.0MB 12kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.0MB 11kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 16kB/s eta
     |██████████████████████          | 34.1MB 16kB/s eta
     |██████████████████████          | 34.1MB 16kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.1MB 14kB/s eta
     |██████████████████████          | 34.2MB 14kB/s eta
     |██████████████████████          | 34.2MB 14kB/s eta
     |██████████████████████          | 34.2MB 14kB/s eta
     |██████████████████████          | 34.2MB 17kB/s eta
     |██████████████████████          | 34.2MB 17kB/s eta
     |██████████████████████          | 34.2MB 13kB/s eta
     |██████████████████████          | 34.2MB 13kB/s eta
     |██████████████████████          | 34.2MB 13kB/s eta
     |██████████████████████          | 34.2MB 13kB/s eta
     |██████████████████████          | 34.2MB 16kB/s eta
     |██████████████████████          | 34.3MB 16kB/s eta
     |██████████████████████          | 34.3MB 16kB/s eta
     |██████████████████████          | 34.3MB 14kB/s eta
     |██████████████████████          | 34.3MB 13kB/s eta
     |██████████████████████          | 34.3MB 13kB/s eta
     |██████████████████████          | 34.3MB 13kB/s eta
     |██████████████████████          | 34.3MB 17kB/s eta
     |██████████████████████          | 34.3MB 16kB/s eta
     |██████████████████████          | 34.3MB 10kB/s eta
     |██████████████████████          | 34.3MB 10kB/s eta
     |██████████████████████          | 34.4MB 10kB/s eta
     |██████████████████████          | 34.4MB 10kB/s eta
     |██████████████████████          | 34.4MB 12kB/s eta
     |██████████████████████          | 34.4MB 12kB/s eta
     |██████████████████████          | 34.4MB 12kB/s eta
     |██████████████████████          | 34.4MB 12kB/s eta
     |██████████████████████          | 34.4MB 14kB/s eta
     |██████████████████████          | 34.4MB 14kB/s eta
     |██████████████████████          | 34.4MB 14kB/s eta
     |██████████████████████          | 34.4MB 14kB/s eta
     |██████████████████████          | 34.5MB 23kB/s eta
     |██████████████████████          | 34.5MB 23kB/s eta
     |██████████████████████          | 34.5MB 25kB/s eta
     |██████████████████████          | 34.5MB 25kB/s eta
     |██████████████████████          | 34.5MB 25kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.5MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 21kB/s eta
     |██████████████████████          | 34.6MB 19kB/s eta
     |██████████████████████          | 34.7MB 19kB/s eta
     |██████████████████████          | 34.7MB 19kB/s eta
     |██████████████████████          | 34.7MB 19kB/s eta
     |██████████████████████          | 34.7MB 19kB/s eta
     |██████████████████████          | 34.7MB 18kB/s eta
     |██████████████████████          | 34.7MB 18kB/s eta
     |██████████████████████▌         | 34.7MB 18kB/s eta
     |██████████████████████▌         | 34.7MB 18kB/s eta
     |██████████████████████▌         | 34.7MB 18kB/s eta
     |██████████████████████▌         | 34.7MB 24kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
     |██████████████████████▌         | 34.8MB 15kB/s eta
 0:15:54ERROR: Exception:
Traceback (most recent call last):
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\urllib3\response.py", line 397, in _error_catcher
    yield
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\urllib3\response.py", line 479, in read
    data = self._fp.read(amt)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\http\client.p
y", line 457, in read
    n = self.readinto(b)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\http\client.p
y", line 501, in readinto
    n = self.fp.readinto(b)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\socket.py", l
ine 589, in readinto
    return self._sock.recv_into(b)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\ssl.py", line
 1071, in recv_into
    return self.read(nbytes, buffer)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\ssl.py", line
 929, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\cli\base_command.py", line 188, in main
    status = self.run(options, args)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\commands\install.py", line 345, in run
    resolver.resolve(requirement_set)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\legacy_resolve.py", line 196, in resolve
    self._resolve_one(requirement_set, req)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\legacy_resolve.py", line 359, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\legacy_resolve.py", line 307, in _get_abstract_dist_for
    self.require_hashes
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\operations\prepare.py", line 199, in prepare_linked_requirement
    progress_bar=self.progress_bar
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 1064, in unpack_url
    progress_bar=progress_bar
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 924, in unpack_http_url
    progress_bar)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 1152, in _download_http_url
    _download_url(resp, link, content_file, hashes, progress_bar)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 861, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\utils\hashes.py", line 75, in check_against_chunks
    for chunk in chunks:
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 829, in written_chunks
    for chunk in chunks:
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\utils\ui.py", line 156, in iter
    for x in it:
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_internal\download.py", line 818, in resp_read
    decode_content=False):
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\urllib3\response.py", line 531, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\urllib3\response.py", line 496, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\contextlib.py
", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\users\xiaona\appdata\local\programs\python\python37\lib\site-packages
\pip\_vendor\urllib3\response.py", line 402, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files
.pythonhosted.org', port=443): Read timed out.

#96 Re: Cortex M0/M3/M4/M7 » stm32f103 设置pwm输出后马上设置pwm捕获不成功 » 2019-09-04 20:38:08

看了下,感觉怎么这么优秀的一个用库函数一个用寄存器=。=

#97 Re: 全志 SOC » licheepi zero使用tf卡emdebian根文件系统,只使用ttyS0 » 2019-08-07 20:53:59

tty1 to tty6 是虚拟终端设备吧, 给 telnet/ssh 之类的网络程序用的吧, 应该是驱动自己产生的, 除非你把对应的驱动 disable

#98 Re: 全志 SOC » licheepi zero使用tf卡emdebian根文件系统,只使用ttyS0 » 2019-08-07 20:43:05

是不是你 bootargs 的 console=/dev/fb0 导致屏幕显示终端登陆?

#99 Re: 全志 SOC » V3s rootfs挂载失败 » 2019-07-25 23:42:57

bsp linux 3.4 对吧, 那个 flash 分区和主线可能有点不同, 好像是改代码可以实现, 添加分区代码 结构体数组.

#100 Re: 全志 SOC » V3s rootfs挂载失败 » 2019-07-25 23:24:03

1. linux 开启 CONFIG_MTD_CMDLINE_PARTS
2. 或者 linux 开启 CONFIG_MTD_OF_PARTS, 设备树里面添加 parts,

#101 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2019-07-24 08:38:19

chendong 说:

你们虚拟机都装自己电脑上,我一般单独用一台台式机做虚拟机,然后用samba传文件,用putty 登录做编译,用Source Insight 联网编辑代码。

个人感觉 xshell mobaxterm 比 putty 好用

#102 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2019-07-24 08:37:19

chendong 说:

还是喜欢用台式机,要不USB 口不够用。

这台电脑3个USB口, 我自己感觉够用了.

#103 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2019-07-23 19:35:32

mango 说:

一般搞开发,要么IBM,要么MBP

个人感觉, 自从换了 ssd 之后, 这个 17.3 寸大屏笔记本还是挺不错的.

我估计一楼的卡屎和后面的蓝屏都和 5400 R/M 的机械硬盘有关系.

#104 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2019-07-23 17:21:00

发现一个神奇的问题, 自从我把 机械硬盘换成 SSD 硬盘之后, 按电源键休眠出现蓝屏的问题再也没出现过了, 我什么都没有干, 只是把机械硬盘数据拷到ssd硬盘而已。

难道是机械硬盘导致蓝屏?

#107 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2019-06-30 15:01:31

QQ20190630145558.jpg


https://item.jd.com/3714590.html

京东速度就是快,
晚上下单, 上午就收到了.

花了28块 + 6 元 运费, 把拆下来的 5400转的机械盘改装成USB移动硬盘, 然后把数据拷回 ssd 硬盘.

#109 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2019-03-31 16:21:16

天边那朵白云 说:

想知道 蓝屏问题还有后续吗?  笑哭

后来加了dell的微信公众号, 可以用来技术支持, 经过与技术支持 N 番文字交流之后 ( 中间省略 1000 字)

最后通过管理员执行

chkdsk c:/f

强制开机检测C盘, 跑了几天暂时没有蓝屏了.

以前只要放置四五个小时, 必然蓝屏.


后面有空我再详细整理过程吧.

#110 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2019-03-10 17:34:36

Windows10的强制签名真的好鬼烦躁,
动不动逻辑分析仪不能用,
禁用驱动签名菜单进入系统,
多重启几次发现连所有USB口都不能用了.

整个USB驱动都出现了驱动未签名,

bcdedit.exe /set nointegritychecks on

网上找来的这个命令也跑不了,
还得按 F2 进入 BIOS,
去掉 Secure Boot Enable 的勾勾。
重启之后才算成功运行上面的命令,
这样USB才算正常。

#111 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2019-02-18 08:16:36

Xaf993120190218081508.jpg


QQ20190218081728.jpg

大早上看到电脑蓝屏了, 扎心了。

用的是出厂原装的 Windows10,

出现好几次了, 这锅到底戴尔, 还是微软背?

https://zhuanlan.zhihu.com/p/34743309

#112 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 解决 搬瓦工 Linux VPS主机时区问题 » 2019-02-09 11:28:49

我这里执行就直接出错了:

root@ubuntu:~# timedatectl set-timezone Asia/Shanghai
Failed to get D-Bus connection: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

执行 dbus-daemon  --system 搞定:

root@ubuntu:~# dbus-daemon  --system
root@ubuntu:~#
root@ubuntu:~# timedatectl set-timezone Asia/Shanghai
root@ubuntu:~# date
Fri Feb  8 09:01:12 CST 2019

#114 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 京东买了个戴尔 DELL 大屏笔记本电脑,真是问题不断 » 2019-01-21 18:39:37

awfans
回复: 26

QQ20190121183659.png

https://item.jd.com/100000016922.html

无缘无故卡死,

鼠标键盘都完全不能动那种,

一直卡死, 完全不动,

唯一处理方法就是拔掉外置电源, 就活了。

#115 Re: Nuvoton N32905/N32926/NUC972/N9H20/N9H26/N9H30 » n32926的虚拟串口兼容性比较差 » 2018-11-19 23:36:16

是linux 3.x 的usb 协议栈有问题?还是 n32926 的USB驱动有问题?

#116 Re: 全志 SOC » 各位大神有弄过电容屏的触摸吗 不是电阻屏 » 2018-11-19 23:34:48

看起来硬件没什么问题,软件得用心慢慢调了。

#117 Re: 全志 SOC » v3s开发板,想用按钮驱动产生中断实现开关led灯 » 2018-11-19 23:33:48

605364021 说:

v3s使用ADC按键,怎么用驱动实现检测按键按下?

https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/drivers/input/keyboard/sun4i-lradc-keys.c

/*
 * Allwinner sun4i low res adc attached tablet keys driver
 *
 * Copyright (C) 2014 Hans de Goede <hdegoede@redhat.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/*
 * Allwinnner sunxi SoCs have a lradc which is specifically designed to have
 * various (tablet) keys (ie home, back, search, etc). attached to it using
 * a resistor network. This driver is for the keys on such boards.
 *
 * There are 2 channels, currently this driver only supports channel 0 since
 * there are no boards known to use channel 1.
 */

#include <linux/err.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>

#define LRADC_CTRL		0x00
#define LRADC_INTC		0x04
#define LRADC_INTS		0x08
#define LRADC_DATA0		0x0c
#define LRADC_DATA1		0x10

/* LRADC_CTRL bits */
#define FIRST_CONVERT_DLY(x)	((x) << 24) /* 8 bits */
#define CHAN_SELECT(x)		((x) << 22) /* 2 bits */
#define CONTINUE_TIME_SEL(x)	((x) << 16) /* 4 bits */
#define KEY_MODE_SEL(x)		((x) << 12) /* 2 bits */
#define LEVELA_B_CNT(x)		((x) << 8)  /* 4 bits */
#define HOLD_EN(x)		((x) << 6)
#define LEVELB_VOL(x)		((x) << 4)  /* 2 bits */
#define SAMPLE_RATE(x)		((x) << 2)  /* 2 bits */
#define ENABLE(x)		((x) << 0)

/* LRADC_INTC and LRADC_INTS bits */
#define CHAN1_KEYUP_IRQ		BIT(12)
#define CHAN1_ALRDY_HOLD_IRQ	BIT(11)
#define CHAN1_HOLD_IRQ		BIT(10)
#define	CHAN1_KEYDOWN_IRQ	BIT(9)
#define CHAN1_DATA_IRQ		BIT(8)
#define CHAN0_KEYUP_IRQ		BIT(4)
#define CHAN0_ALRDY_HOLD_IRQ	BIT(3)
#define CHAN0_HOLD_IRQ		BIT(2)
#define	CHAN0_KEYDOWN_IRQ	BIT(1)
#define CHAN0_DATA_IRQ		BIT(0)

struct sun4i_lradc_keymap {
	u32 voltage;
	u32 keycode;
};

struct sun4i_lradc_data {
	struct device *dev;
	struct input_dev *input;
	void __iomem *base;
	struct regulator *vref_supply;
	struct sun4i_lradc_keymap *chan0_map;
	u32 chan0_map_count;
	u32 chan0_keycode;
	u32 vref;
};

static irqreturn_t sun4i_lradc_irq(int irq, void *dev_id)
{
	struct sun4i_lradc_data *lradc = dev_id;
	u32 i, ints, val, voltage, diff, keycode = 0, closest = 0xffffffff;

	ints  = readl(lradc->base + LRADC_INTS);

	/*
	 * lradc supports only one keypress at a time, release does not give
	 * any info as to which key was released, so we cache the keycode.
	 */

	if (ints & CHAN0_KEYUP_IRQ) {
		input_report_key(lradc->input, lradc->chan0_keycode, 0);
		lradc->chan0_keycode = 0;
	}

	if ((ints & CHAN0_KEYDOWN_IRQ) && lradc->chan0_keycode == 0) {
		val = readl(lradc->base + LRADC_DATA0) & 0x3f;
		voltage = val * lradc->vref / 63;

		for (i = 0; i < lradc->chan0_map_count; i++) {
			diff = abs(lradc->chan0_map[i].voltage - voltage);
			if (diff < closest) {
				closest = diff;
				keycode = lradc->chan0_map[i].keycode;
			}
		}

		lradc->chan0_keycode = keycode;
		input_report_key(lradc->input, lradc->chan0_keycode, 1);
	}

	input_sync(lradc->input);

	writel(ints, lradc->base + LRADC_INTS);

	return IRQ_HANDLED;
}

static int sun4i_lradc_open(struct input_dev *dev)
{
	struct sun4i_lradc_data *lradc = input_get_drvdata(dev);
	int error;

	error = regulator_enable(lradc->vref_supply);
	if (error)
		return error;

	/* lradc Vref internally is divided by 2/3 */
	lradc->vref = regulator_get_voltage(lradc->vref_supply) * 2 / 3;

	/*
	 * Set sample time to 4 ms / 250 Hz. Wait 2 * 4 ms for key to
	 * stabilize on press, wait (1 + 1) * 4 ms for key release
	 */
	writel(FIRST_CONVERT_DLY(2) | LEVELA_B_CNT(1) | HOLD_EN(1) |
		SAMPLE_RATE(0) | ENABLE(1), lradc->base + LRADC_CTRL);

	writel(CHAN0_KEYUP_IRQ | CHAN0_KEYDOWN_IRQ, lradc->base + LRADC_INTC);

	return 0;
}

static void sun4i_lradc_close(struct input_dev *dev)
{
	struct sun4i_lradc_data *lradc = input_get_drvdata(dev);

	/* Disable lradc, leave other settings unchanged */
	writel(FIRST_CONVERT_DLY(2) | LEVELA_B_CNT(1) | HOLD_EN(1) |
		SAMPLE_RATE(2), lradc->base + LRADC_CTRL);
	writel(0, lradc->base + LRADC_INTC);

	regulator_disable(lradc->vref_supply);
}

static int sun4i_lradc_load_dt_keymap(struct device *dev,
				      struct sun4i_lradc_data *lradc)
{
	struct device_node *np, *pp;
	int i;
	int error;

	np = dev->of_node;
	if (!np)
		return -EINVAL;

	lradc->chan0_map_count = of_get_child_count(np);
	if (lradc->chan0_map_count == 0) {
		dev_err(dev, "keymap is missing in device tree\n");
		return -EINVAL;
	}

	lradc->chan0_map = devm_kmalloc_array(dev, lradc->chan0_map_count,
					      sizeof(struct sun4i_lradc_keymap),
					      GFP_KERNEL);
	if (!lradc->chan0_map)
		return -ENOMEM;

	i = 0;
	for_each_child_of_node(np, pp) {
		struct sun4i_lradc_keymap *map = &lradc->chan0_map[i];
		u32 channel;

		error = of_property_read_u32(pp, "channel", &channel);
		if (error || channel != 0) {
			dev_err(dev, "%s: Inval channel prop\n", pp->name);
			return -EINVAL;
		}

		error = of_property_read_u32(pp, "voltage", &map->voltage);
		if (error) {
			dev_err(dev, "%s: Inval voltage prop\n", pp->name);
			return -EINVAL;
		}

		error = of_property_read_u32(pp, "linux,code", &map->keycode);
		if (error) {
			dev_err(dev, "%s: Inval linux,code prop\n", pp->name);
			return -EINVAL;
		}

		i++;
	}

	return 0;
}

static int sun4i_lradc_probe(struct platform_device *pdev)
{
	struct sun4i_lradc_data *lradc;
	struct device *dev = &pdev->dev;
	int i;
	int error;

	lradc = devm_kzalloc(dev, sizeof(struct sun4i_lradc_data), GFP_KERNEL);
	if (!lradc)
		return -ENOMEM;

	error = sun4i_lradc_load_dt_keymap(dev, lradc);
	if (error)
		return error;

	lradc->vref_supply = devm_regulator_get(dev, "vref");
	if (IS_ERR(lradc->vref_supply))
		return PTR_ERR(lradc->vref_supply);

	lradc->dev = dev;
	lradc->input = devm_input_allocate_device(dev);
	if (!lradc->input)
		return -ENOMEM;

	lradc->input->name = pdev->name;
	lradc->input->phys = "sun4i_lradc/input0";
	lradc->input->open = sun4i_lradc_open;
	lradc->input->close = sun4i_lradc_close;
	lradc->input->id.bustype = BUS_HOST;
	lradc->input->id.vendor = 0x0001;
	lradc->input->id.product = 0x0001;
	lradc->input->id.version = 0x0100;

	__set_bit(EV_KEY, lradc->input->evbit);
	for (i = 0; i < lradc->chan0_map_count; i++)
		__set_bit(lradc->chan0_map[i].keycode, lradc->input->keybit);

	input_set_drvdata(lradc->input, lradc);

	lradc->base = devm_ioremap_resource(dev,
			      platform_get_resource(pdev, IORESOURCE_MEM, 0));
	if (IS_ERR(lradc->base))
		return PTR_ERR(lradc->base);

	error = devm_request_irq(dev, platform_get_irq(pdev, 0),
				 sun4i_lradc_irq, 0,
				 "sun4i-a10-lradc-keys", lradc);
	if (error)
		return error;

	error = input_register_device(lradc->input);
	if (error)
		return error;

	return 0;
}

static const struct of_device_id sun4i_lradc_of_match[] = {
	{ .compatible = "allwinner,sun4i-a10-lradc-keys", },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, sun4i_lradc_of_match);

static struct platform_driver sun4i_lradc_driver = {
	.driver = {
		.name	= "sun4i-a10-lradc-keys",
		.of_match_table = of_match_ptr(sun4i_lradc_of_match),
	},
	.probe	= sun4i_lradc_probe,
};

module_platform_driver(sun4i_lradc_driver);

MODULE_DESCRIPTION("Allwinner sun4i low res adc attached tablet keys driver");
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
MODULE_LICENSE("GPL");

#118 Re: 全志 SOC » 网友墨墨 设计的 芒果派(mango pi) V3s开发板 » 2018-10-19 22:46:02

千条路玩条路,又来走原路搞camdroid,重新mark一下.

#121 VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 把ubuntu的usb摄像头变成RTSP服务器全过程【原创】 » 2018-10-17 22:27:06

awfans
回复: 6

1. 下载 live555源代码:
#wget http://www.live555.com/liveMedia/public/live.2013.04.30.tar.gz

2. 编译源代码:
#tar xvf live.2013.04.30.tar.gz
#./genMakefiles linux
#make -j10

3.运行mediaserver
~/live/mediaServer$ ./live555MediaServer

4. 建立fifo
~/live/mediaServer$ mkfifo test.m4e
~/live/mediaServer$ chmod u+rw test.m4e

5.设计软件,采集video数据,编码成xvid,写入fifo
/home/avr32/live/mediaServer/test.m4e
编译命令:
gcc -o testx ubuntu_encode_usb_camera.c -lxvidcore
运行testx
#testx

7. vlc打开网址:
vlc rtsp://127.0.0.1:8554/test.m4e




ubuntu_encode_usb_camera.c

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/videodev2.h>
#include "xvid.h"

#define WRITE_PIPE_AS_FILE    1

#define FRAMERATE_INCR 1001
#define SMALL_EPS (1e-10)
#define VIDEO "/dev/video0"
#define INDEX 0
#define IOCTL(fd, req, addr ) \
((-1==ioctl(fd,req,addr))?(perror(#req),close(fd),exit(EXIT_FAILURE)):0)

static float ARG_FRAMERATE = 25.00f;
static int ARG_QUALITY = 4;
static int ARG_MAXKEYINTERVAL = 250;
static char * ARG_OUTPUTFILE= "/home/avr32/live/mediaServer/test.m4e";
//static char * ARG_OUTPUTFILE= "test.m4e";

#if WRITE_PIPE_AS_FILE
static int fp = 0;
#else
static FILE * fp = NULL;
#endif

static int done = 0;
static const int motion_presets[] = {
/* quality 0 */
0,

/* quality 1 */
XVID_ME_ADVANCEDDIAMOND16,

/* quality 2 */
XVID_ME_ADVANCEDDIAMOND16 | XVID_ME_HALFPELREFINE16,

/* quality 3 */
XVID_ME_ADVANCEDDIAMOND16 | XVID_ME_HALFPELREFINE16 |
XVID_ME_ADVANCEDDIAMOND8 | XVID_ME_HALFPELREFINE8,

/* quality 4 */
XVID_ME_ADVANCEDDIAMOND16 | XVID_ME_HALFPELREFINE16 |
XVID_ME_ADVANCEDDIAMOND8 | XVID_ME_HALFPELREFINE8 |
XVID_ME_CHROMA_PVOP | XVID_ME_CHROMA_BVOP,

/* quality 5 */
XVID_ME_ADVANCEDDIAMOND16 | XVID_ME_HALFPELREFINE16 |
XVID_ME_ADVANCEDDIAMOND8 | XVID_ME_HALFPELREFINE8 |
XVID_ME_CHROMA_PVOP | XVID_ME_CHROMA_BVOP,

/* quality 6 */
XVID_ME_ADVANCEDDIAMOND16 | XVID_ME_HALFPELREFINE16 | XVID_ME_EXTSEARCH16 |
XVID_ME_ADVANCEDDIAMOND8 | XVID_ME_HALFPELREFINE8 | XVID_ME_EXTSEARCH8 |
XVID_ME_CHROMA_PVOP | XVID_ME_CHROMA_BVOP,

};
static const int vop_presets[] = {
/* quality 0 */
0,

/* quality 1 */
0,

/* quality 2 */
XVID_VOP_HALFPEL,

/* quality 3 */
XVID_VOP_HALFPEL | XVID_VOP_INTER4V,

/* quality 4 */
XVID_VOP_HALFPEL | XVID_VOP_INTER4V,

/* quality 5 */
XVID_VOP_HALFPEL | XVID_VOP_INTER4V |
XVID_VOP_TRELLISQUANT,

/* quality 6 */
XVID_VOP_HALFPEL | XVID_VOP_INTER4V |
XVID_VOP_TRELLISQUANT | XVID_VOP_HQACPRED,

};

static int XDIM=640,YDIM=480;
static use_assembler = 0;
static void *enc_handle = NULL;

static int enc_init(int use_assembler);
static int enc_main(unsigned char *image,
unsigned char *bitstream,
int *key,
int *stats_type,
int *stats_quant,
int *stats_length,
int stats[3]);
static int enc_stop();
//signal act method defination
static void clean(int signum)
{
    done=1;
}
int 
main(int argc,char *argv[])
{
    //register SIGINT action method ,to save the m4u file
    signal(SIGINT,clean);
    int fd;
    struct v4l2_capability cap;    
    struct v4l2_format format;
    struct v4l2_requestbuffers reqbuf;
    struct v4l2_buffer buffer;
    struct v4l2_input input;
    int index=0,i;
for (i=1; i< argc; i++) {

if (strcmp("-asm", argv[i]) == 0 ) {
use_assembler = 1;
}else if(strcmp("-f", argv[i]) == 0 && i < argc -1){
            i++;
            ARG_OUTPUTFILE = argv[i];
        }else if(strcmp("-i", argv[i]) == 0 && i < argc -1){
            i++;
            index = atoi(argv[i]);
        } else if(strcmp("-w", argv[i]) == 0 && i < argc -1){
            i++;
            XDIM = atoi(argv[i]);
        } else if(strcmp("-h", argv[i]) == 0 && i < argc -1){
            i++;
            YDIM = atoi(argv[i]);
        } 
}
    
//init capture card
    
    fd = open(VIDEO,O_RDWR);
    if(fd<0)
    {
        perror("Can't open /dev/video device");
        exit(errno);
    }
    //if card can't support video capture and by means of steamio,exit 
    
    IOCTL(fd, VIDIOC_QUERYCAP, &cap);
    if ( !(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)
         &&!(cap.capabilities & V4L2_CAP_STREAMING))
    {
        fprintf(stderr, "Couldn't use the card \n");
        exit(3);
    } 
    
//query input and select the desired input

IOCTL(fd, VIDIOC_G_INPUT, &index);
    input.index = index;
    IOCTL(fd, VIDIOC_ENUMINPUT, &input);
    printf ("Current input: Index %i,Name %s\n", index,input.name);    
    for(i=0;;i++)
    {
        if(i!=index)
        {
            input.index = i;
            if(-1==ioctl(fd, VIDIOC_ENUMINPUT, &input))
                break;
            else
                printf ("Other input: Index %i,Name %s\n",i,input.name);
        }
    }
IOCTL(fd, VIDIOC_S_INPUT, &index);

    //get current video format,set the desired format
    format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    IOCTL(fd,VIDIOC_G_FMT,&format);

#if 1
    format.fmt.pix.width = XDIM;
    format.fmt.pix.height = YDIM;
    format.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
    format.fmt.pix.field = V4L2_FIELD_ANY;//V4L2_FIELD_INTERLACED
    
	IOCTL(fd,VIDIOC_S_FMT,&format);
#endif

    XDIM = format.fmt.pix.width;
    printf("Gotten width %d\n",XDIM);
    YDIM = format.fmt.pix.height;
    printf("Gotten height %d\n",YDIM);
    
//let driver get the buffers
    
    reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    reqbuf.memory = V4L2_MEMORY_MMAP;
    reqbuf.count = 4;
    IOCTL(fd,VIDIOC_REQBUFS,&reqbuf );
    if (reqbuf.count < 4) 
    {
       printf ("Not enough buffer memory for driver\n");
       exit (5);
    }

//mmap the driver's buffer to application address
    
    //create relative buffers struct to be used by mmap

    struct 
    {
        void * start;
        size_t length;
    } buffers[reqbuf.count];
    
//mmap the driver's kernel buffer into application

for (i=0;i<reqbuf.count;i++)
    {
        buffer.type = reqbuf.type;
        buffer.index =i ;
        
        //query the status of one buffer ,mmap the driver buffer
        
        IOCTL(fd,VIDIOC_QUERYBUF,&buffer);
        buffers[i].length = buffer.length;
        buffers[i].start = mmap (NULL,buffer.length,
                                 PROT_READ | PROT_WRITE,
                                 MAP_SHARED,
                                 fd,buffer.m.offset);
        if (buffers[i].start == MAP_FAILED) 
        {
           close(fd);
           perror ("mmap");
           exit(errno);
        }
    }
    //begin video capture
    
    IOCTL(fd,VIDIOC_STREAMON,&reqbuf.type);         
    
    //enqueue all driver buffers
    for (i=0;i<reqbuf.count;i++)
    {        
        buffer.type = reqbuf.type;
        buffer.index = i;
        IOCTL(fd,VIDIOC_QUERYBUF, &buffer);
        IOCTL(fd,VIDIOC_QBUF,&buffer);
    } 
    //init xvid
    
    int result;
    result = enc_init(1);
    if(result!=0)
    {
fprintf(stderr, "Encore INIT problem, return value %d\n", result);
goto clean_all;           
    }
    
    //get mem of mpg4 frame
    
    uint8_t *mp4_buffer = NULL;    
mp4_buffer = (unsigned char *) malloc(XDIM*YDIM);
if (mp4_buffer==NULL)
    {
        fprintf(stderr,"malloc error");
        goto clean_all;
    }
   int key;
int stats_type;
int stats_quant;
int stats_length;
    int sse[3];     
    
//create store mp4 file
#if WRITE_PIPE_AS_FILE
fp= open(ARG_OUTPUTFILE, O_WRONLY);
#else
fp= fopen(ARG_OUTPUTFILE, "wb");
#endif
    if (fp== NULL) {
    perror("Error opening output file.");
exit(-1);
    } 

//main loop ,frame capture,compressed 

    i = 0;
    int outbytes,m4v_size;
    while(!done)
    {
        //dequeue one frame
            
        buffer.type = reqbuf.type;
        buffer.index = i;
        IOCTL(fd, VIDIOC_QUERYBUF, &buffer);
        IOCTL(fd, VIDIOC_DQBUF, &buffer);
        /*debug info
        printf("current frame's unix time seconds :%d\n",buffer.timestamp.tv_sec);
        printf("current frame's unix time mcicoseconds :%d\n",buffer.timestamp.tv_usec);
        */
       
        //compress a frame
        
        m4v_size = enc_main((uint8_t *)buffers[i].start,
                             mp4_buffer+16,
                             &key, &stats_type,&stats_quant, &stats_length, sse);

//store into output file
#if WRITE_PIPE_AS_FILE
outbytes = write(fp, mp4_buffer, m4v_size);
#else
outbytes = fwrite(mp4_buffer, 1, m4v_size, fp);
#endif
if(outbytes != m4v_size)
{
    fprintf(stderr,"Error writing the m4u file\n");
    exit(7);
}

//enqueue one frame
            
        buffer.type = reqbuf.type;
        buffer.index = i;
        IOCTL(fd, VIDIOC_QUERYBUF, &buffer );
        IOCTL(fd, VIDIOC_QBUF, &buffer );
        i++;            
        if( i >= reqbuf.count ) 
            i = 0;
    }
clean_all:
#if WRITE_PIPE_AS_FILE
	close(fp);
#else
    fclose(fp);
#endif
enc_stop();    
    //stop capture
    IOCTL(fd, VIDIOC_STREAMOFF, &reqbuf.type );
    //unmmap the apllication buffer
    for (i=0;i<reqbuf.count;i++)
        munmap (buffers[i].start,buffers[i].length);    
    //release the dynamic mem
    close(fd);
return 0;
}

int
enc_init(int use_assembler)
{
int xerr;
//xvid_plugin_cbr_t cbr;
    xvid_plugin_single_t single;
xvid_plugin_2pass1_t rc2pass1;
xvid_plugin_2pass2_t rc2pass2;
//xvid_plugin_fixed_t rcfixed;
xvid_enc_plugin_t plugins[7];
xvid_gbl_init_t xvid_gbl_init;
xvid_enc_create_t xvid_enc_create;

/*------------------------------------------------------------------------
* XviD core initialization
*----------------------------------------------------------------------*/

/* Set version -- version checking will done by xvidcore */
memset(&xvid_gbl_init, 0, sizeof(xvid_gbl_init));
xvid_gbl_init.version = XVID_VERSION;
    xvid_gbl_init.debug = 0;


/* Do we have to enable ASM optimizations ? */
if (use_assembler) {
xvid_gbl_init.cpu_flags = 0;
}

/* Initialize XviD core -- Should be done once per __process__ */
xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL);

/*------------------------------------------------------------------------
* XviD encoder initialization
*----------------------------------------------------------------------*/

/* Version again */
memset(&xvid_enc_create, 0, sizeof(xvid_enc_create));
xvid_enc_create.version = XVID_VERSION;

/* Width and Height of input frames */
xvid_enc_create.width = XDIM;
xvid_enc_create.height = YDIM;
xvid_enc_create.profile = XVID_PROFILE_S_L3;

/* init plugins  */
    xvid_enc_create.zones = NULL;
    xvid_enc_create.num_zones = 0;

xvid_enc_create.plugins = NULL;
xvid_enc_create.num_plugins = 0;

/* No fancy thread tests */
xvid_enc_create.num_threads = 0;

/* Frame rate - Do some quick float fps = fincr/fbase hack */
if ((ARG_FRAMERATE - (int) ARG_FRAMERATE) < SMALL_EPS) {
xvid_enc_create.fincr = 1;
xvid_enc_create.fbase = (int) ARG_FRAMERATE;
} else {
xvid_enc_create.fincr = FRAMERATE_INCR;
xvid_enc_create.fbase = (int) (FRAMERATE_INCR * ARG_FRAMERATE);
}

/* Maximum key frame interval */
    if (ARG_MAXKEYINTERVAL > 0) {
        xvid_enc_create.max_key_interval = ARG_MAXKEYINTERVAL;
    }else {
    xvid_enc_create.max_key_interval = (int) ARG_FRAMERATE *10;
    }

/* Bframes settings */
xvid_enc_create.max_bframes = 0;
xvid_enc_create.bquant_ratio = 150;
xvid_enc_create.bquant_offset = 100;

/* Dropping ratio frame -- we don't need that */
xvid_enc_create.frame_drop_ratio = 0;

/* Global encoder options */
xvid_enc_create.global = 0;

/* I use a small value here, since will not encode whole movies, but short clips */
xerr = xvid_encore(NULL, XVID_ENC_CREATE, &xvid_enc_create, NULL);

/* Retrieve the encoder instance from the structure */
enc_handle = xvid_enc_create.handle;

return (xerr);
}

int
enc_main(unsigned char *image,
unsigned char *bitstream,
int *key,
int *stats_type,
int *stats_quant,
int *stats_length,
int sse[3])
{
int ret;

xvid_enc_frame_t xvid_enc_frame;
xvid_enc_stats_t xvid_enc_stats;

/* Version for the frame and the stats */
memset(&xvid_enc_frame, 0, sizeof(xvid_enc_frame));
xvid_enc_frame.version = XVID_VERSION;

memset(&xvid_enc_stats, 0, sizeof(xvid_enc_stats));
xvid_enc_stats.version = XVID_VERSION;

/* Bind output buffer */
xvid_enc_frame.bitstream = bitstream;
xvid_enc_frame.length = -1;

/* Initialize input image fields */
if (image) {
xvid_enc_frame.input.plane[0] = image;
xvid_enc_frame.input.csp = XVID_CSP_YUY2;
xvid_enc_frame.input.stride[0] = XDIM*2;
} else {
xvid_enc_frame.input.csp = XVID_CSP_NULL;
}

/* Set up core's general features */
xvid_enc_frame.vol_flags = 0;

/* Set up core's general features */
xvid_enc_frame.vop_flags = vop_presets[ARG_QUALITY];

/* Frame type -- let core decide for us */
xvid_enc_frame.type = XVID_TYPE_AUTO;

/* Force the right quantizer -- It is internally managed by RC plugins */
xvid_enc_frame.quant = 3;

/* Set up motion estimation flags */
xvid_enc_frame.motion = motion_presets[ARG_QUALITY];

/* We don't use special matrices */
xvid_enc_frame.quant_intra_matrix = NULL;
xvid_enc_frame.quant_inter_matrix = NULL;

/* Encode the frame */
ret = xvid_encore(enc_handle, XVID_ENC_ENCODE, &xvid_enc_frame,
  &xvid_enc_stats);

*key = (xvid_enc_frame.out_flags & XVID_KEYFRAME);
*stats_type = xvid_enc_stats.type;
*stats_quant = xvid_enc_stats.quant;
*stats_length = xvid_enc_stats.length;
sse[0] = xvid_enc_stats.sse_y;
sse[1] = xvid_enc_stats.sse_u;
sse[2] = xvid_enc_stats.sse_v;
return (ret);
}

int
enc_stop()
{
int xerr;

/* Destroy the encoder instance */
xerr = xvid_encore(enc_handle, XVID_ENC_DESTROY, NULL, NULL);

return (xerr);
}

#122 Re: 全志 SOC » [A20] 请教主线kernel or debian 版本FW 硬件加速如何工作? » 2018-10-14 23:03:32

晕哥 说:
真的是很烦 说:

那这样大家平时弄的最新kernel和debian 都只能是个玩具啦 ?

试下来, 如果不开启硬件加速的话,  cpu的能力不够, 720p都抗不住

是的,关键的外设用不起来。

一般的应用还是可以的.

#125 Re: 全志 SOC » 针对Lichee Pi Zero的Debian问题。 » 2018-10-04 22:15:23

Mitko 说:
路人甲 说:

对,按照上面的步骤一步一步,可以把 Ethernet 搞定。

没有必要从愚蠢的答案,如果你不能为这个主题贡献一些有意义的东西,你的评论不受欢迎。

Update: 以太网安装文章产生:

....
/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc: 1: /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc: ELF: not found
/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc: 1: /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc: Syntax error: Unterminated quoted string
Kbuild:20: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 2
Makefile:1061: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

https://whycan.cn/t_864.html#p3468
是不是你的系统是 64bit, gcc 是 32bit 的

试一试下面的命令:

sudo apt-get install lsb-core
apt-get install lib32z1 lib32ncurses5
apt-get install lib32stdc++6

#126 Re: 全志 SOC » 有没有朋友用过 【SD 接口的 NAND】,可以用在全志soc上 » 2018-10-03 09:16:00

达克罗德 说:

和spi nand比有什么优势?

内置了坏块和写平衡算法吧,软件上面就当硬盘用了,处理起来比较简单。

#128 Re: 全志 SOC » xboot 启动代码分析 » 2018-09-01 07:29:27

放狗搜了一圈,又回到挖坑网, 太好了,顶上去.

#131 Re: 全志 SOC » F1C100S裸奔framebuffer+PWM+GPIO驱动 » 2018-08-23 17:35:01

是呀,我也觉得好奇怪,屏幕是好的。

#132 Re: 全志 SOC » 大家希望S3模组使用什么接口引出?希望坛友脑爆一下 » 2018-08-21 19:42:44

NGFF 与  B2B  如何同时插入,抱歉我的脑洞还是不够大。

#133 Re: Nuvoton N32905/N32926/NUC972/N9H20/N9H26/N9H30 » step by step 全志 f1c100s MDK 裸奔各种外设(参考N3290x) » 2018-08-21 09:33:08

QQ20180821093222.jpg

紧跟楼主步伐,学习 f1c100s mdk 裸奔.
jlink 可以连上,mdk 可以调试。

#134 Re: 全志 SOC » F1C100S裸奔framebuffer+PWM+GPIO驱动 » 2018-08-21 09:29:28

QQ20180821092612.jpg

就是这样的,看起来也挺正常, 800x480

#135 Re: 全志 SOC » F1C100S裸奔framebuffer+PWM+GPIO驱动 » 2018-08-19 23:34:57

我的是800x480的5寸屏,上面红红的,下面有一条灰色的,关电脑了,明天仔细看看。

#136 Re: 全志 SOC » F1C100S裸奔framebuffer+PWM+GPIO驱动 » 2018-08-19 23:17:33

终于搞定,谢谢达哥, 红红的LCD亮起来了.

#137 Re: 全志 SOC » F1C100S裸奔framebuffer+PWM+GPIO驱动 » 2018-08-19 22:47:19

果然顺利编译完成.

但是烧进去之后,屏幕串口都没有反应,
而且再次进入 fel 模式,
说明应该是有问题的。



烧这个demo也一样:
https://whycan.cn/t_1393.html

#139 Re: 全志 SOC » F1C100S裸奔framebuffer+PWM+GPIO驱动 » 2018-08-19 22:24:26

达克罗德 说:

感觉你这个编译器不对,我是用xboot指定的5.3.1版
http://pan.baidu.com/s/1dDtssIt

我试一试这个.

#140 Re: 全志 SOC » F1C100S裸奔framebuffer+PWM+GPIO驱动 » 2018-08-19 22:21:39

把 driver/fb-f1c100s.c 的 include <stdlib.h> 屏蔽起来,
上面的错误没有了,

新的链接错误:

root@ubuntu:~/minimal_f1c100s# make CROSS_COMPILE=arm-linux-gnueabi-
LINK build/firmware.elf
arm-linux-gnueabi-gcc -T f1c100s.ld -nostdlib -Wl,--cref,-Map=build/firmware.elf.map -o build/firmware.elf build/main.o build/machine/sys-clock.o build/machine/sys-dram.o build/machine/sys-uart.o build/machine/sys-copyself.o build/machine/sys-spi-flash.o build/machine/sys-mmu.o build/machine/exception.o build/driver/gpio-f1c100s.o build/driver/pwm-f1c100s.o build/driver/reset-f1c100s.o build/lib/malloc.o build/lib/dma.o build/driver/clk-f1c100s-pll.o build/driver/fb-f1c100s.o build/machine/start.o build/arch/arm32/lib/memcpy.o build/arch/arm32/lib/memset.o -lgcc
build/lib/malloc.o: In function `insert_free_block':
/root/minimal_f1c100s/lib/malloc.c:387: undefined reference to `__assert_fail'
/root/minimal_f1c100s/lib/malloc.c:393: undefined reference to `__assert_fail'
build/lib/malloc.o: In function `block_split':
/root/minimal_f1c100s/lib/malloc.c:424: undefined reference to `__assert_fail'
/root/minimal_f1c100s/lib/malloc.c:428: undefined reference to `__assert_fail'
/root/minimal_f1c100s/lib/malloc.c:426: undefined reference to `__assert_fail'
build/lib/malloc.o:/root/minimal_f1c100s/lib/malloc.c:461: more undefined references to `__assert_fail' follow
/usr/lib/gcc-cross/arm-linux-gnueabi/5/libgcc.a(_dvmd_lnx.o): In function `__aeabi_ldiv0':
(.text+0x8): undefined reference to `raise'
collect2: error: ld returned 1 exit status
Makefile:78: recipe for target 'build/firmware.elf' failed
make: *** [build/firmware.elf] Error 1

#141 Re: 全志 SOC » F1C100S裸奔framebuffer+PWM+GPIO驱动 » 2018-08-19 22:03:45

然后换 arm-linux-gnueabihf-gcc 还是一样的错误:

arm-linux-gnueabihf-gcc -Imachine/include -Iarch/arm32/include -Idriver/include -Ilib -march=armv5te -mtune=arm926ej-s -mfloat-abi=soft -marm -mno-thumb-interwork -g -ggdb -Wall -O3 -ffreestanding -std=gnu99 -D__ARM32_ARCH__=5 -D__ARM926EJS__ -c -MD -o build/driver/fb-f1c100s.o driver/fb-f1c100s.c
In file included from /usr/arm-linux-gnueabihf/include/stdlib.h:42:0,
                 from driver/fb-f1c100s.c:26:
/usr/arm-linux-gnueabihf/include/bits/waitstatus.h:71:37: error: operator '==' has no right operand
# if __BYTE_ORDER == __LITTLE_ENDIAN
                                     ^
/usr/arm-linux-gnueabihf/include/bits/waitstatus.h:86:37: error: operator '==' has no right operand
# if __BYTE_ORDER == __LITTLE_ENDIAN
                                     ^
make: *** [build/driver/fb-f1c100s.o] Error 1

#142 Re: 全志 SOC » F1C100S裸奔framebuffer+PWM+GPIO驱动 » 2018-08-19 21:59:46

请问楼主你的 arm-eabi-gcc 是通过什么方式装到Linux 上面的?
我用 arm-none-linux-gnueabi-

make 后出错:

arm-none-linux-gnueabi-gcc -Imachine/include -Iarch/arm32/include -Idriver/include -Ilib -march=armv5te -mtune=arm926ej-s -mfloat-abi=soft -marm -mno-thumb-interwork -g -ggdb -Wall -O3 -ffreestanding -std=gnu99 -D__ARM32_ARCH__=5 -D__ARM926EJS__ -c -MD -o build/driver/fb-f1c100s.o driver/fb-f1c100s.c
In file included from /usr/local/arm-2014.05/arm-none-linux-gnueabi/libc/usr/include/stdlib.h:42:0,
                 from driver/fb-f1c100s.c:26:
/usr/local/arm-2014.05/arm-none-linux-gnueabi/libc/usr/include/bits/waitstatus.h:71:37: error: operator '==' has no right operand
# if __BYTE_ORDER == __LITTLE_ENDIAN
                                     ^
/usr/local/arm-2014.05/arm-none-linux-gnueabi/libc/usr/include/bits/waitstatus.h:86:37: error: operator '==' has no right operand
# if __BYTE_ORDER == __LITTLE_ENDIAN
                                     ^
make: *** [build/driver/fb-f1c100s.o] Error 1

#145 Re: 全志 SOC » 奇怪了,用全志官方的PhoenixSuit烧录软件,V3s开发板(zero)烧录一切正常,f1c100s开发板(荔枝派nano)就死活都不行 » 2018-08-13 16:17:15

QQ20180813160712.png

现在每次都可以烧了,
我只是把串口线接上而已, 啥也没干
难道 licheepi nano 板子设计问题?

#151 Re: Openwrt/LEDE/AR9331/MT7688/RT5350 » MT7688 的有支持的python或lua 或node.js 的gpio驱动库吗 » 2018-08-11 21:49:34

这种方式不错,相当于直接操作寄存器了, 速度肯定快

类似这个帖子吧:
https://whycan.cn/t_1450.html

#153 Re: 全志 SOC » step by step 使用gdb调试Linux平台应用程序 » 2018-07-30 21:37:45

太好了,改天把我的吃灰的V3s 板子拿出来试一试。

#154 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-28 14:17:26

有没有接上串口, 看看输出日志,有没有获取到IP地址?dueros 对讲是要按REC按键哦.

#156 Re: ESP32/ESP8266 » LyraT 乐鑫官方ESP32开发板入坑记录 (百度AI dueros 演示成功!) » 2018-07-25 08:08:41

可不可以不用按键激活, 用自然语言激活, 就像 "天猫精灵", "小爱同学" 一样, 用这种自然语言激活.

#157 Re: 8051/STC8/AT89C51/N76E003 » 新唐 N76E003 8051 1T 单片机入坑记录 » 2018-07-24 17:07:41

oktony 说:

感觉这个芯片总体是挺好的,最大的坑就是无法全部IO口都能中断,只能最大8个管脚中断,还有模块没有独立时钟,AD采样不能独立分频,STM8其实还是无法取代的。

总结到位!

#160 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2018-07-21 10:08:03

QQ20180721144346.png

diff --git a/arch/arm/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/dts/sun8i-v3s-licheepi-zero.dts
index 3aec3eb..14376f1 100644
--- a/arch/arm/dts/sun8i-v3s-licheepi-zero.dts
+++ b/arch/arm/dts/sun8i-v3s-licheepi-zero.dts
@@ -50,11 +50,12 @@

        aliases {
                serial0 = &uart0;
+               serial2 = &uart2;
                spi0 = &spi0;
        };

        chosen {
-               stdout-path = "serial0:115200n8";
+               stdout-path = "serial2:115200n8";
        };
 };

@@ -77,6 +78,12 @@
        status = "okay";
 };

+&uart2 {
+        pinctrl-0 = <&uart2_pins_a>;
+        pinctrl-names = "default";
+        status = "okay";
+};
+
 &usb_otg {
        dr_mode = "otg";
        status = "okay";
diff --git a/arch/arm/dts/sun8i-v3s.dtsi b/arch/arm/dts/sun8i-v3s.dtsi
index 8ab3021..f3ebbc6 100644
--- a/arch/arm/dts/sun8i-v3s.dtsi
+++ b/arch/arm/dts/sun8i-v3s.dtsi
@@ -214,6 +214,12 @@
                                bias-pull-up;
                        };

+
+            uart2_pins_a: uart2@0 {
+                pins = "PB0", "PB1";
+                function = "uart2";
+                bias-pull-up;
+            };
                        mmc0_pins_a: mmc0@0 {
                                pins = "PF0", "PF1", "PF2", "PF3",
                                       "PF4", "PF5";
diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
index 6ac42ac..d5b545f 100644
--- a/include/configs/sun8i.h
+++ b/include/configs/sun8i.h
@@ -27,6 +27,14 @@
        #define CONFIG_SUNXI_USB_PHYS   2
 #endif

+
+#define CONFIG_BOOTCOMMAND   "sf probe 0 108000000; "                           \
+                             "sf read 0x41000000 0x0F0000 0x010000; "  \
+                             "sf read 0x41010000 0x300000 0x800000; " \
+                             "bootz 0x41010000 - 0x41000000"
+
+#define CONFIG_BOOTARGS      "console=ttyS2,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:960k(uboot),64k(dtb),1M(background),1M(animation),8M(kernel),-(appendfs) root=/dev/ram0 rdinit=/init vt.global_cursor_default=0"
+
 /*
  * Include common sunxi configuration where most the settings are
  */
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index fcecd0b..2b0d9ca 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -274,7 +274,7 @@ extern int soft_i2c_gpio_scl;
 #endif

 #ifndef CONFIG_CONS_INDEX
-#define CONFIG_CONS_INDEX              1       /* UART0 */
+#define CONFIG_CONS_INDEX              3       /* UART0 */
 #endif

 #ifdef CONFIG_REQUIRE_SERIAL_CONSOLE
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Jul 21 2018 - 09:56: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@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  2  1  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 0x600000
SF: 6291456 bytes @ 0x110000 Read: OK
=> 

uboot 终于启动了.

#161 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2018-07-20 22:42:15

根据晕哥提示的修改, 接上串口 UART2 有显示,感觉只是spl 起来了,u-boot并没有启动:

U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Jul 20 2018 - 22:31:29)
DRAM: 64 MiB
Trying to boot from sunxi SPI

#162 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2018-07-20 17:47:45

QQ20180720174614.png

QQ20180720174524.png

修改了这两个文件:
    modified:   arch/arm/dts/sun8i-v3s-licheepi-zero.dts

/*
 * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
 *
 * This file is dual-licensed: you can use it either under the terms
 * of the GPL or the X11 license, at your option. Note that this dual
 * licensing only applies to this file, and not this project as a
 * whole.
 *
 *  a) This file is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of the
 *     License, or (at your option) any later version.
 *
 *     This file is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 * Or, alternatively,
 *
 *  b) Permission is hereby granted, free of charge, to any person
 *     obtaining a copy of this software and associated documentation
 *     files (the "Software"), to deal in the Software without
 *     restriction, including without limitation the rights to use,
 *     copy, modify, merge, publish, distribute, sublicense, and/or
 *     sell copies of the Software, and to permit persons to whom the
 *     Software is furnished to do so, subject to the following
 *     conditions:
 *
 *     The above copyright notice and this permission notice shall be
 *     included in all copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
 */

/dts-v1/;
#include "sun8i-v3s.dtsi"
#include "sunxi-common-regulators.dtsi"

/ {
	model = "Lichee Pi Zero";
	compatible = "licheepi,licheepi-zero", "allwinner,sun8i-v3s";

	aliases {
		serial0 = &uart0;
		serial2 = &uart2;
		spi0 = &spi0;
		ethernet0 = &emac;
	};

	chosen {
		stdout-path = "serial2:115200n8";
	};
};

&emac {
       phy = <&phy0>;
       phy-mode = "mii";
       allwinner,use-internal-phy;
       allwinner,leds-active-low;
       status = "okay";
       phy0: ethernet-phy@0 {
               reg = <1>;
       };
};

&mmc0 {
	pinctrl-0 = <&mmc0_pins_a>;
	pinctrl-names = "default";
	broken-cd;
	bus-width = <4>;
	vmmc-supply = <&reg_vcc3v3>;
	status = "okay";
};

&spi0 {
	status = "okay";
};

&uart0 {
	pinctrl-0 = <&uart0_pins_a>;
	pinctrl-names = "default";
	status = "okay";
};

&uart2 {
	pinctrl-0 = <&uart2_pins_a>;
	pinctrl-names = "default";
	status = "okay";
};


&usb_otg {
	dr_mode = "otg";
	status = "okay";
};

&usbphy {
	usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
	status = "okay";
};

    modified:   arch/arm/dts/sun8i-v3s.dtsi

/*
 * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
 *
 * This file is dual-licensed: you can use it either under the terms
 * of the GPL or the X11 license, at your option. Note that this dual
 * licensing only applies to this file, and not this project as a
 * whole.
 *
 *  a) This file is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of the
 *     License, or (at your option) any later version.
 *
 *     This file is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 * Or, alternatively,
 *
 *  b) Permission is hereby granted, free of charge, to any person
 *     obtaining a copy of this software and associated documentation
 *     files (the "Software"), to deal in the Software without
 *     restriction, including without limitation the rights to use,
 *     copy, modify, merge, publish, distribute, sublicense, and/or
 *     sell copies of the Software, and to permit persons to whom the
 *     Software is furnished to do so, subject to the following
 *     conditions:
 *
 *     The above copyright notice and this permission notice shall be
 *     included in all copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
 */

#include <dt-bindings/clock/sun8i-v3s-ccu.h>
#include <dt-bindings/reset/sun8i-v3s-ccu.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>

/ {
	#address-cells = <1>;
	#size-cells = <1>;
	interrupt-parent = <&gic>;

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu@0 {
			compatible = "arm,cortex-a7";
			device_type = "cpu";
			reg = <0>;
			clocks = <&ccu CLK_CPU>;
		};
	};

	timer {
		compatible = "arm,armv7-timer";
		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
	};

	clocks {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		osc24M: osc24M_clk {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <24000000>;
			clock-output-names = "osc24M";
		};

		osc32k: osc32k_clk {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <32768>;
			clock-output-names = "osc32k";
		};
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		dma: dma-controller@01c02000 {
			compatible = "allwinner,sun8i-v3s-dma";
			reg = <0x01c02000 0x1000>;
			interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&ccu CLK_BUS_DMA>;
			resets = <&ccu RST_BUS_DMA>;
			#dma-cells = <1>;
		};

		syscon: syscon@01c00000 {
			   compatible = "allwinner,sun8i-h3-syscon","syscon";
			   reg = <0x01c00000 0x34>;
		};

		mmc0: mmc@01c0f000 {
			compatible = "allwinner,sun7i-a20-mmc";
			reg = <0x01c0f000 0x1000>;
			clocks = <&ccu CLK_BUS_MMC0>,
				 <&ccu CLK_MMC0>,
				 <&ccu CLK_MMC0_OUTPUT>,
				 <&ccu CLK_MMC0_SAMPLE>;
			clock-names = "ahb",
				      "mmc",
				      "output",
				      "sample";
			resets = <&ccu RST_BUS_MMC0>;
			reset-names = "ahb";
			interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		mmc1: mmc@01c10000 {
			compatible = "allwinner,sun7i-a20-mmc";
			reg = <0x01c10000 0x1000>;
			clocks = <&ccu CLK_BUS_MMC1>,
				 <&ccu CLK_MMC1>,
				 <&ccu CLK_MMC1_OUTPUT>,
				 <&ccu CLK_MMC1_SAMPLE>;
			clock-names = "ahb",
				      "mmc",
				      "output",
				      "sample";
			resets = <&ccu RST_BUS_MMC1>;
			reset-names = "ahb";
			interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		mmc2: mmc@01c11000 {
			compatible = "allwinner,sun7i-a20-mmc";
			reg = <0x01c11000 0x1000>;
			clocks = <&ccu CLK_BUS_MMC2>,
				 <&ccu CLK_MMC2>,
				 <&ccu CLK_MMC2_OUTPUT>,
				 <&ccu CLK_MMC2_SAMPLE>;
			clock-names = "ahb",
				      "mmc",
				      "output",
				      "sample";
			resets = <&ccu RST_BUS_MMC2>;
			reset-names = "ahb";
			interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		usb_otg: usb@01c19000 {
			compatible = "allwinner,sun8i-h3-musb";
			reg = <0x01c19000 0x0400>;
			clocks = <&ccu CLK_BUS_OTG>;
			resets = <&ccu RST_BUS_OTG>;
			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
			interrupt-names = "mc";
			phys = <&usbphy 0>;
			phy-names = "usb";
			extcon = <&usbphy 0>;
			status = "disabled";
		};

		usbphy: phy@01c19400 {
			compatible = "allwinner,sun8i-v3s-usb-phy";
			reg = <0x01c19400 0x2c>,
			      <0x01c1a800 0x4>;
			reg-names = "phy_ctrl",
				    "pmu0";
			clocks = <&ccu CLK_USB_PHY0>;
			clock-names = "usb0_phy";
			resets = <&ccu RST_USB_PHY0>;
			reset-names = "usb0_reset";
			status = "disabled";
			#phy-cells = <1>;
		};

		ccu: clock@01c20000 {
			compatible = "allwinner,sun8i-v3s-ccu";
			reg = <0x01c20000 0x400>;
			clocks = <&osc24M>, <&osc32k>;
			clock-names = "hosc", "losc";
			#clock-cells = <1>;
			#reset-cells = <1>;
		};

		rtc: rtc@01c20400 {
			compatible = "allwinner,sun6i-a31-rtc";
			reg = <0x01c20400 0x54>;
			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
		};

		pio: pinctrl@01c20800 {
			compatible = "allwinner,sun8i-v3s-pinctrl";
			reg = <0x01c20800 0x400>;
			interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
			clock-names = "apb", "hosc", "losc";
			gpio-controller;
			#gpio-cells = <3>;
			interrupt-controller;
			#interrupt-cells = <3>;

           emac_rgmii_pins: emac0@0 {
                   allwinner,pins = "PD0", "PD1", "PD2", "PD3",
                                   "PD4", "PD5", "PD7",
                                   "PD8", "PD9", "PD10",
                                   "PD12", "PD13", "PD15",
                                   "PD16", "PD17";
                   allwinner,function = "emac";
                   allwinner,drive = <SUN4I_PINCTRL_40_MA>;
                   allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
           };

			uart0_pins_a: uart0@0 {
				pins = "PB8", "PB9";
				function = "uart0";
				bias-pull-up;
			};

			uart2_pins_a: uart2@0 {
				pins = "PB0", "PB1";
				function = "uart2";
				bias-pull-up;
			};

			mmc0_pins_a: mmc0@0 {
				pins = "PF0", "PF1", "PF2", "PF3",
				       "PF4", "PF5";
				function = "mmc0";
				drive-strength = <30>;
				bias-pull-up;
			};

			spi0_pins: spi0 {
				pins = "PC0", "PC1", "PC2", "PC3";
				function = "spi0";
			};
		};

		timer@01c20c00 {
			compatible = "allwinner,sun4i-a10-timer";
			reg = <0x01c20c00 0xa0>;
			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&osc24M>;
		};

		wdt0: watchdog@01c20ca0 {
			compatible = "allwinner,sun6i-a31-wdt";
			reg = <0x01c20ca0 0x20>;
			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
		};

		uart0: serial@01c28000 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c28000 0x400>;
			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu CLK_BUS_UART0>;
			resets = <&ccu RST_BUS_UART0>;
			status = "disabled";
		};

		uart1: serial@01c28400 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c28400 0x400>;
			interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu CLK_BUS_UART1>;
			resets = <&ccu RST_BUS_UART1>;
			status = "disabled";
		};

		uart2: serial@01c28800 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c28800 0x400>;
			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu CLK_BUS_UART2>;
			resets = <&ccu RST_BUS_UART2>;
			status = "disabled";
		};

		spi0: spi@1c68000 {
			compatible = "allwinner,sun8i-h3-spi";
			reg = <0x01c68000 0x1000>;
			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
			clock-names = "ahb", "mod";
			pinctrl-names = "default";
			pinctrl-0 = <&spi0_pins>;
			resets = <&ccu RST_BUS_SPI0>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		emac: ethernet@1c30000 {
			compatible = "allwinner,sun8i-h3-emac";
			reg = <0x01c30000 0x104>, <0x01c00030 0x4>;
			reg-names = "emac", "syscon";
			interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
			resets = <&ccu RST_BUS_EMAC>, <&ccu RST_BUS_EPHY>;
			reset-names = "ahb", "ephy";
			clocks = <&ccu CLK_BUS_EMAC>, <&ccu CLK_BUS_EPHY>;
			clock-names = "ahb", "ephy";
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
		};

		gic: interrupt-controller@01c81000 {
			compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
			reg = <0x01c81000 0x1000>,
			      <0x01c82000 0x1000>,
			      <0x01c84000 0x2000>,
			      <0x01c86000 0x2000>;
			interrupt-controller;
			#interrupt-cells = <3>;
			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
		};
	};
};

但是发现串口2并没有数据输出.

#163 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2018-07-20 16:28:34

awfans
回复: 76

git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental

代码是上面这里下载到的.

默认是从 PB8,PB9 这组 UART0 输出的,
我现在想改到 PB0, PB1 这组 UART2 输出,
应该如何做到呢?





以下由 @哇酷小二 2021-02-10 添加
------------------------------------
相关链接:
荔枝派zero V3S u-boot调试信息从UART1(PE21/PE22)输出没有成功,还遗留什么没有修改? (修改成功,方案在8楼)
http://whycan.com/t_1624.html

#165 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 请问这种螺丝柱是通过什么工艺弄进去的? » 2018-07-11 09:48:02

awfans
回复: 13

QQ20180711094238.jpg

请问这种螺丝柱是通过什么工艺弄进去的?
我们公司的用自攻牙的螺丝柱,
在流水线上稍用力就打爆了,
造成产品不良率有点高.
今天看到竞品用这种柱子,装配方便,而且不容易打穿.

#166 VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 请教一个 linux kernel问题, 确保每个自旋锁都处于自身的缓冲行中 » 2018-07-06 08:22:10

awfans
回复: 0

struct zone 用 ZONE_PADDING 分隔成几个部分,其中 zone->lock 和 zone->lru_lock 分在不同的cache line
书上说,“确保每个自旋锁都处于自身的缓冲行中” 可以提高性能.
哪位 大牛 能给小弟说说, 这怎么就能提高性能了
尤其是 一个大结构体,里面好几个锁, 中间填充填充,让每个锁处在不同的cache line上
这样的做法,究竟是怎么提高性能的?

如果把这两个锁 都塞到同一个64字节当中,不就永远都在同一个cache line中了嘛,何必非要分开?

#171 Re: 全志 SOC » 请教大神们一个问题, 为什么V3s Linux 擦除spi flash出现 Permission denied 错误 » 2018-06-27 14:50:33

谢谢大神, 果然是 ro 的问题,去掉就好了.

# flashcp -v zImage /dev/mtd4
Erasing block: 113/113 (100%)
Writing kb: 7172/7172 (100%)
Verifying kb: 7172/7172 (100%)

#172 Re: 全志 SOC » 请教大神们一个问题, 为什么V3s Linux 擦除spi flash出现 Permission denied 错误 » 2018-06-27 14:26:18

对, 是主线 Linux 4.13-y

[    0.000000] Kernel command line: console=ttySl,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:960k(uboot)ro,64k(dtb)ro,1M(ext1)ro,1M(ext2),6M(kernel)ro,-(fs) root=/dev/ram0 rdinit=/init vt.global_cursor_default=0

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000f0000 00010000 "uboot"
mtd1: 00010000 00010000 "dtb"
mtd2: 00100000 00010000 "ext1"
mtd3: 00100000 00010000 "ext2"
mtd4: 00800000 00010000 "kernel"
mtd5: 01500000 00010000 "fs"

#173 Re: Nuvoton N32905/N32926/NUC972/N9H20/N9H26/N9H30 » NUC972自带LCD控制器的吗?我看了下手册,好像是这样。请知道的大佬们,指点一下 » 2018-06-27 14:12:10

19697805 说:

我也是觉得解码有问题,但是这个文件是用官方例程解码,保存的

我记得以前用NUC972的jpeg解码没问题,只是后来公司选了全志的方案就没弄了。

#174 全志 SOC » 请教大神们一个问题, 为什么V3s Linux 擦除spi flash出现 Permission denied 错误 » 2018-06-27 14:10:52

awfans
回复: 5

# flash_eraseall /dev/mtd0
flash_eraseall: can't open '/dev/mtd0': Permission denied

#176 Re: NB-IoT/2G模块/4G模块/GPRS模块/GPS/北斗 » 上海移远 M26 模块入坑记录 » 2018-06-27 08:53:59

M26不带 GPS/北斗, 看起来应该用联发科 MT2502 方案.

#177 Re: NB-IoT/2G模块/4G模块/GPRS模块/GPS/北斗 » 上海移远 M26 模块入坑记录 » 2018-06-27 08:41:26

M26上电启动后,默认没有开机信息, 不知道能不能通过AT指令修改设置。


如果要显示来电号码, 要通过下面的指令:

AT+QCLIP=1
AT+CLIP=1

#178 Re: NB-IoT/2G模块/4G模块/GPRS模块/GPS/北斗 » 上海移远 M26 模块入坑记录 » 2018-06-27 08:33:35

http://www.eet-china.com/news/article/201706211552
ofo小黄车启用NB-IoT智能锁,拆开一看呵呵了



609b44ab-de69-4a94-b0e2-056d31899de5.jpg
看来要不了多久就会有大量的 M26 涌入二手市场。

#179 Re: ESP32/ESP8266 » 使用ble-spp-serverdemo做的蓝牙透传,IOS能连上,安卓连不上怎么解决。那个demo同时支持SPP和BLE模式。 » 2018-06-27 08:12:21

请教楼主, 基于 BLE 的 spp server, 要苹果的MFI认证吗?
我记得 蓝牙2.1的 spp 一定要MFI认证才可以使用。

#180 Re: ST/STM8/STM8S/STM8L » stm8l gpio模拟串口,有没有好方法啊,我用定时器不停判断高低电平,现在接收数据老是有误码 » 2018-06-26 08:52:34

谢谢大家搞定了, 我提高了采用频率,连续三个低则判定低电平,连续三个高则判定高电平。

#182 Re: ESP32/ESP8266 » ESP32 的 A2DP只有 SINK例程, 为什么没有Source例程,我们公司急需一个蓝牙喇叭发射端(Source) » 2018-06-26 08:33:42

szxxbb 说:

我遇到的问题是,如果旁边有几个设备都开通蓝牙,特别是手机开通蓝牙,这个demo查询蓝牙设备就会反复查到手机蓝牙,而不太容易查到蓝牙耳机。

估计和信道满员(瞎猜的)有关,你会发现半夜的时候 WIFI信号会比白天好很多,因为你楼上楼下的邻居已经熟睡,不占用信道。

#183 Re: ST/STM8/STM8S/STM8L » stm8l gpio模拟串口,有没有好方法啊,我用定时器不停判断高低电平,现在接收数据老是有误码 » 2018-06-23 08:21:30

你用大循环做肯定不行
别人的例子只是例子而已,只是告诉你有这么一个功能和方法
你需要用状态机
主循环去轮巡状态机,中断去填充缓冲区
你想想,如果让你设计个硬件串口,你能如何设计?就解决这个问题了
另外就是,单片机要跑16M
示波器看下波特率是不是偏差太大,如果太大,需要用外部晶振

#184 Re: ST/STM8/STM8S/STM8L » stm8l gpio模拟串口,有没有好方法啊,我用定时器不停判断高低电平,现在接收数据老是有误码 » 2018-06-23 08:20:24

超级萌新 说:

你可以短路你自己模拟的两个io,看看能不能自发自收

前面几个字节正常,后面就错了,是不是由于定时器中断代码运行占用了一定的时间,导致后面时序偏差了

#185 ST/STM8/STM8S/STM8L » stm8l gpio模拟串口,有没有好方法啊,我用定时器不停判断高低电平,现在接收数据老是有误码 » 2018-06-23 08:17:56

awfans
回复: 12

stm8l gpio模拟串口,有没有好方法啊,我用定时器不停判断高低电平,现在接收数据老是有误码,
就一个串口,现在要三个,得模拟两个,
模拟串口9600波特率,
是用定时器不断的判断起始位接收数据,还是外部中断加定时器,
两种方法都试了,都只能接受到前面几个字节是对的,后面就错了.
晶振16Mhz 2分频, 8Mhz,
我用示波器比较了标准串口的104us,然后我用定时器拉高拉低io口,示波器量了也是104us,
发送没什么问题,就是接收比较麻烦.

#186 Re: Php/Nodejs/Web/HTML5/Javascript/微信开发/Python » 学习Python,有什么资源推荐? » 2018-06-22 08:08:24

Lvy 说:

可以看小甲鱼的视频或者fishc论坛

B站看过小甲鱼的python视频,会讲些不好笑的黄色段子 ....

#190 Re: Nuvoton N32905/N32926/NUC972/N9H20/N9H26/N9H30 » NUC972,刷UCGUI,刷得慢。请大佬们知道 » 2018-06-20 17:57:47

我想按钮显示图片,我用的是UCGUI,不支持流位图,现在用的是BUTTON_SetGIF显示。能成功显示按钮图片,但是要啊在应用函数后面WM_Exec();才能显示,不然会显示不成功。

#194 Re: 全志 SOC » licheepi zero BSP 内核(linux3.4) 编译教程 » 2018-05-01 23:07:22

那你看下有没有生成 zImage,
现在我比较喜欢用 camdroid,
详情搜一下本站  芒果派

#195 Re: 全志 SOC » V3s 主线linux4.13,PB口作为外部中断EINT,在内核里面作中断,有会用的吗? » 2018-05-01 22:59:35

主线内核不太清楚,
camdroid的 TSC2003 触摸屏就用了中断,
是正常的。

#197 ESP32/ESP8266 » ESP_ADF 的 baidu api demo 没有跑起来, 请大神们帮我分析一下。 » 2018-04-30 22:16:18

awfans
回复: 6

rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5536
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:13756
entry 0x40078fb4
I (30) boot: ESP-IDF v3.0-rc1-257-g489e98cf-dirty 2nd stage bootloader
I (30) boot: compile time 21:58:53
I (33) boot: Enabling RNG early entropy source...
I (36) boot: SPI Speed      : 40MHz
I (40) boot: SPI Mode       : DIO
I (44) boot: SPI Flash Size : 8MB
I (48) boot: Partition Table:
I (52) boot: ## Label            Usage          Type ST Offset   Length
I (59) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (67) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (74) boot:  2 factory          factory app      00 00 00010000 00100000
I (82) boot: End of partition table
I (86) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1d4c0 (120000) map
I (137) esp_image: segment 1: paddr=0x0002d4e8 vaddr=0x3ffb0000 size=0x02b28 ( 11048) load
I (141) esp_image: segment 2: paddr=0x00030018 vaddr=0x400d0018 size=0x7fe70 (523888) map
0x400d0018: _stext at ??:?

I (327) esp_image: segment 3: paddr=0x000afe90 vaddr=0x3ffb2b28 size=0x006ec (  1772) load
I (328) esp_image: segment 4: paddr=0x000b0584 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _iram_start at C:/esp-adf/esp-idf/components/freertos/xtensa_vectors.S:1685

I (334) esp_image: segment 5: paddr=0x000b098c vaddr=0x40080400 size=0x1282c ( 75820) load
I (374) esp_image: segment 6: paddr=0x000c31c0 vaddr=0x400c0000 size=0x00000 (     0) load
I (385) boot: Loaded app from partition at offset 0x10000
I (385) boot: Disabling RNG early entropy source...
I (386) cpu_start: Pro cpu up.
I (389) cpu_start: Starting app cpu, entry point is 0x40080ff8
0x40080ff8: call_start_cpu1 at C:/esp-adf/esp-idf/components/esp32/cpu_start.c:215

I (0) cpu_start: App cpu up.
I (400) heap_init: Initializing. RAM available for dynamic allocation:
I (407) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (413) heap_init: At 3FFB9568 len 00026A98 (154 KiB): DRAM
I (419) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (425) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (432) heap_init: At 40092C2C len 0000D3D4 (52 KiB): IRAM
I (438) cpu_start: Pro cpu start user code
I (120) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (148) BAIDU_SPEECH_EXAMPLE: [ 0 ] Start and wait for Wi-Fi network
I (148) wifi: wifi firmware version: 7ff2a2a
I (148) wifi: config NVS flash: enabled
I (158) wifi: config nano formating: disabled
I (158) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUS
E
I (168) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUS
E
I (198) wifi: Init dynamic tx buffer num: 32
I (198) wifi: Init data frame dynamic rx buffer num: 32
I (198) wifi: Init management frame dynamic rx buffer num: 32
I (208) wifi: wifi driver task: 3ffc0d80, prio:23, stack:4096
I (208) wifi: Init static rx buffer num: 10
I (208) wifi: Init dynamic rx buffer num: 32
I (218) wifi: wifi power manager task: 0x3ffc59c0 prio: 21 stack: 2560
I (248) phy: phy_version: 366.0, ba9923d, Dec 29 2017, 14:25:06, 0, 0
I (248) wifi: mode : sta (30:ae:a4:46:ac:a8)
I (618) wifi: n:3 0, o:1 0, ap:255 255, sta:3 0, prof:1
I (1598) wifi: state: init -> auth (b0)
I (1598) wifi: state: auth -> assoc (0)
I (1608) wifi: state: assoc -> run (10)
I (1708) wifi: connected with lingtel.cn, channel 3
I (2608) event: sta ip: 192.168.9.124, mask: 255.255.255.0, gw: 192.168.9.1
I (2608) BAIDU_SPEECH_EXAMPLE: [ 1 ] Start audio codec chip
I (2618) ES8388_DRIVER: init,out:02, in:00
I (2628) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (2628) AUDIO_HAL: Codec mode is 2, Ctrl:1
I (2638) BAIDU_SPEECH_EXAMPLE: [2.0] Create audio pipeline for playback
I (2638) BAIDU_SPEECH_EXAMPLE: [2.1] Create http stream to read data
I (2648) BAIDU_SPEECH_EXAMPLE: [2.2] Create i2s stream to write data to codec chip
I (2658) I2S: DMA Malloc info, datalen=blocksize=1200, dma_buf_count=3
I (2658) I2S: DMA Malloc info, datalen=blocksize=1200, dma_buf_count=3
I (2668) I2S: APLL: Req RATE: 44100, real rate: 43945.016, BITS: 16, CLKM: 1, BCK: 8, MCLK: 1128
9966.924, SCLK: 1406240.500000, diva: 1, divb: 0
I (2678) BAIDU_SPEECH_EXAMPLE: [2.3] Create mp3 decoder to decode mp3 file
I (2688) BAIDU_SPEECH_EXAMPLE: [2.4] Register all elements to audio pipeline
I (2698) BAIDU_SPEECH_EXAMPLE: [2.5] Link it together http_stream-->mp3_decoder-->i2s_stream-->[
codec_chip]
I (2708) BAIDU_SPEECH_EXAMPLE: [2.6] Setup uri (http as http_stream, mp3 as mp3 decoder, and def
ault output is i2s)
I (2718) BAIDU_SPEECH_EXAMPLE: [ 4 ] Setup event listener
I (2728) BAIDU_SPEECH_EXAMPLE: [4.1] Listening event from all elements of pipeline
I (2738) BAIDU_SPEECH_EXAMPLE: [4.2] Listening event from peripherals
I (2738) BAIDU_SPEECH_EXAMPLE: [ 5 ] Start audio_pipeline
I (2748) AUDIO_ELEMENT: [http] Element task created
I (2748) AUDIO_ELEMENT: [mp3] Element task created
I (2758) AUDIO_ELEMENT: [i2s] Element task created
I (2758) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:253, MEM Total:182768 Bytes

W (2768) AUDIO_ELEMENT: [http] RESUME:Element has not running,state:3,task_run:1
I (2778) AUDIO_ELEMENT: [http] AEL_MSG_CMD_RESUME,state:3
W (2798) AUDIO_ELEMENT: [mp3] RESUME:Element has not running,state:3,task_run:1
I (2798) AUDIO_ELEMENT: [mp3] AEL_MSG_CMD_RESUME,state:3
I (2798) MP3_DECODER: MP3 opened
W (2808) AUDIO_ELEMENT: [i2s] RESUME:Element has not running,state:3,task_run:1
I (2808) AUDIO_ELEMENT: [i2s] AEL_MSG_CMD_RESUME,state:3
I (2818) I2S_STREAM: AUDIO_STREAM_WRITER
I (2828) AUDIO_PIPELINE: Pipeline started
I (3658) I2S: APLL: Req RATE: 16000, real rate: 15999.022, BITS: 16, CLKM: 1, BCK: 8, MCLK: 4096
000.000, SCLK: 511968.718750, diva: 1, divb: 0
W (3658) AUDIO_ELEMENT: [i2s] RESUME:Element has not running,state:3,task_run:1
I (3668) AUDIO_ELEMENT: [i2s] AEL_MSG_CMD_RESUME,state:3
I (3668) I2S_STREAM: AUDIO_STREAM_WRITER
I (3818) BAIDU_AUTH: Access token=24.a4b6e6b604319fd37c097fae886a687f.2592000.1527689504.282335-11175544
I (4108) HTTP_STREAM: Content-Type = application/json
W (4108) HTTP_STREAM: No more data,errno:9
I (4108) AUDIO_ELEMENT: IN-[http] AEL_IO_DONE,0
I (4118) AUDIO_ELEMENT: IN-[mp3] AEL_IO_DONE,-2
Encountered error reading when MP3 init
E (4118) AUDIO_ELEMENT: [mp3] AEL_STATUS_ERROR_OPEN
I (4128) MP3_DECODER: Closed
E (4128) AUDIO_ELEMENT: [mp3] AEL_MSG_CMD_ERROR
W (4148) AUDIO_ELEMENT: IN-[i2s] AEL_IO_ABORT
W (4368) BAIDU_SPEECH_EXAMPLE: [ * ] Stop event received
I (4368) BAIDU_SPEECH_EXAMPLE: [ 6 ] Stop audio_pipeline
I (4368) AUDIO_PIPELINE: audio_pipeline_unlinked
I (4388) wifi: state: run -> init (0)
I (4388) wifi: n:3 0, o:3 0, ap:255 255, sta:3 0, prof:1
W (4388) PERIPH_WIFI: Wi-Fi disconnected from SSID lingtel.cn, auto-reconnect enabled, reconnect after 5000 ms
I (4398) wifi: flush txq
I (4398) wifi: stop sw txq
I (4398) wifi: lmac stop hw txq
I (4398) wifi: Deinit lldesc rx mblock:10
E (9398) wifi: esp_wifi_connect 858 wifi is not init

https://github.com/espressif/esp-adf/tree/master/examples/cloud_services/pipeline_baidu_speech_mp3

#198 Re: ESP32/ESP8266 » 请问如果使用AP5056这种锂电充电芯片, 我在单片机/液晶屏怎么知道已经充满,或者充到什么地步了?一楼有AP5056手册 » 2018-04-30 22:14:01

达克罗德 说:

我都是用ad采样电池电压然后根据查表法得到电量估计

嗯嗯,我找找看ESP有没有 ADC口。

#200 Re: ST/STM8/STM8S/STM8L » STM8 写的 433Mhz 解码器 » 2018-04-30 16:48:57

解码各种433Mhz 遥控器,安防设备信号。

页脚

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

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