tags:

views:

26

answers:

2

hi all, i have existing old version images like kernel image,filesys image,application images in my NAND flash. i want to port the new modified kernel or application image on to the NAND flash by replacing the older one. But in the new images 90% is common to the old images. so i don't want the entire new image to transfer. inspite i am thinking of some kind of comaprision between the old and new images and want to send only the difference on to flash memory. so that i can avoid transfering a larger data.

can it be possible ? i need some guidence to do this.

A: 

It's certainly possible, however with flash you'll have to take into account the difference between erase sector size and write sector size (typically the erase block is multiple write sectors in size).

stsquad
by comparing two images how can i get the difference image ? i serched many places and every where they it is mentioend that i can get the differ possitions. ex: <kernel-src>/scripts/bloat-o-meter vmlinux.default vmlinux.altconfig
sujitnist
A: 

This would be very difficult, for two reasons.

  1. The Linux kernel is stored compressed, so a small change can cause all the compression output following that point to be different.

  2. If a modification changes the size of some code, everything stored after that will have to shift forward or back.

In theory, you could create your own way of linking and/or compressing the kernel so that code stays in one place and compression happens in a block-aware way, but that would be a lot of work -- probably not worth it just to save a few minutes of erase/write time during kernel upgrades.

Eric Seppanen
thanks for your suggestion Eric.i completely agree with your point.there will be a rework of shiftting the data and code if atleast one memory region is exceeding the size in my new modified application, kernel image, which will be very difficult and time consuming to do directly on Device FLASH memory.
sujitnist