反复烧录了几个不通的根文件系统,结果进到系统后,发现有些重名的目录:
# ls -al
total 31
drwxr-xr-x 1 root root 2032 Jan 1 00:00 .
drwxr-xr-x 1 root root 2032 Jan 1 00:00 ..
-rw------- 1 root root 1895 Jan 1 00:01 .ash_history
drwxr-xr-x 1 1000 1000 2032 Jul 15 2019 bin
drwxr-xr-x 5 root root 2320 Jan 1 00:00 dev
drwxr-xr-x 1 1000 1000 2032 Jan 1 00:00 etc
drwxr-xr-x 1 1000 1000 2032 Jul 15 2019 lib
lrwxrwxrwx 1 1000 1000 3 Jul 15 2019 lib32 -> lib
lrwxrwxrwx 1 1000 1000 11 Jul 15 2019 linuxrc -> bin/busybox
drwx------ 1 root root 2032 Jan 1 00:00 lost+found
drwxr-xr-x 1 1000 1000 2032 Jul 9 2019 media
drwxr-xr-x 1 1000 1000 2032 Jul 9 2019 mnt
drwxr-xr-x 1 1000 1000 2032 Jul 9 2019 opt
dr-xr-xr-x 39 root root 0 Jan 1 00:00 proc
drwx------ 1 1000 1000 2032 Jul 9 2019 root
drwxr-xr-x 3 root root 120 Jan 1 00:00 run
drwxr-xr-x 1 1000 1000 2032 Jul 15 2019 sbin
dr-xr-xr-x 11 root root 0 Jan 1 00:00 sys
drwxrwxrwt 2 root root 60 Jan 1 00:00 tmp
drwxr-xr-x 1 1000 1000 2032 Jul 16 2019 usr
drwxr-xr-x 1 1000 1000 2032 Jul 16 2019 usr
drwxr-xr-x 1 1000 1000 2032 Jul 13 2019 var
于是每次重新烧写根文件镜像前,先执行遍全部擦除,到时不会出现这个问题了,但是这样也太麻烦了吧。
还有想尝试只擦除根文件系统,结果总是失败,可能是block区域计算错误,结果是uboot都进不去了。
nuc972的根文件镜像烧录地址是0x2000000; nand flash每页有2048字节,每个block有64页,也就是131072字节,换算成16进制:0x20000;
于是文件系统的起始block是:0x2000000 / 0x20000 = 0x100,也就是block256.
整个nand flash大小是256M,是0x10000000 / 0x20000 = 0x800,也就是block2048.
那么我擦除的block区域是 256至(2048-256),结果执行擦除后,uboot也不正常了。
最近编辑记录 Gentlepig (2019-07-16 16:40:53)
离线