1、下载代码:

http://code.google.com/p/fatplus/downloads/list

下载 yaffs2-source.tar

2、解压缩后,编译:

tar xvf yaffs2-source.tar
cd yaffs2/utils
make

出现错误提示:

gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline yaffs_ecc.c -o yaffs_ecc.o
gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline mkyaffsimage.c -o mkyaffsimage.o
In file included from mkyaffsimage.c:31:
../yaffs_guts.h:831: warning: ‘struct iattr’ declared inside parameter list
../yaffs_guts.h:831: warning: its scope is only this definition or declaration, which is probably not what you want
../yaffs_guts.h:832: warning: ‘struct iattr’ declared inside parameter list
../yaffs_guts.h:835: error: expected declaration specifiers or ‘…’ before ‘loff_t’
../yaffs_guts.h:837: error: expected declaration specifiers or ‘…’ before ‘loff_t’
../yaffs_guts.h:839: error: expected declaration specifiers or ‘…’ before ‘loff_t’

修改错误:

vi devextras.h

添加如下代码:

#if defined(__APPLE__) || defined (__FreeBSD__)
typedef long long loff_t;
#endif

 

 

推荐一个很棒的第三方精简的 Laravel console

个人喜好经常写些命令行工具,laravel 很方便,但脚手架工程就 45M左右,使用 composer install --no-dev 也要24M左右,很笨重。 也尝试过 symfony 的 compos...

阅读全文

有关 PHP 和 js 浮点运算的坑

javascript 0.1 + 0.2 为啥不等于 0.3 ? (正确结果:0.30000000000000004) 0.8 * 7 为啥不等于 5.6 ? (正确结果:5.6000000000000005) PHP var_dump(intv...

阅读全文

彻底搞懂 PHP 变量结构体,多数文章观点不准确

PHP5 中的 zval // 1. zval typedef struct _zval_struct { zvalue_value value; zend_uint refcount__gc; zend_uchar type; zend_uchar is...

阅读全文

欢迎留言