[2008.X] Flashing the kernel live
kelvie at ieee.org
Thu Sep 25 10:06:45 CEST 2008
On Wednesday, September 24, 2008 23:57:34 Tore Martin Hagen wrote:
> Sarton O'Brien wrote:
> > On Wednesday 24 September 2008 19:05:45 Kelvie Wong wrote:
> >> I was just wondering, is there a way to flash the kernel live (i.e. with
> >> the software still running)? Is the boot partition (it's on the NAND
> >> Flash somewhere) something I can just mount and override a file? Or do
> >> I have to use dd? Or is there some trickery I can do with dfu-util?
> > opkg upgrade manages this so I'd say you could ... using a tool like mtd
> > or such, I really don't how, just that it does :)
> I don't have my phone right here, but you can do a
> cat /proc/mtd
> and it will list out which mtd partition that contains the kernel. Then
> you do
> flasheraseall /dev/mtdX
> cat yourUimage.bin > /dev/mtdX
> And thats it
Alright, I tried that; here are my results:
[root at om-gta02 ~] $ cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00010000 "physmap-flash.0"
mtd1: 00040000 00020000 "u-boot"
mtd2: 00040000 00020000 "u-boot_env"
mtd3: 00800000 00020000 "kernel"
mtd4: 000a0000 00020000 "splash"
mtd5: 00040000 00020000 "factory"
mtd6: 0f6a0000 00020000 "rootfs"
[root at om-gta02 ~] $ flash_eraseall /dev/mtd3
Erasing 128 Kibyte @ 7e0000 -- 98 % complete.
[root at om-gta02 ~] $ cat uImage.bin > /dev/mtd3
cat: write error: Invalid argument
[root at om-gta02 ~] $ file uImage.bin; du -h uImage.bin; file /dev/mtd3
uImage.bin: u-boot/PPCBoot image
/dev/mtd3: character special (90/6)
Any ideas? Do I need to do something special before I can directly write to
In the meantime I'm going to just flash in the u-boot...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the community