* mkcramfs under cygwin ??
@ 2002-05-26 22:37 gmx
2002-05-27 7:03 ` Stuart Brady
0 siblings, 1 reply; 3+ messages in thread
From: gmx @ 2002-05-26 22:37 UTC (permalink / raw)
To: cygwin
CygWinners - hi again,
since i got no reply to my mkcramfs porting question (ok - mybe it's too special
and i'm too impatiently - sorry),
i spend some time on trying it myself.
I was really wondering how far I git - better said, it's nearly done! :)
Beside of a little bug, it works basically - i can create compressed ram
filesystems under windows now.
I don`t really know, if i can expect being helped by this list - but i think
this question is cygwin specific.
If i'm wrong here and I inconvenience you - sorry - please tell me where/whom to
ask (maybe "alt.comp.programming.linux.rookies" or such ??)
The only thing i had to fix was to add "typedef long long int loff_t;" to
mkcramfs.c because it's not defined in cygwin's types.h.
Surprisingly, it compiled successfully - just with some warnings.
But there is a bug inside: The created filesystem contains "inconsistent"
symlink entries if i unpack them again with uncramfs on a
linux box - i.e. they are garbled.
linux:/tmp/testdir3/base # ls -la
insgesamt 7
drwxr-xr-x 9 vmware bin 251 Apr 26 21:34 .
drwxr-xr-x 67 vmware bin 1653 Apr 26 21:34 ..
drwxr-xr-x 2 vmware bin 883 Apr 26 21:34 bin
drwxr-xr-x 2 vmware bin 75 Apr 26 21:34 dev
drwxr-xr-x 3 vmware bin 532 Apr 26 21:34 etc
drwxr-xr-x 5 vmware bin 459 Apr 26 21:34 lib
lrwxrwxrwx 1 vmware bin 13 Apr 26 21:34 linuxrc -> bin/busybox??
drwxr-xr-x 2 vmware bin 35 Apr 26 21:34 proc
drwxr-xr-x 2 vmware bin 35 Apr 26 21:34 root
lrwxrwxrwx 1 vmware bin 86 Apr 26 21:34 sbin ->
bina�?a(u??@v??Xw???y??0z??H{??`|??x}???~??¨???�??�??ð???????
???8???drwxr-xr-x 2 vmware bin 35 Apr 26 21:34 tmp
lrwxrwxrwx 1 vmware bin 49 Apr 26 21:34 usr ->
tmpaè??aee//base/tmp/ion-0.8\pkg-tree\base\root\8
lrwxrwxrwx 1 vmware bin 8 Apr 26 21:34 var -> tmp/vara
I think this maybe a result of the compile warning
$ make
gcc -Wall -O3 mkcramfs.c -lz -o mkcramfs
mkcramfs.c: In function `parse_directory':
mkcramfs.c:177: warning: passing arg 4 of `scandir' from incompatible pointer
type
mkcramfs.c: In function `main':
mkcramfs.c:750: warning: int format, ssize_t arg (arg 2)
mkcramfs.c:757: warning: int format, ssize_t arg (arg 2)
mkcramfs.c:771: warning: int format, ssize_t arg (arg 4)
mkcramfs.c:781: warning: int format, ssize_t arg (arg 3)
mkcramfs.c:781: warning: int format, ssize_t arg (arg 4)
I think, the warnings for Lines 750 - 781 don't matter at all and can be
ignored, because it's just printf's/fprintf(stderr,....)'s
but what about this one :
mkcramfs.c:177: warning: passing arg 4 of `scandir' from incompatible pointer
type
?????
Line 177 is:
/* read in the directory and sort */
dircount = scandir(name, &dirlist, 0, cramsort);
I searched for scandir and found the declaration - but I have no clue, what this
means and how to interpret that.
Why does the error happen only with symlinks and not with normal files ?
sadly,I'm on war with pointers and all that stuff - last programming i did was
shell and some java....
(hey, i'm systems administrator - not programmer ;)))
Could someone please(please!) point me to some docs or give me some advice, how
to fix this problem ?
It will cost me weeks to find out, by myself, i think.....
cygwin:
int scandir (const char *__dir,
struct dirent ***__namelist,
int (*select) (const struct dirent *),
int (*compar) (const struct dirent **,const struct dirent **));
i compared that to my linux box:
linux:
extern int scandir (__const char *__restrict __dir,
struct dirent ***__restrict __namelist,
int (*__selector) (__const struct dirent *),
int (*__cmp) (__const void *, __const void *)) __THROW;
looks a little bit different.....
Thanks in advance 4 helping and best regards
Roland
References:
mkcramfs & sources: http://home.austarnet.com.au/paul1/vr/mkcramfs249.tar.gz
uncramfs & sources: http://agenda.fatcathk.com/romdisk/uncramfs-0.6.tar.gz
AUTHOR 1: I hear if you play the NT 4.0 CD backwards, you get a Satanic message.
AUTHOR 2: That's nothing. If you play it forward, it installs NT 4.0.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mkcramfs under cygwin ??
2002-05-26 22:37 mkcramfs under cygwin ?? gmx
@ 2002-05-27 7:03 ` Stuart Brady
0 siblings, 0 replies; 3+ messages in thread
From: Stuart Brady @ 2002-05-27 7:03 UTC (permalink / raw)
To: cygwin
On Fri, 26 Apr 2002, gmx wrote:
> since i got no reply to my mkcramfs porting question
Your mail is taking a very long time to get here, or your clock is
wrong. Looking at the headers, I'd go with the latter. Those that sort
by date could miss your mail completely.
--
Stuart Brady
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 3+ messages in thread
* mkcramfs under cygwin ??
@ 2002-05-25 21:17 gmx
0 siblings, 0 replies; 3+ messages in thread
From: gmx @ 2002-05-25 21:17 UTC (permalink / raw)
To: cygwin
HI CygWin'ners,
I'd like to know, if it is possible to get mkcramfs run with cygwin.
http://home.austarnet.com.au/paul1/vr/mkcramfs249.tar.gz
I don't have much experience with compiling and all that porting-stuff - i
could
try myself, but first i'd like to know, if it will be possible without major
problems. (perhaps there are functions inside which cygwin doesn`t provide?)
mkcramfs is a utility which builds a compressed ram-filesystem from a
directory-tree.
This can be used as a ramdisk for boot-floppies/diskless workstations
etc.... Linux-Kernel
has support for using that.
I`m involved in a project called "netstation" and perhaps it could be useful
if
people could build their "netstation" (i.e. put together the netstation
packages) on a
windows machine and create their bootimage.
Any help would be very pleasant
regards
Roland
PS:
I'm also interested in porting mknbi to win32 - but since mknbi is perl it't
more
of a perl issue, than a cygwin issue - isn't it ? (mknbi is part of
etherboot - www.etherboot.com)
AUTHOR 1: I hear if you play the NT 4.0 CD backwards, you get a Satanic
message.
AUTHOR 2: That's nothing. If you play it forward, it installs NT 4.0.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-05-27 10:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-26 22:37 mkcramfs under cygwin ?? gmx
2002-05-27 7:03 ` Stuart Brady
-- strict thread matches above, loose matches on Subject: below --
2002-05-25 21:17 gmx
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).