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/
|