Kernel Panic on Buildroot B2021.10.1

  • Hi,


    I tried to run on PicoMODA9 the new Buildroot release B2021.10.1 but I get a Kernel panic and I don't know why.

    The previous release of Buildroot B2020.04 runs without problems.

    Can you, please, tell me what is I'm doing wrong ?



    This is the complete message:

    Starting kernel ...



    WARNING: CPU: 0 PID: 1 at drivers/mtd/nand/raw/nand_base.c:5756 nand_scan_with_i

    ds+0xb88/0x137c

    Total number of ECC bytes exceeded oobsize

    Modules linked in:

    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.70-F+S #1

    Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)

    [<8010e460>] (unwind_backtrace) from [<8010a150>] (show_stack+0x10/0x14)

    [<8010a150>] (show_stack) from [<809765fc>] (dump_stack+0x7c/0x98)

    [<809765fc>] (dump_stack) from [<80129230>] (__warn+0xb8/0xd0)

    [<80129230>] (__warn) from [<801292c0>] (warn_slowpath_fmt+0x78/0xa8)

    [<801292c0>] (warn_slowpath_fmt) from [<805a2f20>] (nand_scan_with_ids+0xb88/0x1

    37c)

    [<805a2f20>] (nand_scan_with_ids) from [<805aceb4>] (gpmi_nand_fus_probe+0x290/0

    x370)

    [<805aceb4>] (gpmi_nand_fus_probe) from [<8052fe54>] (platform_drv_probe+0x48/0x

    94)

    [<8052fe54>] (platform_drv_probe) from [<8052e1c8>] (really_probe+0x1f8/0x318)

    [<8052e1c8>] (really_probe) from [<8052e590>] (driver_probe_device+0x13c/0x154)

    [<8052e590>] (driver_probe_device) from [<8052e72c>] (device_driver_attach+0x44/

    0x5c)

    [<8052e72c>] (device_driver_attach) from [<8052e7f0>] (__driver_attach+0xac/0xb4

    )

    [<8052e7f0>] (__driver_attach) from [<8052c670>] (bus_for_each_dev+0x64/0xa4)

    [<8052c670>] (bus_for_each_dev) from [<8052d644>] (bus_add_driver+0x150/0x1b0)

    [<8052d644>] (bus_add_driver) from [<8052ef9c>] (driver_register+0xac/0xf0)

    [<8052ef9c>] (driver_register) from [<801026e8>] (do_one_initcall+0x74/0x1a0)

    [<801026e8>] (do_one_initcall) from [<80e00e94>] (kernel_init_freeable+0x184/0x1

    d0)

    [<80e00e94>] (kernel_init_freeable) from [<8098a96c>] (kernel_init+0x8/0x10c)

    [<8098a96c>] (kernel_init) from [<801010e8>] (ret_from_fork+0x14/0x2c)

    Exception stack(0x8b453fb0 to 0x8b453ff8)

    3fa0: 00000000 00000000 00000000 00000000

    3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

    3fe0: 00000000 00000000 00000000 00000000 00000013 00000000

    ---[ end trace 48f1850f8a957818 ]---

    gpmi-nand-fus 112000.gpmi-nand: driver registration failed: -22

    gpmi-nand-fus: probe of 112000.gpmi-nand failed with error -22

    8<--- cut here ---

    Unable to handle kernel NULL pointer dereference at virtual address 00000000

    pgd = (ptrval)

    [00000000] *pgd=00000000

    Internal error: Oops: 805 [#1] PREEMPT SMP ARM

    Modules linked in:

    CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 5.4.70-F+S #1

    Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)

    PC is at dt_remember_or_free_map+0x64/0xdc

    LR is at 0x0

    pc : [<8044a310>] lr : [<00000000>] psr: a0000013

    sp : 8b453d80 ip : 8ad74118 fp : 8044b6e0

    r10: 82002164 r9 : 00000002 r8 : 8ad742b8

    r7 : 00000002 r6 : 8ad74280 r5 : 8b58c380 r4 : 8ad740d8

    r3 : 00000000 r2 : 00000000 r1 : 8ad740d8 r0 : 8ad74280

    Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none

    Control: 10c5387d Table: 10004059 DAC: 00000051

    Process swapper/0 (pid: 1, stack limit = 0x(ptrval))

    Stack: (0x8b453d80 to 0x8b454000)

    3d80: 8ad740c0 8b58c380 8bb4263c 00000000 8bb423a0 00000001 00000000 8044a94c

    3da0: 00000002 809903ac 00000000 82002164 82002178 00000000 4d7c6d00 82002164

    3dc0: 00000002 8ad74280 00000002 80f06348 80f22fbc 8ad740c0 80ceb2c4 8b535010

    3de0: 00000000 00000157 00000000 80fc6d70 80e554f4 80447bd4 ffffffff 00000000

    3e00: 8ad740cc 80ceb2c4 80f22fbc 00000000 8acff840 8b535010 80f34ba0 00000157

    3e20: 00000000 80fc6d70 80e554f4 80447f50 00000000 8b535010 8acff7c0 8054a5b8

    3e40: 8b535010 80fc6d6c 00000000 8052e088 8b535010 80f34ba0 80f34ba0 80f30380

    3e60: 00000157 80f65000 80e004a4 8052e590 80f34ba0 8b535010 00000000 00000000

    3e80: 8b535010 80f34ba0 80f30380 00000157 80f65000 8052e72c 00000000 8b535010

    3ea0: 80f34ba0 8052e7f0 8b535010 80f34ba0 8052e744 8052c670 80f30380 8b409b58

    3ec0: 8b5279b4 80f06348 80f34ba0 8acff700 00000000 8052d644 80ca1e65 80ca1e66

    3ee0: 00000000 80f34ba0 80e2e8a0 ffffe000 00000000 8052ef9c 80f65000 80e2e8a0

    3f00: ffffe000 801026e8 80c5fde1 80142fb4 00000000 80e00400 80d5ee3c 00000157

    3f20: 00000006 00000006 00000000 80d60908 00000156 80d60908 80e45818 8bfff8e7

    3f40: 00000000 80f06348 80e004a4 00000007 80f65000 80f06348 80e45850 00000007

    3f60: 80f65000 80e45834 80e45854 80e00e94 00000006 00000006 00000000 80e004a4

    3f80: 00000000 00000000 8098a964 00000000 00000000 00000000 00000000 00000000

    3fa0: 00000000 8098a96c 00000000 801010e8 00000000 00000000 00000000 00000000

    3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

    3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000

    [<8044a310>] (dt_remember_or_free_map) from [<8044a94c>] (pinctrl_dt_to_map+0x32

    0/0x3a4)

    [<8044a94c>] (pinctrl_dt_to_map) from [<80447bd4>] (create_pinctrl+0x58/0x304)

    [<80447bd4>] (create_pinctrl) from [<80447f50>] (devm_pinctrl_get+0x30/0x64)

    [<80447f50>] (devm_pinctrl_get) from [<8054a5b8>] (pinctrl_bind_pins+0x3c/0x120)


    [<8054a5b8>] (pinctrl_bind_pins) from [<8052e088>] (really_probe+0xb8/0x318)

    [<8052e088>] (really_probe) from [<8052e590>] (driver_probe_device+0x13c/0x154)

    [<8052e590>] (driver_probe_device) from [<8052e72c>] (device_driver_attach+0x44/

    0x5c)

    [<8052e72c>] (device_driver_attach) from [<8052e7f0>] (__driver_attach+0xac/0xb4

    )

    [<8052e7f0>] (__driver_attach) from [<8052c670>] (bus_for_each_dev+0x64/0xa4)

    [<8052c670>] (bus_for_each_dev) from [<8052d644>] (bus_add_driver+0x150/0x1b0)

    [<8052d644>] (bus_add_driver) from [<8052ef9c>] (driver_register+0xac/0xf0)

    [<8052ef9c>] (driver_register) from [<801026e8>] (do_one_initcall+0x74/0x1a0)

    [<801026e8>] (do_one_initcall) from [<80e00e94>] (kernel_init_freeable+0x184/0x1

    d0)

    [<80e00e94>] (kernel_init_freeable) from [<8098a96c>] (kernel_init+0x8/0x10c)

    [<8098a96c>] (kernel_init) from [<801010e8>] (ret_from_fork+0x14/0x2c)

    Exception stack(0x8b453fb0 to 0x8b453ff8)

    3fa0: 00000000 00000000 00000000 00000000

    3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

    3fe0: 00000000 00000000 00000000 00000000 00000013 00000000

    Code: e2844018 e1c160fc e5814000 e5813004 (e5831000)

    ---[ end trace 48f1850f8a957819 ]---

    Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

    ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

    ]---

  • cridaniel

    Changed the title of the thread from “Linux Panic on Buildroot B2021.10.1” to “Kernel Panic on Buildroot B2021.10.1”.
  • Hello,


    there seems to be an issue with the NAND flash on your board.

    Our Linux boards use a NAND chip with 64 OOB size

    nand: Micron MT29F2G08ABAEAH4

    nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64


    Your board uses an and chip with 224 OOB size


    nand: Micron MT29F2G08ABAFAH4

    nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 224


    These where only used on some Windows boards.


    There is a known issue when trying to switch from Windows boards with this NAND chip to Linux.


    Is this only for development purposes or are you planning to switch from Windows to Linux on existing boards in the field?

  • Hello,


    it is just for development purposes. We are trying to switch in the future to linux.

    The previous release of Buildroot worked without problems. Is there a configuration that can be changed when building the linux kernel that would make this release also work ?

  • Hello


    it could be possible, but it will be hard for us to repruduce as we do not use this flash type anymore for quit some time.

    Also you shouldn't be able to write the Uboot from Uboot or Linux, only from Nboot.


    The easiest solution would be, that you send us the board and we'll exchange it with the new version for free.

    This would also be closer to the production boards, you would receive in the future.



    However it is odd that it worked with the last realease, so we would like to investigate further. Did you use the exact same board?

    Could you please tell us the following output?:

    1. Go into Nboot by resetting the board and keep "s" pressed in the console

    2. In Nboot console press "2" , the "NAND Flash settings" should be printed


    Your F&S Support Team

  • Hello,


    yes, I have used the exact same board.

    The output is:


    NAND Flash settings

    --------------------------

    uBlockCount = 2048

    uPageCount = 64

    uPageCountBits = 6

    uPageSize = 2048

    uPageSizeBits = 11

    uSpareSize = 224

    uColCycle = 2

    uRowCycle = 3

    uSize = 256

    normal ECC is 40 bits per 1024 bytes

    boot ECC is 40 bits per 1024 bytes

    flashlayout 0: size = 2224, metasize = 36, level = 40

    flashlayout 1: size = 2190, metasize = 2, level = 40

  • Hello,


    we have created a patch that should fix your issue with booting linux.


    Please copy the attached patch to your linux kernel directory and run


    patch -p1 < 0001-In-gpmi-nand-fus.c-set-and-use-ecc.total-ecc.bytes-c.patch


    Please note, that you still only can write the U-boot from Nboot, NOT from U-Boot or Linux. This can only be fixed by exchanging the flash.


    Your F&S Support Team