Index: config/userspace/deployment.lkc =================================================================== RCS file: /sources/ltib/ltib/config/userspace/deployment.lkc,v retrieving revision 1.6 diff -U 3 -r1.6 deployment.lkc --- config/userspace/deployment.lkc 28 Dec 2009 11:00:18 -0000 1.6 +++ config/userspace/deployment.lkc 3 Oct 2011 13:10:27 -0000 @@ -20,6 +20,28 @@ help build a yaffs2 flash filesystem image + config DEPLOYMENT_UBIFS + bool "ubifs" + help + build a ubi flash filesystem image + Apart from the options below, also the /bin/ubifs_ubinize_tmpl.ini + file is used to create a partition with 1 rootfs volume + (http://www.linux-mtd.infradead.org/faq/ubi.html#L_ubi_mkimg): + * image: name of the image file; automatically filled in + * vol_size: volume size : for fixed size; or NA with autoresize + flag, so left away here (if absent, the volume size is assumed to + be equivalent to the size of the image file). + * vol_type: 'dynamic' for RW and 'static' for RO + * vol_name: name used during mounting, so must match the name given + by the bootloader to the kernel! + * vol_alignment: put to 1; this is only useful, for example, when + one wants to maintain a block device on top of an UBI volume. In + this case, it is desirable to fit an integer number of blocks in + logical eraseblocks of this UBI volume. + * vol_flags: autoresize flag: then autoresize if you want to use + all available LEBs (because some PEBs are bad, it is not possible + to know in forehand what the maximum available LEBs are) + config DEPLOYMENT_RAMDISK bool "ext2.gz ramdisk" help @@ -56,6 +78,7 @@ if CAP_DEPLOYMENT_ELF && (DEPLOYMENT_JFFS2 \ || DEPLOYMENT_YAFFS2 \ + || DEPLOYMENT_UBIFS \ || DEPLOYMENT_RAMDISK) config DEPLOYMENT_ELF bool "Create a combined ELF image" @@ -75,6 +98,7 @@ string default JFFS2 if DEPLOYMENT_JFFS2 default YAFFS2 if DEPLOYMENT_YAFFS2 + default UBIFS if DEPLOYMENT_UBIFS default RAMDISK if DEPLOYMENT_RAMDISK default CRAMFS if DEPLOYMENT_CRAMFS default ROMFS if DEPLOYMENT_ROMFS @@ -107,6 +131,96 @@ endif +if DEPLOYMENT_UBIFS + +config DEPLOYMENT_MIN_I0_UNIT_SIZE + string "ubifs minimum I/O unit size" + default 2048 + help + This set the UBIFS minimum I/O unit size in Byte. + Is usually 1B for NOR flashes, and agrees with the page size of NAND + flashes (without spare). + See http://www.linux-mtd.infradead.org/doc/ubi.html#L_min_io_unit + +config DEPLOYMENT_SUB_PAGE_SIZE + string "ubifs sub-page size" + default 512 + help + This set the UBIFS sub-page size in Byte - only for NAND flash. + In practice, this is the minimum unit size for ECC calculation. See + http://www.linux-mtd.infradead.org/doc/ubi.html#L_subpage. + Easiest way to discover this (and all) parameter is to run linux on + your board (from NFS or JFFS2), keep a spare partition in flash, and do + 'ubiformat' and 'ubiattach'; the latter will show all parameters. + +config DEPLOYMENT_PEB_SIZE + string "ubifs physical erase block (PEB) size" + default 128KiB + help + This sets the UBIFS Physical erase block (PEB) size of your Chip. + Is your Chip (erase) "block size" without spare (spare area is reserved + by UBI for ECC data). Size might be specified kilobytes (KiB), + megabytes (MiB), gigabytes (GiB) or bytes (no modifier). + +config DEPLOYMENT_LEB_SIZE + string "ubifs logical erase block (LEB) size in Bytes" + default 126KiB + help + This set the UBIFS Logical Erase Block (LEB) size in bytes. This has to + be smaller than the PEB size because of the UBI EC and VID headers (see + http://www.linux-mtd.infradead.org/doc/ubi.html#L_overhead): 2 pages if + the flash has no sub-pages, else 1 page (nand page = minimum I/O unit). + +config DEPLOYMENT_MAX_LEB_COUNT + string "ubifs maximum logical erase block (LEB) count" + default 4096 + help + This set maximum LEB count, the logical maximum size of the image = + (LEB_COUNT * LEB_SIZE). This is the maximum volume size you want to + support for this image to be put on. Don't exagerate, because it will + cost performance. + See http://www.linux-mtd.infradead.org/faq/ubifs.html#L_max_leb_cnt. + +choice + prompt "ubifs compression type" + default DEPLOYMENT_UBIFS_NONE + help + Default UBIFS build without compression. + + config DEPLOYMENT_UBIFS_NONE + bool "no compression" + help + Choose to build ubifs image without compression. + + config DEPLOYMENT_UBIFS_LZO + bool "LZO compression" + help + choose lzo compression ubifs image, lzo compressor is + generally faster than zlib but compresses worse. + + config DEPLOYMENT_UBIFS_FAVOR_LZO + bool "try both compressions" + help + It is a method of combining "lzo" and "zlib" compressors. Namely, + mkfs.ubifs tries to compress data with both "lzo" and "zlib" + compressors, then it compares which compressor is better. + + config DEPLOYMENT_UBIFS_ZLIB + bool "zlib compression" + help + zlib compresses better than LZO but it is slower. + +endchoice + +config DEPLOYMENT_UBIFS_COMPR_TYPE + string + default none if DEPLOYMENT_UBIFS_NONE + default lzo if DEPLOYMENT_UBIFS_LZO + default favor_lzo if DEPLOYMENT_UBIFS_FAVOR_LZO + default zlib if DEPLOYMENT_UBIFS_ZLIB + +endif + config DEPLOYMENT_ZIP depends DEPLOYMENT_ROMFS bool "Create a compressed image of the kernel/romfs image" @@ -136,7 +250,7 @@ default n config SYSCFG_TMPFS_SIZE - depends SYSCFG_READONLY_FS || DEPLOYMENT_JFFS2 || DEPLOYMENT_YAFFS2 + depends SYSCFG_READONLY_FS || DEPLOYMENT_JFFS2 || DEPLOYMENT_YAFFS2 || DEPLOYMENT_UBIFS string "tmpfs size" default "512k" help @@ -147,16 +261,16 @@ from the total available RAM to the system. config SYSCFG_RAM_DIRS - depends SYSCFG_READONLY_FS || DEPLOYMENT_JFFS2 || DEPLOYMENT_YAFFS2 + depends SYSCFG_READONLY_FS || DEPLOYMENT_JFFS2 || DEPLOYMENT_YAFFS2 || DEPLOYMENT_UBIFS string "Place these dirs in writable RAM" default "/tmp /etc /var" if SYSCFG_READONLY_FS - default "/tmp /var" if DEPLOYMENT_JFFS2 || DEPLOYMENT_YAFFS2 + default "/tmp /var" if DEPLOYMENT_JFFS2 || DEPLOYMENT_YAFFS2 || DEPLOYMENT_UBIFS help Flash may only be erased a finite number of times (of the order - of 100000 times for a NOR device). If you deploy to Flash, - frequently written files should be written to RAM to avoid - exhausting Flash. List here a space separated list of directories - to be put in tmpfs (RAM). Changes to these directories will + of 100000 times for a NOR device and a NAND device with good ECC). + If you deploy to Flash, frequently written files should be written to + RAM to avoid exhausting Flash. List here a space separated list of + directories to be put in tmpfs (RAM). Changes to these directories will be lost on reboot. You may also want to use this option if you choose to deploy a read-only root filesystem. Note that if you have chosen a read-only root filesystem, the default