转载——如何把文件打包进NK
来源:互联网 发布:学蛮话软件 编辑:程序博客网 时间:2024/05/20 16:12
将文件让入Nk.bin
在project.bib文件中,在关键词“FILE”下面,按Name, Path, Memory Type格式添加。
其中:
Name: 所添加的文件在Target文件系统中的文件名,在/windows目录下。
Path: 所要添加的文件在host中的文件名(含路径)
Memory Type: 存储类型,一般写NK。
例如添加如下:
test.exe d:/evcpro/mytest/rel/mytest.exe nk
则将host上的mytest.exe加入nk.bin, 在Target上会在/windows目录下有个文件test.exe.
将文件放入指定的目录
A file system (.dat) file defines the directory and file locations for the initial settings on a target device. When you cold boot your platform on the target device, Filesys.exe uses these .dat files to create the directories, links, and files in the RAM file system on the target device.
When updating the Project.dat file to define directory and file locations, you can specify any root directory name other than the Windows directory and its subdirectories. In addition, you can copy or link to a file in the ROM Windows directory.
The file or link is created in the RAM file system that is part of the object store in the directory specified by the .dat file.
The following code example shows typical entries in a Project.dat file.
root:-Directory("My Documents")root:-Directory("Program Files")Directory("/Program Files"):-Directory("My Projects")Directory("/Program Files"):-Directory("Accessories")Directory("/Program Files"):-Directory("Communication")Directory("/Program Files/My Projects"):-File("My Project Program", "/Windows/Myproj.exe")root:-File("/control.lnk", "/Windows/control.lnk")
The root: statement defines the root directories for the OS image. The root: statement is used to create any subdirectories that must be the first entry in the file.
Two directories, My Documents and Program Files, are located below the root directory. In addition, three subdirectories — My Projects, Accessories, and Communication — are located in the Program Files directory.
The -File parameter copies the file Myproj.exe from ROM, as defined by the Windows directory, into the My Projects directory with the My Project Program file name.
When updating the .dat files, you can use IF and ENDIF conditional blocks and, optionally, the NOT (!) operator. Use the semicolon (;) to start a line of comments.
The following code example shows how the subdirectory locations for the Program Files directory could be rewritten.
IF IMGINCLUDEAPPS Directory("/Program Files"):-Directory("My Projects")ENDIFIF IMGNOACC ! Directory("/Program Files"):-Directory("Accessories")ENDIFDirectory("/Program Files"):-Directory("Communication")
In this example, Makeimg.exe includes the My Projects directory if the user-defined environment variable IMGINCLUDEAPPS has been set before running Makeimg.exe.
If the environment variable IMGNOACC was not set, the Accessories directory is included.
Regardless of environment variable settings, the Communication directory is included in the OS image.
Items placed in the ROM image appear in the Windows directory automatically.
At boot time, the OS parses the information that was in the .dat file and creates a more robust file system by creating other directories and copying files to their appropriate locations. This process uses RAM to store the files that were copied. Items listed in the .dat file are then copied, not moved.
Shortcut(.lnk) files make up the majority of the items in the .dat file, because .lnk files are very small and are not symbolic links.
The only way to make a file appear outside the Windows directory is through the .dat file.
地址http://blog.csdn.net/freasy/archive/2004/12/13/215263.aspx
- 转载——如何把文件打包进NK
- 转载——如何把文件打包进NK
- [转载]如何把应用程序程序和ORACLE客户端一起打包
- NK.BIN打包生成(文件,目录&注册表)
- 安卓中如何把普通文件打包进apk并且JNI中能自己读取文件内容
- 如何利用eclipse把 class文件打包成java文件
- cocos——把测试app打包成ipa文件
- C#把DLL文件打包进EXE
- 【转载】.so文件打包进apk方法
- 【转载】Java如何实现文件打包下载功能
- 如何实现从SD卡更新NK?——(已经实现)
- 如何实现从SD卡更新NK?——(已经实现)
- 如何减小NK大小
- 如何减小NK大小
- 如何减小NK大小
- 如何使用iexpress把ocx,dll等文件打包成cab文件
- 如何把java项目(java文件)打包成.jar文件,双击即可运行.
- 把DLL文件打包进EXE的技巧(C#)
- pio输出EXCEL示例
- 试图扩大物理文件时,MODIFY FILE 遇到操作系统错误 112(磁盘空间不足)
- 博客
- 能忍到第5个8笑的就是高手
- 今天你被黑了吗
- 转载——如何把文件打包进NK
- 海峰五笔试用体验,感觉上当受骗……
- 高手急救::建立哈夫曼树和哈夫曼编码,最好还带译码的算法...求例
- 嵌入式系统里是否使用非解压内核
- 我想找资料
- 使用REDCAT配置字段,而不用代码开发
- 遍历DIV(备忘)
- Linux修改fstab引起系统无法启动问题的解决方法
- CLOSE_WAIT解决方法