Skip to contentSkip to conversation

ubiformat: reverse question about vid offset change

PATCH In review Bernard Blackham 3 participants 4 messages Jun 25, 2008 – Jun 30, 2008 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ubiformat: reverse question about vid offset change

Users can pass the -O option to ubiformat to override the VID header offset on the command-line. If for some reason, the new offset does not match what is on flash, ubiformat currently prompts the user if they'd rather use the *old* offsets. This means that calling ubiformat with --yes will not do what was requested on the command-line.

This patch reverses the question so --yes is actually useful for running in batch-mode.

ubi-utils/new-utils/src/ubiformat.c +2 -1
index dc5dc44..545630b 100644
@@ -675,12 +675,13 @@ int main(int argc, char * const argv[])
 				"which is different to calculated offsets %d and %d",
 				si->vid_hdr_offs, si->data_offs, ui.vid_hdr_offs,
 				ui.data_offs);
-			normsg_cont("use old offsets %d and %d? (yes/no)  ",
+			normsg_cont("use new offsets %d and %d? (yes/no)  ",
 				    si->vid_hdr_offs, si->data_offs);
 		}
 		if (args.yes || answer_is_yes()) {
 			if (args.yes && !args.quiet)
 				printf("yes\n");
+		} else {
 			ui.vid_hdr_offs = si->vid_hdr_offs;
 			ui.data_offs = si->data_offs;
 		}
#1 lore raw
Quoted 9 lines · Bernard Blackham

Users can pass the -O option to ubiformat to override the VID header offset on the command-line. If for some reason, the new offset does not match what is on flash, ubiformat currently prompts the user if they'd rather use the *old* offsets. This means that calling ubiformat with --yes will not do what was requested on the command-line.

This patch reverses the question so --yes is actually useful for running in batch-mode.

Pushed, thank you!

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)
#2 lore raw

Getting Error in NOR MTD map driver

Hi,
I am developing NOR MTD map driver for SPANSION NOR. I am getting the
following error and hence not able to detect the device. Kindly help me out.

Unknown Amd/Fujitsu Extended Query version 1.4.
gen_probe: No supported Vendor Command Set found

Regards,
Divyanshu

#3 lore raw

NOR MTD map driver up and running but name coming as NULL

Hi,
I am able to bring up NOR flash succsfully. The reason for the error was 2.6.14.2 not supporting query version 1.4.
Anyway it is working fine and I can see the partitions on # cat /proc/mtd.

Now for testing that device is it required that I need to put some fime system on it, say jffs?
Also on doing cat /proc/mtd, I can see the partition names appearing as "<NULL>" and not the ones that I declared in my map driver inside instance of struct mtd_partitions

Following are my declarations and I aspire to see names as "BOOT" and "Linux-Image".

Any help will be highly appreciated.

static struct mtd_partition BCM5892_nand_partition [] = { {

        .name           = "BOOT",
        .offset         = 0,
        .size           = 0x0001000,
        .mask_flags     =MTD_WRITEABLE,

},

{

        .name           = "Linux-Image",
        .size           = MTDPART_SIZ_FULL,
        .offset         = MTDPART_OFS_NXTBLK,

},
};

Thanks and regards,
Divyanshu

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Divyanshu Verma
Sent: Thursday, June 26, 2008 2:55 PM
To: [email protected]
Subject: Getting Error in NOR MTD map driver

Hi,
I am developing NOR MTD map driver for SPANSION NOR. I am getting the
following error and hence not able to detect the device. Kindly help me out.

Unknown Amd/Fujitsu Extended Query version 1.4.
gen_probe: No supported Vendor Command Set found

Regards,
Divyanshu

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/