• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Cloning  (Read 2504 times)

Karma: 0
Posts: 5

View Profile
« on: September 02, 2011, 07:03:10 AM »

So far I have used TonidoPlugs. They are set up by Tonido to boot from a USB device. I am now using either a fast Flash key, or a SD card (on a USB mount) with a powered hub for my Debian Squeeze kernel. I have also additionals USB drives for most of my apache/mysql stuff. Been up and working for now almost 100 days.

I am now getting into "pure" sheevaplugs. I understand they do not come with a u-boot able to boot from the SD card (still right?) and that's the assumption for my question.

I have found some good tutorials on how to set the u-boot to recognize and boot from an SD card (http://www.plugcomputer.org/plugwiki/index.php/SD_Card_As_Root_File_System) and as soon as the sheevaplug gets into my mailbox I will set it up.

Here is THE question:

Now that I have a modified nand/u-boot that can boot from an SD card, how do I clone it to other sheevaplugs rather than manually change teh u-boot on each and every sheevaplug?

I have found many forums and wikis and I am now totally confused!


Jonas Jensen

Karma: 0
Posts: 4

View Profile WWW
« Reply #1 on: September 07, 2011, 01:41:43 AM »

Atleast there is a way (albeit slow) to dump the U-Boot environment variables from NAND to file. You can probably use this method to dump the entire NAND or just the sections you are interested in (such as uImage or rootfs) . However, I'm not sure restoring them is a good idea, because really, I have no idea how OOB data works on NAND devices.

Should it be dumped with or without OOB data? Can anyone give a good explaination of what different uses this has?

I installed openocd 0.5 which is available @ http://packages.debian.org/wheezy/openocd

Connect and run server:

openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg

Then connect with nc:

nc localhost 4444

Dump the NAND environment variables. I used the addresses specified in /usr/share/openocd/scripts/board/sheevaplug.cfg:

target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled

nand probe 0
NAND flash device 'NAND 512MiB 3.3V 8-bit (Samsung)' found

nand list
#0: NAND 512MiB 3.3V 8-bit (Samsung) pagesize: 2048, buswidth: 8,
       blocksize: 131072, blocks: 4096

nand dump 0 /tmp/uboot-botech-dev-env.bin 0xa0000 0x40000
dumped 270336 bytes in 1084.018311s (0.244 KiB/s)

As you can see, dumping a 264K file took about 18 minutes. That's close to 2400 baud. I assume this has something to do with OpenOCD communicating over what is virtually a serial line (libftdi). Anyone know how to bump up the speed ?

This way of cloning with OpenOCD would make it very easy to massproduce plugs with OEM software. But also a good way to make backups.

Global Moderator
Sr. Member

Karma: 38
Posts: 497

View Profile
« Reply #2 on: September 07, 2011, 03:45:37 PM »

You'd pretty much have to dump with OOB data.  In the case of the environment the OOB data is not standard OOB data and needs to be duplicated.  If you want to see how the OOB data is used download git://github.com/cbxbiker61/plugenv.git and take a look at that.

Pages: [1]
Jump to: