Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1485513

Re: [PATCH 1/2] mtd: add support for partition parsers

From Richard Weinberger <richard.weinberger@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] mtd: add support for partition parsers
Date 2016-09-17 12:10 +0200
Message-ID <sikJk-1cR-9@gated-at.bofh.it> (permalink)
References <rWKhr-oj-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Rafał,

On Tue, Jul 19, 2016 at 10:51 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
> This extends MTD subsystem by adding a support for partition parsers
> that should be used for creating subpartitions. There are some types of
> partitions that require splitting, like firmware containers.
> It's common some home routers that a single firmware image gets flashed
> to predefined partition and then we need to parse it dynamically.
>
> The reason for having such parsers is to share code. Right now we have
> e.g. TRX parsing implemented in bcm47xxpart but this could be used in
> more cases (e.g. on ramips which doesn't use bcm47xxpart or with DT).
>
> This implementation requires marking partition as requiring parsing with
> a specific parser. This can be used right away with some parsers like
> bcm47xxpart, in future we will hopefully also find a solution for doing
> it with ofpart ("fixed-partitions").
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> One thing I'm not proud of in this patch is struct mtd_partition casting
> in order to be able to modify partition offset. It's marked as const so
> it was the only way I could think of. Any better ideas? Currently parser
> gets a single MTD and it doesn't have to deal with its offset, which I
> kind of like as it simplifies things.

I have to admit, I don't fully understand what you are trying to solve.
Why are you introducing a new concept of partition parsing in patch 2/2?
We have already one.

Are you unhappy with the way parsers are _requested_?
Currently MTD core tries cmdlinepart and ofpart, drivers can override that.
Do you need a way to request a parser via DT or cmdline?

-- 
Thanks,
//richard

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/2] mtd: add support for partition parsers Richard Weinberger <richard.weinberger@gmail.com> - 2016-09-17 12:10 +0200
  Re: [PATCH 1/2] mtd: add support for partition parsers Rafał Miłecki <zajec5@gmail.com> - 2016-09-19 12:40 +0200

csiph-web