* [mtdblock] reading regions where %512 != 0
@ 2019-08-07 17:27 Enrico Mioso
2019-08-09 12:15 ` Boris Brezillon
0 siblings, 1 reply; 3+ messages in thread
From: Enrico Mioso @ 2019-08-07 17:27 UTC (permalink / raw)
To: linux-mtd
Hello guys!
first of all - thank you for your great work!
I've been experimenting an issue with OpenWRt on a TP-Link Archer C60 V2 device, where an mtd region has been defined so that it's not 512-bytes aligned:
mac: partition@1fb00 {
label = "mac";
reg = <0x01fb00 0x000500>;
read-only;
};
So the region is 1280 bytes long; still reading from the exported mtdblock device will results in a 1024 bytes read.
This prevents users from making proper backups of flash regions. I don't know how many instances of this exist in the OpenWRt tree right now, but it's not clear wether we should fix this issue in the mtdblock or defining regions differently, changing their sizes.
Any help, suggestions or ideas very welcome and apreciated.
Thank you very much,
Enrico
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [mtdblock] reading regions where %512 != 0
2019-08-07 17:27 [mtdblock] reading regions where %512 != 0 Enrico Mioso
@ 2019-08-09 12:15 ` Boris Brezillon
2019-08-09 12:48 ` Enrico Mioso
0 siblings, 1 reply; 3+ messages in thread
From: Boris Brezillon @ 2019-08-09 12:15 UTC (permalink / raw)
To: Enrico Mioso; +Cc: linux-mtd
Enrico,
On Wed, 7 Aug 2019 19:27:49 +0200 (CEST)
Enrico Mioso <mrkiko.rs@gmail.com> wrote:
> Hello guys!
>
> first of all - thank you for your great work!
>
> I've been experimenting an issue with OpenWRt on a TP-Link Archer C60 V2 device, where an mtd region has been defined so that it's not 512-bytes aligned:
>
> mac: partition@1fb00 {
> label = "mac";
> reg = <0x01fb00 0x000500>;
> read-only;
> };
>
> So the region is 1280 bytes long; still reading from the exported mtdblock device will results in a 1024 bytes read.
> This prevents users from making proper backups of flash regions. I don't know how many instances of this exist in the OpenWRt tree right now, but it's not clear wether we should fix this issue in the mtdblock or defining regions differently, changing their sizes.
> Any help, suggestions or ideas very welcome and apreciated.
Is this a NOR or a NAND? Have tried reading from the mtd device instead
of mtdblock? I guess block devices have to be aligned on 512B...
>
> Thank you very much,
> Enrico
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [mtdblock] reading regions where %512 != 0
2019-08-09 12:15 ` Boris Brezillon
@ 2019-08-09 12:48 ` Enrico Mioso
0 siblings, 0 replies; 3+ messages in thread
From: Enrico Mioso @ 2019-08-09 12:48 UTC (permalink / raw)
To: Boris Brezillon; +Cc: linux-mtd
Hello!!
thanks for the reply.
This is a SPI NOR device.
Reading from mtd device actually results in reading the entire content. Thank you very very much!!
Enrico
On Fri, 9 Aug 2019, Boris Brezillon wrote:
> Date: Fri, 9 Aug 2019 14:15:44
> From: Boris Brezillon <boris.brezillon@collabora.com>
> To: Enrico Mioso <mrkiko.rs@gmail.com>
> Cc: linux-mtd@lists.infradead.org
> Subject: Re: [mtdblock] reading regions where %512 != 0
>
> Enrico,
>
> On Wed, 7 Aug 2019 19:27:49 +0200 (CEST)
> Enrico Mioso <mrkiko.rs@gmail.com> wrote:
>
>> Hello guys!
>>
>> first of all - thank you for your great work!
>>
>> I've been experimenting an issue with OpenWRt on a TP-Link Archer C60 V2 device, where an mtd region has been defined so that it's not 512-bytes aligned:
>>
>> mac: partition@1fb00 {
>> label = "mac";
>> reg = <0x01fb00 0x000500>;
>> read-only;
>> };
>>
>> So the region is 1280 bytes long; still reading from the exported mtdblock device will results in a 1024 bytes read.
>> This prevents users from making proper backups of flash regions. I don't know how many instances of this exist in the OpenWRt tree right now, but it's not clear wether we should fix this issue in the mtdblock or defining regions differently, changing their sizes.
>> Any help, suggestions or ideas very welcome and apreciated.
>
> Is this a NOR or a NAND? Have tried reading from the mtd device instead
> of mtdblock? I guess block devices have to be aligned on 512B...
>
>>
>> Thank you very much,
>> Enrico
>>
>>
>>
>> ______________________________________________________
>> Linux MTD discussion mailing list
>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-09 12:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07 17:27 [mtdblock] reading regions where %512 != 0 Enrico Mioso
2019-08-09 12:15 ` Boris Brezillon
2019-08-09 12:48 ` Enrico Mioso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).