(Created page with "Switching from Blogger to be able to WordPress can easily be a nice idea, particularly if you are looking to be able to develop a more pro looking blog or alternatively online...")
 
(Created page with " == What is Unsorted Block Image (UBI)? == The Unsorted Block Image File System (UBIFS) is designed to operate on raw flash devices. It was first introduced into the 2.6.27 L...")
Line 1: Line 1:
Switching from Blogger to be able to WordPress can easily be a nice idea, particularly if you are looking to be able to develop a more pro looking blog or alternatively online store. Downloading not to mention installing an advantageous Wordpress tienda online plugin could be your individual at first step towards creating an advantageous Wordpress tienda online.  
+
 
Almost just about everyone within the planet who owns a laptop or simply a personal desktop has tried online shopping, especially at Christmas, quite than braving the particular cold us may sit at house just about all cozy plus relaxed on your own sofa at house. The main condition with on the net shopping is that thus various websites use different types of shopping carts and also e-commerce functions.  
+
== What is Unsorted Block Image (UBI)? ==
I've lately been reviewing different Wordpress tienda online plug-ins. They appear that would come inside all the different shapes and even sizes with varying fees ranging from $50 - $2000 (custom built systems). When folks begin the particular search for a Wordpress tienda online plugin, they become lost due to the fact that each and every plugin claims to be able to do the particular same job because the next, and so how do your needs grasp your own obtaining what a person desire?
+
 
Thus precisely what usually are the particular prevalent qualities you need to feel for when purchasing a Wordpress tienda online plugin?
+
The Unsorted Block Image File System (UBIFS) is designed to operate on raw flash devices. It was first introduced into the 2.6.27 Linux Kernel in October 2008.
Popular qualities of a wordpress tienda online:  
+
 
Search function built in: An ideal shopping system has a built within search function. This particular may allow shoppers to sort throughout keywords connected with your individual goods and also really should make it effortless for them to locate the actual right product. On a greater scale imagine having in order to navigate by thousands of goods, a person simply might not do it, that is why a search function becomes invaluable.
+
UBIFS works on an Unsorted Block Image (UBI) device which provides tracking of bad flash blocks and wear leveling. UBI works on top of MTD.
Payments: Because your needs grasp a shopping cart must be capable in order to procedure payments, however precisely what kind of payments? You should anticipate a standard shopping cart plugin to cover PayPal not to mention Google Checkout a bit of include other built throughout gateways functions.
+
 
WordPress is actually a powerful CMS which offers a great deal of features not to mention benefits for a web pages. It may in addition be utilized for powering e-commerce websites. Generally there an are a large number of Plugins and also themes for sale that let the actual incorporate of Wordpress tienda online store growth. Certain of these plug-ins happen to be free whilst a few of the are generally premium.  
+
For further information see :
Certain of the particular popular Wordpress tienda online plugins happen to be
+
 
