您尚未登录。

#1 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 试一试 搭建 OpenCV 入门环境 » 2021-09-20 10:46:12

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
    if( argc != 2)
    {
     cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
     return -1;
    }

    Mat image, image2;
    //image = imread(argv[1], CV_LOAD_IMAGE_COLOR);   // Read the file
    image = imread(argv[1], IMREAD_GRAYSCALE);   // Read the file

    threshold(image, image2, 128, 255, THRESH_BINARY | THRESH_OTSU);

    if(! image2.data )                              // Check for invalid input
    {
        cout <<  "Could not open or find the image" << std::endl ;
        return -1;
    }

    namedWindow( "Display window", WINDOW_AUTOSIZE);// Create a window for display.
    imshow( "Display window", image2);                   // Show our image inside it.

    waitKey(0);                                          // Wait for a keystroke in the window
    return 0;
}

QQ截图20210920104543.png

#3 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » KEIL开发LVGL显示汉字不能正常显示 » 2021-05-28 08:28:48

@伍零壹
可能是 with bom和no bom的区别,就是with bom在文件头多四个字节。

#4 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 这条路应该怎么走 » 2021-05-25 11:40:54

没必要专门去学习,有项目的时候针对性学习一下就好了。

#6 Re: 全志 SOC » Buildroot如何配置某个单独的软件包? » 2021-05-24 11:49:52

其他次要软件包估计没实现,得自己照葫芦画瓢

#7 Re: ESP32/ESP8266 » 请教esp32官方例子 restful_server 关于 semihost 的设置方法 » 2021-05-24 09:52:37

这个是半主机问题,还是文件不存在问题?

Failed to open file : /www/index.html

#9 Re: 全志 SOC » 终于搞定f1c100s的i2s输出 » 2021-05-23 14:49:28

Molly 说:
raspberryman 说:

请问楼主,mclk怎么给呢?

应该是可以的,但我现在用的pcm5102a可以不给mclk
我研究一下,晚点回复你

嗯嗯,我觉得应该和摄像头那个PCLK输出一样。

楼主方便贴一份完整的dts和config吗,有空我也试一试。

#13 Re: 全志 SOC » 全志官方melis系统在WIN7 WIN10中的环境搭建 » 2021-05-18 09:57:26

48d73cedb94fa035.png


-193e7226601249a4.png

感谢楼主,我以前用 msys,导致编译ucgui的命令行超过8192进行不下去,现在改用cygwin搞定了。

#14 Re: 全志 SOC » 如何将flash中的bin文件加载到片上DDR使用? » 2021-05-17 11:47:00

1587463659 说:

对,裸奔的

xboot或者uboot里面有 spi和spiflash的读取代码,你把spiflash指定地方,指定长度的数据,读到ddr地址即可。

#16 Re: 全志 SOC » java后端工程师玩linux卡片电脑 » 2021-05-17 09:23:43

嵌入式开发 立刻/马上可以看到输出结果,这就是乐此不疲的原因。

#18 Re: 全志 SOC » v3s reboot 指令不起作用,用哪个命令重启系统? » 2021-05-15 16:39:30

linux的reboot是pmu或者看门狗实现的。

你跟踪一下吧。


今天确定了一件事情, linux的reboot命令到最后会调用看门狗的restart函数重启
http://whycan.com/t_5521.html
(出处:哇酷开发者社区)

#19 Re: 全志 SOC » v3s reboot 指令不起作用,用哪个命令重启系统? » 2021-05-15 16:06:28

feng888 说:
raspberryman 说:

提问的艺术:麻烦把日志和详细情况说一下。

控制台输入 reboot 回车

#
#
#
# reboot
#
#

你用的sdk版本是哪个?是不是关掉了看门狗?

#21 Re: 全志 SOC » VGA module & baremetal programming » 2021-05-14 18:20:55

见过电阻网络的,没见过这种,楼主牛🐂!

#26 全志 SOC » 两个设备都支持otg, 用typeC to typeC 的线连接,如何协商主从? » 2021-05-13 11:55:15

raspberryman
回复: 1

两个设备都支持otg, 用typeC to typeC 的线连接,如何协商主从?

两个设备都支持otg, 用typeC to typeC 的线连接,如何协商主从?

要求是 AP(主)->ios (从), AP(从)- Android(主)

#27 Re: Php/Nodejs/Web/HTML5/Javascript/微信开发/Python » 研究研究本站显示 emoji 表情 » 2021-05-13 09:24:19

🚽🦕🔥☀️🐤😣😬😹👩🤦♀️👨👨👦🌂👜🎩🎓🧦🧣🧦👒⚽️⚾️🥊🚌🛵💔♉️🇨🇳🇦🇱🇩🇿🇦🇫

#28 Re: 全志 SOC » V3S tina系统 如何添加外置RTC » 2021-05-13 09:20:33

potato 说:

在mach-sunxi目录下sun8i.c中增加i2c_board_info结构体,在dev init函数中调用i2c_register_board_info来注册驱动。

感谢分享宝贵经验😄

#29 Re: 全志 SOC » V3S tina系统 如何添加外置RTC » 2021-05-12 21:05:53

potato 说:

已解决

请教是怎么解决的呢?

#30 Re: 全志 SOC » 全志melis系统环境搭建、打包、烧录流程 » 2021-05-11 09:07:05

felixguan 说:

ePDKv100.img可以改成bin文件,直接烧录到nor flash里面跑么?

不可以,官方img是有格式的。

#31 Re: 全志 SOC » F1c100s是否成功启动SPI屏(st7789v)!? » 2021-05-07 09:59:43

usb键盘? 这个有点复杂吧?

首先确保你的usb键盘工作正常,用evtest测试,然后还要做别的处理才行。

#32 Re: ST/STM8/STM8S/STM8L » 公司新做的 STM8L151C8T6 板子, IAR调试出现问题. » 2021-05-06 11:58:16

changfen009 说:

看一下电源的驱动能力,再测一下输入的IO。

就是供电引起的。话说nb现在死透了吗?

#37 Re: Php/Nodejs/Web/HTML5/Javascript/微信开发/Python » 研究研究本站显示 emoji 表情 » 2021-04-24 19:40:55

💪👈👉☝👆👇✌✋👌👍👎✊👊👋👏👐✍👣👀👂👃👅👄💋👓👔👕👖👗👘👙👚👛👜👝🎒💼👞👟👠👡👢👑👒🎩🎓💄💅💍🌂

#40 Re: 全志 SOC » 请问一下,A33GPIO按键驱动该怎么配置,配置文件使用的是sys_config.fex???? » 2021-04-20 11:58:07

jkl 说:

也是变态了,问题出在A33的一些IO口不能够申请中断,仔细注意了一下数据手册才发现。
https://whycan.com/files/members/2437/1618890808(1)_20210420-1155.jpg

这是全志的基本操作了,如果不改pcb,只能timer轮询了。

#45 Re: 全志 SOC » 写一个非常简单的 V3s@linux4.13-y 中断驱动 » 2021-04-15 22:33:42

mysteryli 说:

这种在应用层怎么调用?

只是一个简单的演示代码,如果需要应用层调用,需要加 open/close/read/write/ioctl 等操作代码

#48 Re: 全志 SOC » 求助:全志A33芯片sd卡kernel启动时无法挂载mmc2 » 2021-04-11 20:47:25

linxx 说:

我也不清楚为何,mmc默认的drive-strength = <30>,结果设置到<40>,增强了驱动能力,反而不行了,就很奇怪。还希望有大神能解释一下.

好像我搞x3驱动eMMC的时候遇到一样的问题,改下驱动能力就好了

#50 Re: 全志 SOC » 请问f1c100s nano开发板如何测试液晶屏驱动是否正确? » 2021-04-10 15:56:59

542396750@qq.com 说:

仿写 panel_simple.c中800*480的代码。好了

改成什么样的?怎么改的呢?

#51 Re: 全志 SOC » 分享我画的启明云端SSD202核心板对应的底板,引出两USB口,网口,TF卡,调试串口转micro USB输出,50Pin标准7寸液晶屏接口 » 2021-04-08 08:58:45

saub 说:

看来没人感兴趣,就结贴了吧

感谢楼主分享,可能玩ssd20x的朋友还不多,慢慢就会热了

#55 Re: 全志 SOC » 在荔枝派nano环境下,全志tina移植ax88772c的问题求助 » 2021-04-07 11:55:50

MagicKind 说:
raspberryman 说:

usb0网卡是啥呢?

不清楚,而且我还有个问题这usb0网卡每次启动mac都会改变的,enmm,还有如果成功识别到网卡的话不是以ethxx开头的吗,而且我给这usb0配了IP之后和本地的电脑也ping不通,在同一个局域网

这个是不是 rndis网卡?

#57 Re: 全志 SOC » 发现一个比较牛B的芯片,RDA8810M,这个芯片不仅内置256MDDR2,还内置了512Mflash,用来跑linux+QT妥妥的 » 2021-04-07 09:52:11

saub 说:
raspberryman 说:

用香橙派开发板把项目开发到一半,同事说可能停产了,到处打听确实停产了,都停产了,推广个锤子啊

ᥬ?᭄我也是无意看到这个芯片,没了解清楚,见谅哈

兄台我不是说你,是说那个卖开发板的。

#58 Re: 全志 SOC » 发现一个比较牛B的芯片,RDA8810M,这个芯片不仅内置256MDDR2,还内置了512Mflash,用来跑linux+QT妥妥的 » 2021-04-07 09:39:01

用香橙派开发板把项目开发到一半,同事说可能停产了,到处打听确实停产了,都停产了,推广个锤子啊

#59 Re: Nuvoton N32905/N32926/NUC972/N9H20/N9H26/N9H30 » GNAND init failed !!!!!!!! 硬件肯定没问题,我哪里配置错了。 » 2021-04-07 09:36:59

新唐太j 8缺人才了,连一个uboot都不会移植,然后每个芯片一个不同的烧录软件,用户体验辣鸡级别。

#61 Re: 全志 SOC » 尝试从零构建F1C100s开发环境 » 2021-04-05 00:01:12

[    0.952845] Creating 4 MTD partitions on "spi0.0":
[    0.957800] 0x000000000000-0x000000100000 : "u-boot"
[    0.966748] rfd_ftl: no RFD magic found in 'u-boot'
[    0.973911] ftl_cs: FTL header not found.
[    0.979699] 0x000000100000-0x000000210000 : "dtb"
[    0.988407] rfd_ftl: no RFD magic found in 'dtb'
[    0.995293] ftl_cs: FTL header not found.
[    1.000986] 0x000000110000-0x000000620000 : "kernel"
[    1.019761] rfd_ftl: no RFD magic found in 'kernel'
[    1.027133] ftl_cs: FTL header not found.
[    1.032773] 0x000000510000-0x000001000000 : "rootfs"
[    1.066081] rfd_ftl: no RFD magic found in 'rootfs'
[    1.073276] ftl_cs: FTL header not found.

奇怪,这是什么错误?

#62 Re: 全志 SOC » 怎么从SPI NAND上删除uboot,内核,根文件 » 2021-04-03 17:22:12

在uboot用mtd命令删
在linux用flash_eraseall 命令删

#64 Re: 全志 SOC » V3S 如何 LCD 背光调整? » 2021-04-01 15:51:51

建议直接用 devmem 读写寄存器测试,看是不是驱动程序有bug?

#70 Re: 全志 SOC » v3s荔枝派spi启动ssd1306-oled(小白求教) » 2021-03-30 10:34:05

开始测试v3s 荔枝派zero 接oled, 请围观.
http://whycan.com/t_329.html
(出处:哇酷开发者社区)

#71 Re: 全志 SOC » 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享] » 2021-03-30 09:55:55

MagicKind,麻烦重新开帖,把你的日志和.config配置都贴上,否则谁能猜中?

#72 Re: 全志 SOC » 全志 F1C200s Tina 修改 SPI NOR FLASH 芯片尺寸和分区大小 [分享] » 2021-03-30 09:44:40

MagicKind 说:
飞翔工控 说:
MagicKind 说:

大佬,请问下,你知道VFS: Cannot open root device "mtdblock4" or unknown-block(0,0): error -6的问题是什么吗

https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html

#define ENXIO            6      /* No such device or address */

/dev/mtdblock4 设备不存在

这个不是系统会自己创建的吗

要追溯起来,可复杂了。
要提供dtb/bootargs mtdparts传入分区参数,要勾选mtd和mtdblock驱动

#73 Re: DOPI开源摄像头(HI3516/HI3518) » 询问hi3516ev200输入adv7180问题 » 2021-03-29 20:32:42

挂逻辑分析仪,看下有没有中断和时序对不对

#74 Re: 全志 SOC » 全志官方tina linux sdk sys_config.fex 的 uart_debug_port 参数是如何影响uboot和linux » 2021-03-28 23:43:43

TeveT 说:

楼主用的是3.5的吗,4.9的内核版本,已经可以直接操作dts了呀

请问如何选择linux版本?f1c200s  tina3.5

#77 Re: 全志 SOC » 偶然发现荔枝派V3S上电有概率不能启动TF程序的问题,电源都正常工作。 » 2021-03-24 11:16:22

socbis 说:

荔枝派Zero,因为新到没焊SPIFlash,这两天都用SD卡启动的,确实会有概率不启动,我还以为是我的USB口电压不够,看来是板卡缺陷啊

可能是断电不彻底,TF卡没有彻底复位。

#78 Re: 全志 SOC » 小白找大神帮忙搞驱动,有偿 » 2021-03-22 22:09:08

io模拟pwm控制背光有什么苦衷吗,屏幕会很闪的

#80 Re: 全志 SOC » 关于V3S内存问题 » 2021-03-19 17:22:09

potato 说:
raspberryman 说:

视频编解码器那个地方占了内存,如果不要视频编解码器可以屏蔽那里

不熟悉linux 的sdk,能不能告诉一下在哪改 sad

记得有好几个帖子提到,你搜索一下,我没有改过。

#81 Re: 全志 SOC » 关于V3S内存问题 » 2021-03-19 15:22:14

视频编解码器那个地方占了内存,如果不要视频编解码器可以屏蔽那里

#82 Re: 全志 SOC » 关于V3S内存问题 » 2021-03-19 10:17:14

你是不是用 tina linux或者camdroid?

#83 Re: 全志 SOC » 怎么使用PCF8563作为RTC时钟? » 2021-03-18 12:46:38

都没8563的日志,看下是不是硬件有问题

#85 Re: 全志 SOC » v3s 启用以太网后发热严重 » 2021-03-13 17:37:03

unturned3 说:
raspberryman 说:

是不是想和STM32一个发热级别,那不可能的。

对,这个我知道是不行的(可能是我 “解决本身发热问题” 这句没问清楚,修改了)。

我的荔枝派Zero开了以太网后摸起来比全速运行的H3还烫,不知道这个情况正不正常,移除L1(或者那几个电阻)能否降低温度。

谢谢各位大佬耐心解答了

人肉测温,大概能降低10度,具体用热温枪试一试。

#88 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 不明白rtt的这个for迭代是如何实现的。 » 2021-03-13 14:27:00

就是用C语言的 for循环遍历双向链表

把for代码拆成三行就比较明白了

#89 Re: 全志 SOC » v3s 启用以太网后发热严重 » 2021-03-13 11:44:12

解决本身发热问题? 是不是想和STM32一个发热级别,那不可能的。

#90 Re: 全志 SOC » v3s 启用以太网后发热严重 » 2021-03-12 20:20:36

惨了,我也抄荔枝派这个电路,领导一直说芯片发热,我左检查又检查,和zero核对N次,还是没能发现这个问题。


L1 取掉前 0.186A@12V
L1 取掉后 0.146A@12V

足足相差了 0.04A*12V = 0.48W

这么大的功率都拿去发热了, 我热



关于 lichee-pi zero v3s 以太网硬件严重发热问题和解决办法
http://whycan.com/t_3887.html#p36033
(出处:哇酷开发者社区)

#92 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 讨论一下:目前 AP6212 WiFi 芯片缺货严重,大伙都有哪些替换方案? » 2021-03-12 16:25:03

KingJin 说:

用海华的pin2pin兼容

请教具体是什么型号呢?


aozima 说:

我这边是在WIFI SOC中写个固件,然后更新驱动程序。不过研发成本比较高。

ESP8266/ESP32?

#94 Re: 全志 SOC » 求助!v3s移植infones游戏模拟器后出现声音滞后问题 » 2021-03-12 13:42:09

微凉VeiLiang 说:

是不是v3s linux驱动的问题?之前看论坛帖子好像有相关反馈

那个延时500ms左右,不会延迟这么久

#95 Re: 全志 SOC » 建议以后开源只放PDF 坛里开源的资料已经被倒卖了 [店主已下架并道歉] » 2021-03-12 09:57:59

我记得GPL是不排斥商业用途的,只要保证修改后的继续开源就行

#97 Re: 全志 SOC » linux-zero-4.14.y 如何配置 启用usb 高速2.0 480M读U盘 » 2021-03-11 11:00:23

feng888 说:

问题解决,设备树没开启 ehci!!

原来如此

请教怎么判断是全速2.0?

#101 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » buildroot 下载慢如何解决 » 2021-03-10 19:26:57

用外部工具链可以避免编译其他的,不过刚刚入坑还是建议等下载完成吧

#102 Re: 全志 SOC » linux-zero-4.14.y 如何配置 启用usb 高速2.0 480M读U盘 » 2021-03-10 19:25:04

默认就是usb2.0,不过读速度肯定没有480M,内存和cpu速度限制

#103 Re: 哇酷地摊(跳蚤市场) » 转行清仓 » 2021-03-10 19:20:00

rick lou 说:

我高一,因为暑假创业失败

这算凡尔赛么?

#107 Re: 全志 SOC » f1c200s ov2640 如何输出 MJPG 格式? » 2021-03-09 18:00:10

因为没人去更新代码,我朋友公司他们把mjpeg驱动加上去了

#109 Re: 哇酷地摊(跳蚤市场) » 转行清仓 » 2021-03-08 19:06:31

没记错的话,楼主还在读初中吧?

#110 Re: 全志 SOC » F1C100s用DMA加速spiflash启动 » 2021-03-05 09:28:20

airpumpkin 说:

没有仔细测,摁下reset,大约1-2s的样子

请教楼主,uboot有没有办法改 ^_^

#111 Re: 全志 SOC » 玩弄bluetoothctl的时候直接拿过来单独编译搞事情(附源码) » 2021-03-05 09:20:39

那有空我试一试,再次感谢楼主分享!  有不明白的问题再跟帖请教。

#112 Re: 全志 SOC » 玩弄bluetoothctl的时候直接拿过来单独编译搞事情(附源码) » 2021-03-05 09:11:19

dbus不适合嵌入式环境,在桌面也有点奇葩,估计是为了进程互操作和解藕吧。

我也想试一试,请问楼主这个代码可以在Ubuntu玩吗?

TeveT 说:

主要就是不想花大时间弄dbus,既然拿出来单独用就分享一下,都是bluez的代码哈哈哈哈,嵌入自己的代码只要回调注册搞一搞,界面交互效率高

raspberryman 说:

感谢楼主分享,我以前参考晕哥那个 btstack帖子搞了一个demo,后来没有玩了

郁闷,没有搞定 Ubuntu下用btstack协议栈驱动 RTL8723BS
http://whycan.com/t_1133.html#p53670

咦,居然发现楼主也玩了 btstack...

TeveT 说:

对的,我直接拿这部分嵌入我的代码,做蓝牙播放器界面

#113 Re: 全志 SOC » 玩弄bluetoothctl的时候直接拿过来单独编译搞事情(附源码) » 2021-03-05 08:48:36

感谢楼主分享,我以前参考晕哥那个 btstack帖子搞了一个demo,后来没有玩了

郁闷,没有搞定 Ubuntu下用btstack协议栈驱动 RTL8723BS
http://whycan.com/t_1133.html#p53670

咦,居然发现楼主也玩了 btstack...

TeveT 说:

对的,我直接拿这部分嵌入我的代码,做蓝牙播放器界面

奔跑的孩子 说:

请问楼主 bluetoothctl 是bluez 的源码包里面的吗?

#114 Re: 全志 SOC » 想用F1C500S 替代F1C100S 跑裸机,发现跑不起来。 » 2021-03-04 13:45:06

MyWaKeng 说:

是的,我在官网查了,是带内部DRAM 的。看参数列表,感觉跟100S 一模一样。 就是没找到F1C500S数据手册,不知道引脚是否有差异。

你用bsp linux,还是melis?

#115 Re: 全志 SOC » 想用F1C500S 替代F1C100S 跑裸机,发现跑不起来。 » 2021-03-04 12:51:47

armstrong 说:

已经确认:C500没有内置DRAM,需要外接的。

那估计F1C500就是F1C100A了?

#117 Re: 全志 SOC » 有用过ILI9488的RGB接口的朋友吗? » 2021-03-03 22:10:31

嗯,现在的LCD驱动芯片基本都是这种模式 。 用三线SPI初始化一下才能用RGB

#120 Re: 全志 SOC » v3s make uImage 报错recipe for target '.tmp_vmlinux1' failed,请问大家这个如何解决? » 2021-03-03 08:25:06

搜索一下看switch_dev_register这个函数在哪个文件实现了,然后开启那个编译开关

#121 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 技术人的误区 » 2021-03-02 08:35:25

1. 技术高确实能赚钱,这只是一个充分条件,我前前前东家的老板技术可是牛得一批,N年前在csdn的博客原创文章都是关于软件破解的,现在他们公司在行业里面也是一流的,当然钱也没少赚。

技术高 + 商业眼光 + 机会 = 赚钱

坛子里面那个whyabc666有点意思,一天到晚神神叨叨的。。。。。。。上怨天,下怨地

#122 Re: 全志 SOC » PhoenixSuit烧写v3s 固件 » 2021-03-01 16:40:34

dml1048147924 说:
raspberryman 说:

和多少M有关系吗?

我的意思是我们产品是flash 启动方式,不是TF卡启动方式,
bin格式的烧录文件能不能转成img格式的

看我前面的回复:

把spi flash的几个脚留出来,外接烧录器省时实力。

或者用特殊TF卡固件,从TF卡启动,在linux直接烧spiflash

#125 Re: 全志 SOC » PhoenixSuit烧写v3s 固件 » 2021-03-01 11:36:17

把spi flash的几个脚留出来,外接烧录器省时实力。

或者用特殊TF卡固件,从TF卡启动,在linux直接烧spiflash

#127 Re: 全志 SOC » 40P的FPC座子哪一种最常用? » 2021-02-28 09:28:57

结构允许的前提下用翻盖下接的,widora tiny200那种座子。

#129 Re: 全志 SOC » 全志A33 如何把程序下载到spi flash里? » 2021-02-26 13:54:45

发一个能用win32diskimager 烧 A33/X3 SPI FLASH(MX25/W25)的TF卡固件
http://whycan.com/t_5639.html
(出处:哇酷开发者社区)

#130 Re: 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-26 13:47:37

SigmaStar #
SigmaStar # nand scrub -y 0x6000000 0x20000

NAND scrub: device 0 offset 0x6000000, size 0x20000
Erasing at 0x6000000 -- 100% complete.
Time:5479 us, speed:23922 KB/s
OK
SigmaStar #
SigmaStar # nand dump.oob 0x6000000
Page 06000000 dump:
OOB:
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
SigmaStar # nand bad

Device 0 bad blocks:
ecc error P: 0x0
SigmaStar #

把0x6000000 地址的坏块标志擦洗了一下, 坏块数归零了。

#131 Re: 全志 SOC » 全志A33 如何把程序下载到spi flash里? » 2021-02-26 13:44:49

主线的方案?貌似sunxi-fel不能写spi flash,只能仿照 V3s/F1C100s的改一下

#132 Re: 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-26 11:26:53

SigmaStar #
SigmaStar # nand markbad 0x6000000
block 0x06000000 successfully marked as bad
SigmaStar #
SigmaStar # nand bad

Device 0 bad blocks:
  06000000
SigmaStar #
SigmaStar # nand dump.oob 0x6000000
Page 06000000 dump:
OOB:
        00 ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff

继续作死, 主动把 0x6000000标记成坏块, 然后把 oob 读出来, 第一个字节非0xFF, 所以是坏块了。

#133 Re: 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-26 11:04:42

咨询aodzip大佬, 让我试一试 nand dump.oob, 我用启明云端的7寸开发板测试:

SigmaStar # nand dump.oob 0x0
Page 00000000 dump:
OOB:
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
SigmaStar #
SigmaStar # nand dump.raw 0x0
Page 00000000 dump:
        4d 53 54 41 52 53 45 4d  49 55 53 46 44 43 49 53
        03 cd eb 11 00 00 00 00  00 00 00 00 00 00 00 00
        40 00 00 08 40 00 00 08  00 02 00 00 00 6c 00 0a
        00 00 00 00 00 00 00 00  ca 02 ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
OOB:
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff

仍然全部是 0xFF

OOB:
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff

看来uboot的spinand驱动里面oob也是内部管理的,

除非自己改驱动,把ecc关了,把obb缓冲区扩充到128字节,然后再秀出来。

#134 Re: 全志 SOC » 【芒果派F1C200s/R3】如何zImage修改为uImage » 2021-02-26 10:57:45

uImage和zImage比,多一个0x40字节的头而已,里面有校验码

#136 Re: 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-26 09:42:51

GD SPI NAND官方手册: gd5f1gq4xbxig_v3.0_20190505.pdf

带着这些疑问, 我打开了手册.


Page Size :
- 2048 bytes + 128 bytes with ECC disabled
- 2048 bytes + 64 bytes with ECC enabled

开启ECC只有64字节可用, 关闭ECC可以多出64字节, 由此猜测有64字节用于内部ECC了.

顺着数据手册:
2021-02-26_094654.png

果然如此, 后面64Byte才是ECC!

#137 Re: 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-26 09:26:27

擦除 & 编程这个 nand:

flash_eraseall /dev/mtd0
flashcp /mnt/tfcard/devicetree.dtb  /dev/mtd0

然后读出带oob的第一个page数据:

# nanddump -o --bb=dumpbad -f /opt/y2.bin -s 0x00000000 -l 0x800 /dev/mtd0
ECC failed: 2
ECC corrected: 0
Number of bad blocks: 5
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00000800...
#
# hexdump /opt/y2.bin -v
0000000 0dd0 edfe 0000 5739 0000 3800 0000 6035
0000010 0000 2800 0000 1100 0000 1000 0000 0000
0000020 0000 f703 0000 2835 0000 0000 0000 0000
0000030 0000 0000 0000 0000 0000 0100 0000 0000
0000040 0000 0300 0000 0400 0000 0000 0000 0100
0000050 0000 0300 0000 0400 0000 0f00 0000 0100
0000060 0000 0300 0000 0400 0000 1b00 0000 0100
0000070 0000 0300 0000 1200 0000 2c00 6957 6f64
0000080 6172 4d20 6e61 6f67 6950 5220 0033 0000
0000090 0000 0300 0000 3000 0000 3200 6c61 776c
00000a0 6e69 656e 2c72 7573 696e 2d76 3166 3263
00000b0 3030 0073 6c61 776c 6e69 656e 2c72 7573
00000c0 696e 2d76 3166 3163 3030 0073 0000 0100
00000d0 6861 6963 352d 0076 0000 0300 0000 1000
00000e0 0000 3200 6572 7567 616c 6f74 2d72 6966
00000f0 6578 0064 0000 0300 0000 0800 0000 3d00
0000100 6861 6963 352d 0076 0000 0300 0000 0400
0000110 0000 4c00 4c00 404b 0000 0300 0000 0400
0000120 0000 6400 4c00 404b 0000 0300 0000 0000
0000130 0000 7c00 0000 0300 0000 0000 0000 8e00
0000140 0000 0300 0000 1000 0000 a100 0000 0200
0000150 0000 0100 0000 0800 0000 0000 0000 0300
0000160 0000 0900 0000 a600 6964 6173 6c62 6465
0000170 0000 0000 0000 0200 0000 0100 7375 3062
0000180 762d 7562 0073 0000 0000 0300 0000 1000
0000190 0000 3200 6572 7567 616c 6f74 2d72 6966
00001a0 6578 0064 0000 0300 0000 0a00 0000 3d00
00001b0 7375 3062 762d 7562 0073 0000 0000 0300
00001c0 0000 0400 0000 4c00 4c00 404b 0000 0300
00001d0 0000 0400 0000 6400 4c00 404b 0000 0300
00001e0 0000 0000 0000 8e00 0000 0300 0000 1000
00001f0 0000 a100 0000 0200 0000 0100 0000 0900
0000200 0000 0000 0000 0300 0000 0900 0000 a600
0000210 6964 6173 6c62 6465 0000 0000 0000 0200
0000220 0000 0100 7375 3162 762d 7562 0073 0000
0000230 0000 0300 0000 1000 0000 3200 6572 7567
0000240 616c 6f74 2d72 6966 6578 0064 0000 0300
0000250 0000 0a00 0000 3d00 7375 3162 762d 7562
0000260 0073 0000 0000 0300 0000 0400 0000 4c00
0000270 4c00 404b 0000 0300 0000 0400 0000 6400
0000280 4c00 404b 0000 0300 0000 0000 0000 7c00
0000290 0000 0300 0000 0000 0000 8e00 0000 0300
00002a0 0000 1000 0000 a100 0000 0200 0000 0700
00002b0 0000 0600 0000 0000 0000 0300 0000 0900
00002c0 0000 a600 6964 6173 6c62 6465 0000 0000
00002d0 0000 0200 0000 0100 7375 3262 762d 7562
00002e0 0073 0000 0000 0300 0000 1000 0000 3200
00002f0 6572 7567 616c 6f74 2d72 6966 6578 0064
0000300 0000 0300 0000 0a00 0000 3d00 7375 3262
0000310 762d 7562 0073 0000 0000 0300 0000 0400
0000320 0000 4c00 4c00 404b 0000 0300 0000 0400
0000330 0000 6400 4c00 404b 0000 0300 0000 0000
0000340 0000 7c00 0000 0300 0000 0000 0000 8e00
0000350 0000 0300 0000 1000 0000 a100 0000 0200
0000360 0000 0700 0000 0300 0000 0000 0000 0300
0000370 0000 0900 0000 a600 6964 6173 6c62 6465
0000380 0000 0000 0000 0200 0000 0100 6376 3363
0000390 3076 0000 0000 0300 0000 1000 0000 3200
00003a0 6572 7567 616c 6f74 2d72 6966 6578 0064
00003b0 0000 0300 0000 0700 0000 3d00 6376 3363
00003c0 3076 0000 0000 0300 0000 0400 0000 4c00
00003d0 2d00 c0c6 0000 0300 0000 0400 0000 6400
00003e0 2d00 c0c6 0000 0200 0000 0100 6376 3363
00003f0 3376 0000 0000 0300 0000 1000 0000 3200
0000400 6572 7567 616c 6f74 2d72 6966 6578 0064
0000410 0000 0300 0000 0700 0000 3d00 6376 3363
0000420 3376 0000 0000 0300 0000 0400 0000 4c00
0000430 3200 a05a 0000 0300 0000 0400 0000 6400
0000440 3200 a05a 0000 0300 0000 0400 0000 ad00
0000450 0000 0f00 0000 0200 0000 0100 6376 3563
0000460 3076 0000 0000 0300 0000 1000 0000 3200
0000470 6572 7567 616c 6f74 2d72 6966 6578 0064
0000480 0000 0300 0000 0700 0000 3d00 6376 3563
0000490 3076 0000 0000 0300 0000 0400 0000 4c00
00004a0 4c00 404b 0000 0300 0000 0400 0000 6400
00004b0 4c00 404b 0000 0200 0000 0100 6c63 636f
00004c0 736b 0000 0000 0100 6c63 2d6b 3432 004d
00004d0 0000 0300 0000 0400 0000 b500 0000 0000
00004e0 0000 0300 0000 0c00 0000 3200 6966 6578
00004f0 2d64 6c63 636f 006b 0000 0300 0000 0400
0000500 0000 c200 6e01 0036 0000 0300 0000 0700
0000510 0000 d200 736f 3263 4d34 0000 0000 0300
0000520 0000 0400 0000 ad00 0000 0300 0000 0200
0000530 0000 0100 736f 3263 4d34 335f 6b32 0000
0000540 0000 0300 0000 0400 0000 b500 0000 0000
0000550 0000 0300 0000 1300 0000 3200 6966 6578
0000560 2d64 6166 7463 726f 632d 6f6c 6b63 0000
0000570 0000 0300 0000 0400 0000 e500 0000 ee02
0000580 0000 0300 0000 0400 0000 ef00 0000 0100
0000590 0000 0300 0000 0400 0000 fa00 0000 0300
00005a0 0000 0300 0000 0400 0000 ad00 0000 0500
00005b0 0000 0200 0000 0100 6c63 2d6b 3233 006b
00005c0 0000 0300 0000 0400 0000 b500 0000 0000
00005d0 0000 0300 0000 0c00 0000 3200 6966 6578
00005e0 2d64 6c63 636f 006b 0000 0300 0000 0400
00005f0 0000 c200 0000 0080 0000 0300 0000 0700
0000600 0000 d200 736f 3363 6b32 0000 0000 0300
0000610 0000 0400 0000 ad00 0000 0600 0000 0200
0000620 0000 0200 0000 0100 7063 7375 0000 0000
0000630 0000 0300 0000 0400 0000 0f00 0000 0000
0000640 0000 0300 0000 0400 0000 0000 0000 0100
0000650 0000 0100 7063 4075 0030 0000 0000 0300
0000660 0000 0400 0000 0101 7063 0075 0000 0300
0000670 0000 0f00 0000 3200 7261 2c6d 7261 396d
0000680 3632 6a65 732d 0000 0000 0300 0000 0400
0000690 0000 0d01 0000 0000 0000 0300 0000 0800
00006a0 0000 fa00 0000 0400 0000 0b00 0000 0200
00006b0 0000 0200 0000 0100 6f73 0063 0000 0300
00006c0 0000 0b00 0000 3200 6973 706d 656c 622d
00006d0 7375 0000 0000 0300 0000 0400 0000 0000
00006e0 0000 0100 0000 0300 0000 0400 0000 0f00
00006f0 0000 0100 0000 0300 0000 0000 0000 1101
0000700 0000 0100 6f69 006e 0000 0300 0000 1400
0000710 0000 3200 6c61 776c 6e69 656e 2c72 7573
0000720 786e 2d69 6f69 006e 0000 0300 0000 0500
0000730 0000 a600 6b6f 7961 0000 0000 0000 0100
0000740 6568 7061 635f 616d 3040 0000 0000 0300
0000750 0000 0e00 0000 3200 6c61 776c 6e69 656e
0000760 2c72 6d63 0061 0000 0000 0300 0000 0400
0000770 0000 1801 6d63 0061 0000 0300 0000 0400
0000780 0000 2201 0000 0400 0000 0300 0000 0400
0000790 0000 2a01 0000 0000 0000 0300 0000 0400
00007a0 0000 3401 0000 0000 0000 0300 0000 0800
00007b0 0000 3e01 6f69 5f6e 6d63 0061 0000 0200
00007c0 0000 0200 0000 0100 7273 6d61 632d 6e6f
00007d0 7274 6c6f 656c 4072 6331 3030 3030 0030
00007e0 0000 0300 0000 4a00 0000 3200 6c61 776c
00007f0 6e69 656e 2c72 7573 696e 2d76 3166 3163
0000800 ffff ffff ffff ffff ffff ffff ffff ffff
0000810 ffff ffff ffff ffff ffff ffff ffff ffff
0000820 ffff ffff ffff ffff ffff ffff ffff ffff
0000830 ffff ffff ffff ffff ffff ffff ffff 00ff

发现oob数据是这样的:

0000800 ffff ffff ffff ffff ffff ffff ffff ffff
0000810 ffff ffff ffff ffff ffff ffff ffff ffff
0000820 ffff ffff ffff ffff ffff ffff ffff ffff
0000830 ffff ffff ffff ffff ffff ffff ffff 00ff

并没有ECC校验数据嘛? 那校验数据去哪里了呢?没有校验数据怎么保证SPI NAND数据正确呢?

#138 Re: 全志 SOC » 荔枝派zero移植linux 5.2无法挂接spi norflash » 2021-02-26 08:56:30

十有八九rootfs没起来的问题,请贴出来完整log

#139 Re: 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-26 08:54:18

做一个测试啊, 把 0x06000000 这个坏的分区复制到 0x06020000  / 0x06040000  , 看看会发生什么事情

导出这个坏的block到y.bin:

nanddump -o --bb=dumpbad -f /opt/y.bin -s 0x06000000 -l 0x800 /dev/mtd0

发现数据(包括64byte oob)都是 0:

# hexdump -v /op/y.bin
0000000 0000 0000 0000 0000 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000030 0000 0000 0000 0000 0000 0000 0000 0000
0000040 0000 0000 0000 0000 0000 0000 0000 0000
0000050 0000 0000 0000 0000 0000 0000 0000 0000
0000060 0000 0000 0000 0000 0000 0000 0000 0000
0000070 0000 0000 0000 0000 0000 0000 0000 0000
0000080 0000 0000 0000 0000 0000 0000 0000 0000
0000090 0000 0000 0000 0000 0000 0000 0000 0000
00000a0 0000 0000 0000 0000 0000 0000 0000 0000
00000b0 0000 0000 0000 0000 0000 0000 0000 0000
00000c0 0000 0000 0000 0000 0000 0000 0000 0000
00000d0 0000 0000 0000 0000 0000 0000 0000 0000
00000e0 0000 0000 0000 0000 0000 0000 0000 0000
00000f0 0000 0000 0000 0000 0000 0000 0000 0000
0000100 0000 0000 0000 0000 0000 0000 0000 0000
0000110 0000 0000 0000 0000 0000 0000 0000 0000
0000120 0000 0000 0000 0000 0000 0000 0000 0000
0000130 0000 0000 0000 0000 0000 0000 0000 0000
0000140 0000 0000 0000 0000 0000 0000 0000 0000
0000150 0000 0000 0000 0000 0000 0000 0000 0000
0000160 0000 0000 0000 0000 0000 0000 0000 0000
0000170 0000 0000 0000 0000 0000 0000 0000 0000
0000180 0000 0000 0000 0000 0000 0000 0000 0000
0000190 0000 0000 0000 0000 0000 0000 0000 0000
00001a0 0000 0000 0000 0000 0000 0000 0000 0000
00001b0 0000 0000 0000 0000 0000 0000 0000 0000
00001c0 0000 0000 0000 0000 0000 0000 0000 0000
00001d0 0000 0000 0000 0000 0000 0000 0000 0000
00001e0 0000 0000 0000 0000 0000 0000 0000 0000
00001f0 0000 0000 0000 0000 0000 0000 0000 0000
0000200 0000 0000 0000 0000 0000 0000 0000 0000
0000210 0000 0000 0000 0000 0000 0000 0000 0000
0000220 0000 0000 0000 0000 0000 0000 0000 0000
0000230 0000 0000 0000 0000 0000 0000 0000 0000
0000240 0000 0000 0000 0000 0000 0000 0000 0000
0000250 0000 0000 0000 0000 0000 0000 0000 0000
0000260 0000 0000 0000 0000 0000 0000 0000 0000
0000270 0000 0000 0000 0000 0000 0000 0000 0000
0000280 0000 0000 0000 0000 0000 0000 0000 0000
0000290 0000 0000 0000 0000 0000 0000 0000 0000
00002a0 0000 0000 0000 0000 0000 0000 0000 0000
00002b0 0000 0000 0000 0000 0000 0000 0000 0000
00002c0 0000 0000 0000 0000 0000 0000 0000 0000
00002d0 0000 0000 0000 0000 0000 0000 0000 0000
00002e0 0000 0000 0000 0000 0000 0000 0000 0000
00002f0 0000 0000 0000 0000 0000 0000 0000 0000
0000300 0000 0000 0000 0000 0000 0000 0000 0000
0000310 0000 0000 0000 0000 0000 0000 0000 0000
0000320 0000 0000 0000 0000 0000 0000 0000 0000
0000330 0000 0000 0000 0000 0000 0000 0000 0000
0000340 0000 0000 0000 0000 0000 0000 0000 0000
0000350 0000 0000 0000 0000 0000 0000 0000 0000
0000360 0000 0000 0000 0000 0000 0000 0000 0000
0000370 0000 0000 0000 0000 0000 0000 0000 0000
0000380 0000 0000 0000 0000 0000 0000 0000 0000
0000390 0000 0000 0000 0000 0000 0000 0000 0000
00003a0 0000 0000 0000 0000 0000 0000 0000 0000
00003b0 0000 0000 0000 0000 0000 0000 0000 0000
00003c0 0000 0000 0000 0000 0000 0000 0000 0000
00003d0 0000 0000 0000 0000 0000 0000 0000 0000
00003e0 0000 0000 0000 0000 0000 0000 0000 0000
00003f0 0000 0000 0000 0000 0000 0000 0000 0000
0000400 0000 0000 0000 0000 0000 0000 0000 0000
0000410 0000 0000 0000 0000 0000 0000 0000 0000
0000420 0000 0000 0000 0000 0000 0000 0000 0000
0000430 0000 0000 0000 0000 0000 0000 0000 0000
0000440 0000 0000 0000 0000 0000 0000 0000 0000
0000450 0000 0000 0000 0000 0000 0000 0000 0000
0000460 0000 0000 0000 0000 0000 0000 0000 0000
0000470 0000 0000 0000 0000 0000 0000 0000 0000
0000480 0000 0000 0000 0000 0000 0000 0000 0000
0000490 0000 0000 0000 0000 0000 0000 0000 0000
00004a0 0000 0000 0000 0000 0000 0000 0000 0000
00004b0 0000 0000 0000 0000 0000 0000 0000 0000
00004c0 0000 0000 0000 0000 0000 0000 0000 0000
00004d0 0000 0000 0000 0000 0000 0000 0000 0000
00004e0 0000 0000 0000 0000 0000 0000 0000 0000
00004f0 0000 0000 0000 0000 0000 0000 0000 0000
0000500 0000 0000 0000 0000 0000 0000 0000 0000
0000510 0000 0000 0000 0000 0000 0000 0000 0000
0000520 0000 0000 0000 0000 0000 0000 0000 0000
0000530 0000 0000 0000 0000 0000 0000 0000 0000
0000540 0000 0000 0000 0000 0000 0000 0000 0000
0000550 0000 0000 0000 0000 0000 0000 0000 0000
0000560 0000 0000 0000 0000 0000 0000 0000 0000
0000570 0000 0000 0000 0000 0000 0000 0000 0000
0000580 0000 0000 0000 0000 0000 0000 0000 0000
0000590 0000 0000 0000 0000 0000 0000 0000 0000
00005a0 0000 0000 0000 0000 0000 0000 0000 0000
00005b0 0000 0000 0000 0000 0000 0000 0000 0000
00005c0 0000 0000 0000 0000 0000 0000 0000 0000
00005d0 0000 0000 0000 0000 0000 0000 0000 0000
00005e0 0000 0000 0000 0000 0000 0000 0000 0000
00005f0 0000 0000 0000 0000 0000 0000 0000 0000
0000600 0000 0000 0000 0000 0000 0000 0000 0000
0000610 0000 0000 0000 0000 0000 0000 0000 0000
0000620 0000 0000 0000 0000 0000 0000 0000 0000
0000630 0000 0000 0000 0000 0000 0000 0000 0000
0000640 0000 0000 0000 0000 0000 0000 0000 0000
0000650 0000 0000 0000 0000 0000 0000 0000 0000
0000660 0000 0000 0000 0000 0000 0000 0000 0000
0000670 0000 0000 0000 0000 0000 0000 0000 0000
0000680 0000 0000 0000 0000 0000 0000 0000 0000
0000690 0000 0000 0000 0000 0000 0000 0000 0000
00006a0 0000 0000 0000 0000 0000 0000 0000 0000
00006b0 0000 0000 0000 0000 0000 0000 0000 0000
00006c0 0000 0000 0000 0000 0000 0000 0000 0000
00006d0 0000 0000 0000 0000 0000 0000 0000 0000
00006e0 0000 0000 0000 0000 0000 0000 0000 0000
00006f0 0000 0000 0000 0000 0000 0000 0000 0000
0000700 0000 0000 0000 0000 0000 0000 0000 0000
0000710 0000 0000 0000 0000 0000 0000 0000 0000
0000720 0000 0000 0000 0000 0000 0000 0000 0000
0000730 0000 0000 0000 0000 0000 0000 0000 0000
0000740 0000 0000 0000 0000 0000 0000 0000 0000
0000750 0000 0000 0000 0000 0000 0000 0000 0000
0000760 0000 0000 0000 0000 0000 0000 0000 0000
0000770 0000 0000 0000 0000 0000 0000 0000 0000
0000780 0000 0000 0000 0000 0000 0000 0000 0000
0000790 0000 0000 0000 0000 0000 0000 0000 0000
00007a0 0000 0000 0000 0000 0000 0000 0000 0000
00007b0 0000 0000 0000 0000 0000 0000 0000 0000
00007c0 0000 0000 0000 0000 0000 0000 0000 0000
00007d0 0000 0000 0000 0000 0000 0000 0000 0000
00007e0 0000 0000 0000 0000 0000 0000 0000 0000
00007f0 0000 0000 0000 0000 0000 0000 0000 0000

-------------

0000800 0000 0000 0000 0000 0000 0000 0000 0000
0000810 0000 0000 0000 0000 0000 0000 0000 0000
0000820 0000 0000 0000 0000 0000 0000 0000 0000
0000830 0000 0000 0000 0000 0000 0000 0000 0000

然后把带oob的数据写到 0x06020000  / 0x06040000

nandwrite -o -s 0x06020000 /dev/mtd0 /opt/y.bin

nandwrite -o -s 0x06040000 /dev/mtd0 /opt/y.bin

重启后, 果然多了两个坏block:

# nanddump -o --bb=dumpbad -f /opt/y.bin -s 0x06000000 -l 0x800 /dev/mtd0
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 4
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x06000000 and ending at 0x06000800...
ECC: 1 uncorrectable bitflip(s) at offset 0x06000000

没错, 就是他们:

# flash_eraseall /dev/mtd0
Erasing 128 Kibyte @ 3ba0000 - 49% complete.
Skipping bad block at 0x03bc0000
Erasing 128 Kibyte @ 5fe0000 - 79% complete.
Skipping bad block at 0x06000000

Skipping bad block at 0x06020000

Skipping bad block at 0x06040000
Erasing 128 Kibyte @ 7800000 - 100% complete.

#141 Re: 全志 SOC » V3S 怎么读取芯片温度 手册没有看到 裸机 谢谢 » 2021-02-25 16:56:20

全志的手册都是有一茬没一茬的,翻一下A20手册,我记得偏移地址一样的,基地址不同。

#142 Re: 全志 SOC » 【芒果派F1C200s/R3】修改DDR/CPU频率 » 2021-02-25 15:38:40

有人将荔枝派nano超频到800MHz以上运行了吗?
http://whycan.com/t_4237.html
(出处:哇酷开发者社区)


f1c100s能超频到多少呢?
http://whycan.com/t_1786.html
(出处:哇酷开发者社区)

#143 Re: 全志 SOC » 【芒果派F1C200s/R3】修改DDR/CPU频率 » 2021-02-25 15:37:29

今天确定了两件事:F1C100S的CPU频率和DRAM频率设置
http://whycan.com/t_3380.html
(出处:哇酷开发者社区)



大神能看一下吗,f1c100s 修改DDR主频和cpu主频??
http://whycan.com/t_5346.html
(出处:哇酷开发者社区)

#144 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 试一试 搭建 OpenCV 入门环境 » 2021-02-25 14:01:01

Qt 版本

----------------------------------------
1. 安装 VC2017

2. OpenCV官网下载 https://opencv.org/releases/ 预编译版本 opencv-4.5.1-vc14_vc15.exe

3. 下载安装 qt-opensource-windows-x86-5.12.3.exe 勾选 VC2017 x64 方案。

4. test.pro 工程文件添加以下代码:

INCLUDEPATH += D:\opencv\build\include

CONFIG(debug, debug|release) {
    LIBS += -LD:\opencv\build\x64\vc15\lib -lopencv_world451d
} else {
    LIBS += -LD:\opencv\build\x64\vc15\lib -lopencv_world451
}

5. 添加 test.cpp 代码到工程, 编译运行, 结果与一楼一样。

#145 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 试一试 搭建 OpenCV 入门环境 » 2021-02-25 13:58:52

VC2017 版本:
-------------------------------------------

1. 安装 VC2017

2. OpenCV官网下载 https://opencv.org/releases/ 预编译版本 opencv-4.5.1-vc14_vc15.exe

解压到 D盘

3. 把 D:\opencv\build\x64\vc15\bin 添加到系统PATH

4. 新建工程, 把 D:\opencv\build\include 添加到头文件目录, 把 D:\opencv\build\x64\vc15\lib 添加到库文件目录, 并且把 opencv_world451.lib / opencv_world451d.lib 添加到链接库

工程文件 test.cpp 代码在一楼,

5. 编译运行, 结果和一楼一样。

#146 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 试一试 搭建 OpenCV 入门环境 » 2021-02-25 11:56:08

raspberryman
回复: 4

Ubuntu版本:

sudo apt-get install libopencv-dev

test.cpp

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
    if( argc != 2)
    {
     cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
     return -1;
    }

    Mat image;
    image = imread(argv[1], CV_LOAD_IMAGE_COLOR);   // Read the file

    if(! image.data )                              // Check for invalid input
    {
        cout <<  "Could not open or find the image" << std::endl ;
        return -1;
    }

    namedWindow( "Display window", WINDOW_AUTOSIZE );// Create a window for display.
    imshow( "Display window", image );                   // Show our image inside it.

    waitKey(0);                                          // Wait for a keystroke in the window
    return 0;
}

编译命令行:

g++ -o test test.cpp -lopencv_core -lopencv_imgproc -lopencv_ximgproc -lopencv_highgui -lopencv_stitching -lopencv_imgcodecs

运行:

./test2 /usr/share/help/cs/cheese/figures/cheese.png

参考: https://docs.opencv.org/2.4/doc/tutorials/introduction/display_image/display_image.html

2021-02-25_115930.png

#147 Re: 全志 SOC » [zero]萌新求教,卡启动进不了系统,急!谢谢了(趴 » 2021-02-25 09:07:09

linstar 说:

谢谢大佬!!大佬元宵快乐。这个文件系统我之前可以跑起来的,应该怎么处理,重烧uboot吗,麻烦了(瘫)

重烧TF卡就行,文件系统弄坏了

#148 Re: 全志 SOC » 请问 buildroot 根文件系统 ubi和ubifs有什么区别呢? » 2021-02-23 14:28:35

Question
What is the difference between UBI and UBIFS?
Answer
The UBI subsystem works on top of MTD devices and provides a notion of UBI volumes. UBIFS filesystem works on top of UBI volumes.
The UBIFS is done with the mkfs.ubifs command and the UBI is done with ubinize command.
SAM-BA and the U-Boot nand write.trimffs command expect a UBI file.

https://microchipsupport.force.com/s/article/What-is-the-difference-between-UBI-and-UBIFS

#149 Re: 全志 SOC » 请问 buildroot 根文件系统 ubi和ubifs有什么区别呢? » 2021-02-23 14:24:51

https://www.digi.com/support/knowledge-base/difference-between-ubifs-and-ubi-file-systems-on-c

The UBIFS image is a file system image.It works on top of a UBI volume.You cannot flash it on the raw flash device */dev/mtd*. You need to create UBI volume first and then update the volume with UBIFS image.

The UBI image is a UBI volume image. It uses the UBIFS image and some other metadata to create a volume on top of a raw flash device */dev/mtd*. In other words you can flash directly a UBI image with standard *nandwrite* command using the '/dev/mtdx' char device.

On CCWi-i.MX51 or CCWi-i.MX53 platforms , u-boot requires  UBIFS image, because the internals of u-boot will create the UBI volume and then updates it with UBIFS image.

