mkyaffs2image not working..

sebastian
Hello,

I am trying to make a debian/emdebian rootfs for use with the default
friendlyarm kernel on my micro2440. 

Both the mkyaffs2image tar file on this site does not work, neither does
the one which came on my friendlyarm dvd.

root@lina:/lina-scratch/2440-3.5/usr/sbin# ls
mkyaffs2image  mkyaffs2image-128M
root@lina:/lina-scratch/2440-3.5/usr/sbin# ./mkyaffs2image
bash: ./mkyaffs2image: No such file or directory
root@lina:/lina-scratch/2440-3.5/usr/sbin# ./mkyaffs2image-128M
bash: ./mkyaffs2image-128M: No such file or directory
root@lina:/lina-scratch/2440-3.5/usr/sbin# ldd mkyaffs2image
 not a dynamic executable
root@lina:/lina-scratch/2440-3.5/usr/sbin# ldd mkyaffs2image-128M
 not a dynamic executable

these two files, are the only ones present in both tar.gzips, there are no
instructions on how to use them. are these meant to be compiled or
something? I have googled and found nothing. 

It has now been over 6 months that i have tried to get a debian rootfs
working off the inbuilt flash, so I would really appreciate some help.

Cheers,
Seb

sebastian
PS: I found and compiled another mkyaffs2image I found on the net, which
does appear to build an image. However, uploading and booting that image
produces the following problem: 

http://pastebin.com/sncpDEQ5

This is why I want to try the mkyaffs2image from friendlyarm, because I
thnk they maybe have modified it for the 2440 devices, so other copies of
mkyaffs2image might not work.

sean_h
Say your rootfs exists at /srv/rootfs/mini6410 on your host

Copy mkyaffs2image and/or mkyaffs2image-128M to /srv/rootfs

cd /srv/rootfs

( Depending on your board memory choose appropriate version of
mkyaffs2image )
 
./mkyaffs2image-128M ./mini6410 rootfs

chmod 666 rootfs

Resulting rootfs can be downloaded to the target

sebastian
Hi sean_h

thankyou for the reply.

However, this does not work. What you describe is the exact scenario I have
done.

lina@lina:/lina-scratch/2440-3.5-old$ ls
instructions.txt  mkyaffs2image-128M  mkyaffs2-old rootfs_qtopia_qt4.img 
simple-config  squeeze-grip-rootfs  usbpush   zImage_W35

squeeze-grip-rootfs is the rootfs for the image i want.

lina@lina:/lina-scratch/2440-3.5-old$ ./mkyaffs2image-128M
./squeeze-grip-rootfs rootfs
-bash: ./mkyaffs2image-128M: No such file or directory


This is why I am very confused. I can SEE the file is there, using `ls`. I
can 'cat' the file to see its contents. but bash says it doesnt exist.

sebastian
Okay I think I just figured it out..

lina@lina:/lina-scratch/2440-3.5-old$ ld mkyaffs2image-128M
ld: i386 architecture of input file `mkyaffs2image-128M' is incompatible
with i386:x86-64 output

For some reason bash reports the wrong error. the program has been compiled
for another architecture and thus cannot be used.

Is there a place I can get the source code for mkyaffs2image (specifically
the -128M version) ?

sean_h
Hi Sebastian

The mkyaffs2image supplied by FriendlyArm is what you want. I think your
problem is your rootfs. The rootfs that you have on your host must be cross
compiled for your specific target.

Where did you get your rootfs from?

Sean

sebastian
Hi Sean,

I have *never* been able to make a rootfs using friendlyarm's
mkyaffs2image, this is what I have been saying all along... The
mkyaffs2image I found randomly on the net does actually run, and creates an
image, but is not friendlyarm's copy. And that image doesn't work.

I have just downloaded the friendlyarm copy minutes ago to prove that it
doesnt work on this system:



# this file....
http://www.friendlyarm.net/dl.php?file=linux-mkyaffs2image.tgz
(linux-mkyaffs2image.tgz (16.57 KB))


lina@lina:/lina-scratch/friendlyarm/tmp$ tar xvf linux-mkyaffs2image.tgz
usr/sbin/mkyaffs2image
usr/sbin/mkyaffs2image-128M
lina@lina:/lina-scratch/friendlyarm/tmp$ cd ./usr/sbin/
lina@lina:/lina-scratch/friendlyarm/tmp/usr/sbin$ ls
mkyaffs2image  mkyaffs2image-128M
lina@lina:/lina-scratch/friendlyarm/tmp/usr/sbin$ ./mkyaffs2image
-bash: ./mkyaffs2image: No such file or directory
lina@lina:/lina-scratch/friendlyarm/tmp/usr/sbin$ ld ./mkyaffs2image
ld: i386 architecture of input file `./mkyaffs2image' is incompatible with
i386:x86-64 output
lina@lina:/lina-scratch/friendlyarm/tmp/usr/sbin$ ./mkyaffs2image-128M
-bash: ./mkyaffs2image-128M: No such file or directory
lina@lina:/lina-scratch/friendlyarm/tmp/usr/sbin$ ld ./mkyaffs2image-128M
ld: i386 architecture of input file `./mkyaffs2image-128M' is incompatible
with i386:x86-64 output
ld: error in ./mkyaffs2image-128M(.eh_frame); no .eh_frame_hdr table will
be created.


This is the same situation with the mkyaffs2image files on the supplied
DVD. Obviously I need the source code to recompile it for my architecture.
What is confusing me is that given how pretty much every PC on the planet
is x86-64 by now, why did friendlyarm compile it without x86-64 support?

sean_h
Sebastian

I have just downloaded from your link above and run it on my machine and
created a yaffs format of my rootfs.

My host machine specs are: 

cat /proc/cpuinfo 
processor  : 0
vendor_id  : GenuineIntel
cpu family  : 6
model    : 42
model name  : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
stepping  : 7
microcode  : 0x25
cpu MHz    : 800.000
cache size  : 3072 KB