Author Topic: Building a new ROM - mkcramfs doesn't work  (Read 3100 times)

wildangus

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • http://
Building a new ROM - mkcramfs doesn't work
« on: August 04, 2004, 03:43:56 pm »
Help!!

I downloaded the file rootfs_20020204.tar.gz so I can start building my own ROM and get a "No such file" when build.sh tries to execute mkcramfs.

Can anyone explain this?!!!

heres some more info...

nin# uname -a
Linux jupiter.6ashes.fsnet.co.uk 2.0.38 #4 Thu Jun 29 10:24:49 BST 2000 i586
nin# whoami
root
nin# pwd
/mounts/hda4/Disk1/Intranet/rootfs/bin
nin# ls -l
total 21
-rwx------   1 root     root          170 Mar 11  2002 build.sh
-rwx------   1 root     root        19089 Nov 20  2001 mkcramfs
nin# ./mkcramfs
bash: ./mkcramfs: No such file or directory
nin#

No such file or directory????  ^^^^^^

Thanks,

Wild Angus }:-)

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Building a new ROM - mkcramfs doesn't work
« Reply #1 on: August 04, 2004, 07:53:05 pm »
Looks like mkdcramfs is a script file and some command that it calls is missing - have a look inside mkcramfs and see what it calls and make sure you have it (and in the right path)

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

wildangus

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • http://
Building a new ROM - mkcramfs doesn't work
« Reply #2 on: August 05, 2004, 12:21:55 am »
I tried that (after looking at build.sh)

mkcramfs is an ELF binary.

I just can't understand why it can be "No such file or directory" when I can ls it and it has rwx permission.

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
Building a new ROM - mkcramfs doesn't work
« Reply #3 on: August 05, 2004, 04:45:24 am »
Yes, its a binary. Sources are to find on the net. Was written by Linus himself!

Does build.sh do a cd before calling?

It is called as ./mkcramfs - which disables the $PATH search and is relative to the cd of the execuing script - not relative to the call of build.sh.

-- hns
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com

wildangus

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • http://
Building a new ROM - mkcramfs doesn't work
« Reply #4 on: August 05, 2004, 02:46:24 pm »
Look at the listing from my terminal session...

I'm in the directory something/something/rootfs/bin where mkcramfs is located.
I can "ls" it.
It has rwx for the user root.
I am root.
I try to execute ./mkcramfs.
It says "No such file or directory".

I just don't get it...

Wild Angus }:-/

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
Building a new ROM - mkcramfs doesn't work
« Reply #5 on: August 05, 2004, 03:30:34 pm »
Sorry, I think I need new glasses :-)
I didn't see that you have tried to run directly from the shell.

What is your environment looking like (set)?

Maybe the PATH is scrambled so that even a local file can't be executed...

And some other idea: how did you mount the hda4 device? I remember that there are security precautions in some UNIX systems that can disable root execution of files although they are rwx.

As mkcramfs is not a harmful command, I would also recommend to try:

chown zaurus mkcramfs
chmod a+rx mkcramfs
su zaurus
./mkcramfs

-- hns
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com

MtnMichael

  • Newbie
  • *
  • Posts: 40
    • View Profile
Building a new ROM - mkcramfs doesn't work
« Reply #6 on: August 05, 2004, 05:44:43 pm »
I think your only problem is the "./" in front of the mkcramfs command.

So on my system, I get the same error msg:
********
# ./usr/mnt.rom/card/.zgcc/bin/mkcramfs
bash: ./usr/mnt.rom/card/.zgcc/bin/mkcramfs: No such file or directory
********

Now without the "./":
********
# /usr/mnt.rom/card/.zgcc/bin/mkcramfs
usage: /usr/mnt.rom/card/.zgcc/bin/mkcramfs [-h] [-e edition] [-i file] [-n name] dirname outfile
 -h         print this help
 -E         make all warnings errors (non-zero exit status)
 -e edition set edition number (part of fsid)
 -i file    insert a file image into the filesystem (requires >= 2.4.0)
 -n name    set name of cramfs filesystem
 -p         pad by 512 bytes for boot code
 -s         sort directory entries (old option, ignored)
 -v         be more verbose
 -z         make explicit holes (requires >= 2.3.39)
 dirname    root of the directory tree to be compressed
 outfile    output file
#
********

Hope that helps.

- Michael