cvs
来自「这是一个SIGMA方案的PMP播放器的UCLINUX程序,可播放DVD,VCD,」· 代码 · 共 56 行
TXT
56 行
n, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA This is access code for flashes using ARM's flash partitioning standards. $Id: afs.c,v 1.6 2001/10/02 10:04:51 rmk Exp $======================================================================*/#include <linux/module.h>#include <linux/types.h>#include <linux/kernel.h>#include <linux/slab.h>#include <linux/string.h>#include <linux/init.h>#include <linux/mtd/mtd.h>#include <linux/mtd/map.h>#include <linux/mtd/partitions.h>struct footer_struct { u32 image_info_base; /* Address of first word of ImageFooter */ u32 image_start; /* Start of area reserved by this footer */ u32 signature; /* 'Magic' number proves it's a footer */ u32 type; /* Area type: ARM Image, SIB, customer */ u32 checksum; /* Just this structure */};struct image_info_struct { u32 bootFlags; /* Boot flags, compression etc. */ u32 imageNumber; /* Unique number, selects for boot etc. */ u32 loadAddress; /* Address program should be loaded to */ u32 length; /* Actual size of image */ u32 address; /* Image is executed from here */ char name[16]; /* Null terminated */ u32 headerBase; /* Flash Address of any stripped header */ u32 header_length; /* Length of header in memory */ u32 headerType; /* AIF, RLF, s-record etc. */ u32 checksum; /* Image checksum (inc. this struct) */};static intafs_read_footer(struct mtd_info *mtd, u_int *img_start, u_int *iis_start, u_int off, u_int mask){ struct footer_struct fs; u_int ptr = off + mtd->erasesize - sizeof(fs); size_t sz; int ret; ret = mtd->read(mtd, ptr, sizeof(fs), &sz, (u_char *) &fs); if (ret >= 0 && sz != sizeof(fs)) ret = -EINVAL; if (ret < 0) { printk(KE
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?