rootfs reset

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

rootfs reset

1,103 次查看
moose
Contributor IV

Is it possible to accommodate a rootfs reset on the device to bring it back to the original state when the image was originally flashed? Kinda like a factory reset function to wipe out any custom modifications the user made. Obviously, we can do this by reflashing the image, but we would like to implement this on the device.

Our device uses iMX8MNANO and we use yocto to build the image. Thank you.

标签 (2)
0 项奖励
回复
7 回复数

1,067 次查看
jimmychan
NXP TechSupport
NXP TechSupport

Yes. You could store the backup image in another storage device or another partition. So you could restore the image on the device.

0 项奖励
回复

1,059 次查看
moose
Contributor IV

Okay. We don't have another storage device, but we have plenty of space on our mmc flash. Could you please provide instructions or documentation on how we could store another image and trigger the reload of this image? Thanks!

0 项奖励
回复

1,014 次查看
jimmychan
NXP TechSupport
NXP TechSupport
0 项奖励
回复

984 次查看
moose
Contributor IV

@jimmychan the link you provided is in regards to OTA (software update over-the-air). I am asking for the recommended way to reset the rootfs to the original image state. This is something done locally and doesn't require software update or network connection to that matter. Similar to how most Linux devices offer factory reset.

0 项奖励
回复

962 次查看
jimmychan
NXP TechSupport
NXP TechSupport

I think you could simply store the backup rootfs image in a backup partition. And then run a script that contain linux commands for formatting the rootfs partition, and extract a .tar.gz rootfs image file to there.

0 项奖励
回复

931 次查看
moose
Contributor IV

That could work. Could you please provide the instructions for how you would implement this? This is a common use case and clear instructions would be very helpful. Thank you.

0 项奖励
回复

916 次查看
jimmychan
NXP TechSupport
NXP TechSupport

The linux commands like "fdisk" for creating partition, "mkfs.ext4" for formatting, "tar" for extracting the compressed file and etc. You may refer to the Linux User's guide (https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf) for more details. 

0 项奖励
回复