Changes between Version 35 and Version 36 of linux/ubi
- Timestamp:
- 10/28/2021 05:24:23 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
linux/ubi
v35 v36 20 20 The geometry data can be found in the datasheet for the specific flash device used. Gateworks uses a variety of NAND Flash devices that fall within two different unique geometries we refer to as 'normal' and 'large' which references the erase block size: 21 21 ||= NAND Part =||= NAND Size =||= Page Size (Bytes) =||= Block Size =||= Logical Erase Block Size =||= Blocks =||= READ_ID Bytes =||= Gateworks Geometry Name =|| 22 || Cypress S34ML16G2 02|| 2GiB || 2048 || 128KiB || 124KiB || 16384 || 0x01 0xd5 0xd2 0x95 || normal ||22 || Cypress S34ML16G2 || 2GiB || 2048 || 128KiB || 124KiB || 16384 || 0x01 0xd5 0xd2 0x95 || normal || 23 23 || Micron MT29F2G08 || 256MiB || 2048 || 128KiB || 124KiB || 2048 || 0x2c 0x90 0x95 0x06 || normal || 24 24 || Micron MT29F16G08 || 2GiB || 4096 || 256KiB || 248KiB || 8192 || 0x2c 0xd5 0xd1 0xa6 || large || … … 27 27 28 28 The geometry can also be determined at runtime in U-Boot using {{{nand info}}} and Linux using {{{sysfs}}}: 29 * Cypress S34ML16G202 2GiB FLASH: 29 * Cypress S34ML16G202 2048MiB FLASH: 30 - U-Boot: 31 {{{#!bash 32 Ventana > nand info 33 34 Device 0: nand0, sector size 128 KiB 35 Page size 2048 b 36 OOB size 128 b 37 Erase size 131072 b 38 subpagesize 2048 b 39 options 0x40000200 40 bbt options 0x 8000 41 }}} 42 * U-Boot above shows a 2048 byte page size and a 128KiB erase block size which dictates a 124KiB logical erase block size 43 - Linux (once device is attached via 'ubiattach /dev/ubi_ctrl -m 2' or via 'root=ubi ubi=2' kernel cmdline params: 44 {{{#!bash 45 # cat /sys/devices/virtual/ubi/ubi0/min_io_size 46 2048 47 # cat /sys/devices/virtual/ubi/ubi0/eraseblock_size 48 126976 49 # cat /sys/devices/virtual/ubi/ubi0/total_eraseblocks 50 16248 51 }}} 52 * above shows a 2048 byte page size, a 124KiB logical erase block size (which dictates a 128KiB physical erase block size) and a max of 16248 total erase blocks available in this ubi for a total usable space of 16248*124KiB still available for use by ubi volumes 53 * Micron MT29F16G08 2048MiB FLASH: 30 54 - U-Boot: 31 55 {{{#!bash … … 40 64 bbt options 0x 0 41 65 }}} 42 * U-Boot above shows a 4096 byte page size and a256KiB erase block size which dictates a 248KiB logical erase block size66 * Note the 4096 byte page size and 256KiB erase block size which dictates a 248KiB logical erase block size 43 67 - Linux (once device is attached via 'ubiattach /dev/ubi_ctrl -m 2' or via 'root=ubi ubi=2' kernel cmdline params: 44 68 {{{#!bash … … 50 74 8124 51 75 }}} 52 * above shows a 4096 byte page size, a 248KiB logical erase block size (which dictates a 256KiB physical erase block size) and a max of 8124 total erase blocks available in this ubi for a total usable space of 8124*248KiB still available for use by ubi volumes76 * above shows a 4096 byte page size, a 248KiB logical erase block size (which dictates a 256KiB physical erase block size) and a max of 8124 total erase blocks available in this ubi for a total usable space of 253952*248KiB still available for use by ubi volumes 53 77 * Micron MT29F2G08 256MiB FLASH: 54 78 - U-Boot: … … 58 82 Device 0: nand0, sector size 128 KiB 59 83 Page size 2048 b 60 OOB size 128b84 OOB size 64 b 61 85 Erase size 131072 b 62 86 subpagesize 2048 b … … 72 96 126976 73 97 # cat /sys/devices/virtual/ubi/ubi0/total_eraseblocks 74 1 624898 1912 75 99 }}} 76 100 * above shows a 2048 byte page size, a 124KiB logical erase block size (which dictates a 128KiB physical erase block size) and a max of 126976 total erase blocks available in this ubi for a total usable space of 126976*124KiB still available for use by ubi volumes