Changes between Version 5 and Version 6 of linux/ubi


Ignore:
Timestamp:
10/01/2018 09:33:48 AM (2 months ago)
Author:
Cale Collins
Comment:

added clarity to On a target board with NAND FLASH

Legend:

Unmodified
Added
Removed
Modified
  • linux/ubi

    v5 v6  
    212212=== On a target board with NAND FLASH ===
    213213[=#ubiontarget]
    214 To extract or manipulate the contents of a UBI within the NAND Flash of a Linux system, Linux must be booted from a secondary medium on a device with NAND FLASH and without the NAND FLASH partition being mounted.
     214To extract or manipulate the contents of a UBI within the NAND Flash of a Linux system, Linux must be booted from a secondary medium without the NAND FLASH partition being mounted.
    215215
    216216The following examples assume that UBI has been configured to use the 3rd (zero based) MTD FLASH partition ({{{ubi.mtd=2}}} kernel command line) as we typically use the {{{mtdparts=nand:16m(uboot),1m(env),-(rootfs)}}} env variable in U-Boot to dynamically modify the Linux Device-Tree to partition the NAND flash device into 3 partitions: bootloader, bootloader-env, and rootfs. Thus the bootloader is {{{/dev/mtd0}}}, the bootloader env is {{{/dev/mtd1}}}, and the rootfs is {{{/dev/mtd2}}}.
     
    249249umount /mnt/ubi # unmount filesystem
    250250}}}
    251 
     251Troubleshooting:
     252
     253The output beneath indicates that /dev/mtd2 is not attached and you may proceed with manipulating the NAND flash.
     254{{{#!bash
     255root@OpenWrt:/# ubidetach /dev/ubi_ctrl -m 2
     256ubidetach: error!: cannot detach mtd2
     257           error 16 (Resource busy)
     258}}}
    252259
    253260== Working with UBI in U-boot Bootloader ==