OESF Portables Forum

Everything Else => Desktop Operating Systems Issues => Zaurus General Forums => Archived Forums => Windows Issues => Topic started by: ShiroiKuma on October 23, 2004, 05:23:43 pm

Title: mkcramfs for cygwin
Post by: ShiroiKuma on October 23, 2004, 05:23:43 pm
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.
Title: mkcramfs for cygwin
Post by: loji on November 02, 2004, 09:29:21 am
it's located here ::
http://erny.narod.ru/eng/zaurus.htm (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
Title: mkcramfs for cygwin
Post by: shula on November 28, 2004, 06:37:16 pm
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.
Title: mkcramfs for cygwin
Post by: shula on November 28, 2004, 08:32:23 pm
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!
Title: mkcramfs for cygwin
Post by: qx773 on November 29, 2004, 01:45:20 pm
Try the attached mkcramfs.  I used it successfully to create a cramfs file on Windows 98SE.
Title: mkcramfs for cygwin
Post by: shula on November 30, 2004, 10:10:51 am
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?
Title: mkcramfs for cygwin
Post by: qx773 on November 30, 2004, 08:44:54 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.
Title: mkcramfs for cygwin
Post by: ShiroiKuma on December 01, 2004, 03:21:16 am
Quote
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.
Title: mkcramfs for cygwin
Post by: shula on December 01, 2004, 07:42:58 am
(or a different binaries.
i compared my version byte:byte with yours. they're identiacl.)
Title: mkcramfs for cygwin
Post by: qx773 on December 02, 2004, 08:26:33 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
Title: mkcramfs for cygwin
Post by: ShiroiKuma on December 03, 2004, 05:21:32 am
Quote
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?
Title: mkcramfs for cygwin
Post by: shula on December 03, 2004, 08:33:55 am
alternatively,
how can we create a cramfs from the zaurus?
Title: mkcramfs for cygwin
Post by: qx773 on December 03, 2004, 07:28:54 pm
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.
Title: mkcramfs for cygwin
Post by: qx773 on December 03, 2004, 07:57:55 pm
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 (http://www.cygwin.org) ?  When you access Cygwin, do you get a bash shell prompt?
Title: mkcramfs for cygwin
Post by: shula on December 09, 2004, 04:57:38 pm
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.
Title: mkcramfs for cygwin
Post by: ShiroiKuma on December 15, 2004, 05:20:05 am
Quote
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.
Title: mkcramfs for cygwin
Post by: qx773 on December 15, 2004, 10:08:34 pm
You could try increasing your maximum swap file size.
Title: mkcramfs for cygwin
Post by: ShiroiKuma on December 16, 2004, 03:30:59 am
Quote
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?