AR# 71114

2017.1-2018.2 Zynq UltraScale+ MPSoC: QSPI ブート モードで JFFS2 ファイルシステムをマウントしていると Linux カーネル ブートにエラーが発生する

説明

UltraScale+ MPSoC 評価ボードで JFFS2 ファイルシステムを使用して Linux をブートすると、PetaLinux 2017.x および 2018.1/2 でそのファイルシステムをマウントしているときに次のようなエラーが発生します。

2017.x boot ログ: 

QSPI ブート モードで JFFS2 ファイルシステムを使用して Linux をブートすると、次のようなエラー メッセージが表示されます。 

ブート ログ全体が添付されています。

[    3.802595] ALSA device list:
[    3.805506]   #0: DisplayPort monitor
[    3.810220] jffs2: Node at 0x00001cec with length 0x00001044 would run over the end of the erase block
[    3.819531] jffs2: Perhaps the file system was created with the wrong erase size?
[    3.827014] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001cf0: 0x1044 instead
[    3.836501] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001cf4: 0x586d instead
[    3.845979] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001cf8: 0x0012 instead
[    3.855467] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001cfc: 0x0003 instead
[    3.864948] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001d00: 0x81ed instead
[    3.874425] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001d08: 0x3008 instead
[    3.883904] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001d18: 0x2000 instead
[    3.893384] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001d1c: 0x1000 instead
[    3.902863] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001d20: 0x1000 instead
[    3.912344] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001d28: 0x700c instead
[    3.921820] jffs2: Further such events for this erase block will not be printed
[    3.929294] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00002000: 0xeb45 instead
[    3.938779] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00002004: 0x7deb instead
[    3.948257] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00002008: 0xb31e instead
[    3.959251] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000200c: 0x9c13 instead
[    3.970237] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00002010: 0x0586 instead
[    3.981221] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00002014: 0xed13 instead
[    3.992215] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00002018: 0x8422 instead
[    4.003164] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000201c: 0xc654 instead
[    4.014065] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00002020: 0xca11 instead
[    4.024937] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00002024: 0x4ec6 instead
[    4.035808] jffs2: Further such events for this erase block will not be printed
[    4.045321] jffs2: Node at 0x00003c2c with length 0x00000691 would run over the end of the erase block
[    4.056143] jffs2: Perhaps the file system was created with the wrong erase size?
[    4.065364] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004000: 0xc18a instead
[    4.076473] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004004: 0x3a61 instead
[    4.087588] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004008: 0xcd5f instead
[    4.098710] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000400c: 0x944f instead
[    4.109787] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004010: 0xebcf instead
[    4.120818] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004014: 0x8cff instead
[    4.131832] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004018: 0x8f39 instead
[    4.142845] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000401c: 0x73a1 instead
[    4.153836] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004020: 0xc358 instead
[    4.164787] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004024: 0x0679 instead
[    4.175714] jffs2: Further such events for this erase block will not be printed
[    4.185348] jffs2: Node at 0x00005d08 with length 0x000006a6 would run over the end of the erase block
[    4.196119] jffs2: Perhaps the file system was created with the wrong erase size?
[    4.205361] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00006000: 0x153c instead
[    4.216361] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00006004: 0x0f31 instead
[    4.227323] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00006008: 0x4fb0 instead
[    4.238242] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000600c: 0xcfe2 instead
[    4.249125] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00006010: 0x3c88 instead
[    4.259955] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00006014: 0x8f83 instead
[    4.270719] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00006018: 0x0644 instead
[    4.281471] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000601c: 0x06ae instead
[    4.292208] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00006020: 0x3c41 instead
[    4.302886] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00006024: 0xbee9 instead
[    4.313509] jffs2: Further such events for this erase block will not be printed
 

2018.1/2 ブート:ログ: 

JFFS2 ルート ファイルシステムを使用して QSPI ブート モードでカーネルをブートすると、ファイルシステムのマウントに関連した次のような問題が表示されます。


[    4.237179] ALSA device list:
[    4.242208]   #0: DisplayPort monitor
[    4.387362] random: crng init done
[    5.109881] jffs2: notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    5.129424] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    5.137842] jffs2: error: (1) jffs2_do_read_inode_internal: CRC failed for read_inode of inode 4 at physical location 0x10c
[    5.151269] jffs2: iget() failed for ino #4
[    5.157703] devtmpfs: error mounting -5
[    5.163888] Freeing unused kernel memory: 512K
[    5.179677] jffs2: error: (1) jffs2_do_read_inode_internal: CRC failed for read_inode of inode 12 at physical location 0x490
[    5.193259] jffs2: iget() failed for ino #12
[    5.199889] Starting init: /sbin/init exists but couldn't execute it (error -5)
[    5.210270] jffs2: error: (1829) jffs2_do_read_inode_internal: CRC failed for read_inode of inode 128 at physical location 0x109408
[    5.216080] jffs2: error: (1) jffs2_do_read_inode_internal: CRC failed for read_inode of inode 5 at physical location 0x17c
[    5.216098] Unable to handle kernel paging request at virtual address ffffffc97a03c57e
[    5.216099] Mem abort info:
[    5.216102]   Exception class = DABT (current EL), IL = 32 bits
[    5.216103]   SET = 0, FnV = 0
[    5.216104]   EA = 0, S1PTW = 0
[    5.216105] Data abort info:
[    5.216107]   ISV = 0, ISS = 0x00000045
[    5.216108]   CM = 0, WnR = 1
[    5.216112] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff8009062000
[    5.216114] [ffffffc97a03c57e] *pgd=0000000000000000, *pud=0000000000000000
[    5.216119] Internal error: Oops: 96000045 [#1] SMP
[    5.216121] Modules linked in:
[    5.216127] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx-v2018.1 #1
[    5.216128] Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
[    5.216130] task: ffffffc87b846d00 task.stack: ffffff8008038000
[    5.216139] PC is at free_block.constprop.20+0xf0/0x1b0
[    5.216141] LR is at 0x1
[    5.216143] pc : [<ffffff8008189698>] lr : [<0000000000000001>] pstate: 400000c5
[    5.216145] sp : ffffff800803b7d0
[    5.216146] x29: ffffff800803b7d0 x28: ffffff800803b850
[    5.216150] x27: ffffffc87b824000 x26: ffffffc87b801080
[    5.216153] x25: ffffffc87ff75110 x24: 000000000000003c
[    5.216157] x23: ffffffc87a5f8b80 x22: 00000048771dc000
[    5.216160] x21: ffffffc87b800000 x20: ffffffc87ff75100
[    5.216163] x19: ffffff8008d99100 x18: 0000000000000001
[    5.216167] x17: 0000000000000006 x16: ffffffc87b801088
[    5.216170] x15: ffffffc87b8010a8 x14: ffffffbf00000000
[    5.216174] x13: dead000000000100 x12: dead000000000200
[    5.216177] x11: ffffffc87ff752f0 x10: ffffffbf1dab0d40
[    5.216180] x9 : ffffffc87a03c580 x8 : ffffffc87a03c580
[    5.216184] x7 : ffffffc87b801080 x6 : 00000000fffffffe
[    5.216187] x5 : 0000000000000000 x4 : 0000000000f4078b
[    5.216190] x3 : ffffff800803b850 x2 : ffffffbf1dab0d20
[    5.216193] x1 : ffffffc87ff75198 x0 : ffffffc87b800000
[    5.216198] Process swapper/0 (pid: 1, stack limit = 0xffffff8008038000)
[    5.216199] Call trace:
[    5.216202] Exception stack(0xffffff800803b690 to 0xffffff800803b7d0)
[    5.216205] b680:                                   ffffffc87b800000 ffffffc87ff75198
[    5.216209] b6a0: ffffffbf1dab0d20 ffffff800803b850 0000000000f4078b 0000000000000000
[    5.216212] b6c0: 00000000fffffffe ffffffc87b801080 ffffffc87a03c580 ffffffc87a03c580
[    5.216216] b6e0: ffffffbf1dab0d40 ffffffc87ff752f0 dead000000000200 dead000000000100
[    5.216219] b700: ffffffbf00000000 ffffffc87b8010a8 ffffffc87b801088 0000000000000006
[    5.216223] b720: 0000000000000001 ffffff8008d99100 ffffffc87ff75100 ffffffc87b800000
[    5.216227] b740: 00000048771dc000 ffffffc87a5f8b80 000000000000003c ffffffc87ff75110
[    5.216231] b760: ffffffc87b801080 ffffffc87b824000 ffffff800803b850 ffffff800803b7d0
[    5.216234] b780: 0000000000000001 ffffff800803b7d0 ffffff8008189698 00000000400000c5
[    5.216238] b7a0: ffffff800803b800 0000000000000003 ffffffffffffffff 00000000ffffffc8
[    5.216240] b7c0: ffffff800803b7d0 ffffff8008189698
[    5.216245] [<ffffff8008189698>] free_block.constprop.20+0xf0/0x1b0
[    5.216250] [<ffffff800818a498>] ___cache_free+0xc8/0x1b8
[    5.216254] [<ffffff800818acdc>] kfree+0x54/0x70
[    5.216260] [<ffffff80082e6944>] jffs2_free_full_dirent+0xc/0x18
[    5.216264] [<ffffff80082e9e94>] jffs2_do_clear_inode+0xbc/0x130
[    5.216268] [<ffffff80082f04e4>] jffs2_evict_inode+0x34/0x40
[    5.216273] [<ffffff80081b8224>] evict+0xa4/0x190
[    5.216276] [<ffffff80081b8628>] iput+0x148/0x1d0
[    5.216279] [<ffffff80081ba234>] iget_failed+0x24/0x30
[    5.216282] [<ffffff80082f0684>] jffs2_iget+0x194/0x320
[    5.216286] [<ffffff80082e503c>] jffs2_lookup+0x104/0x188
[    5.216291] [<ffffff80081a5758>] lookup_slow+0x90/0x160
[    5.216295] [<ffffff80081a88d4>] walk_component+0x1fc/0x308
[    5.216299] [<ffffff80081a8ca0>] link_path_walk+0x2c0/0x4e0
[    5.216303] [<ffffff80081a98ac>] path_openat+0x84/0x11f8
[    5.216307] [<ffffff80081abb08>] do_filp_open+0x60/0xd8
[    5.216310] [<ffffff80081a0b8c>] do_open_execat+0x5c/0x1c8
[    5.216314] [<ffffff80081a26e8>] do_execveat_common.isra.14+0x198/0x618
[    5.216318] [<ffffff80081a2b90>] do_execve+0x28/0x30
[    5.216323] [<ffffff8008083850>] run_init_process+0x28/0x38
[    5.216326] [<ffffff8008083874>] try_to_run_init_process+0x14/0x50
[    5.216332] [<ffffff8008a1c60c>] kernel_init+0xbc/0x100
[    5.216336] [<ffffff8008084a90>] ret_from_fork+0x10/0x18
[    5.216341] Code: 1ad22484 0b050084 1ad12484 b40005a9 (38264924)
[    5.216343] ---[ end trace 128c3b2905dc9d7e ]---
[    5.216368] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    5.216368]
[    5.216372] SMP: stopping secondary CPUs
[    5.224555] Kernel Offset: disabled
[    5.224558] CPU features: 0x002004
[    5.224559] Memory Limit: none
[    5.884350] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    5.884350]

