uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(74):initramfs
来源:互联网 发布:java分布式事务 编辑:程序博客网 时间:2024/06/11 23:10
快乐虾
http://blog.csdn.net/lights_joy/
lights@hb165.com
本文适用于
ADI bf561 DSP
优视BF561EVB开发板
uclinux-2008r1.5-rc3(smp patch)
Visual DSP++ 5.0(update 5)
欢迎转载,但请保留作者信息
默认情况下,内核使用了initramfs做为rootfs,而为了将rootfs与内核放在一起,在链接文件ldf中做了一下处理:
.init.ramfs
{
INPUT_SECTION_ALIGN(4)
___initramfs_start = .;
INPUT_SECTIONS($LIBRARIES_SML3_CM(.init.ramfs))
___initramfs_end = .;
} > MEM_UCLINUX_INIT_RAMFS
.init.ramfs这个段其实只有一个数据,那就是rootfs。为此选择rootfs.initramfs这个文件,将之插入到内核中。建一个.s的汇编文件,插入两行代码:
.section .init.ramfs,"a"
.inc/binary "rootfs.initramfs"
这样,就可以将rootfs.initramfs文件的内容放到.init.ramfs段中了。
参考VDSP文档:
INC/BINARY, Include Contents of a File
The .INC/BINARY directive includes the content of file at the current location. You can control the search paths used via the -i command-line switch (click here).
Syntax:
.INC/BINARY [ symbol = ] "filename" [,skip [,count]] ;
.INC/BINARY [ symbol[] = ] "filename" [,skip [,count]] ;
where
symbol – the name of a symbol to associate with the data being included from the filefilename – the name of the file to include. The argument is enclosed in double quotes.
The skip argument skips a number of bytes from the start of the file.
The count argument indicates the maximum number of bytes to read.
Example:
.SECTION data1;
.VAR jim;
.INC/BINARY sym[] = "bert",10,6;
.VAR fred;
.INC/BINARY Image1[] = "photos/Picture1.jpg";
1 参考资料
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(69):SHARED_MEMORY(2009-02-20)
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(70):保留VDSP的heap(2009-02-20)
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(71):l1_data_sram_init的疑惑(2009-02-20)
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(72):中断时SP的保存(2009-2-22)
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(73):.init.setup(2009-02-27)
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(74):initramfs
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(5):'bf561.h'的问题
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(38):未命名union的问题
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(45):未命名union的后遗症
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(46):fls_long的问题
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(47):per_cpu的奇怪问题
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(70):保留VDSP的heap
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(71):l1_data_sram_init的疑惑
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(72):中断时SP的保存
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(1):前言
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(2):代码注释
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(3):vdsp项目创建
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(4):目录差异
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(6):CONFIG_BFIN_KERNEL_CLOCK
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(7):CONFIG_MEM_MT48LC16M16A2TG_75
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(8):CONFIG_CLKIN_HZ
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(9):CONFIG_MEM_SIZE
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(10):CONFIG_FLASH_SPEED_BTT
- 实例解析java + ajax(jQuery) + json工作过程(登录)
- asp连接oracle9i数据库
- Linux操作系统Vmstat命令列出的属性详解
- Flex结合JavaScript读取本地路径的方法
- select multiplt 多选代码及脚本
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(74):initramfs
- 私人游艇时代悄然启航
- Cetia4 1.1文档-1引言
- sqlserver中数据类型转换小实验
- 奥斯卡最佳纪录片女主角沦为妓女 原因不明
- Linux 使用技巧33条
- CH12 文本处理(全) .net 复习课
- 成功的途径就是不断超越自我。
- 读《曾国藩全书》随想