Changes between Version 5 and Version 6 of linux/ubi
- Timestamp:
- 10/01/2018 04:33:48 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
linux/ubi
v5 v6 212 212 === On a target board with NAND FLASH === 213 213 [=#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 andwithout the NAND FLASH partition being mounted.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 without the NAND FLASH partition being mounted. 215 215 216 216 The 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}}}. … … 249 249 umount /mnt/ubi # unmount filesystem 250 250 }}} 251 251 Troubleshooting: 252 253 The output beneath indicates that /dev/mtd2 is not attached and you may proceed with manipulating the NAND flash. 254 {{{#!bash 255 root@OpenWrt:/# ubidetach /dev/ubi_ctrl -m 2 256 ubidetach: error!: cannot detach mtd2 257 error 16 (Resource busy) 258 }}} 252 259 253 260 == Working with UBI in U-boot Bootloader ==