public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] arm: mvebu: Espressobin: Setup MTD partitions when booting kernel
Date: Thu, 20 Aug 2020 10:51:28 +0200	[thread overview]
Message-ID: <20200820085128.er7wxkmeyllixfkr@pali> (raw)
In-Reply-To: <af8852d8-23d5-d61d-505d-6786ded6447e@denx.de>

On Thursday 20 August 2020 10:17:55 Stefan Roese wrote:
> On 20.08.20 09:40, Pali Roh?r wrote:
> > On Thursday 20 August 2020 07:02:18 Stefan Roese wrote:
> > > Can't you just use "mtdparts=" kernel cmdline parameter instead to pass
> > > the MTD layout to the kernel?
> > 
> > Maybe it is possible too, I have not tried it.
> > 
> > I thought that more common is to update DTS file by uboot when loading
> > kernel as it is already done e.g. for ethernet MAC address on
> > Espressobin.
> 
> Updating the MAC address is very common, yes. But passing the
> MTD partition layout via the mtdparts= cmdline is also very
> common and used very frequently. From my experience, its the
> defacto recommended method to pass this info and also easier than
> generating these DTS lines via some code.
> 
> Please take a look at the mtdparts U-Boot command and its usage
> in other targets.
> 
> > Also I see that uboot has function fdt_fixup_mtdparts() via
> > CONFIG_FDT_FIXUP_PARTITIONS option which do this, but uses uboot MTD
> > code which IIRC cannot initialize SPI NOR.
> 
> Why not?

I had an impression that U-Boot does not support.

> SPI NOR is also integrated into the U-Boot MTD world as
> well. Please see this GARDENA MT7688 target, which uses SPI NOR &
> SPI NAND:

Ok, I'm going to look at it.

> > Anyway, updating DTS has advantage that it is not needed to update
> > existing boot scripts for OS. There are more distributions for
> > Espressobin which have own boot scripts stored on SD card for loading
> > kernel. And therefore to use command line parameters it would be needed
> > to update all of them.
> 
> I see. This is an argument I understand. But can't you use the common
> fdt_fixup_mtdparts() then?
> 
> > And I see there another problem. For specifying size of mtd partitions
> > in command line, it is required to know offsets of those partitions. And
> > e.g. uboot env partition depends on CONFIG_ENV_OFFSET option which is
> > not available for uboot boot script code.
> > 
> > But if you have other idea, I'm open to also other solutions.
> 
> I have not investigated a multi-distribution solution here. Perhaps
> the common fdt_fixup_mtdparts() is able to handle this?

In case U-Boot would see MTD SPI partitions, then fdt_fixup_mtdparts()
should work.

  reply	other threads:[~2020-08-20  8:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 14:24 [PATCH 1/2] arm: mvebu: Espressobin: Make SPI env offset compatible with Marvell's U-Boot Pali Rohár
2020-08-19 14:24 ` [PATCH 2/2] arm: mvebu: Espressobin: Setup MTD partitions when booting kernel Pali Rohár
2020-08-19 18:01   ` [EXT] " Kostya Porotchkin
2020-08-20  5:02   ` Stefan Roese
2020-08-20  7:40     ` Pali Rohár
2020-08-20  8:17       ` Stefan Roese
2020-08-20  8:51         ` Pali Rohár [this message]
2020-08-20 11:12           ` Pali Rohár
2020-08-20 11:19             ` Stefan Roese
2020-08-20 11:45               ` Pali Rohár
2020-08-20 12:03           ` Pali Rohár
2020-08-20 12:09             ` Stefan Roese
2020-08-25 10:42               ` Pali Rohár
2020-08-27 16:29   ` Andre Heider
2020-08-31 13:05   ` Stefan Roese
2020-08-19 17:59 ` [EXT] [PATCH 1/2] arm: mvebu: Espressobin: Make SPI env offset compatible with Marvell's U-Boot Kostya Porotchkin
2020-08-20  4:59 ` Stefan Roese
2020-08-27 16:29 ` Andre Heider
2020-08-31 13:05 ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200820085128.er7wxkmeyllixfkr@pali \
    --to=pali@kernel.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox