在xv6 makefile中添加通用文件 [英] Add a generic file in xv6 makefile

查看:478
本文介绍了在xv6 makefile中添加通用文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在研究xv6操作系统. 我在此处中找到了如何添加通过修改MAKEFILE文件进行系统调用. 我的问题是:一旦启动,我们如何添加简单的文本文件或任何其他类型的文件以在xv6系统中看到?

I'm currently studying the xv6 OS. I found out here how to add a system call by modifying the MAKEFILE file. My question is: how do we add simple text files or any other kind of file to be seen in the xv6 system once it boots?

推荐答案

README文件也是通用文件.在MakeFile中搜索出现的README并添加所需的文件就足够了.

README file in Xv6 is a generic file too. Searching for occurrences of README in the MakeFile and adding your required file will be sufficient.

假设new.txt是您要添加的文件.

Suppose new.txt is the file you want to add.

要更改的MakeFile部分为:

Parts of the MakeFile to be changed are:

1)

fs.img: mkfs README new.txt $(UPROGS)
./mkfs fs.img README new.txt $(UPROGS)

2)

PRINT = runoff.list runoff.spec README new.txt toc.hdr toc.ftr $(FILES)

3)

EXTRA=\
mkfs.c ulib.c user.h cat.c echo.c forktest.c grep.c kill.c\
ln.c ls.c mkdir.c rm.c stressfs.c usertests.c wc.c zombie.c\
printf.c umalloc.c\
README new.txt dot-bochsrc *.pl toc.* runoff runoff1 runoff.list\
.gdbinit.tmpl gdbutil\

这篇关于在xv6 makefile中添加通用文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