The UBI image is meant to be used directly by the operating system (Linux/Android), but at the moment Digi use it only on Linux.

#150 Re: 全志 SOC » 请问我在 ubuntu 可以模拟挂载ubi 文件系统吗? » 2021-02-23 12:01:34

好奇帮楼主测试了一下buildroot 生成ubi文件, 一次成功:

cd /addon/buildroot/output/images

sudo modprobe nandsim first_id_byte=0xad second_id_byte=0xda third_id_byte=0x10 fourth_id_byte=0x95
sudo dd if=rootfs.ubi of=/dev/mtd0
sudo modprobe ubi
sudo modprobe ubifs
sudo ubiattach --mtdn=0 --vid-hdr-offset=2048
sudo mkdir -p /mnt/ubifs/
sudo mount -t ubifs ubi0:rootfs /mnt/ubifs/

显示挂载ubi的文件系统:

$ ls /mnt/ubifs/ -l
total 0
drwxr-xr-x  2 root root 4960 Feb 23 11:34 bin
drwxr-xr-x  4 root root  608 Feb 19 11:32 dev
drwxr-xr-x 12 root root 2096 Feb 23 11:34 etc
drwxr-xr-x  5 root root 2960 Feb 19 11:32 lib
lrwxrwxrwx  1 root root    3 Feb 19 11:39 lib32 -> lib
lrwxrwxrwx  1 root root   11 Feb 19 11:50 linuxrc -> bin/busybox
drwxr-xr-x  2 root root  160 Feb 19 11:32 media
drwxr-xr-x  2 root root  160 Feb 19 11:32 mnt
drwxr-xr-x  2 root root  160 Feb 19 11:32 opt
drwxr-xr-x  2 root root  232 Feb 19 11:32 overlay
drwxr-xr-x  2 root root  160 Feb 19 11:32 proc
drwxr-xr-x  2 root root  232 Feb 19 11:32 rom
drwx------  2 root root  160 Feb 19 11:32 root
drwxr-xr-x  3 root root  224 Feb 19 11:51 run
drwxr-xr-x  2 root root 4008 Feb 23 11:34 sbin
drwxr-xr-x  2 root root  160 Feb 19 11:32 sys
drwxrwxrwt  2 root root  160 Feb 19 11:32 tmp
drwxr-xr-x  7 root root  544 Feb 23 11:34 usr
drwxr-xr-x  4 root root  672 Feb 23 11:34 var

buildroot关于ubi文件系统的配置:

BR2_TARGET_ROOTFS_TAR_OPTIONS=""
BR2_TARGET_ROOTFS_UBI=y
BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x20000
BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048
# BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG is not set
BR2_TARGET_ROOTFS_UBI_OPTS=""
BR2_TARGET_ROOTFS_UBIFS=y
BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000
BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800
BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2048
# BR2_TARGET_ROOTFS_UBIFS_RT_NONE is not set
# BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB is not set
BR2_TARGET_ROOTFS_UBIFS_RT_LZO=y
BR2_TARGET_ROOTFS_UBIFS_NONE=y
# BR2_TARGET_ROOTFS_UBIFS_GZIP is not set
# BR2_TARGET_ROOTFS_UBIFS_BZIP2 is not set
# BR2_TARGET_ROOTFS_UBIFS_LZMA is not set
# BR2_TARGET_ROOTFS_UBIFS_LZO is not set
# BR2_TARGET_ROOTFS_UBIFS_XZ is not set
BR2_TARGET_ROOTFS_UBIFS_OPTS=""
# BR2_TARGET_ROOTFS_YAFFS2 is not set

#152 Re: 全志 SOC » 编译Buildroot-tiny200时出现错误,请大佬指教,急急!!!!!!!!!!!!!!!!!!!!!!!1 (平台: 树梅派) » 2021-02-23 09:59:39

我估计buildroot默认是在x86平台跑的,那些host工具默认使用x86汇编指令,如果你要整个buildroot都能在树莓派跑,可能要大改才行。

#153 Re: 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-22 16:39:05

带oob读出一个block数据: nanddump -s 0x06000000 -l 0x20000 -o -f /opt/1.bin  /dev/mtd0

# nanddump -s 0x06000000 -l 0x20000 -o -f /opt/1.bin  /dev/mtd0
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 2
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x06000000 and ending at 0x06020000...
# ls -l /opt/
total 132
-rw-r--r--    1 root     root        135168 Jan  1 01:13 1.bin
#

算了一下, 一个block包括oob区:
(2048+64)*64 = 135168

应该是 135168 字节!

#154 Re: 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-22 16:35:07

感谢楼上的兄弟提醒, 我继续跟踪一下.

# nandtest  -o 0x03bc0000 -l 0x40000 /dev/mtd0
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 2
BBT blocks     : 0
Bad block at 0x03bc0000
03be0000: checking...of 4)...
Finished pass 1 successfully
#
# nandtest -m -o 0x06000000 -l 0x40000 /dev/mtd0
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 2
BBT blocks     : 0
Bad block at 0x06000000
06020000: checking...of 4)...
Finished pass 1 successfully
#

linux 下面的nandtest整片nand flash 扫描要 10分钟左右, 只扫两个坏块还是挺快的。

#155 Re: 全志 SOC » mangopi_r3 Qt5问题 » 2021-02-22 16:31:54

那应该是 rootfs超过mtd2大小了, 你改一下 board/widora 目录下面的关于nnad的配置文件

#156 Re: 全志 SOC » mangopi_r3 Qt5问题 » 2021-02-22 16:21:50

[    1.854121]  (driver?)
[    1.860645] No filesystem could mount root, tried:
[    1.860651]  squashfs
[    1.865564]
[    1.869339] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
根文件系统系统出错了,没有勾选之前是可以的?

#157 Re: 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-22 12:02:39

# date;flash_eraseall /dev/mtd0;date;
Thu Jan  1 00:26:51 UTC 1970
Erasing 128 Kibyte @ 3ba0000 - 49% complete.
Skipping bad block at 0x03bc0000
Erasing 128 Kibyte @ 5fe0000 - 79% complete.
Skipping bad block at 0x06000000
Erasing 128 Kibyte @ 7800000 - 100% complete.
Thu Jan  1 00:26:54 UTC 1970
# dd if=/dev/zero of=/dev/mtd0 bs=1M count=1 seek=59;
dd: error writing '/dev/mtd0': Input/output error
1+0 records in
0+0 records out
#
# dd if=/dev/zero of=/dev/mtd0 bs=1M count=1 seek=96
dd: error writing '/dev/mtd0': Input/output error
1+0 records in
0+0 records out
#

擦除失败的block, dd一样会出错.




# dd if=/dev/zero of=/dev/mtd0 bs=128K seek=478
dd: error writing '/dev/mtd0': Input/output error
1+0 records in
0+0 records out
#
# dd if=/dev/zero of=/dev/mtd0 bs=128K seek=768
dd: error writing '/dev/mtd0': Input/output error
1+0 records in
0+0 records out

第478, 768两个block出错了.

#158 全志 SOC » widora tiny200 spi nand 测试 » 2021-02-22 11:51:37

raspberryman
回复: 10

主控芯片: F1C200s
SPI NAND: GD5F1QG4UAY1G
SPI SPEED: 50M Hz

&spi0 {
        status = "okay";

        spi-nand@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "spi-nand";
                reg = <0>;
                spi-max-frequency = <50000000>;
                status = "okay";

                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                        partition@0 {
                                label = "spinand";
                                reg = <0x000000 0x7800000>;
                        };
                };
        };
};

擦除, 三秒完成:

# date;flash_eraseall /dev/mtd0;date;
Thu Jan  1 00:00:49 UTC 1970
Erasing 128 Kibyte @ 3ba0000 - 49% complete.
Skipping bad block at 0x03bc0000
Erasing 128 Kibyte @ 5fe0000 - 79% complete.
Skipping bad block at 0x06000000
Erasing 128 Kibyte @ 7800000 - 100% complete.
Thu Jan  1 00:00:52 UTC 1970
#

读速度约 2.2M字节/秒, 约18Mbps

# date;dd if=/dev/mtd0 of=/dev/null bs=1M count=10;date;
Thu Jan  1 00:01:41 UTC 1970
10+0 records in
10+0 records out
Thu Jan  1 00:01:45 UTC 1970
#
# date;dd if=/dev/mtd0 of=/dev/null bs=1M count=10;date;
Thu Jan  1 00:01:58 UTC 1970
10+0 records in
10+0 records out
Thu Jan  1 00:02:02 UTC 1970
#
# date;dd if=/dev/mtd0 of=/dev/null bs=1M count=20;date;
Thu Jan  1 00:02:14 UTC 1970
20+0 records in
20+0 records out
Thu Jan  1 00:02:23 UTC 1970
#
#
# date;dd if=/dev/mtd0 of=/dev/null bs=1M count=100;date;
Thu Jan  1 00:02:41 UTC 1970
100+0 records in
100+0 records out
Thu Jan  1 00:03:25 UTC 1970

写速度, 36秒写了59M字节, 约1.6M字节/秒, 合 13Mbps

# date;dd if=/dev/zero of=/dev/mtd0 bs=1M count=59;date;
Thu Jan  1 00:14:56 UTC 1970
59+0 records in
59+0 records out
Thu Jan  1 00:15:32 UTC 1970

#159 Re: 全志 SOC » 直接在 widora tiny200开发板测试 spi nand ubifs文件系统 » 2021-02-20 10:19:54

使用aodzip的sd卡镜像启动,敲回车进入uboot命令行, 手动输入下面三行命令可以从sd卡引脚:

setenv bootargs "console=ttyS0,115200 earlyprintk rootwait consoleblank=0 net.ifnames=0 biosdevname=0 root=/dev/mmcblk0p3"
setenv bootcmd  "load mmc 0:2 0x80000000 zImage; load mmc 0:2 0x80700000 devicetree.dtb;bootz 0x80000000 - 0x80700000;"
boot

手动输入这几行命令, 也可以sd卡引导,但是根文件系统已经是ubifs了:

sf probe 1000000
sf probe 10000000
setenv bootargs "console=ttyS0,115200 earlyprintk rootwait consoleblank=0 net.ifnames=0 biosdevname=0 root=ubi0:rootfs rw rootflags=sync rootfstype=ubifs ubi.mtd=3"
setenv bootcmd  "load mmc 0:2 0x80000000 zImage; load mmc 0:2 0x80700000 devicetree.dtb;bootz 0x80000000 - 0x80700000;"
boot

这是启动log:

U-Boot SPL 2020.07 (Feb 19 2021 - 12:13:05 +0800)
DRAM: 64 MiB
Trying to boot from MMC1


U-Boot 2020.07 (Feb 19 2021 - 12:13:05 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM:  64 MiB
MMC:   mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 800x480 lcd console (overscan 0x0)
In:    serial
Out:   vga
Err:   vga
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot:  0
=>
=>
=> sf probe
unrecognized JEDEC id bytes: ff, c8, f1
Failed to initialize SPI flash at 0:0 (error -2)
=> sf probe 1000000
unrecognized JEDEC id bytes: 00, c8, f1
Failed to initialize SPI flash at 0:1000000 (error -2)
=> sf probe 10000000
unrecognized JEDEC id bytes: 00, c8, f1
Failed to initialize SPI flash at 0:10000000 (error -2)
=> setenv bootargs "console=ttyS0,115200 earlyprintk rootwait consoleblank=0 net.ifnames=0 biosdevname=0 root=ubi0:rootfs rw rootflags=sync rootfstype=ubifs ubi.mtd=3"
=> setenv bootcmd  "load mmc 0:2 0x80000000 zImage; load mmc 0:2 0x80700000 devicetree.dtb;bootz 0x80000000 - 0x80700000;"
=> boot
4613080 bytes read in 750 ms (5.9 MiB/s)
14901 bytes read in 7 ms (2 MiB/s)
## Flattened Device Tree blob at 80700000
   Booting using the fdt blob at 0x80700000
   Loading Device Tree to 816f9000, end 816ffa34 ... OK
Cannot setup simplefb: node not found

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.66 (cube@ubuntu) (gcc version 8.4.0 (Buildroot 2020.02.4-00005-g9d84975a2d)) #2 Fri Feb 19 14:15:21 CST 2021
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Widora MangoPi R3
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x83000000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk rootwait consoleblank=0 net.ifnames=0 biosdevname=0 root=ubi0:rootfs rw rootflags=sync rootfstype=ubifs ubi.mtd=3
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 37708K/65536K available (7168K kernel code, 253K rwdata, 1752K rodata, 1024K init, 228K bss, 11444K reserved, 16384K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x254/0x444 with crng_init=0
[    0.000051] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000146] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000897] Console: colour dummy device 80x30
[    0.001006] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070269] pid_max: default: 32768 minimum: 301
[    0.070774] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070816] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.072732] CPU: Testing write buffer coherency: ok
[    0.074840] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076158] devtmpfs: initialized
[    0.087670] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.087741] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.091985] pinctrl core: initialized pinctrl subsystem
[    0.094714] NET: Registered protocol family 16
[    0.098625] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.100968] cpuidle: using governor menu
[    0.149556] SCSI subsystem initialized
[    0.149974] usbcore: registered new interface driver usbfs
[    0.150151] usbcore: registered new interface driver hub
[    0.150482] usbcore: registered new device driver usb
[    0.151020] mc: Linux media interface: v0.10
[    0.151148] videodev: Linux video capture interface: v2.00
[    0.151274] pps_core: LinuxPPS API ver. 1 registered
[    0.151294] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.151361] PTP clock support registered
[    0.152448] ion_parse_dt_heap_common: id 4 type 4 name cma align 1000
[    0.153474] Advanced Linux Sound Architecture Driver Initialized.
[    0.156033] clocksource: Switched to clocksource timer
[    0.187887] thermal_sys: Registered thermal governor 'step_wise'
[    0.188647] NET: Registered protocol family 2
[    0.190251] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.190356] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.190417] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.190472] TCP: Hash tables configured (established 1024 bind 1024)
[    0.190797] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.190861] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.191377] NET: Registered protocol family 1
[    0.194196] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.196142] Initialise system trusted keyrings
[    0.196785] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.218403] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.219017] jffs2: version 2.2. (NAND) (SUMMARY)  ? 2001-2006 Red Hat, Inc.
[    0.333754] Key type asymmetric registered
[    0.333797] Asymmetric key parser 'x509' registered
[    0.333976] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.334006] io scheduler mq-deadline registered
[    0.334024] io scheduler kyber registered
[    0.349792] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.374405] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.380689] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    0.382050] printk: console [ttyS0] disabled
[    0.402366] 1c25400.serial: ttyS0 at MMIO 0x1c25400 (irq = 28, base_baud = 6250000) is a 16550A
[    0.836213] printk: console [ttyS0] enabled
[    0.846141] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    0.867399] panel-simple panel: panel supply power not found, using dummy regulator
[    0.877103] SCSI Media Changer driver v0.25
[    0.882889] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[    0.895727] spi-nand spi0.0: GigaDevice SPI NAND was found.
[    0.901430] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    0.911035] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.917508] Creating 4 MTD partitions on "spi0.0":
[    0.922319] 0x000000000000-0x000000080000 : "u-boot"
[    0.932832] 0x000000080000-0x0000000a0000 : "dtb"
[    0.941783] 0x000000100000-0x000000800000 : "kernel"
[    0.950003] random: fast init done
[    0.980009] 0x000000800000-0x000007800000 : "rootfs"
[    1.402173] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.408827] ehci-platform: EHCI generic platform driver
[    1.414476] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.420788] ohci-platform: OHCI generic platform driver
[    1.426594] usbcore: registered new interface driver usb-storage
[    1.433571] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.445500] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.451503] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.461545] hub 1-0:1.0: USB hub found
[    1.465450] hub 1-0:1.0: 1 port detected
[    1.472619] i2c /dev entries driver
[    1.476904] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    1.490501] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    1.501522] sun4i-csi 1cb0000.csi: Packed (RAW) format enabled.
[    1.509439] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.519519] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.557652] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.567195] usbcore: registered new interface driver usbhid
[    1.572769] usbhid: USB HID core driver
[    1.577049] sunxi-cedar 1c0e000.video-codec: sunxi cedar version 0.01alpha
[    1.584253] sunxi-cedar 1c0e000.video-codec: cedar-ve the get irq is 20
[    1.596530] debugfs: Directory '1c23c00.codec' with parent 'F1C100s Audio Codec' already present!
[    1.610346] sun4i-codec 1c23c00.codec: Codec <-> 1c23c00.codec mapping ok
[    1.626408] NET: Registered protocol family 17
[    1.630974] Key type dns_resolver registered
[    1.636695] Loading compiled-in X.509 certificates
[    1.660968] sun4i-drm soc:display-engine: bound 1e00000.display-frontend (ops 0xc083d0a0)
[    1.670060] sun4i-drm soc:display-engine: bound 1e60000.display-backend (ops 0xc083c8e0)
[    1.679651] sun4i-drm soc:display-engine: bound 1c0c000.lcd-controller (ops 0xc083b480)
[    1.688224] sun4i-drm soc:display-engine: bound 1c0a000.tv-encoder (ops 0xc083c1a0)
[    1.695886] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.702599] [drm] No driver support for vblank timestamp query.
[    1.710256] [drm] Initialized sun4i-drm 1.0.0 20150629 for soc:display-engine on minor 0
[    1.719318] [drm] kms: can't enable cloning when we probably wanted to.
[    1.791243] Console: switching to colour frame buffer device 100x30
[    1.793879] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.796674] mmc0: new high speed SD card at address 0001
[    1.798984] mmcblk0: mmc0:0001 00000 1.83 GiB
[    1.830776]  mmcblk0: p1 p2 p3
[    1.855478] sun4i-drm soc:display-engine: fb0: sun4i-drmdrmfb frame buffer device
[    1.864055] ubi0: attaching mtd3
[    1.878025] random: crng init done
[    3.423082] ubi0: scanning is finished
[    3.453782] ubi0: attached mtd3 (name "rootfs", size 112 MiB)
[    3.459706] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.466645] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.473421] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.480441] ubi0: good PEBs: 894, bad PEBs: 2, corrupted PEBs: 0
[    3.486491] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    3.493730] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1797218344
[    3.502884] ubi0: available PEBs: 0, total reserved PEBs: 894, PEBs reserved for bad PEB handling: 18
[    3.512774] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.521005] ubi0: background thread "ubi_bgt0d" started, PID 60
[    3.536715] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    3.543541] ALSA device list:
[    3.546645]   #0: F1C100s Audio Codec
[    3.550867] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    3.559634] cfg80211: failed to load regulatory.db
[    3.566817] UBIFS: parse sync
[    3.572891] UBIFS (ubi0:0): Mounting in unauthenticated mode
[    3.582724] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 65
[    3.851755] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    3.859311] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    3.869328] UBIFS (ubi0:0): FS size: 109326336 bytes (104 MiB, 861 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[    3.879963] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[    3.885832] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID C2613C70-55A8-4922-BAD7-FC87B64728E0, small LPT model
[    3.903107] UBIFS (ubi0:0): full atime support is enabled.
[    3.908873] VFS: Mounted root (ubifs filesystem) on device 0:16.
[    3.918242] devtmpfs: mounted
[    3.927799] Freeing unused kernel memory: 1024K
[    3.932838] Run /sbin/init as init process
Mounting OverlayFS: Skip
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Populating /dev using udev: [    5.675841] udevd[97]: starting version 3.2.9
[    5.967378] udevd[98]: starting eudev-3.2.9

[    8.152908] Goodix-TS 0-005d: 0-005d supply AVDD28 not found, using dummy regulator
[    8.161063] Goodix-TS 0-005d: 0-005d supply VDDIO not found, using dummy regulator
[    8.178104] ov2640 0-0030: Product ID error fa:fa
[    8.329337] Goodix-TS 0-005d: i2c test failed attempt 1: -6
[    8.369858] Goodix-TS 0-005d: i2c test failed attempt 2: -6
[    8.406275] Goodix-TS 0-005d: I2C communication failure: -6
#
#
#
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
ubi0:rootfs              98056     47964     50092  49% /
devtmpfs                 18852         0     18852   0% /dev
tmpfs                    27556         0     27556   0% /dev/shm
tmpfs                    27556        32     27524   0% /tmp
tmpfs                    27556        76     27480   0% /run
#
# md5sum /bin/busybox
cdb44d81c489bc9d4f82e4a27253433f  /bin/busybox
#
#

从日志看,ubifs根文件系统已经完全正常:

[    3.559634] cfg80211: failed to load regulatory.db
[    3.566817] UBIFS: parse sync
[    3.572891] UBIFS (ubi0:0): Mounting in unauthenticated mode
[    3.582724] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 65
[    3.851755] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    3.859311] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    3.869328] UBIFS (ubi0:0): FS size: 109326336 bytes (104 MiB, 861 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[    3.879963] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[    3.885832] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID C2613C70-55A8-4922-BAD7-FC87B64728E0, small LPT model
[    3.903107] UBIFS (ubi0:0): full atime support is enabled.
[    3.908873] VFS: Mounted root (ubifs filesystem) on device 0:16.
#
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
ubi0:rootfs              98056     47964     50092  49% /
#

参考: https://www.cnblogs.com/zxc2man/p/7568731.html

#160 Re: 全志 SOC » 直接在 widora tiny200开发板测试 spi nand ubifs文件系统 » 2021-02-20 09:30:03

buildroot关于ubi文件系统的配置:

BR2_TARGET_ROOTFS_TAR=y
BR2_TARGET_ROOTFS_TAR_NONE=y
BR2_TARGET_ROOTFS_TAR_OPTIONS=""
BR2_TARGET_ROOTFS_UBI=y
BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x20000
BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048
BR2_TARGET_ROOTFS_UBI_OPTS=""
BR2_TARGET_ROOTFS_UBIFS=y
BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000
BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800
BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2048
BR2_TARGET_ROOTFS_UBIFS_RT_LZO=y
BR2_TARGET_ROOTFS_UBIFS_NONE=y
BR2_TARGET_ROOTFS_UBIFS_OPTS=""

把buildroot生成的rootfs.ubi烧录到 nand flash:

# flash_eraseall /dev/mtd3
Erasing 128 Kibyte @ 33a0000 - 46% complete.
Skipping bad block at 0x033c0000
Erasing 128 Kibyte @ 57e0000 - 78% complete.
Skipping bad block at 0x05800000
Erasing 128 Kibyte @ 7000000 - 100% complete.
#
# ubiformat /dev/mtd3 -f /mnt/udisk/rootfs.ubi -s 2048 -O 2048
ubiformat: mtd3 (nand), size 117440512 bytes (112.0 MiB), 896 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 895 -- 100 % complete
ubiformat: 894 eraseblocks are supposedly empty
ubiformat: 2 bad eraseblocks found, numbers: 414, 704
ubiformat: flashing eraseblock 422 -- 100 % complete
ubiformat: formatting eraseblock 895 -- 100 % complete
#
# ubiattach /dev/ubi_ctrl -m 3
[ 2338.369507] ubi0: attaching mtd3
[ 2339.932799] ubi0: scanning is finished
[ 2339.996910] ubi0: volume 0 ("rootfs") re-sized from 420 to 872 LEBs
[ 2340.021735] ubi0: attached mtd3 (name "rootfs", size 112 MiB)
[ 2340.027648] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 2340.034519] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 2340.041381] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 2340.048382] ubi0: good PEBs: 894, bad PEBs: 2, corrupted PEBs: 0
[ 2340.054382] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[ 2340.061631] ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1797218344
[ 2340.070778] ubi0: available PEBs: 0, total reserved PEBs: 894, PEBs reserved for bad PEB handling: 18
[ 2340.082502] ubi0: background thread "ubi_bgt0d" started, PID 242
UBI device number 0, total 894 LEBs (113516544 bytes, 108.2 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
#
#
# mkdir -p /mnt/rootfs/; mount -t ubifs ubi0:rootfs /mnt/rootfs
[ 2424.798470] UBIFS (ubi0:0): Mounting in unauthenticated mode
[ 2424.815509] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 247
[ 2425.061164] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 2425.068703] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 2425.078691] UBIFS (ubi0:0): FS size: 109326336 bytes (104 MiB, 861 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[ 2425.089322] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[ 2425.095205] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID C2613C70-55A8-4922-BAD7-FC87B64728E0, small LPT model
[ 2425.122645] UBIFS (ubi0:0): full atime support is enabled.
#
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root               114901     92109     14191  87% /
devtmpfs                 18852         0     18852   0% /dev
tmpfs                    27556         0     27556   0% /dev/shm
tmpfs                    27556       356     27200   1% /tmp
tmpfs                    27556        88     27468   0% /run
/dev/sda               1920768     54048   1866720   3% /mnt/udisk
ubi0:rootfs              98056     47932     50124  49% /mnt/rootfs
#
# ls /mnt/rootfs/
bin/      lib/      media/    overlay/  root/     sys/      var/
dev/      lib32/    mnt/      proc/     run/      tmp/
etc/      linuxrc   opt/      rom/      sbin/     usr/
#
# md5sum  /mnt/rootfs/bin/busybox
cdb44d81c489bc9d4f82e4a27253433f  /mnt/rootfs/bin/busybox
#

至此, 我们用ubifs 作为根文件系统的任务已经完成一大半了。

#163 全志 SOC » 主线Linux用shell命令切换 OTG(分享)tiny200/licheepi nano|zero均可以使用 » 2021-02-19 17:35:47

raspberryman
回复: 17

dts配置:

&usb_otg {
        dr_mode = "otg"; /* 三个可选项: otg / host / peripheral */
        status = "okay";
};
##切换到host模式:
# echo host > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
# [  117.758152] phy phy-1c13400.phy.0: Changing dr_mode to 1
[  118.414817] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[  118.598193] usb-storage 1-1:1.0: USB Mass Storage device detected
[  118.611789] scsi host0: usb-storage 1-1:1.0
[  119.686198] scsi 0:0:0:0: Direct-Access     Mass     Storage Device   1.00 PQ: 0 ANSI: 0 CCS
[  119.703976] sd 0:0:0:0: [sda] 3842048 512-byte logical blocks: (1.97 GB/1.83 GiB)
[  119.725260] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  119.739844] sd 0:0:0:0: [sda] Write Protect is off
[  119.771819] sd 0:0:0:0: [sda] No Caching mode page found
[  119.777288] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  119.801571]  sda: sda1 sda2 sda3
[  119.817224] sd 0:0:0:0: [sda] Attached SCSI removable disk

#
##切换到device模式:
# echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
[  123.880272] phy phy-1c13400.phy.0: Changing dr_mode to 2
# [  123.890905] usb 1-1: USB disconnect, device number 3

#167 Re: 全志 SOC » 直接在 widora tiny200开发板测试 spi nand ubifs文件系统 » 2021-02-19 15:58:12

继续创建一个 test_volume2 卷,写入10M test2.bin 文件, 重启检查md5校验码:

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "u-boot"
mtd1: 00020000 00020000 "dtb"
mtd2: 00700000 00020000 "kernel"
mtd3: 04000000 00020000 "rom"
mtd4: 03000000 00020000 "overlay"
#
#
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root               114901     92103     14197  87% /
devtmpfs                 18852         0     18852   0% /dev
tmpfs                    27556         0     27556   0% /dev/shm
tmpfs                    27556        32     27524   0% /tmp
tmpfs                    27556        68     27488   0% /run
ubi0:test_volume         17200     14936      1352  92% /mnt/ubifs

#
#
#
# ubimkvol /dev/ubi0 -N test_volume2 -s 15MiB
Volume ID 1, size 124 LEBs (15745024 bytes, 15.0 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "test_volume2", alignment 1
#
#
#
# mkdir -p /mnt/ubifs2/; mount -t ubifs ubi0:test_volume2 /mnt/ubifs2
[ 1491.419679] UBIFS (ubi0:1): default file-system created
[ 1491.428380] UBIFS (ubi0:1): Mounting in unauthenticated mode
[ 1491.439012] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 214
[ 1491.614619] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "test_volume2"
[ 1491.622701] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 1491.632704] UBIFS (ubi0:1): FS size: 14475264 bytes (13 MiB, 114 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
[ 1491.643085] UBIFS (ubi0:1): reserved for root: 683702 bytes (667 KiB)
[ 1491.649575] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID 90D01E93-DCFB-4015-916E-426926CA867C, small LPT model
[ 1491.665149] UBIFS (ubi0:1): full atime support is enabled.
#
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root               114901     92104     14196  87% /
devtmpfs                 18852         0     18852   0% /dev
tmpfs                    27556         0     27556   0% /dev/shm
tmpfs                    27556        32     27524   0% /tmp
tmpfs                    27556        68     27488   0% /run
ubi0:test_volume         17200     14936      1352  92% /mnt/ubifs
ubi0:test_volume2        12384        20     11696   0% /mnt/ubifs2
#
#
# cd /mnt/ubifs2; dd if=/dev/urandom of=test2.bin bs=10M count=1
1+0 records in
1+0 records out
#
# md5sum test2.bin
a7a11444e92abb24b92da2d459142ef7  test2.bin
#
# md5sum test2.bin
a7a11444e92abb24b92da2d459142ef7  test2.bin
#




执行命令:

ubiattach /dev/ubi_ctrl -m 4
mkdir -p /mnt/ubifs/; mount -t ubifs ubi0:test_volume /mnt/ubifs
mkdir -p /mnt/ubifs2/; mount -t ubifs ubi0:test_volume2 /mnt/ubifs2

md5sum /mnt/ubifs/test1.bin
md5sum /mnt/ubifs2/test2.bin




运行结果:

# ubiattach /dev/ubi_ctrl -m 4
m[  117.787394] ubi0: attaching mtd4
kdir -p /mnt/ubifs/; mount -t ubifs ubi0:test_volume [  118.474268] ubi0: scanning is finished
/mnt/[  118.518382] ubi0: attached mtd4 (name "overlay", size 48 MiB)
[  118.524234] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[  118.531237] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[  118.538097] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[  118.545064] ubi0: good PEBs: 383, bad PEBs: 1, corrupted PEBs: 0
[  118.551153] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[  118.558415] ubi0: max/mean erase counter: 5/3, WL threshold: 4096, image sequence number: 1368536342
[  118.567585] ubi0: available PEBs: 70, total reserved PEBs: 313, PEBs reserved for bad PEB handling: 19
ubifs
mk[  118.579706] ubi0: background thread "ubi_bgt0d" started, PID 196
dir -UBI device number 0, total 383 LEBs (48631808 bytes, 46.3 MiB), available 70 LEBs (8888320 bytes, 8.4 MiB), LEB size 126976 bytes (124.0 KiB)
# mkdir -p /mnt/ubifs/; mount -t ubifs ubi0:test_volume /mnt/ubifs
p /[  118.664103] UBIFS (ubi0:0): Mounting in unauthenticated mode
[  118.673953] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 200
mnt/ubifs2/; mount -[  118.908290] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "test_volume"
[  118.916285] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[  118.926338] UBIFS (ubi0:0): FS size: 19808256 bytes (18 MiB, 156 LEBs), journal size 1015809 bytes (0 MiB, 8 LEBs)
[  118.936716] UBIFS (ubi0:0): reserved for root: 935592 bytes (913 KiB)
[  118.943184] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID DDF61ED8-29D8-41D3-B75C-D06A4B5B5FC8, small LPT model
t ubifs[  118.961970] UBIFS (ubi0:0): full atime support is enabled.
# mkdir -p /mnt/ubifs2/; mount -t ubifs ubi0:test_volume2 /mnt/ubifs2

md5[  119.401852] UBIFS (ubi0:1): Mounting in unauthenticated mode
su[  119.412234] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 203
m /mnt/ubifs/test1.bin
m[  119.644532] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "test_volume2"
[  119.652611] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[  119.662659] UBIFS (ubi0:1): FS size: 14475264 bytes (13 MiB, 114 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
[  119.673054] UBIFS (ubi0:1): reserved for root: 683702 bytes (667 KiB)
[  119.679560] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID 90D01E93-DCFB-4015-916E-426926CA867C, small LPT model
d5sum /m[  119.698437] UBIFS (ubi0:1): full atime support is enabled.
n#
# md5sum /mnt/ubifs/test1.bin
/ubifs2/test2.bin


30303d04108632117aa0f3a656dadb14  /mnt/ubifs/test1.bin
# md5sum /mnt/ubifs2/test2.bin

a7a11444e92abb24b92da2d459142ef7  /mnt/ubifs2/test2.bin
#
#
#
# md5sum /mnt/ubifs/test1.bin
30303d04108632117aa0f3a656dadb14  /mnt/ubifs/test1.bin
#
# md5sum /mnt/ubifs2/test2.bin
a7a11444e92abb24b92da2d459142ef7  /mnt/ubifs2/test2.bin
#

两个卷的随机数大文件校验码仍然正常。

#168 Re: 全志 SOC » 直接在 widora tiny200开发板测试 spi nand ubifs文件系统 » 2021-02-19 15:57:45

&spi0 {
        status = "okay";

        spi-nand@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "spi-nand";
                reg = <0>;
                spi-max-frequency = <50000000>;
                status = "okay";

                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                        partition@0 {
                                label = "u-boot";
                                reg = <0x000000 0x80000>;
                                read-only;
                        };

                        partition@1 {
                                label = "dtb";
                                reg = <0x80000 0x20000>;
                                read-only;
                        };

                        partition@2 {
                                label = "kernel";
                                reg = <0x100000 0x700000>;
                                read-only;
                        };

                        partition@3 {
                                label = "rom";
                                reg = <0x800000 0x4000000>;
                                read-only;
                        };

                        partition@4 {
                                label = "overlay";
                                reg = <0x4800000 0x3000000>;
                        };
                };
        };
};

spi nand分区是 aodzip 大佬默认的配置.


[    0.879898] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[    0.892723] spi-nand spi0.0: GigaDevice SPI NAND was found.
[    0.898426] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    0.908036] 5 fixed-partitions partitions found on MTD device spi0.0
[    0.914397] Creating 5 MTD partitions on "spi0.0":
[    0.919311] 0x000000000000-0x000000080000 : "u-boot"
[    0.929945] 0x000000080000-0x0000000a0000 : "dtb"
[    0.938921] 0x000000100000-0x000000800000 : "kernel"
[    0.947089] random: fast init done
[    0.977131] 0x000000800000-0x000004800000 : "rom"
[    1.222006] 0x000004800000-0x000007800000 : "overlay"
[    1.407977] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

这是开机log

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "u-boot"
mtd1: 00020000 00020000 "dtb"
mtd2: 00700000 00020000 "kernel"
mtd3: 04000000 00020000 "rom"
mtd4: 03000000 00020000 "overlay"

这是分区信息。

#169 Re: 全志 SOC » 直接在 widora tiny200开发板测试 spi nand ubifs文件系统 » 2021-02-19 15:54:51

重启之后15M随机数文件test1.bin md5码依然是正确的!

#ubiattach /dev/ubi_ctrl -m 4
[   42.202019] ubi0: attaching mtd4
[   42.875260] ubi0: scanning is finished
[   42.920832] ubi0: attached mtd4 (name "overlay", size 48 MiB)
[   42.926746] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[   42.933618] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[   42.940486] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[   42.947485] ubi0: good PEBs: 383, bad PEBs: 1, corrupted PEBs: 0
[   42.953485] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[   42.960736] ubi0: max/mean erase counter: 5/3, WL threshold: 4096, image sequence number: 1368536342
[   42.969884] ubi0: available PEBs: 194, total reserved PEBs: 189, PEBs reserved for bad PEB handling: 19
[   42.981773] ubi0: background thread "ubi_bgt0d" started, PID 194
UBI device number 0, total 383 LEBs (48631808 bytes, 46.3 MiB), available 194 LEBs (24633344 bytes, 23.4 MiB), LEB size 126976 bytes (124.0 KiB)
#
#
#
#
# mkdir -p /mnt/ubifs/; mount -t ubifs ubi0:test_volume /mnt/ubifs
[   73.033794] UBIFS (ubi0:0): Mounting in unauthenticated mode
[   73.050609] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 199
[   73.285632] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "test_volume"
[   73.293482] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   73.303552] UBIFS (ubi0:0): FS size: 19808256 bytes (18 MiB, 156 LEBs), journal size 1015809 bytes (0 MiB, 8 LEBs)
[   73.313941] UBIFS (ubi0:0): reserved for root: 935592 bytes (913 KiB)
[   73.320457] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID DDF61ED8-29D8-41D3-B75C-D06A4B5B5FC8, small LPT model
[   73.338918] UBIFS (ubi0:0): full atime support is enabled.
#
#
# cd /mnt/ubifs/
#
# md5sum test1.bin
30303d04108632117aa0f3a656dadb14  test1.bin
#
# md5sum test1.bin
30303d04108632117aa0f3a656dadb14  test1.bin
#
#

说明:测试OK!

#170 Re: 全志 SOC » 直接在 widora tiny200开发板测试 spi nand ubifs文件系统 » 2021-02-19 15:37:52

tiny200 spi nand 现场测试:

#
# ubiformat /dev/mtd4
ubiformat: mtd4 (nand), size 50331648 bytes (48.0 MiB), 384 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 383 -- 100 % complete
ubiformat: 383 eraseblocks have valid erase counter, mean value is 2
ubiformat: 1 bad eraseblocks found, numbers: 192
ubiformat: formatting eraseblock 383 -- 100 % complete
#
# ubiattach /dev/ubi_ctrl -m 4
[  325.203966] ubi0: attaching mtd4
[  325.867234] ubi0: scanning is finished
[  325.905417] ubi0: attached mtd4 (name "overlay", size 48 MiB)
[  325.911186] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[  325.918219] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[  325.925002] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[  325.932013] ubi0: good PEBs: 383, bad PEBs: 1, corrupted PEBs: 0
[  325.938054] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
[  325.945301] ubi0: max/mean erase counter: 4/3, WL threshold: 4096, image sequence number: 1368536342
[  325.954413] ubi0: available PEBs: 360, total reserved PEBs: 23, PEBs reserved for bad PEB handling: 19
[  325.965401] ubi0: background thread "ubi_bgt0d" started, PID 200
UBI device number 0, total 383 LEBs (48631808 bytes, 46.3 MiB), available 360 LEBs (45711360 bytes, 43.5 MiB), LEB size 126976 bytes (124.0 KiB)
#
#
#
# ubimkvol /dev/ubi0 -N test_volume -s 20MiB
Volume ID 0, size 166 LEBs (21078016 bytes, 20.1 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "test_volume", alignment 1
#
#
# mkdir -p /mnt/ubifs/; mount -t ubifs ubi0:test_volume /mnt/ubifs
[  396.316740] UBIFS (ubi0:0): default file-system created
[  396.323943] UBIFS (ubi0:0): Mounting in unauthenticated mode
[  396.334069] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 206
[  396.510137] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "test_volume"
[  396.518175] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[  396.528174] UBIFS (ubi0:0): FS size: 19808256 bytes (18 MiB, 156 LEBs), journal size 1015809 bytes (0 MiB, 8 LEBs)
[  396.538550] UBIFS (ubi0:0): reserved for root: 935592 bytes (913 KiB)
[  396.544998] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID DDF61ED8-29D8-41D3-B75C-D06A4B5B5FC8, small LPT model
[  396.560487] UBIFS (ubi0:0): full atime support is enabled.
#
# cd /mnt/ubifs/
#
# dd if=/dev/urandom of=test1.bin bs=15M count=1
1+0 records in
1+0 records out
#
# ls -l
total 15360
-rw-r--r--    1 root     root      15728640 Jan  1 00:07 test1.bin
#
# md5sum test1.bin
30303d04108632117aa0f3a656dadb14  test1.bin
# md5sum test1.bin
30303d04108632117aa0f3a656dadb14  test1.bin
#

#171 全志 SOC » 直接在 widora tiny200开发板测试 spi nand ubifs文件系统 » 2021-02-19 15:37:23

raspberryman
回复: 10

参考链接:

http://www.linux-mtd.infradead.org/faq/ubifs.html

# Wipe the MTD device out. Note, we could use flash_eraseall, but we do not
# want to lose erase counters
ubiformat /dev/mtd0

# Load UBI module
modprobe ubi

# Attach mtd0 to UBI - UBI will detect that the MTD device is
# empty and automatically format it. This command will also create
# UBI device 0 and udev should create /dev/ubi0 node
ubiattach /dev/ubi_ctrl -m 0

# Create an UBI volume - the created volume will be empty
ubimkvol /dev/ubi0 -N test_volume -s 10MiB

# Mount UBIFS - it will automatically format the empty volume
mount -t ubifs ubi0:test_volume /mnt/ubifs

相关参考:
请问 buildroot 根文件系统 ubi和ubifs有什么区别呢?
http://whycan.com/t_6019.html
(出处:哇酷开发者社区)

#172 Re: Openwrt/LEDE/AR9331/MT7688/RT5350 » OpenWrt vs Buildroot » 2021-02-19 15:23:50

拍打323 说:
XIVN1987 说:
达克罗德 说:

buildroot 偏向于给你提供定制rootfs的选项,怎么选由用户来定。而且buildroot是选好了之后对源码进行交叉编译;而openwrt我的理解类似于Debian,官方给你选好了很多软件包和服务,组成了一个有特色的操作系统。当然由于带了包管理,你还是可以事后安装你想要的软件包。不像buildroot是自己编源码,在openwrt这些软件包事先都是已经编译好的,放到了源服务器上。

我感觉使用上差不多,主要都是三步:
1、git clone 下载源码
2、make xxx_defconfig(OpenWrt不需要此步)、make menuconfig 选择芯片型号、开发板型号、需要的功能和软件
3、make 编译生成linux镜像文件,,执行这一步的时候都会先根据选择的芯片编译生成交叉编译器,,然后再用交叉编译器编译系统镜像

感觉真的很相似,,

要说差异的话,似乎OpenWrt的官方源码https://github.com/openwrt/openwrt中支持的芯片型号几乎都是路由器芯片,,非路由器芯片很少

不过这似乎也不是啥大问题,,因为我们下载源码的时候一般都是去芯片/开发板供应商那里去下载,,而不是去openwrt或buildroot的github去下载

什么源码去芯片供应商下?比如v3s移植openwrt ,''make menuconfig 选择芯片型号、开发板型号、需要的功能和软件''openwrt源码自带的吗?

感觉只要用同一版本工具链编译的,同一架构,比如都是A7,我感觉服务器上面的包可以通用,凭本事想象的,路过的大佬请赐教

#173 Re: 全志 SOC » 请问 buildroot 根文件系统 ubi和ubifs有什么区别呢? » 2021-02-19 15:17:17

感谢楼上两位大佬,我大概明白了,

ubifs是用mkfs.ubifs生成的,不能直接烧录到flash,

而ubi文件是ubinize文件生成的,可以直接烧录到nand flash,

ubi文件包含上面生成的ubifs文件,并且在cfg配置文件给该img文件起一个卷名(volume name)

#174 Re: Openwrt/LEDE/AR9331/MT7688/RT5350 » OpenWrt vs Buildroot » 2021-02-19 14:03:24

达克罗德 说:

buildroot 偏向于给你提供定制rootfs的选项,怎么选由用户来定。而且buildroot是选好了之后对源码进行交叉编译;而openwrt我的理解类似于Debian,官方给你选好了很多软件包和服务,组成了一个有特色的操作系统。当然由于带了包管理,你还是可以事后安装你想要的软件包。不像buildroot是自己编源码,在openwrt这些软件包事先都是已经编译好的,放到了源服务器上。

嗯,这么说好像是那么回事

#176 Re: 全志 SOC » Widora TINY200 R2 体验版开源开发包,修复了大部分F1C100s/F1C200s的遗留问题 » 2021-02-17 19:40:25

是浪费了一点内存,但是32bit操作速度更快,16bit你得考虑对齐问题。

#177 Re: 全志 SOC » 发现f1c100s/f1c600s的twi和cx32l003的iic极为相似 » 2021-02-14 14:07:07

道胜天下 说:

过完春节回去,发上我的f1c100s的i2c中断发送代码,从机代码,这个i2c和n76e003的ip都很相似。

有可能是同一个IP?

#178 Re: 全志 SOC » 分享F1C100S的TVD源码,TVIN0接CVBS摄像头采集数据显示到LCD屏 » 2021-02-14 13:53:25

道胜天下 说:

各位大佬,cvbs是不是相当于ccd呀?

不是,cvbs是一种通讯标准,ccd是一种工艺。

早前的ccd摄像头一般直接输出cvbs信号,他们没有必然的联系。

#179 Re: 全志 SOC » 各侠大神,v3s BSP内核 如何测试音频驱动比如录音,播放声音? » 2021-02-10 21:57:17

小菜鸟又有新问题了, tinyalsa如何编译成arm-linux 静态链接版本
http://whycan.com/t_490.html
(出处:哇酷开发者社区)

#180 Re: 全志 SOC » v3s BSP内核 wifi可以用为AP,但不能sta连接路由器上网,大神帮忙。。 » 2021-02-10 17:32:20

zhuacai 说:
路人甲 说:

驱动有问题吧? 有没有 wlan0 设备?


没有wlan0 设备,但开启ap模式就有wlan0 设备,如何开启sta模式呢

运行什么命令?

#181 Re: 全志 SOC » 刷了uboot没有调试信息 » 2021-02-06 13:17:39

也发一个荔枝派zero 全志V3s 32M spi flash 固件,800x480 LCD, 开机自动运行 Qt analogclock
http://whycan.com/t_3400.html#p48415
(出处:哇酷开发者社区)

#182 Re: 全志 SOC » 全志V3s采用UDP视频传输H264效果很好 » 2021-02-05 13:14:17

bingyinhaha 说:
webb_2002 说:
whyabc666 说:

怎么解决乱序重组,局域网没问题不代表什么!

每个视频数据包是有编号的,收到数据先缓存,然后再按照编号组包。


局域网网络环境太理想了,demo下没问题。

实际应用中,UDP 没办法保证不丢包,以太网帧最大应该是1400多字节,图像大了就要拆包发送,简单的编号组包基本上不可用。

换TCP不丢包,网络协议开销比较大。

那用RTP协议?

#183 Re: 全志 SOC » 全志V3s采用UDP视频传输H264效果很好 » 2021-02-04 17:58:49

无痕 说:

请问在linux下如何使用全志V3S的硬编码(x.264)功能?

V3s使用gstreamer的插件openmax调用cedar硬解码,荔枝派zero测试通过
http://whycan.com/t_5398.html
(出处:哇酷开发者社区)

这是主线linux的

#185 Re: 全志 SOC » V3S F1C是好芯片,但是没有CAN ADC » 2021-02-04 10:56:19

fehooyt 说:

周立功推的ARM9芯片是哪款?

Gentlepig 说:

周立功不是新推了个800M的arm9么,估计外设应该都有这些吧。

ZLG发布了一个资源超级丰富的吗ARM9 ZMP110 芯片,不知道价格如何,发在公众号的文章随后删了,不知道啥意思
http://whycan.com/t_5945.html#p58982
(出处:哇酷开发者社区)

#188 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 话说在外国销售的手机为什么要安装GMS才能销售? » 2021-02-04 07:11:23

245 人赞同了该回答
别说欧洲了,作为一个在香港长大,内地上大学的我,去年买了一台华为P40 Pro的我看到这道题目觉得我完全能回答。

首先,一直以来所有图片都是通过Google Photo 来备份的,虽然Google Photo突然说要收费,但是因为搬走的成本太大,至少我是不会这样选择的。

其次,即时聊天软件一般是使用Google Drive备份的,Line 也好 WhatsApp也好,没了Google 服务等于没了接入不了Google Drive 中的备份,也就是说以前的通话记录,朋友传过来的合照,通通躺在备份里,无法查看。

第三,华为手机虽然也有推出Google Docs的快应用,但比起App端真的无法取代,自google 推出Google docs以后,我们写小组作业(现在也是),以至于我平时接客户的单子,都会使用google docs,而纵然安装模拟器和刷gms进华为手机可以解决这个问题,但这些方法都是治标不治本的,模拟器打字肯定是不舒服的,gms各种警告弹出来,而且有些银行app还会把你当成root。

第四,银行app各种无法下载,虽然不少银行都有在华为的海外商店上架,但是其实华为海外商店的app少得可怜,所以一般都是长期登陆中国大陆的选项(频繁切换会被限制),而要是银行规模少一点的,在网上几乎很难找到apk,而且以apk安装远远没有在官方渠道安装安全,加上很多银行app的发现你不是从Google play下载的的根本不给用,所以会带来极大的麻烦。

第五,打游戏基本都需要Play Game,没有二代居民身份证的用户实名国服游戏首先手续就很麻烦,其次当你的朋友都是玩国际服的时候,谁陪你玩国服。

从另外一个角度讲,当你的学校依赖Google class,公司依赖Google suit,家人依赖Google One,你用华为手机根本是自找麻烦,关键是华为比其他手机都要贵上不少的时候,为什么我要花更多的钱找更多的麻烦。

不过,纵然买了华为,它的相机让我忽视了所有的不便,Google Docs 电脑用就好,银行app iPad用就好,毕竟现在人在内地确实不是天天需要用到GMS,但天天要用GMS的,生活重度依赖GMS的,喜欢打游戏的,买华为真的是自找麻烦。

所以从我的身上你大概可以看吃为什么华为欧美市场这么需要Google GMS,因为就算你不用,你老板用、你上司用、你学校用、你老师用,你不用谁迁就你,的确可以慢慢找替代的APP,但为何我不买本来就有GMS的小米或者已经降价了的iPhone呢,你要记住欧洲人也不是你想象中的富裕,性价比还是比较实际。

编辑于 15 小时前・著作权归作者所有
wangdong268
不是抬杠看来还真的得来一套非google的东西. 要不然哪天给你断了 什么都没有了.
王加
海外没有gms的手机谷歌服务基本没法用,就算强行上也会出各种莫名其妙的问题。

https://www.zhihu.com/answer/1710854044

#189 Re: 全志 SOC » V3s、F1C100是否能用在户外全天候24小时工作的应用场景 » 2021-02-03 14:57:47

fehooyt 说:

国内的户外环境稳定最低有零下30度,最高也有50度吧

raspberryman 说:

常温的话,问题不大

-20度就悬了,建议不要用全志了。

#190 Re: 全志 SOC » f1c200s添加keyboard_gpio失败 » 2021-02-03 14:55:54

pinctrl-0 = <&key_pins>;

删掉这一句试一试

#191 Re: 全志 SOC » f1c200s添加keyboard_gpio失败 » 2021-02-03 14:43:57

already requested by

已经在别处被使用

#195 Re: 全志 SOC » 玩游戏机的想搞下f1c100s系列的掌机的内置spi芯片内容 不懂硬件...请问几个问题 » 2021-02-02 14:56:09

Windows裸机程序烧录工具,烧录到SD卡
http://whycan.com/t_3875.html#p54539
(出处:哇酷开发者社区)

把这个img烧到tf卡,然后usb插电脑,就能用这个:
编译、安装Windows版本sunxi-fel步骤 (32M spi flash补丁,支持W25Q256/MX25L256)
http://whycan.com/t_444.html

读出spi flash数据

#196 Re: RISC-V » 看到沁恒的riscv单片机支持swd调试。 » 2021-02-02 13:42:22

DENHJD 说:

只是借用SWD串行调试线这个名字吧,比如LGT的AVR兼容8位机调试接口也叫SWD

应该是类似I2C,比飞利浦注册了商标,atmel和全志就叫TWI, ov叫SCCB,其实还是同一个东西。

#197 Re: 全志 SOC » 玩游戏机的想搞下f1c100s系列的掌机的内置spi芯片内容 不懂硬件...请问几个问题 » 2021-02-02 13:40:22

可以不用烧录器的,你试一试这个:


编译、安装Windows版本sunxi-fel步骤 (32M spi flash补丁,支持W25Q256/MX25L256)
http://whycan.com/t_444.html
(出处:哇酷开发者社区)

页脚

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

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