WP e-commerce: This really is the many powerful and free of charge Wordpress tienda online plugin, which provides a great deal of choices for setting up an on the net store with WordPress. WP e-commerce is actually integrated with PayPal, Google checkout, Authorize.net not to mention countless more. It enables the actual developers in order to conveniently tweak the particular feel and even feel of the actual website by utilizing WordPress PHP template tags, short codes, plus widgets.  
+
* [http://www.linux-mtd.infradead.org/doc/ubifs.html UBIFS Home Page]
e-Shop: This really is a free plug-in. It also has a great deal of qualities and even choices for ecommerce -internet site development with WordPress. It may easily handle down loadable products, and supports multiple payment choices which include, PayPal, e-Processing Network, Webtopay and Cash/Cheque.
+
* [http://www.linux-mtd.infradead.org/doc/ubi.html UBI Home Page]
The WP online store plugin typically is you of the very best plugins out there. It not merely lets anyone create specialist product pages, it furthermore lets us make purchase forms plus a couple of cool shopping carts.  
+
* [http://www.linux-mtd.infradead.org/faq/ubifs.html UBIFS FAQ Page]
Setting up the actual theme typically is as well a piece of cake for almost everyone. Anyone might really include to be able to fill within a simple critical info form. Critical information which include the particular currency your needs might like to employ not to mention your individual country of residence is actually needed in order to be filled within the setup shape. Having a PayPal account typically is a must should you intend that would do business online. When you have certainly not opened an account however, us should really do it directly that would take care of all the the particular payments with regard to you go.
+
* [http://www.linux-mtd.infradead.org/faq/ubi.html UBI FAQ Page]
To get more critical information on how to be able to create a on the net store visit [http://enteralia.com/vender-en-internet.html crear tienda online]
+
 
 +
== Obtaining details of the Flash Device ==
 +
 
 +
Before we can start building UBIFS and UBI images, we need to know details of the flash device fitted on the Seagate GoFlex Home. This can be achieved by running [[Cross_Compiling_MTD_Utils_for_ARM|mtdinfo -a on our target device]], i.e. the GoFlex Home.
 +
 
 +
Pay particular attention to the Eraseblock size, Sub-page size, Minimum input/output unit size and the number of eraseblocks for the partition where our UBIFS will reside.
 +
 
 +
<PRE>
 +
# mtdinfo -a
 +
Count of MTD devices:           3
 +
Present MTD devices:           mtd0, mtd1, mtd2
 +
Sysfs interface supported:     yes
 +
 
 +
mtd0
 +
Name:                          uboot
 +
Type:                          nand
 +
Eraseblock size:                131072 bytes, 128.0 KiB
 +
Amount of eraseblocks:          8 (1048576 bytes, 1024.0 KiB)
 +
Minimum input/output unit size: 2048 bytes
 +
Sub-page size:                  512 bytes
 +
OOB size:                      64 bytes
 +
Character device major/minor:  90:0
 +
Bad blocks are allowed:        true
 +
Device is writable:            true
 +
 
 +
mtd1
 +
Name:                          uImage
 +
Type:                          nand
 +
Eraseblock size:                131072 bytes, 128.0 KiB
 +
Amount of eraseblocks:          48 (6291456 bytes, 6.0 MiB)
 +
Minimum input/output unit size: 2048 bytes
 +
Sub-page size:                  512 bytes
 +
OOB size:                      64 bytes
 +
Character device major/minor:  90:2
 +
Bad blocks are allowed:        true
 +
Device is writable:            true
 +
 
 +
mtd2
 +
Name:                          root
 +
Type:                          nand
 +
Eraseblock size:                131072 bytes, 128.0 KiB
 +
Amount of eraseblocks:          1992 (261095424 bytes, 249.0 MiB)
 +
Minimum input/output unit size: 2048 bytes
 +
Sub-page size:                 512 bytes
 +
OOB size:                      64 bytes
 +
Character device major/minor:  90:4
 +
Bad blocks are allowed:        true
 +
Device is writable:            true
 +
</PRE>
 +
 
 +
== Building an UBIFS ==
 +
 
 +
Make a ZLIB compressed (-x zlib) UBI filesystem image with a minimum I/O unit size of 2048 bytes (-m 2048), a logical erase block (LEB) size of 131072 bytes and a maximum logical erase block count of 1992:
 +
 
 +
<PRE>
 +
# mkfs.ubifs -v -x zlib -m 2048 -e 129024 -c 1992 -r rootfs/ rootfs.ubifs.img
 +
mkfs.ubifs
 +
root:        rootfs/
 +
min_io_size:  2048
 +
leb_size:    129024
 +
max_leb_cnt:  1992
 +
output:      rootfs.ubifs.img
 +
jrn_size:    8388608
 +
reserved:    0
 +
compr:        zlib
 +
keyhash:      r5
 +
fanout:      8
 +
orph_lebs:    1
 +
space_fixup:  0
 +
super lebs:  1
 +
master lebs:  2
 +
log_lebs:    5
 +
lpt_lebs:    2
 +
orph_lebs:    1
 +
main_lebs:    459
 +
gc lebs:      1
 +
index lebs:  11
 +
leb_cnt:      470
 +
UUID:        57A8A50F-A285-4BB5-A671-651CB920EDDA
 +
Success!
 +
 
 +
</PRE>
 +
 
 +
== Building an UBI Image ==
 +
 
 +
Next, we build an UBI image containing the above filesystem as one volume. Create a configuration file called ubi.cfg containing the following :
 +
 
 +
<PRE>
 +
[ubifs]
 +
mode=ubi
 +
image=rootfs.ubifs.img
 +
vol_id=0
 +
vol_size=200MiB
 +
vol_type=dynamic
 +
vol_name=rootfs
 +
vol_flags=autoresize
 +
</PRE>
 +
 
 +
<PRE>
 +
# ubinize -v -o rootfs.ubi.img -m 2048 -p 128KiB -s 512 -O 512 ubi.cfg
 +
ubinize: LEB size:                  129024
 +
ubinize: PEB size:                  131072
 +
ubinize: min. I/O size:            2048
 +
ubinize: sub-page size:            512
 +
ubinize: VID offset:                512
 +
ubinize: data offset:              2048
 +
ubinize: UBI image sequence number: 1674295640
 +
ubinize: loaded the ini-file "ubi.cfg"
 +
ubinize: count of sections: 1
 +
 
 +
ubinize: parsing section "ubifs"
 +
ubinize: mode=ubi, keep parsing
 +
ubinize: volume type: dynamic
 +
ubinize: volume ID: 0
 +
ubinize: volume size: 209715200 bytes
 +
ubinize: volume name: rootfs
 +
ubinize: volume alignment: 1
 +
ubinize: autoresize flags found
 +
ubinize: adding volume 0
 +
ubinize: writing volume 0
 +
ubinize: image file: rootfs.ubifs.img
 +
 
 +
ubinize: writing layout volume
 +
ubinize: done
 +
</PRE>
 +
 
 +
== Flashing ==
 +
 
 +
It is advisable not to use nandwrite to flash an UBI image. For more information, see [http://www.linux-mtd.infradead.org/faq/ubifs.html#L_why_ubiformat here].
 +
 
 +
The recommended method is to use ubiformat as this not only preserves the erase counters used for wear leveling, it prevents ECC errors on some NAND flash devices.
 +
 
 +
ubiformat is not available from the bootloader, thus you need to undertake this task on a bootable GoFlex Home. I normally boot using root NFS to carry out this operation.
 +
 
 +
From the shell on the GoFlex Home:
 +
 
 +
<PRE>
 +
# flash_erase /dev/mtd2 0 0
 +
# ubiformat /dev/mtd2 -s 512 -O 512 -f rootfs.ubi.img
 +
</PRE>
 +
 
 +
== Testing ==
 +
 
 +
You can test an newly flashed image prior to loading it as the root filesystem (i.e. while using root NFS).
 +
 
 +
First attach the desired MTD partition to UBI using the ubiattach command. Once this is successful, you can mount the UBIFS.
 +
 
 +
<PRE>
 +
ubiattach -p /dev/mtd2
 +
mount -t ubifs /dev/ubi0_0 /mnt/ubifs/
 +
</PRE>
 +
 
 +
== Boot Messages ==
 +
 
 +
Below is the kernel messages of a system booting from the above UBIFS :
 +
 
 +
<PRE>
 +
 
 +
</PRE>

Revision as of 14:01, 13 April 2014

What is Unsorted Block Image (UBI)?

The Unsorted Block Image File System (UBIFS) is designed to operate on raw flash devices. It was first introduced into the 2.6.27 Linux Kernel in October 2008.

UBIFS works on an Unsorted Block Image (UBI) device which provides tracking of bad flash blocks and wear leveling. UBI works on top of MTD.

For further information see :

Obtaining details of the Flash Device

Before we can start building UBIFS and UBI images, we need to know details of the flash device fitted on the Seagate GoFlex Home. This can be achieved by running mtdinfo -a on our target device, i.e. the GoFlex Home.

Pay particular attention to the Eraseblock size, Sub-page size, Minimum input/output unit size and the number of eraseblocks for the partition where our UBIFS will reside.

# mtdinfo -a
Count of MTD devices:           3
Present MTD devices:            mtd0, mtd1, mtd2
Sysfs interface supported:      yes

mtd0
Name:                           uboot
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          8 (1048576 bytes, 1024.0 KiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  512 bytes
OOB size:                       64 bytes
Character device major/minor:   90:0
Bad blocks are allowed:         true
Device is writable:             true

mtd1
Name:                           uImage
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          48 (6291456 bytes, 6.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  512 bytes
OOB size:                       64 bytes
Character device major/minor:   90:2
Bad blocks are allowed:         true
Device is writable:             true

mtd2
Name:                           root
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          1992 (261095424 bytes, 249.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  512 bytes
OOB size:                       64 bytes
Character device major/minor:   90:4
Bad blocks are allowed:         true
Device is writable:             true

Building an UBIFS

Make a ZLIB compressed (-x zlib) UBI filesystem image with a minimum I/O unit size of 2048 bytes (-m 2048), a logical erase block (LEB) size of 131072 bytes and a maximum logical erase block count of 1992:

# mkfs.ubifs -v -x zlib -m 2048 -e 129024 -c 1992 -r rootfs/ rootfs.ubifs.img
mkfs.ubifs
	root:         rootfs/
	min_io_size:  2048
	leb_size:     129024
	max_leb_cnt:  1992
	output:       rootfs.ubifs.img
	jrn_size:     8388608
	reserved:     0
	compr:        zlib
	keyhash:      r5
	fanout:       8
	orph_lebs:    1
	space_fixup:  0
	super lebs:   1
	master lebs:  2
	log_lebs:     5
	lpt_lebs:     2
	orph_lebs:    1
	main_lebs:    459
	gc lebs:      1
	index lebs:   11
	leb_cnt:      470
	UUID:         57A8A50F-A285-4BB5-A671-651CB920EDDA
Success!

Building an UBI Image

Next, we build an UBI image containing the above filesystem as one volume. Create a configuration file called ubi.cfg containing the following :

[ubifs]
mode=ubi
image=rootfs.ubifs.img
vol_id=0
vol_size=200MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
# ubinize -v -o rootfs.ubi.img -m 2048 -p 128KiB -s 512 -O 512 ubi.cfg
ubinize: LEB size:                  129024
ubinize: PEB size:                  131072
ubinize: min. I/O size:             2048
ubinize: sub-page size:             512
ubinize: VID offset:                512
ubinize: data offset:               2048
ubinize: UBI image sequence number: 1674295640
ubinize: loaded the ini-file "ubi.cfg"
ubinize: count of sections: 1

ubinize: parsing section "ubifs"
ubinize: mode=ubi, keep parsing
ubinize: volume type: dynamic
ubinize: volume ID: 0
ubinize: volume size: 209715200 bytes
ubinize: volume name: rootfs
ubinize: volume alignment: 1
ubinize: autoresize flags found
ubinize: adding volume 0
ubinize: writing volume 0
ubinize: image file: rootfs.ubifs.img

ubinize: writing layout volume
ubinize: done

Flashing

It is advisable not to use nandwrite to flash an UBI image. For more information, see here.

The recommended method is to use ubiformat as this not only preserves the erase counters used for wear leveling, it prevents ECC errors on some NAND flash devices.

ubiformat is not available from the bootloader, thus you need to undertake this task on a bootable GoFlex Home. I normally boot using root NFS to carry out this operation.

From the shell on the GoFlex Home:

# flash_erase /dev/mtd2 0 0 
# ubiformat /dev/mtd2 -s 512 -O 512 -f rootfs.ubi.img

Testing

You can test an newly flashed image prior to loading it as the root filesystem (i.e. while using root NFS).

First attach the desired MTD partition to UBI using the ubiattach command. Once this is successful, you can mount the UBIFS.

ubiattach -p /dev/mtd2
mount -t ubifs /dev/ubi0_0 /mnt/ubifs/

Boot Messages

Below is the kernel messages of a system booting from the above UBIFS :