uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(74):initramfs

快乐虾

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):保留VDSPheap(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)

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嵌云阁主

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值