Remotely write to flash?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I have found that I can avoid the long JFFS2 scan in U-Boot if I write
my kernel image (uImage) to a specific address in flash and using this
address in my boot command rather than putting uImage in the
filesystem and having to scan for it. My problem is updating the
kernel remotely.  Now I can simply scp a new uImage file to my boot
directory in the filesystem.  Is it possible to remotely copy a new
uImage file to a specific address in flash?  I am running Linux 2.6.26
on a PowerPC.

Re: Remotely write to flash?

Quoted text here. Click to load it

Yes, this is possible, if you have compiled your previous kernel to map the
uImage area to a mtd device. See mtd utils and nandwrite (probably already
on your target system).

--
Frank Buss, http://www.frank-buss.de
piano and more:
We've slightly trimmed the long signature. Click to see the full one.
Re: Remotely write to flash?
Washington Ratso skrev:
Quoted text here. Click to load it


I just completed a little project where I can get fast boot time by
copying to an *arbitrary* position in flash :-)

The AT91SAM9M10 boots from a DOS partition on an SD-Card.
I just put the bootloader, u-boot + u-boot environment and uimage on the
SD-Card and reset.
Have no clue on which address it is.

The internal bootROM will read in at91bootstrap to SRAM from the SD-Card
and execute.
at91bootstrap will init the SDRAM and then copy u-boot to SDRAM
and jump and execute u-boot.

u-boot will execute a script from the SD-Card which sets up the
environment, and then read uimage from the SD-Card and execute it.

The EXT3 rootfs is on a second partition on the SD-Card.

If you need to update anything, just press a button during reset,
and at91bootstrap will not load u-boot, instead it will load a USB
Mass Storage Adapter, exporting both the SD-Card DOS partition
and the EXT3 partition to the host PC, which will automatically
open windows.

To upgrade the kernel, you just select the new kernel in a host PC
file manager, drag it and then drop it on the DOS partition.

If you want to update part of the rootfs, you just select the
right directory using rhe host file manager, and when
at the right place, you drag and drop again.
You can also easily open target files for edit using the host editor.

All updates can abviously be made using scripts.

With this approach, you do not need ANY flash on the board,
just the SD-Card.

Quite neat.



--
Best Regards
Ulf Samuelsson
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline