[Avila] Programming JTAG from Linux and tweaking Redboot

gw at lunstad.com gw at lunstad.com
Wed Jul 5 14:35:58 EDT 2006


Hi Tim et al,

I'm afraid that I'm doing something wrong, or that there is something
special about /dev/mtd0. When I try to update the redboot image using
netflash I get the following:

# netflash -knb -r /dev/mtd0 redboot.bin
netflash: open(/dev/mtd0) failed: Permission denied

Here is what I have for mtd:

 cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "RedBoot"
mtd1: 00800000 00020000 "user"
mtd2: 00160000 00020000 "zimage"
mtd3: 00300000 00020000 "ramdisk"
mtd4: 00300000 00020000 "unallocated"
mtd5: 0001f000 00020000 "FIS directory"
mtd6: 00001000 00020000 "RedBoot config"

If I try my "user" (jffs2) partition for yucks I get further:

# netflash -k -r /dev/mtd3 redboot.bin
..........................................................................................................................
netflash: got "redboot.bin", length=333572
netflash: bad image checksum=0x94f0, expected checksum=0x4c4b40

I didn't actually want to overwrite it, so I left the checksum checking in.

Any assistance would be appreaciated. For now I will continue to FLASH.EXE.

Thanks,

Andrew

PS -- In case you were wondering about my perms:

# ls -l /dev/mtd0
crw-rw-rw-    1 0        0         90,   0 /dev/mtd0
# whoami
root

> This has been discussed here in the past (look through the archives for
> possibly more info)
>
> Personally for JTAG I use a personalized VMWare Virtual Machine (using the
> free VMWare player) that boots FREEDos with a PXE network stack and leaves
> me with a DOS cmdprompt with a drive mapped to a network share where I get
> my images from.  This may be a little complicated to setup but the gist of
> it is that you can use FLASH.EXE just fine with a paralell port over
> VMWare if its the whole DOS floppy disk thing that bothers you.  Keep in
> mind its realy slow so I only use this as a failsafe on a board I rendered
> unbootable.
>
> Otherwise to update redboot I use the same method I would use to update
> any other portion of flash - boot the board to a linux kernel and use
> netflash.  If you conifgure your kernel right, you'll have block/char
> devices for each flash partition including the bootloader.  Also keep in
> mind that the binary image you would flash in via this method is NOT the
> byte-swapped image you would feed to FLASH.EXE.
>
> Tim
>
> ----- Original Message ----
> From: gw at lunstad.com
> To: Avila <avila at lists.unixstudios.net>
> Sent: Wednesday, June 28, 2006 8:26:33 AM
> Subject: [Avila] Programming JTAG from Linux  and tweaking Redboot
>
> Hi Folks,
>
> I am beginning to tweak redboot on our 2348 and was wondering if anyone
> had found a work-around to creating a DOS floppy and running FLASH.EXE
> from it to program the flash. Failing that, is it possible to test a
> redboot image from RAM (e.g. load the image and then exec it)?
>
> Thanks in advance,
>
> Andrew
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avila-unsubscribe at lists.unixstudios.net
> For additional commands, e-mail: avila-help at lists.unixstudios.net
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avila-unsubscribe at lists.unixstudios.net
> For additional commands, e-mail: avila-help at lists.unixstudios.net
>
>





More information about the Avila mailing list