mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* linux.bootargs: export mtdparts from DTS
@ 2018-02-23  7:26 Yegor Yefremov
  2018-02-23  7:33 ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov @ 2018-02-23  7:26 UTC (permalink / raw)
  To: barebox

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

Yegor

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux.bootargs: export mtdparts from DTS
  2018-02-23  7:26 linux.bootargs: export mtdparts from DTS Yegor Yefremov
@ 2018-02-23  7:33 ` Sascha Hauer
  2018-02-23  7:39   ` Yegor Yefremov
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2018-02-23  7:33 UTC (permalink / raw)
  To: Yegor Yefremov; +Cc: barebox

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?

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux.bootargs: export mtdparts from DTS
  2018-02-23  7:33 ` Sascha Hauer
@ 2018-02-23  7:39   ` Yegor Yefremov
  2018-02-23  7:52     ` Yegor Yefremov
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov @ 2018-02-23  7:39 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

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

Yegor

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux.bootargs: export mtdparts from DTS
  2018-02-23  7:39   ` Yegor Yefremov
@ 2018-02-23  7:52     ` Yegor Yefremov
  2018-02-23  8:04       ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov @ 2018-02-23  7:52 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

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.

Yegor

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux.bootargs: export mtdparts from DTS
  2018-02-23  7:52     ` Yegor Yefremov
@ 2018-02-23  8:04       ` Sascha Hauer
  2018-02-23  8:10         ` Yegor Yefremov
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2018-02-23  8:04 UTC (permalink / raw)
  To: Yegor Yefremov; +Cc: barebox

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux.bootargs: export mtdparts from DTS
  2018-02-23  8:04       ` Sascha Hauer
@ 2018-02-23  8:10         ` Yegor Yefremov
  0 siblings, 0 replies; 6+ messages in thread
From: Yegor Yefremov @ 2018-02-23  8:10 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Fri, Feb 23, 2018 at 9:04 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 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".

I see now. It is working with the legacy option.

Thanks.

Yegor

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-23  8:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23  7:26 linux.bootargs: export mtdparts from DTS 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
2018-02-23  8:10         ` Yegor Yefremov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox