ts-7000
[Top] [All Lists]

[ts-7000] using nandwrite to update the linux kernel in flash

To:
Subject: [ts-7000] using nandwrite to update the linux kernel in flash
From: Christopher Friedt <>
Date: Mon, 29 May 2006 14:34:14 +0000
Hello all,

After doing a little bit of research into the memory map of the ts-7260
I managed to replace the kernel in flash with a couple of commands,
bypassing the time-consuming RedBoot method suggested in the TS
documentation.

This basically allows me to perform the following command:

mtd_debug erase /dev/mtd/2 262144 835584

wget -O - '<url_to_zImage>' | nandwrite -p -a -l 835584 -s 262144
/dev/mtd/2 -

The second command basically fetches a file from an arbitrary URL and
pipes it to standard output, then the nandwrite command reads all of
that data on standard input. In flash there are 0xCC000 (835584) bytes
allocated for the kernel at an offset of 0x40000 (262144) from character
device /dev/mtd/2 .

The first command sends 0xFF... to all of the memory cells on the flash
chip before writing to it (since in most nand flash chips you can only
change a 1 to a zero and not vice-versa).

For argument's sake, I've made the -l <length> option mandatory so that
people don't overwrite a part of the YAFFS formatted filesysem by
accident if the kernel zImage is too big. There is also a static 1MB
buffer for this filesize and I'm buffering the read every kB.

I hope this is useful for other people, becuase it's certainly been
useful for me and my company, allowing us to

1) perform remote kernel updates, and
2) drastically speed up the production time (for many units)

We're also using a good trick to do remote updates on the filesystem by
using something like

cd / && wget -O - '<url_to_files_in_tbz2_archive>' | tar xvjpf -

If you're interested in nandwrite, check it out at

http://vaiprime.visibleassets.com/~cfriedt/nandwrite/


Cheers,


~/Chris


------------------------ Yahoo! Groups Sponsor --------------------~-->
Home is just a click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/CFFolB/TM
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/




<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU