Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9085242
  • 博文数量: 1732
  • 博客积分: 12961
  • 博客等级: 上将
  • 技术积分: 19830
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-09 11:25
个人简介

偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.

文章分类

全部博文(1732)

文章存档

2023年(26)

2022年(112)

2021年(217)

2020年(157)

2019年(192)

2018年(81)

2017年(78)

2016年(70)

2015年(52)

2014年(40)

2013年(51)

2012年(85)

2011年(45)

2010年(231)

2009年(287)

分类: LINUX

2012-09-07 11:38:28

近来调试 s3c6410, 使用SD/TF卡启动。

已有 rootfs.cramfs  
mount -t cramfs -o loop rootfs.cramfs /mnt

制作cramfs
mkfs.cramfs [-h] [-v] [-b blksize] [-e edition] [-N endian] [-i file] [-n name] dirname outfile
 -h         print this help
 -v         be verbose
 -E         make all warnings errors (non-zero exit status)
 -b blksize use this blocksize, must equal page size
 -e edition set edition number (part of fsid)
 -N endian  set cramfs endianness (big|little|host), default host
 -i file    insert a file image into the filesystem (requires >= 2.4.0)
 -n name    set name of cramfs filesystem
 -p         pad by 512 bytes for boot code
 -s         sort directory entries (old option, ignored)
 -z         make explicit holes (requires >= 2.3.39)
 dirname    root of the filesystem to be compressed
 outfile    output file

usage: mkcramfs [-h] [-b blksize] [-e edition] [-i file] [-n name] dirname outfile
 -h         print this help
 -E         make all warnings errors (non-zero exit status)
 -b blksize blocksize to use
 -e edition set edition number (part of fsid)
 -i file    insert a file image into the filesystem (requires >= 2.4.0)
 -n name    set name of cramfs filesystem
 -p         pad by 512 bytes for boot code
 -s         sort directory entries (old option, ignored)
 -v         be more verbose
 -z         make explicit holes (requires >= 2.3.39)
 dirname    root of the directory tree to be compressed
 outfile    output file

当bootloader中, 把 kernel / rootfs 从 TF 卡读到 RAM 中后,直接引导内核即可。
"movi read kernel c0008000;movi read rootfs c0800000;bootm c0008000"

内核于rootfs.cramfs 的映射关系可以通过 arch/arm/mach-xxx/Makefile.boot中的initrd_phys-y    := 0xc0800000 参数指定,

或者通过引导命令行
【CONFIG_CMDLINE="mem=32M console=ttySA0,38400n8 initrd=0xc0800000,3M root=/dev/ram"】


#define CONFIG_BOOTARGS_MOVI "root=/dev/ram0 rw initrd=0x50800000,8M console=ttySAC0,115200"
#define CONFIG_BOOTARGS_NAND "root=/dev/sftl2 rootfstype=cramfs console=ttySAC0,115200"



【CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) load_ramdisk=1 prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M"】
阅读(3975) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~