This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Could we make a system restore point for kernel and UBIFS filesy stem image for our dm8168 board?

HI,TIer.

Now we use DM8168 board with a 512MB nand flash with UBIFS.

And to avoid the kernel or file system broken,we want to make a system restore point for our dm8168 board,just like the microsoft windows system do.

And we want to use a 1GB nandflash, during burning process in factory, we put the kernel image and file system image into the unused region in nandflash, I mean the last 512MB part.And if the kernel or filesystem is broken,then  we enter the uboot, and restore the backup kernel and filesytem into the normal position of the nand, just like burning kernel/filesytem into the board.

My thinking is right?Could TIer give me some guidelines?

Thank you.

  • something to be added to describe my plan:

    When i say that we put the kernel image and file system image into the unused region in nand flash.I meant that in kelnel board-support file,I add two regions:backup_kernel and backup_fs,then the region in UBIFS will be about six:u-boot,u-boot vraible,kernel,fs,backup_kernel,backup_fs. And the backup_kernel and backup_fs is read only in UBIFS.

  • Yes, it is possible.
    If original kernel got corrupted, then we have to call backup kernel to avoid board hang.
    If board get booted with backup kernel then we need to flash the actual kernel in that original kernel location.
    For that, we have to modify/tweak the u-boot's "bootcmd"

    If filesystem got corrupted and not able to mount then we need to reset the board automatically (using panic arg) , need to find the panic reset and set the variable in u-boot.
    If board get booted with backup filesystem then we need to flash the actual fs in that original fs location.
    For that, we have to modify/tweak the u-boot's "bootargs" and kernel.
  • Your mind is more complex than mine and more advanced and better.

    I just think that if the kernel or filesystem is bad, we enter uboot, and flash the backup_kernel or backup_filesystem into the normal_kernel or normal_filesystem position MANUALLY,not automatically.