Remotely write to flash?

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.

Reply to
Washington Ratso
Loading thread data ...

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,
piano and more:
Reply to
Frank Buss

Washington Ratso skrev:

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
 Click to see the full signature
Reply to
Ulf Samuelsson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.