Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

spi-nand kernel module is missing (please add kernel config option MTD_SPI_NAND=m)

Featured Replies

A lot of spi-nand flashes is supported linux kernel. It will be very helpful to add a possibility to read/write/erase such flashes using standard linux support. Unfortunately spi-nand support is not enabled in armbian linux kernel.
 

example: recovery bootloader on the router board
 

  • Orange Pi 4 configuration

    1. Recompile orange pi 4 linux kernel to enable spi-nand driver (linux-5.10 or above is required). Make sure spinand, mtd and nandcore are built as modules
    2. sudo armbian-config, go to “System → DTC” and replace spidev with spinand
    3. install the following packages: mtd-utils
    4. reboot board to apply changes
     
  • Connect spi-nand chip to orange pi4 board

    Testpoint Meaning Where to connect
    3.3V 3.3V power supply pin 17 of orange pi 4 connector
    DI SPI Data In pin 19 of orange pi 4 connector
    DO SPI Data Out pin 21 of orange pi 4 connector
    CLK SPI Clock pin 23 of orange pi 4 connector
    GND Ground pin 25 of orange pi 4connector
    CS# SPI Chip Select pin 24 of orange pi 4 connector
    WP# Write Protect short with HOLD# and 3.3V testpoints
    HOLD# Hold short with WP# and 3.3V testpoints
     
  • restart spinand and mtd modules

    rmmod ofpart spinand mtd nandcore
    modprobe spinand
    modprobe mtd

    make sure the flash was detected

    dmesg | tail -n 6
    [ 237.055291] spi-nand: probe of spi0.0 failed with error -524
    [ 383.913569] spi-id: 00, ef, aa, 21
    [ 383.913729] spi-id: ef, aa, 21, 00
    [ 383.913878] spi-id: ef, aa, 21, 00
    [ 383.913936] spi-nand spi0.0: Winbond SPI NAND was found.
    [ 383.913965] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
     
  • Recovering bootloader

    Add partitions of your choice using

    mtdpart add /dev/mtd0 <PART_NAME>

    Erase & flash partition

    flash_erase /dev/mtd 0 0
    nandwrite /dev/mtd image_file

    Disconnect flash from orange pi board and test it

Solved by Igor

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.