2003-02-25 08:27:08

by Diksha B Bhoomi

[permalink] [raw]
Subject: Writing new filesystem

I am interested in writing a new filesystems. For that purpose I
took thr src from msdos and tried to do the compiling. The
Makefile in the msdos directory does not run. It gives the error
that TOPDIR is not set. I set it ti /usr/src/linux so as to add
the Rules.make but this time it gives the other errors. It
compiles with cc and without seting the --KERNEL-- that leads to
many errors. Now my question is that how do I compile the code
which I have put in /usr/src/linux/fs/myfs
the directory to hold the code for my new filesystems.

I tried to execute the make file from /usr/src/linux to create the
new kernel but here again it does not take into account the new ly
added dir. I then followed to make dep. In this it goes to myfs
dir but no compiletion happens. It creates two files myfs.ver and
myfs.ver but both of zero bytes. This means that gcc did not
compile the code in myfs dir? What should I do now?

Diksha


Atta Dipa Bhava


2003-02-25 17:04:15

by Andy Isaacson

[permalink] [raw]
Subject: Re: Writing new filesystem

On Tue, Feb 25, 2003 at 08:36:31AM -0000, Diksha B Bhoomi wrote:
> I am interested in writing a new filesystems. For that purpose I
> took thr src from msdos and tried to do the compiling. The
[snip]
> new kernel but here again it does not take into account the new ly
> added dir. I then followed to make dep. In this it goes to myfs
> dir but no compiletion happens. It creates two files myfs.ver and
[snip]

Look at fs/Makefile, search for "ext2", and add your new fs directory in
the appropriate spots.

I would recommend using ext2 or something, rather than msdosfs, as your
template. The DOS filesystem is crufty.

-andy

2003-02-25 21:36:51

by Herman Oosthuysen

[permalink] [raw]
Subject: Re: Writing new filesystem

[snip]
>
> Look at fs/Makefile, search for "ext2", and add your new fs directory in
> the appropriate spots.
>
> I would recommend using ext2 or something, rather than msdosfs, as your
> template. The DOS filesystem is crufty.
>
> -andy
>

I agree with above. Also, first look at the simplest fs, which is
romfs. Then look at the oldest, which is minix and finally look at
ext2. After that exercise, you'll know how it works.

2003-02-26 11:41:35

by Diksha B Bhoomi

[permalink] [raw]
Subject: Re: Re: Writing new filesystem

Thanks

I tried that as well butnothing much seems to happing. I searched
the fs/Makefile for "ext2" It comes in the All_SUB_DIRS variable
setting. I already have added myfs entry for this varible. That is
the reason why it went to fs/myfs in make dep. But that does not
solve the purpose.

I once again tell you what am I doing.

I created a directory as fs/myromfs. I copioed into this folder
everything that was present in fs/romfs. Then I changed the
romfs_fs.h to myromfs_fs.h with all MACROS changed appropriatly. I
included this file in namei.c. I even made changes to all ROMxxx
to MYxxx in inode.c file.
I changed the Makefile for myromfs as well.

Now my problem is how do i compile it.

I tried make from myromfs dir. but it gave error as TOPDIR not
set. So in the Makefile of myromfs I added a entry as
$TOPDIR=/usr/src/linux/
That started the compilation but proper gcc params were not set so
gcc failed. That made me confirmed that $TOPDIR must be
comented.

Now I tried to compile from fs dir but again same mesage
appared.

So I went one level up and tried to do make at /usr/src/linux
This is I suppose making kernel. It did work but with out much
results.

I then went on to make dep here only.
This time it did go to fs/myromfs and displayed the message
'leaving the dir /usr/src/linux/fs/myromfs'


Now what should I do.

In otherwords, How do i create the new filesysytem using the given
src and makefiles?

Thanks a lot for your Time and Space.

Diksha


Atta Dipa Bhava

2003-02-26 11:40:36

by Diksha B Bhoomi

[permalink] [raw]
Subject: Re: Re: Writing new filesystem

Thanks

I tried that as well butnothing much seems to happing. I searched
the fs/Makefile for "ext2" It comes in the All_SUB_DIRS variable
setting. I already have added myfs entry for this varible. That is
the reason why it went to fs/myfs in make dep. But that does not
solve the purpose.

I once again tell you what am I doing.

