高中生
最后登录1970-1-1
在线时间 小时
注册时间2019-12-13
|
1 之前改成了tftp下载内核和设备树,怎么改回从emmc启动。通过野火\3-Debian镜像\ebf_debian_2021_06_08\USB烧录镜像\mfgtools-release烧写后,怎么之前的bootcmd和bootargs都还存在,mfgtools-release不会擦除整个emmc存储区吗,不会的话,我该怎么手动擦除自己之前
设置的uboot中的变量,或者怎么变为默认值?
以下是我通过uboot的命令查看到的,fatls mmc 1:1显示有boot,kernel目录等,但是没有zImage,dtb,导致想通过网上的一般方式手动改为emmc启动不知道怎么弄。
U-Boot 2020.10-00819-g92bbb6711d (Oct 01 2021 - 13:30:45 +0800)
CPU: Freescale i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 50C
Reset cause: POR
Model: Freescale i.MX6 UltraLiteLite 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Net: Could not get PHY for FEC0: addr 2
eth1: ethernet@20b4000Could not get PHY for FEC0: addr 2
Hit any key to stop autoboot: 0
=> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device
=> fatls mmc 1:1
38 ID.txt
kernel/
2342 uEnv.txt
611 SOC.sh
boot/
34 autorun.inf
4 file(s), 2 dir(s)
=> ext4ls mmc 1:2
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
<DIR> 4096 boot
<DIR> 4096 bin
<DIR> 4096 home
<DIR> 4096 tmp
<DIR> 4096 proc
<DIR> 4096 opt
<DIR> 4096 srv
<DIR> 4096 usr
<DIR> 4096 run
<DIR> 4096 mnt
<DIR> 4096 etc
<DIR> 4096 sys
<DIR> 4096 lib
<DIR> 4096 root
<DIR> 4096 var
<DIR> 4096 sbin
<DIR> 4096 media
<DIR> 4096 dev
=> printenv bootcmd
bootcmd=tftp 80800000 zImage; tftp 83000000 imx6ull-mmc-npi.dtb; bootz 80800000 - 83000000
=> setenv bootcmd 'mmc dev 1; fatload mmc 1:1 80800000 zImage; fatload mmc 1:1 83000000 imx6ull-mmc-npi.dtb;bootz 80800000 - 83000000' //这样不行,fatls mmc 1:1没有zImage和dtb
2 想通过nfs的形式挂载野火的根文件系统,我将野火\3-Debian镜像\ebf_debian_2021_06_08\USB烧录镜像\mfgtools-release\Profiles\Linux\OS Firmware\release\console-armhf-rootfs-lubancat-carp的压缩文件拷贝到虚拟机中
在uboot命令行中设置setenv bootargs ‘console=ttymxc0,115200 root=/dev/nfs rw nfsroot=192.168.3.18:/home/ly/nfs/rootfs,v3 ip=192.168.3.24:192.168.3.18:192.168.3.1:255.255.255.0::eth0ff’
在虚拟机的/home/ly/nfs/目录中新建rootfs,此时出现2种情况,一种是不通过sudo命令操作,一种是通过sudo命令操作,都会出现不同的问题
2.1 mkdir rootfs
cd rootfs
tar -xvf console-armhf-rootfs-lubancat-carp
此时已经解压好了,但是解压显示了一些错误如下:
./dev/full
tar: ./dev/full:无法 mknod: 不允许的操作
./dev/fd
./dev/tty
tar: ./dev/tty:无法 mknod: 不允许的操作
./dev/random
tar: ./dev/random:无法 mknod: 不允许的操作
./dev/stdout
./dev/console
tar: ./dev/console:无法 mknod: 不允许的操作
./dev/zero
tar: ./dev/zero:无法 mknod: 不允许的操作
./dev/shm/
./dev/null
tar: ./dev/null:无法 mknod: 不允许的操作
./dev/stderr
./dev/pts/
./dev/urandom
tar: ./dev/urandom:无法 mknod: 不允许的操作
./dev/ptmx
tar: ./dev/ptmx:无法 mknod: 不允许的操作
./dev/stdin
tar: 由于前次错误,将以上次的错误状态退出
先不管,通过重启开发板,可以正常登录,但是操作各种命令,不行,如下:
embedfire.com Debian Image 2021-06-08
Support/FAQ: www.firebbs.cn/forum.php
default username:password is [debian:temppwd]
npi login: debian
Password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian@npi:~$
debian@npi:~$ ls
bin
debian@npi:~$ ping 114.114.114.114
ping: socket: Operation not permitted
debian@npi:~$ sudo ping 114.114.114.114
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
debian@npi:~$ su -
Password:
su: Authentication failure
debian@npi:~$ su -
Password:
su: cannot set groups: Operation not permitted
debian@npi:~$ su root
Password:
su: cannot set groups: Operation not permitted
debian@npi:~$ ls -l /usr/bin/sudo
-rwxr-xr-x 1 debian debian 110700 Jan 20 2021 /usr/bin/sudo
debian@npi:~$
但是我直接bootargs=console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw也就是从板子的根文件系统启动,都正常,不知道为什么?
2.2 sudo mkdir rootfs
sudo chmod 777 rootfs
sudo tar -xvf console-armhf-rootfs-lubancat-carp
此时已经解压好了,也不会显示不通过sudo的时候的解压错误(也就是上面的解压错误提示)
此时rootfs显示有个锁的提示
2.2.1 直接启动开发板,
default username:password is [debian:temppwd]
npi login: debian
Password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian@npi:~$
debian@npi:~$
debian@npi:~$ ping 114.114.114.114
PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
64 bytes from 114.114.114.114: icmp_seq=1 ttl=70 time=241 ms
64 bytes from 114.114.114.114: icmp_seq=2 ttl=88 time=137 ms
^C
--- 114.114.114.114 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 137.112/188.861/240.611/51.751 ms
debian@npi:~$ ping www.baidu.com
^C
debian@npi:~$ sudo vi /etc/resolv.conf
[sudo] password for debian:
# Generated by Connection Manager
nameserver ::1
nameserver 127.0.0.1
此时ping 114.114.114.114可以,也不用加sudo命令,
但是ping www.baidu.com则不行,我就去改sudo vi /etc/resolv.conf,进去结果这个还改不了,操作没有反应,此时我去到主机的nfs/rootfs目录,想通过主机改sudo vim ./etc/resolv.conf ,结果打开这个文件里面什么也没有
但是明明在开发板上,如上面几行明明显示有nameserver ::1 nameserver 127.0.0.1,不知道为什么,现在主机里面添加 nameserver 114.114.114.114 nameserver 8.8.8.8,结果显示的时候显示"./etc/resolv.conf" "./etc/resolv.conf" E166: 无法打开并写入链接文件,请按 ENTER 或其 它命令继续,然后网上又搜怎么解决,弄了半天不行
2.2.2 显示有锁,先sudo chmod 777 -R rootfs/
然后启动开发板, 现象又和2.1差不多,显示权限不够,
debian@npi:~$ ping 114.114.114.114
ping: socket: Operation not permitted
debian@npi:~$
然后添加sudo,又显示2.1那种现象
debian@npi:~$ sudo !!
sudo ping 114.114.114.114
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
debian@npi:~$
难道想用野火的这个根文件系统就不行吗,但是想用。知识有限,搞不懂,搞不懂,整得有点累。各种方法方式都试了,国庆都没有耍,想搞好。
|
|