總網頁瀏覽量

搜尋此網誌

顯示具有 研究計畫 標籤的文章。 顯示所有文章
顯示具有 研究計畫 標籤的文章。 顯示所有文章

2010年7月16日 星期五

opengazer

1.Download Opengazer http://www.inference.phy.cam.ac.uk/opengazer/ 
2.安裝要求
 A. vxl >= 1.5.1         http://vxl.sourceforge.net/
   先安裝cmake sudo apt-get install cmake
B.opencv >= 0.9.7 http://sourceforge.net/projects/opencvlibrary 
 檢查所需 apt-cache search opencv 再安裝
C.gtkmm-2.4 >= 2.8.0 http://www.gtkmm.org/ 
sudo apt-get install libgtkmm-2.4-dev
D.cairomm-1.0 >= 0.6.0  http://cairographics.org/cairomm/ 
   sudo apt-get install libcairo2-dev
E.boost >= 1.32.0 http://www.boost.org/

2010年4月1日 星期四

JFFS2 檔案格式

JFFS2
把根檔案系統壓成 jffs2 的指令
安裝指令:
$ sudo apt-get install mtd-utils

安裝完成後,就有mkfs.jffs2 指令可以使用
实例:mkfs.jffs2 -r rootfs -o rootfs.jffs2 -e 0x4000 --pad=0x1000000 -s 0x200 -n




實例:mkfs.jffs2 -r rootfs -o rootfs.jffs2 -e 0x4000 --pad=0x1000000 -s 0x200 -n




mkfs.jffs2: Usage: mkfs.jffs2 [OPTIONS]

Make a JFFS2 file system image from an existing directory tree

Options:

-p, --pad[=SIZE] 用16進制來表示所要輸出檔案的大小,也就是root.jffs2 很重要的是, 為了不浪費flash空間, 這個值最好符合flash driver所規劃的區塊大小。如果不足則使用0xff來填充補滿。

-r, -d, --root=DIR 指定要做成image的源資料夾.(默認:當前文件夾)

-s, --pagesize=SIZE 節點頁大小(默認: 4KiB)

-e, --eraseblock=SIZE 設定擦除塊的大小為(默認: 64KiB)

-c, --cleanmarker=SIZE Size of cleanmarker (default 12)

-m, --compr-mode=MODE Select compression mode (default: priortiry)

-x, --disable-compressor=COMPRESSOR_NAME

Disable a compressor

-X, --enable-compressor=COMPRESSOR_NAME

Enable a compressor

-y, --compressor-priority=PRIORITY:COMPRESSOR_NAME

Set the priority of a compressor

-L, --list-compressors Show the list of the avaiable compressors

-t, --test-compression Call decompress and compare with the original (for test)

-n, --no-cleanmarkers 指明不添加清楚標記(nand flash 有自己的校檢塊,存放相關的信息。) 如果掛載後會出現類似:

CLEANMARKER node found at 0x0042c000 has totlen 0xc != normal 0x0

的警告,則加上-n 就會消失。

-o, --output=FILE 指定輸出image檔案的文件名.(default: stdout)

-l, --little-endian 指定使用小端格式

-b, --big-endian 指定使用大端格式

-D, --devtable=FILE Use the named FILE as a device table file

-f, --faketime Change all file times to '0' for regression testing

-q, --squash Squash permissions and owners making all files be owned by root

-U, --squash-uids 將所有文件的擁有者設為root用戶

-P, --squash-perms Squash permissions on all files

--with-xattr stuff all xattr entries into image

--with-selinux stuff only SELinux Labels into jffs2 image

--with-posix-acl stuff only POSIX ACL entries into jffs2 image

-h, --help 顯示這些文字

-v, --verbose Verbose operation

-V, --version 顯示版本

-i, --incremental=FILE Parse FILE and generate appendage output for it






----------------------------------------------------------------------------
Yaffs2
Android 系統用到的檔案格式 Yaffs2
1. 取得原始檔:
網址:http://www.yaffs.net/
可在官網中下載 yaffs2.tar.gz 檔案

2. 編譯:
進到utils ,下make 指令
指令:
$ make

會有兩個可用的指令檔,mkyaffsimage,mkyaffs2image,可將這兩個指令檔放到 bin 中,便於使用。

http://maxron.pixnet.net/blog/post/26298649