I created a directory as fs/myromfs. I copioed into this folder
everything that was present in fs/romfs. Then I changed the
romfs_fs.h to myromfs_fs.h with all MACROS changed appropriatly. I
included this file in namei.c. I even made changes to all ROMxxx
to MYxxx in inode.c file.
I changed the Makefile for myromfs as well.

Now my problem is how do i compile it.

I tried make from myromfs dir. but it gave error as TOPDIR not
set. So in the Makefile of myromfs I added a entry as
$TOPDIR=/usr/src/linux/
That started the compilation but proper gcc params were not set so
gcc failed. That made me confirmed that $TOPDIR must be
comented.

Now I tried to compile from fs dir but again same mesage
appared.

So I went one level up and tried to do make at /usr/src/linux
This is I suppose making kernel. It did work but with out much
results.

I then went on to make dep here only.
This time it did go to fs/myromfs and displayed the message
'leaving the dir /usr/src/linux/fs/myromfs'


Now what should I do.

In otherwords, How do i create the new filesysytem using the given
src and makefiles?

Thanks a lot for your Time and Space.

Diksha


Atta Dipa Bhava

2003-02-26 11:43:23

by Diksha B Bhoomi

[permalink] [raw]
Subject: Re: Re: Writing new filesystem

Thanks

I tried that as well butnothing much seems to happing. I searched
the fs/Makefile for "ext2" It comes in the All_SUB_DIRS variable
setting. I already have added myfs entry for this varible. That is
the reason why it went to fs/myfs in make dep. But that does not
solve the purpose.

I once again tell you what am I doing.

I created a directory as fs/myromfs. I copioed into this folder
everything that was present in fs/romfs. Then I changed the
romfs_fs.h to myromfs_fs.h with all MACROS changed appropriatly. I
included this file in namei.c. I even made changes to all ROMxxx
to MYxxx in inode.c file.
I changed the Makefile for myromfs as well.

Now my problem is how do i compile it.

I tried make from myromfs dir. but it gave error as TOPDIR not
set. So in the Makefile of myromfs I added a entry as
$TOPDIR=/usr/src/linux/
That started the compilation but proper gcc params were not set so
gcc failed. That made me confirmed that $TOPDIR must be
comented.

Now I tried to compile from fs dir but again same mesage
appared.

So I went one level up and tried to do make at /usr/src/linux
This is I suppose making kernel. It did work but with out much
results.

I then went on to make dep here only.
This time it did go to fs/myromfs and displayed the message
'leaving the dir /usr/src/linux/fs/myromfs'


Now what should I do.

In otherwords, How do i create the new filesysytem using the given
src and makefiles?

Thanks a lot for your Time and Space.

Diksha


Atta Dipa Bhava

2003-02-26 11:42:04

by Diksha B Bhoomi

[permalink] [raw]
Subject: Re: Re: Writing new filesystem

Thanks

I tried that as well butnothing much seems to happing. I searched
the fs/Makefile for "ext2" It comes in the All_SUB_DIRS variable
setting. I already have added myfs entry for this varible. That is
the reason why it went to fs/myfs in make dep. But that does not
solve the purpose.

I once again tell you what am I doing.

I created a directory as fs/myromfs. I copioed into this folder
everything that was present in fs/romfs. Then I changed the
romfs_fs.h to myromfs_fs.h with all MACROS changed appropriatly. I
included this file in namei.c. I even made changes to all ROMxxx
to MYxxx in inode.c file.
I changed the Makefile for myromfs as well.

Now my problem is how do i compile it.

I tried make from myromfs dir. but it gave error as TOPDIR not
set. So in the Makefile of myromfs I added a entry as
$TOPDIR=/usr/src/linux/
That started the compilation but proper gcc params were not set so
gcc failed. That made me confirmed that $TOPDIR must be
comented.

Now I tried to compile from fs dir but again same mesage
appared.

So I went one level up and tried to do make at /usr/src/linux
This is I suppose making kernel. It did work but with out much
results.

I then went on to make dep here only.
This time it did go to fs/myromfs and displayed the message
'leaving the dir /usr/src/linux/fs/myromfs'


Now what should I do.

In otherwords, How do i create the new filesysytem using the given
src and makefiles?

Thanks a lot for your Time and Space.

Diksha


Atta Dipa Bhava