mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: barebox <barebox@lists.infradead.org>
Subject: Re: linux.bootargs: export mtdparts from DTS
Date: Fri, 23 Feb 2018 09:04:02 +0100	[thread overview]
Message-ID: <20180223080402.zhx2klwm7jmmnght@pengutronix.de> (raw)
In-Reply-To: <CAGm1_ktHTY=nv+5iKdr3i+sYX4KoDa2cytCCvGhaK47sP2498g@mail.gmail.com>

On Fri, Feb 23, 2018 at 08:52:35AM +0100, Yegor Yefremov wrote:
> On Fri, Feb 23, 2018 at 8:39 AM, Yegor Yefremov
> <yegorslists@googlemail.com> wrote:
> > On Fri, Feb 23, 2018 at 8:33 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> >> Hi Yegor,
> >>
> >> On Fri, Feb 23, 2018 at 08:26:56AM +0100, Yegor Yefremov wrote:
> >>> My board will be configured via DTS file, that contains an MTD
> >>> partition table [1]. How can it be automatically exported to
> >>> global.inux.bootargs.mtdparts?
> >>>
> >>> [1] https://git.pengutronix.de/cgit/barebox/tree/arch/arm/dts/am335x-baltos-minimal.dts#n217
> >>
> >> Why would you want to do that? You are not going to start an ancient
> >> kernel with ATAG support, are you?
> >
> > So far I'm using ancient LTS 3.18.x kernel with this DTS [1] and
> > packaging it via FIT.
> >
> > [1] https://github.com/visionsystemsgmbh/onrisc_br_bsp/blob/master/board/vscom/dts/3.15/onrisc-baltos-ir-5221.dts
> 
> I've installed dtc and dumped my loaded DTB in Linux:
> 
>                      nand@0,0 {
>                                 reg = <0x0 0x0 0x4>;
>                                 gpmc,we-off-ns = <0x28>;
>                                 gpmc,oe-on-ns = <0x0>;
>                                 gpmc,device-nand = "true";
>                                 gpmc,cycle2cycle-delay-ns = <0x0>;
>                                 gpmc,wr-access-ns = <0x28>;
>                                 gpmc,wr-data-mux-bus-ns = <0x0>;
>                                 gpmc,adv-rd-off-ns = <0x22>;
>                                 gpmc,oe-off-ns = <0x36>;
>                                 gpmc,clk-activation-ns = <0x0>;
>                                 gpmc,wait-on-write = "true";
>                                 elm_id = <0x42>;
>                                 ti,nand-ecc-opt = "bch8";
>                                 gpmc,adv-on-ns = <0x6>;
>                                 gpmc,adv-wr-off-ns = <0x2c>;
>                                 ti,nand-xfer-type = "prefetch-polled";
>                                 gpmc,wait-monitoring-ns = <0x0>;
>                                 nand-bus-width = <0x8>;
>                                 gpmc,device-width = <0x1>;
>                                 gpmc,cs-rd-off-ns = <0x2c>;
>                                 gpmc,rd-cycle-ns = <0x52>;
>                                 #address-cells = <0x1>;
>                                 gpmc,bus-turnaround-ns = <0x0>;
>                                 gpmc,cs-on-ns = <0x0>;
>                                 gpmc,we-on-ns = <0x0>;
>                                 #size-cells = <0x1>;
>                                 gpmc,wait-on-read = "true";
>                                 gpmc,wr-cycle-ns = <0x52>;
>                                 gpmc,access-ns = <0x40>;
>                                 gpmc,sync-clk-ps = <0x0>;
>                                 gpmc,cs-wr-off-ns = <0x2c>;
> 
>                                 partitions {
>                                         compatible = "fixed-partitions";
>                                         #addres-cells = <0x1>;
>                                         #size-cells = <0x1>;
> 
>                                         partition@260000 {
>                                                 reg = <0x260000 0xfda0000>;
>                                                 label = "UBI";
>                                         };
> 
>                                         partition@0 {
>                                                 reg = <0x0 0x20000>;
>                                                 label = "SPL";
>                                         };
> 
>                                         partition@20000 {
>                                                 reg = <0x20000 0x20000>;
>                                                 label = "SPL.backup1";
>                                         };
> 
>                                         partition@40000 {
>                                                 reg = <0x40000 0x20000>;
>                                                 label = "SPL.backup2";
>                                         };
> 
>                                         partition@60000 {
>                                                 reg = <0x60000 0x20000>;
>                                                 label = "SPL.backup3";
>                                         };
> 
>                                         partition@80000 {
>                                                 reg = <0x80000 0x1e0000>;
>                                                 label = "u-boot";
>                                         };
>                                 };
>                         };
> 
> Somehow UBI partition is now the first partition and thus other
> partitions were not parsed. Cat /proc/mtd says nothing and I have only
> /dev/mtd0.

The partition ordering is strange, but not your problem. You only have
mtd0 because the old Kernel doesn't recognize any partition table at
all, note the additional partitions{} subnode which is only recognized
by newer kernels. You have to set global.of_partition_binding="legacy".

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-02-23  8:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23  7:26 Yegor Yefremov
2018-02-23  7:33 ` Sascha Hauer
2018-02-23  7:39   ` Yegor Yefremov
2018-02-23  7:52     ` Yegor Yefremov
2018-02-23  8:04       ` Sascha Hauer [this message]
2018-02-23  8:10         ` Yegor Yefremov

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=20180223080402.zhx2klwm7jmmnght@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=yegorslists@googlemail.com \
    /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