内核挂载JFFS2文件系统出现的问题:jffs2_scan_eraseblock() magic bitmask 0x1985 not found at instead

上周在做HI3521开发板烧写根文件系统后,再次启动后一直出现jffs2文件系统挂载不上的情况,就如题目上jffs2_scan_eraseblock() magic bitmask 0x1985 not found at instead;这种情况一直打印,直到打印“累了”才不再打印(呵呵),其实上周五就跟这个套件公司沟通过,看是出了什么问题,今天又问了一天,看来以后是不能指望他们给解决技术问题了,花了近1万块钱买他们的套件,他们居然连原理图都不给,更可恶的是他们居然阉割了海思的HI3521开发板套件然后自己做,说是提供技术支持和方案,真TM上当受骗了,咨询技术问题他们是遮遮掩掩的,问个问题就没回复了。尼玛这次是赔大了。跑题了,总之就是以后做设计开发方案,不要指望这种公司,技术服务奇差。遇到问题到最后还是得你自己解决。

            好了,说正题,其实海思在这套件上已经做的很多了,如果没有人动(尼玛这公司不但阉割还更换元器件),跑起来没问题。刚买回来的时候有这个公司的demo,也就是说这个公司不知道从哪搞了一个demo,说是demo其实应该是哪个公司的产品,反正他们是不给源码,就连编译后的文件都不给。上周我按照海思套件关于升级内核和文件系统的说明更新了一下文件系统,然后再启动就出现了如题打印的问题,上午反馈给他们公司,他们就说根文件系统挂不上,尼玛我知道挂不上,我要的是解决问题,做技术嘛,我向来都是有问题大家可以一起来解决的态度。可是今天我问了不下5次,电话打了10多遍,他们居然一点动静都没有,也没有回复(那感觉就是上当受骗想发狂)。好吧!我是应该绝望的。我决定就这个问题一直问他们,直到他们给解决为止,不能一直耽误开发进度。(此刻我是已经解决了)

           纠结了一天,到底是什么问题一直出现打印失败的问题?google再google,查看mkfs.jffs2工具的参数,再看看内核关于跟文件的启动部分的代码,关于这部分源代码其实我真是不怎么能看懂。看大家有遇到此类问题,应该是参数的问题。试试吧!什么-p啦,-e啦等等,当然可以查看详细的参数解释。在此注意:问题是这样解决的:内核启动的时候打印的信息的block:64k,不注意这个真是要命啊!耽误了我一天时间。在创建文件系统的时候这个一定要指定大小,默认的大小64k,如果你的spi flash不是,那么就请更改-e参数吧!不巧的是海思套件指定的spi flash的block是0x20000,所以我很火。尼玛你们公司阉割就算了,换芯片为了降低成本,真尼玛该遭雷劈。看到这个参数对不上后我基本肯定是这的问题,重新创建jffs2文件系统。烧写到指定位置,启动OK,终于!哎,尼玛如果你要把flash再减肥的话,我再照着海思套件的说明去做,那我还不等死啊!

 

 

附上mkfs.jffs2部分参数:

NAME mkfs.jffs2 - Create a JFFS2 filesystem image from directory SYNOPSISmkfs.jffs [ -b,--big-endian -l,--little-endian] [ -e,--eraseblock=SIZE ] [ -s,--pagesize=SIZE ] [ -p,--pad[=SIZE] ] [ -h,--help ] [ -v,--version ] [ -r,--root directory ] [ -o,--output image.jffs2 ] DESCRIPTIONThe program mkfs.jffs2 creates a JFFS2 (Second Journaling Flash Filesystem) filesystem image and writes the resulting image to the file specified by the option -o or to the standard output by default. The filesystem image is created using the files and directories contained in the directory specified by the option -r or the present directory, if the -r option is not specified.

Files to be placed into the filesystem image are compressed using the zlib compression library.

Filesystems are created with the same endianness as the host, unless the -b or -l options are specified. As of 2001-04-21, the JFFS2 driver in the Linux kernel only supported images having the same endianness as the CPU.

It is unlikely that JFFS2 images are useful except in conjuction with the MTD (Memory Technology Device) drivers in the Linux kernel, since the JFFS2 filesystem driver in the kernel requires MTD devices.

OPTIONSOptions that take SIZE arguments can be specified as either decimal (e.g., 65536), octal (0200000), or hexidecimal (0x1000).

-b, --big-endian
Create a big-endian JFFS2 image. Default is to make an image with the same endianness as the host.
-e, --eraseblock=SIZE
Use erase block size SIZE. The default is 64 kB. If you use a erase block size different than the erase block size of the target MTD device, JFFS2 may not perform optimally.
-h, --help
Display help text.
-l, --little-endian
Create a little-endian JFFS2 image. Default is to make an image with the same endianness as the host.
-o, --output=FILE
Write JFFS2 image to file FILE. Default is the standard output.
-p, --pad[=SIZE]
Pad output to SIZE bytes with 0xFF. If SIZE is not specified, the output is padded to the end of the final erase block.
-r, -d, --root=DIR
Build filesystem from directory DIR. The default is the current directory.
-s, --pagesize=SIZE
Use page size SIZE. The default is 4 kB. This size is the maximum size of a data node.
-v, --version
Display version information.
BUGSJFFS2 limits device major and minor numbers to 8 bits each. Some consider this a bug. mkfs.jffs2 does not properly handle hard links in the input directory structure. Currently, hard linked files will be expanded to multiple identical files in the output image.

 

你可能感兴趣的:(JFFS2)