一、临时单次进 Shell(推荐,重启失效,不破坏原有配置)
上电 → 出现Hit any key to stop autoboot立刻回车进 U-Boot (=>)
1、沿用你原有 bootargs,末尾追加init=/bin/sh
shell
setenv bootargs mem=48m earlycon=pl011,0x11040000 console=ttyAMA0,115200 clk_ignore_unused initcall_debug rw root=/dev/mtdblock3 rootfstype=jffs2 mtdparts=sfc:256K(boot),256K(env),4M(kernel),4608K(rootfs),4032K(app),3008K(udisk),64K(active),64K(update) init=/bin/sh2、启动内核
shell
boot开机直接进/#,不会挂载 /etc/init.d、不会自动启动应用程序;断电重启自动恢复正常启动。
此时可以进行一些紧急操作,操作完毕后可重新恢复
第一步:重启开发板
plaintext
reboot第二步:在倒计时出现时,按任意键进入 u-boot
看到Hit any key to stop autoboot马上按回车
第三步:输入这条修复命令(直接复制粘贴)
plaintext
setenv bootargs mem=48m earlycon=pl011,0x11040000 console=ttyAMA0,115200 clk_ignore_unused initcall_debug rw root=/dev/mtdblock3 rootfstype=jffs2 mtdparts=sfc:256K(boot),256K(env),4M(kernel),4608K(rootfs),4032K(app),3008K(udisk),64K(active),64K(update)第四步:保存
plaintext
saveenv第五步:启动
plaintext
boot