Author Topic: mkcramfs for cygwin  (Read 12858 times)

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
mkcramfs for cygwin
« 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.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

loji

  • Full Member
  • ***
  • Posts: 130
    • View Profile
    • http://
mkcramfs for cygwin
« Reply #1 on: November 02, 2004, 09:29:21 am »
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
-> pdaXrom beta 3 fixes & feeds
C-1000 + pdaXrom beta3
linksys wifi + expansions

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
mkcramfs for cygwin
« Reply #2 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.
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
mkcramfs for cygwin
« Reply #3 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!
« Last Edit: November 28, 2004, 09:34:44 pm by shula »
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
mkcramfs for cygwin
« Reply #4 on: November 29, 2004, 01:45:20 pm »
Try the attached mkcramfs.  I used it successfully to create a cramfs file on Windows 98SE.
« Last Edit: November 29, 2004, 01:46:27 pm by qx773 »

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
mkcramfs for cygwin
« Reply #5 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?
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
mkcramfs for cygwin
« Reply #6 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.
« Last Edit: November 30, 2004, 09:10:02 pm by qx773 »

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
mkcramfs for cygwin
« Reply #7 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.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
mkcramfs for cygwin
« Reply #8 on: December 01, 2004, 07:42:58 am »
(or a different binaries.
i compared my version byte:byte with yours. they're identiacl.)
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
mkcramfs for cygwin
« Reply #9 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

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
mkcramfs for cygwin
« Reply #10 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?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
mkcramfs for cygwin
« Reply #11 on: December 03, 2004, 08:33:55 am »
alternatively,
how can we create a cramfs from the zaurus?
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
mkcramfs for cygwin
« Reply #12 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.
« Last Edit: December 03, 2004, 07:58:34 pm by qx773 »

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
mkcramfs for cygwin
« Reply #13 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 ?  When you access Cygwin, do you get a bash shell prompt?

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
mkcramfs for cygwin
« Reply #14 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.
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)