• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1]
1  Linux Stuff / General Linux questions / Re: HOWTO mount JFFS2 image on Linux host without NAND flash on: April 15, 2009, 11:13:49 PM
I gave this a try, and the file mounts OK, but it doesn't contain any files.
What i get at the end is a bunch of directories (/etc, /home/ etc..) but no files in them.
Any ideas?

-tmk

Did you try it with ubuntu-9.0.5.Release.jffs2 image, taken from the site? That one is broken...
I tried 9.0.4 image, available from "Downloads" section of this site and it mounts OK and shows all the right stuff available.
Also jffs2 image from the companion CD worked for me.
2  Linux Stuff / Linux distributions / Re: Modifying the Ubuntu jffs2 Image on: April 15, 2009, 10:34:36 PM
Now, what I would like to see is an actual SDK, or a development environment like what we used to get with AXIS ETRAX processors.  I mean the way to build the Ubuntu rootfs image from sources, and add applications to it.

I guess, that after some tweaking Scratchbox toolkit (http://www.scratchbox.org/) can be tuned to support Sheeva.

For example, for Maemo platform (http://maemo.org), which is a Debian derivative for TI OMAP 2420 (ARM) processor, it works quite nicely. Indeed, the toolkit as such does not make a SDK yet, but Scratchbox community might be interested in helping to add Sheeva support. If I only had time, I probably would be able to put some efforts into this, but...

3  Linux Stuff / General Linux questions / Re: HOWTO mount JFFS2 image on Linux host without NAND flash on: April 15, 2009, 10:25:51 PM
Actually, you can use the kernel memory emulating MTD as well.  You just need to allocate more kernel memory. Smiley

It will only work for relatively small images. On my box, which has 1GB RAM, the maximum size of the image I can mount is about 63K. Mounting it over mtdblock would work much slower, but there is no size limitation. Well, almost no limitation  Wink
4  Linux Stuff / Kernel / Re: Cannot boot from NAND after reflash? on: April 15, 2009, 12:18:07 AM
That should be ok. 

You should rewite the uImage and the file_system.jff2 make sure you use

flash_eraseall -j /dev/mtd1
flash_eraseall -j /dev/mtd2

nandwrite -pm /dev/mtd1 uImage.sheeva.20090319
nandwrite -pm /dev/mtd2  ubuntu-9.0.5.Release.jffs2

and make sure You use the same mtparts definition in all you different bootargs

Mark

Indeed, I did flash_erase and flash_eraseall before doing nandwrite and I made sure that mtd partition definitions are the same.
Now I am 99% sure that the ubuntu-9.0.5.Release.jffs2 image, taken from the "Download" section of the WEB site, is broken.
Today I am going to check the image from the companion CD (I should have tried that before! But the rule "Online image is always more up-to-date than on a supplied CD" played a bad joke on me, I guess).

On a side note: I tried to mount the older, 9.0.4 jffs image (using mtd emulation on a block device), taken from the site - and it mounted allright and contained all the necessary stuff inside. So the next experiment will be to flash that one and to see if it works.

Will keep you posted on the outcome of these experiments.
5  Linux Stuff / Linux distributions / Re: Modifying the Ubuntu jffs2 Image on: April 14, 2009, 01:51:17 AM
I would like to convert the ubuntu jffs2 disk image to a regular rootfs tree which I can use to add custom applications and configure to my liking, all the while booting from it via NFS.

Mark,

Have a look at http://openplug.org/plugforum/index.php?topic=59.0 - there is an explanation how to mount, copy and update your JFFS2 image on a Linux host without NAND flash. Hope it helps.

Regards,
Alexander

6  Linux Stuff / General Linux questions / HOWTO mount JFFS2 image on Linux host without NAND flash on: April 14, 2009, 01:41:57 AM
I have found a document, which explains how to mount a jffs2 image using block device emulating MTD:

https://wiki.maemo.org/Modifying_the_root_image

Maemo is a Linux-based platform, which Nokia uses in their Internet Tablet devices. These devices also use NAND flash memory, so the tools they are using are good for SheevaPlug as well. Some Nokia Maemo folks are, actually, standing behind the jffs2 filesystem development.

You need to copy the script from the section "Shell script to mount/unmount JFFS2 using block device emulating MTD" and to fix two errors in it (lines 27 and 35: replace '[' by ']').
Now you can mount your Sheeva jffs2 image and play with it any way you want :-)

Please read "Modifying the copy of the image" attentively - it might save you some troubles in the future!

Indeed, Maemo flasher script is NOT applicable for SheevaPlug. Do not try it!

Note: Do NOT use "Shell script to mount/unmount JFFS2 using kernel memory emulating MTD" method, as it is only usable for small (< 64MB) images, otherwise you get "out of memory" error.

Hope this information is helpful.
7  Linux Stuff / Kernel / Cannot boot from NAND after reflash? on: April 13, 2009, 12:58:26 PM
Hi,

After experimenting awhile with my Sheeva Plug, I managed to screw up the contents of /dev/mtd2, so I needed to reflash the NAND.
u-Boot (in /dev/mtd0) and uImage (in /dev/mtd1) remain intact.

Booting from tftp worked just fine, so did booting from USB flash drive (two partitions, 1st vfat partition with uImage, 2nd ext2 partition with rootfs from ubuntu.9.04.tar.gz, taken from http://plugcomputer.org/index.php/resources/downloads?func=select&id=2

Here is what I did to restore /dev/mtd2:

1. setenv console 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x000000(u-boot),0x200000@0x100000(uImage),0x1fd00000@0x500000(rootfs)rw'
2. Boot from tftp
3. sh-3.2# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00200000 00020000 "uImage"
mtd2: 1fd00000 00020000 "rootfs"

4. uImage.sheeva.040309 and ubuntu.9.0.5.Release.jffs were put to /sos directory on tftp root on the host
5. # flash_erase /dev/mtdblock1
    # flash_eraseall /dev/mtd1
    # flash_erase /dev/mtdblock2
    # flash_eraseall /dev/mtd2

6. # cat /sos/uImage.sheeva.040309 > /dev/mtdblock1
7. # nandwrite -m /dev/mtd2 /sos/ubuntu-9.0.5.Release.jffs2
8. # mount -t jffs2 /dev/mtdblock2 /mnt

Here comes the surprise: /dev/mtd2 mounts OK, but it is almost empty! Only 3% is used (and originally it was about 35% full!)
But I decided to give it a try anyway  Smiley
9. #umount /mnt
10. #reboot
11. Stopped the boot, got u-Boot prompt
12. >> setenv bootargs 'console=ttyS0,115200 mtdparts=nand_flash:0x200000@0x100000(uImage)ro,0x1fd00000@0x300000(rootfs)ro root=/dev/mtdblock2'
>>  setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
>> saveenv
>> boot


...and, of course, after the kernel loads I get:

VFS: Mounted root (jffs2 filesystem).                                                                                                                                     
Freeing init memory: 124K                                                                                                                                                 
Warning: unable to open an initial console.                                                                                                                               
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.     


What else shall I expect? I already knew, that my rootfs is almost empty and there were no /sbin/init in there.
Indeed, I downloaded the .jffs2 filesystem again and repeated the reflashing... with the same result.

What am I doing wrong??? Any help will be greatly appreciated. Thank you.
Pages: [1]