birdman
Moderator
And if they are there for a sanity check, then the failure should be reported to the user. This is what ofgwrite reports when given the wrong device info:Given that mtd knows where the partitions are, why are they given as parameters to ofgwrite, rather than just let it use what it finds?
Code:
Found /proc/mtd entries:
Device: Size: Erasesize: Name: Image:
mtd0: 1ff00000 00020000 "complete"
mtd1: 00600000 00020000 "kernel" <- Error: Selected by user is not a rootfs mtd!!
mtd2: 1f900000 00020000 "rootfs" <- Error: Selected by user is not a kernel mtd!!
mtd3: 00080000 00010000 "cfe"
mtd4: 00200000 00010000 "splash"
mtd5: 00080000 00010000 "macadr"
mtd6: 00080000 00010000 "nvram"
mtd7: 00040000 00010000 "bootconfig"
mtd8: 00040000 00010000 "facconfig"
Using kernel mtd device: /dev/mtd2
Using rootfs mtd device: /dev/mtd1
Error: User selected mtd device cannot be used!