yocto 嵌入式 Linux 系统恢复

yocto 嵌入式 Linux 系统恢复

我在 imx6DL 上使用 Yocto Poky 1.7.3,并尝试实现系统恢复。我可以从 NAND 和 SD 卡启动系统,但“主”系统驻留在 NAND 上。如果发生损坏,我的想法是从 SD 启动系统,然后用位于 SD 上的文件系统覆盖 NAND 上的文件系统。SD 卡有 2 个分区,一个用于启动,一个包含文件系统 (rootfs.ubifs)。

我尝试的是:

mount /dev/mmcblk0p2 /mnt
dd if=/mnt/rootfs.ubifs of=/dev/mtd3 bs=4096

但是当我重新启动系统时,我得到了一个很长的以下错误序列(确切地说是 692 次):

UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 691:0, read 64 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 4096 bytes from PEB 691:4096, read 4096 bytes

最后:

UBI error: vtbl_check: bad CRC at record 15: 0xd2799447, not 0xf116c36b
Volume table record 15 dump:
    reserved_pebs   0
    alignment       0
    data_pad        0
    vol_type        0
    upd_marker      0
    name_len        0
    name            NULL
UBI error: vtbl_check: bad CRC at record 15: 0xd2799447, not 0xf116c36b
Volume table record 15 dump:
    reserved_pebs   0
    alignment       0
    data_pad        0
    vol_type        0
    upd_marker      0
    name_len        0
    name            NULL
UBI error: process_lvol: both volume tables are corrupted
UBI error: ubi_attach_mtd_dev: failed to attach mtd3, error -22
UBI error: ubi_init: cannot attach mtd3
UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", error -19
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.10.17imx6dl-ilux-00.00.007 #1
[<80013974>] (unwind_backtrace+0x0/0xec) from [<80011594>] (show_stack+0x10/0x14)
[<80011594>] (show_stack+0x10/0x14) from [<80012ba0>] (handle_IPI+0x108/0x118)
[<80012ba0>] (handle_IPI+0x108/0x118) from [<80008558>] (gic_handle_irq+0x58/0x5c)
[<80008558>] (gic_handle_irq+0x58/0x5c) from [<8000dd00>] (__irq_svc+0x40/0x70)
Exception stack(0xa8097f50 to 0xa8097f98)
7f40:                                     a8097f98 3b9aca00 60217e3e 00000002
7f60: 80874114 808740c8 81136130 00000001 5ecee2a6 00000002 a8096000 00000000
7f80: 00000017 a8097f98 00000009 80428f64 00000113 ffffffff
[<8000dd00>] (__irq_svc+0x40/0x70) from [<80428f64>] (cpuidle_enter_state+0x54/0xe4)
[<80428f64>] (cpuidle_enter_state+0x54/0xe4) from [<804290b0>] (cpuidle_idle_call+0xbc/0x154)
[<804290b0>] (cpuidle_idle_call+0xbc/0x154) from [<8000ece4>] (arch_cpu_idle+0x10/0x54)
[<8000ece4>] (arch_cpu_idle+0x10/0x54) from [<80059788>] (cpu_startup_entry+0x100/0x14c)
[<80059788>] (cpu_startup_entry+0x100/0x14c) from [<105ff564>] (0x105ff564)

是否有任何说明可以正确替换文件系统?

谢谢

相关内容