6.配置内核使其支持jffs2
说明:
这里要特别注意Memory Technology Devices (MTD)的选项支持及其子项
RAM/ROM/Flash chip drivers --->
Mapping drivers for chip access --->
的选项支持;
还有File systems下选项支持。
- ##################################
- ***********************
- #############################################
- Linux Kernel v2.4.18-rmk7-pxa1 Configuration
- Linux Kernel v2.4.18-rmk7-pxa1 Configuration
- ------------------------------------------------------------------------------
- +-------------------- Memory Technology Devices (MTD) --------------------+
- | Arrow keys navigate the menu. <Enter> selects submenus --->. |
- | Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, |
- | <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help. |
- | Legend: [*] built-in [ ] excluded <M> module < > module capable |
- | +---------------------------------------------------------------------+ |
- | | <*> Memory Technology Device (MTD) support | |
- | | [*] Debugging | |
- | | (3) Debugging verbosity (0 = quiet, 3 = noisy) | |
- | | <*> MTD partitioning support | |
- | | <*> MTD concatenating support | |
- | | < > RedBoot partition table parsing | |
- | | < > Command line partition table parsing | |
- | | < > ARM Firmware Suite partition parsing | |
- | | --- User Modules And Translation Layers | |
- | | <*> Direct char device access to MTD devices | |
- | | <*> Caching block device access to MTD devices | |
- | < > FTL (Flash Translation Layer) support | |
- | | < > NFTL (NAND Flash Translation Layer) support | |
- | | RAM/ROM/Flash chip drivers ---> | |
- | | Mapping drivers for chip access ---> | |
- | | Self-contained MTD device drivers ---> | |
- | | NAND Flash Device Drivers ---> | |
- | +---------------------------------------------------------------------+ |
- +------------------------
- | +---------v(+)--------------------------------------------------------+ |
- +-------------------------------------------------------------------------+
- | <Select> < Exit > < Help > |
- +---------------------------------------------------
- Linux Kernel v2.4.18-rmk7-pxa1 Configuration
- ------------------------------------------------------------------------------
- +---------------------- RAM/ROM/Flash chip drivers -----------------------+
- | Arrow keys navigate the menu. <Enter> selects submenus --->. |
- | Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, |
- | <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help. |
- | Legend: [*] built-in [ ] excluded <M> module < > module capable |
- | +---------------------------------------------------------------------+ |
- | |<*> Detect flash chips by Common Flash Interface (CFI) probe | |
- | |<*> Detect JEDEC JESD21c compatible flash chips | |
- | |[ ] Flash chip driver advanced configuration options | |
- | |<*> Support for Intel/Sharp flash chips | |
- | |< > Support for AMD/Fujitsu flash chips | |
- | |< > Support for RAM chips in bus mapping | |
- | |< > Support for ROM chips in bus mapping | |
- | |< > Support for absent chips in bus mapping | |
- | |[ ] Older (theoretically obsoleted now) drivers for non-CFI chips | |
- | | | |
- | | | |
- | +---------------------------------------------------------------------+ |
- +-------------------------------------------------------------------------+
- | <Select> < Exit > < Help > |
- +-------------------------------------------------------------------------+
- Linux Kernel v2.4.18-rmk7-pxa1 Configuration
- ------------------------------------------------------------------------------
- +-------------------- Mapping drivers for chip access --------------------+
- | Arrow keys navigate the menu. <Enter> selects submenus --->. |
- | Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, |
- | <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help. |
- | Legend: [*] built-in [ ] excluded <M> module < > module capable |
- | +---------------------------------------------------------------------+ |
- | | <*> CFI Flash device in physical memory map | |
- | | (800000) Physical start address of flash mapping | |
- | | (800000) Physical length of flash mapping | |
- | | (2) Bus width in octets | |
- | | <*> CFI Flash device mapped on S3C2410 | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | +---------------------------------------------------------------------+ |
- +-------------------------------------------------------------------------+
- | <Select> < Exit > < Help > |
- +-------------------------------------------------------------------------+
- Linux Kernel v2.4.18-rmk7-pxa1 Configuration
- ------------------------------------------------------------------------------
- +----------------------------- File systems ------------------------------+
- | Arrow keys navigate the menu. <Enter> selects submenus --->. |
- | Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, |
- | <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help. |
- | Legend: [*] built-in [ ] excluded <M> module < > module capable |
- | +---------------------------------------------------------------------+ |
- | | [ ] Quota support | |
- | | < > Kernel automounter support | |
- | | < > Kernel automounter version 4 support (also supports v3) | |
- | | < > Reiserfs support | |
- | | < > ADFS file system support | |
- | | < > Amiga FFS file system support (EXPERIMENTAL) | |
- | | < > Apple Macintosh file system support (EXPERIMENTAL) | |
- | | < > BFS file system support (EXPERIMENTAL) | |
- | | <*> Ext3 journalling file system support (EXPERIMENTAL) | |
- | | [ ] JBD (ext3) debugging support | |
- | | <*> DOS FAT fs support | |
- | < > MSDOS fs support | |
- | | <*> VFAT (Windows-95) fs support | |
- | | < > EFS file system support (read only) (EXPERIMENTAL) | |
- | | < > Journalling Flash File System (JFFS) support | |
- | | <*> Journalling Flash File System v2 (JFFS2) support | |
- | | (2) JFFS2 debugging verbosity (0 = quiet, 2 = noisy) | |
- | | <*> Compressed ROM file system support | |
- | | [*] Virtual memory file system support (former shm fs) | |
- | | <*> Simple RAM-based file system support | |
- | | < > ISO 9660 CDROM file system support | |
- | | < > Minix fs support
- | < > FreeVxFS file system support (VERITAS VxFS(TM) compatible) | |
- | | < > NTFS file system support (read only) | |
- | | < > OS/2 HPFS file system support | |
- | | [*] /proc file system support | |
- | | [*] /dev file system support (EXPERIMENTAL) | |
- | | [*] Automatically mount at boot | |
- | | [ ] Debug devfs | |
- | | [*] /dev/pts file system for Unix98 PTYs | |
- | | < > QNX4 file system support (read only) (EXPERIMENTAL) | |
- | | < > ROM file system support | |
- | | <*> Second extended fs support
- | [ ] Debug devfs | |
- | | [*] /dev/pts file system for Unix98 PTYs | |
- | | < > QNX4 file system support (read only) (EXPERIMENTAL) | |
- | | < > ROM file system support | |
- | | <*> Second extended fs support | |
- | | < > System V/Xenix/V7/Coherent file system support | |
- | | < > UDF file system support (read only) | |
- | | < > UFS file system support (read only) | |
- | | Network File Systems ---> | |
- | | Partition Types ---> | |
- | | Native Language Support --->
- | +--v(+)---------------------------------------------------------------+ |
- +-------------------------------------------------------------------------+
- | <Select> < Exit > < Help > |
- +-------------------------------------------------------------------------+
7.制作jffs2映象
首先取得jffs2的制作工具:mkfs.jffs2(可从网上取得)
执行如下命令即可生成所要的映象:
chmod 777 mkfs.jffs2 //取得mkfs.jffs2的执行权限,即mkfs.jffs2成为可执行文件
./mkfs.jffs2 -d jffs2/ -o jffs2.img //生成jffs2文件映象,其中目录jffs2可以是任意的目录,这里的jffs2是我新建的一个目录
8.Jffs2的应用
对于ppcboot、zImage、ramdisk.image.gz向romfs一样正常烧写;
以上三项烧写完之后,接着烧写jffs2.img,具体烧写如下:
tftp 30800000 jffs2.img
fl 1800000 30800000 20000 (其中20000可根据jffs2的大小适当调整,理论上只要比jffs2.img略大即可,但要为20000的整数倍)
特别注意:要想使我们做的jffs2文件系统更加的人性化,我们还可以在ramdisk.image.gz的mnt/etc/init.d/rc$文件中加入如下指令以便启动时自动挂载jffs2文件系统。
Mount -t jffs2 /dev/mtdblock/4 /mnt //其中的/dev/mtdblock/4是flash上的jffs2分区。
9.以上配置烧写完成之后就可启动我们的系统,对jffs2分区尽情的添加和删除了,添加的东东再不会因断电而丢失了,呵呵就到这了。