comparing 2 kernel images and flashing the diff FLASH memory
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.
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).
This would be very difficult, for two reasons.
The Linux kernel is stored compressed, so a small change can cause all the compression output following that point to be different.
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.
精彩评论