2010年3月30日 星期二

JFFS 檔案格式 Yaffs 檔案格式

對於Flash 耐磨性IBM所創格式JFFS 
http://www.ibm.com/developerworks/linux/library/l-flash-filesystems/


YAFFS (Yet Another Flash File System) was designed and written by Charles Manning, of Whitecliffs, New Zealand, for the company Aleph One.

Yaffs1 is the first version of this file system and works on NAND chips that have 512 byte pages + 16 byte spare (OOB;Out-Of-Band) areas. These older chips also generally allow 2 or 3 write cycles per page, which YAFFS takes advantage of - i.e. dirty pages are marked by writing to a specific spare area byte.
Newer NAND flash chips have larger pages, 2048 bytes + 64 bytes spare areas, and stricter write requirements. Each page within a block must be written to in sequential order, and each page must be written only once. YAFFS2 was designed to accommodate these newer chips. YAFFS2 is based on the YAFFS1 source code, with the major difference being that internal structures are not fixed to assume 512 byte sizing, and a block sequence number is placed on each written page. In this way older pages can be logically overwritten without violating the "write once" rule.

YAFFS is a robust log-structured file system that holds data integrity as a high priority. A secondary YAFFS goal is high performance. YAFFS will typically outperform most alternatives. It is also designed to be portable and has been used on Linux, WinCE, pSOS, eCos, ThreadX and various special-purpose OSes. A variant 'YAFFS/Direct' is used in situations where there is no OS, embedded OSes and bootloaders: it has the same core filesystem but simpler interfacing to the OS and NAND flash hardware.
The filesystem is licensed both under the GPL and under per-product licenses available from Aleph One.Contents [hide]

1 YAFFS1

2 YAFFS2

3 See also

4 References

5 External links

[edit] YAFFS1

YAFFS has no inherent formatting, an erased flash chip is formatted. It follows the smart media scheme of marking the 5th byte of the spare area for bad blocks, and ignores any blocks where the spare area byte 5 is not 0xFF.

To write file data, YAFFS initially writes a whole page (chunk in YAFFS terminology) that describes the file metadata, such as timestamps, name, path, etc. The new file is assigned a unique object ID number; every data chunk within the file will contain this unique object ID within the spare area. YAFFS maintains a tree structure in RAM memory of the physical location of these chunks. When a chunk is no longer valid (the file is deleted, or parts of the file are overwritten), YAFFS marks a particular byte in the spare area of the chunk as ‘dirty’. When an entire block (32 pages) is marked as dirty, YAFFS can erase the block and reclaim the space. If free space on the device is low, YAFFS may need to choose a block that has some number of dirty pages and some number of good pages, move the good pages to a new block, mark the old pages as dirty and erase the block. The process of moving good pages & erasing blocks is called garbage collection.

When a YAFFS system mounts a NAND flash device, it must scan the spare areas of every block to check for valid data, whereby it can then reconstitute the tree data structures.
[edit] YAFFS2
YAFFS2 is similar in concept to YAFFS1, and shares much the same code; and the YAFFS2 code base supports YAFFS1 data formats through backward compatibility. The main difference is that YAFFS2 needs to jump through significant hoops to meet the "write once" requirement of modern NAND flash.

YAFFS2 marks every newly written block with a sequence number that is monotonically increasing. The sequence of the chunks can be inferred from the block sequence number and the chunk offset within the block. Thereby when YAFFS2 scans the flash and detects multiple chunks that have identical ObjectIDs and ChunkNumbers, it can choose which to use by taking the greatest sequence number. For efficiency reasons YAFFS2 also introduces the concept of shrink headers. For example when a file is resized to a smaller size, YAFFS1 will mark all of the affected chunks as dirty - YAFFS2 cannot do this due to the "write once" rule. YAFFS2 instead writes a "shrink header", which indicates that a certain number of pages before that point are invalid. This lets YAFFS2 reconstruct the final state of the filesystem when the system reboots
YAFFS2 uses a more abstract definition of the NAND flash allowing it to be used with a wider variety of flash parts with different geometries, bad block handling rules etc.
YAFFS2 now supports "checkpointing" which bypasses normal mount scanning, allowing very fast mount times. Mileage will vary, but mount times of 3 seconds for 2 GB have been reported.