Help - Search - Members - Calendar
Full Version: mkcramfs for cygwin
OESF Forums > General Forums > Desktop Operating Systems Issues > Windows Issues
ShiroiKuma
Hi:

I want to create cramfs volumes for use on the Z.

I only have a Vaio notebook with an NTFS harddrive, so when I boot from Knoppix or the like, I can't access the harddisk.

Thus I have to create the cramfs under Windows somehow, cygwin probably.

I've searched on Google etc. and found some 2+ years old references to mkcramfs for cygwin finished etc. but can't find it anywhere on the web.

Anyone know where I could get it?

Thank you.
loji
it's located here ::
http://erny.narod.ru/eng/zaurus.htm

it took less than 5 seconds to find on google ::: Check some search tutorials. Fravia has a great site at searchlores.org

this is the google string I used it was the third from the top

mkcramfs windows -linux
shula
been there, done that.
doesn't work on my windows 98 se.

i tried even mount on cygwin, but no success.
(yet)

alternatively,
it could be better to find a compressed ext2 loopback driver (i understand you need a special kernel module for that to work).
then use it with RW support. that should be cool.
shula
i mean,
it seems to run,
but after i mount -o loop file.cramfs path/
i take a look at the files: they are filled with single character, i.e. ................. or ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

never saw something like that.
the file SIZE inside the cramfs match the real files,
but they do not contain the data!
qx773
Try the attached mkcramfs. I used it successfully to create a cramfs file on Windows 98SE.
shula
it is identical to the version in the japanese website, so i won't try.

1. which command line exactly did you use,
2. did you check the contents of 2-3 files from that cramfs?
qx773
Are you sure that the files are identical? Have you compared the checksums of the zipped files? I used mkcramfs to compress the CIA World Fact Book for browsing with Opera or NetFront when some news story mentions a foreign country. I no longer recall the exact command line, but, in Windows, I probably used something like:

mkcramfs DirectoryName factbook.cramfs

On my Zaurus SL-C760, I ran out of loop devices to mount all of the loop devices I was mounting, so I had to use the mknod command to create another loop device. I have an entry in my /etc/fstab file which reads:

/mnt/card/factbook.cramfs /usr/mnt.rom/card/factbook cramfs noauto,loop 0 0

So, I can type:

cd /mnt/card
su root
mount factbook
exit


My SD card contains a file called factbook.cramfs and a directory named factbook to act as the mount point.
ShiroiKuma
QUOTE(qx773 @ Nov 30 2004, 05:44 PM)
Are you sure that the files are identical? Have you compared the checksums of the zipped files? I used mkcramfs to compress the CIA World Fact Book for browsing with Opera or NetFront when some news story mentions a foreign country. I no longer recall the exact command line, but, in Windows, I probably used something like:

mkcramfs DirectoryName factbook.cramfs

On my Zaurus SL-C760, I ran out of loop devices to mount all of the loop devices I was mounting, so I had to use the mknod command to create another loop device. I have an entry in my /etc/fstab file which reads:

/mnt/card/factbook.cramfs /usr/mnt.rom/card/factbook cramfs noauto,loop 0 0

So, I can type:

cd /mnt/card
su root
mount factbook
exit


My SD card contains a file called factbook.cramfs and a directory named factbook to act as the mount point.

I tried using your makecramfs file under XP and the resultant cramfs volume it produces is messed up. The files have no content, the directory structury has some weird numerous nameless entris and so.

Either you must have used some specific options when creating it with this file or you must have used some other file.
shula
(or a different binaries.
i compared my version byte:byte with yours. they're identiacl.)
qx773
I created the attached test.cramfs file. Can you mount it? It contains two different text files

test1.txt
test2.txt


Each text file contains a single line. The test1.txt file contains the line:

This is a test

The test2.txt file contains the line:

This is another test
ShiroiKuma
QUOTE(qx773 @ Dec 2 2004, 05:26 PM)
I created the attached test.cramfs file. Can you mount it? It contains two different text files

test1.txt
test2.txt


Each text file contains a single line. The test1.txt file contains the line:

This is a test

The test2.txt file contains the line:

This is another test

This file is fine, I can read everything fine.

What syntax did you use to create it?

Or maybe the problem is when you have more files and nested directories, that's when it has a problem?

Do you have some temp directory with lots of files and dirs that you could try this with?
shula
alternatively,
how can we create a cramfs from the zaurus?
qx773
I simply created a directory called test, then put the text files in the test directory. I then ran:

mkcramfs test test.cramfs

My understanding is that this version of mkcramfs requires an amount of RAM equal to or greater than the total size of the files that you will be compressing. If you do not have enough memory, then the program will not function correctly on large files or large numbers of files.

As I mentioned in an earlier post, I created a cramfs file out of the HTML directories that comprise the CIA World Fact Book. The resulting cramfs file is over 36MB in size.
qx773
Can you mount the test.cramfs file that I posted, shula? Are you sure that you have Cygwin installed on your computer, downloaded from http://www.cygwin.org ? When you access Cygwin, do you get a bash shell prompt?
shula
ok. i tried your file. it works fine on my Z.
i tried again the mkcramfs - even with 2 text files -> doesn't work on the Z

i tried a mkcramfs on the Z. it runs with no params,
but when i try to mke something, it says:

error loading shared libraries: mkcramfs.arm: undefined symbol: __udivsi3

i have no clue of how to continue from here.
i'm on cacko, c860.
ShiroiKuma
QUOTE(qx773 @ Dec 4 2004, 01:28 AM)
I simply created a directory called test, then put the text files in the test directory. I then ran:

mkcramfs test test.cramfs

My understanding is that this version of mkcramfs requires an amount of RAM equal to or greater than the total size of the files that you will be compressing. If you do not have enough memory, then the program will not function correctly on large files or large numbers of files.

As I mentioned in an earlier post, I created a cramfs file out of the HTML directories that comprise the CIA World Fact Book. The resulting cramfs file is over 36MB in size.

I've tried again to use your binary and it works.

I've used it under a fresh install of cygwin and didn't use the dll's that come with it, but just left the cygwin ones in place.

It worked no problem now.

The only thing it tells me the maximum created volume size is around 270 MB or so. Is there any way to get past this as I need bigger volumes?

Thanks.
qx773
You could try increasing your maximum swap file size.
ShiroiKuma
QUOTE(qx773 @ Dec 16 2004, 04:08 AM)
You could try increasing your maximum swap file size.

I made it 3 GB, trying to cramfs a 1 GB archive, doesn't work.

Also, I've just found the cramfs cuts off any larger file down to 16 MB, thereby destroying it in the cramfs, making it unusable.

Is there any way, to go around this?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.