ソリューション

PetaLinux 2017.x 用の回避策:

JFFS2 ファイルシステムが間違った消去ブロック サイズで設定されているために、この問題が発生します。

この問題を回避するには、次の手順に従って JFFS2 ファイルシステムを作成します。

1) Linux PC に mkfs ツールをインストールし、次のコマンドを使用して JFFS2 ファイルシステムを手動で作成します。

    $ mkfs.jffs2 --root=<filesystem directory> --eraseblock=<erase block size of your flash> -p -o rootfs.jffs2
    $ mkfs.jffs2 --root=<filesystem directory> --eraseblock=0x2000 -p -o rootfs.jffs2


注記: Zynq UltraScale MPSoC 評価ボードのブロック消去サイズは 8KB(0x2000) です。

2) PetaLinux プロジェクトをビルドします。 

petalinux-package コマンドを使用してファイルシステムをブート イメージに含めます。

  $ petalinux-package --boot --u-boot --kernel image.ub --add rootfs.jffs2 --offset <offset-of-jffs2-partition>


PetaLinux 2018.1/2 用の回避策:

これは、DMA のカーネル 4.14 の既知の問題です。 

QSPI のデバイスツリー ノードで「has-io-mode」プロパティをイネーブルにして、SPI コントローラーで DMA をオフにする必要があります。

<plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi に次のデバイス ツリー コンテンツを追加します。

    &qspi {
        has-io-mode = <1>;
    };

添付ファイル

関連添付ファイル

タイトル サイズ ファイルタイプ
2017-x-QSPI-boot-error-log.txt 73 KB TXT
2018-1-or-2-QSPI-boot-error-log.txt 41 KB TXT

アンサー レコード リファレンス

関連アンサー レコード

Answer Number アンサータイトル 問題の発生したバージョン 修正バージョン
71439 2017.1-2018.2: Zynq UltraScale+ MPSoC: Linux kernel panic for JFFS2 filesystem on POR or reboot N/A N/A
AR# 71114
日付 08/21/2018
ステータス アクティブ
種類 一般
デバイス
ツール 詳細 概略
Boards & Kits