All of lore.kernel.org
 help / color / mirror / Atom feed
* core command line parameters with dt
@ 2014-08-01 13:55 Priebe, Sebastian
       [not found] ` <E70AF999396FDF4EAE40E195B84709611F8471EA-VHQhki0MIenpQFNhCJRnZ0Yy6alPw7Wn0MAMd6zgKLc@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Priebe, Sebastian @ 2014-08-01 13:55 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA

Hello,

I want to use kernel command line parameters within my machine file.
If I use the __setup macro I get the following build error:
error: __setup_str_model_bt causes a section type conflict with myboard_dt_board_compat

static const char *myboard_dt_board_compat[] __initconst = {
        "vendor,model",
        NULL
};

How can I use command line parameters with device trees?

Greetings
Sebastian Priebe




==========================================
CADCON
Ingenieurgesellschaft mbH & Co. KG
Geschaeftsfuehrer: Robert Bauer, Andreas Gundel
Sitz der Gesellschaft: D-86368 Gersthofen
Registergericht: Amtsgericht Augsburg HRA 14521
==========================================


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: core command line parameters with dt
       [not found] ` <E70AF999396FDF4EAE40E195B84709611F8471EA-VHQhki0MIenpQFNhCJRnZ0Yy6alPw7Wn0MAMd6zgKLc@public.gmane.org>
@ 2014-08-01 14:12   ` Mark Rutland
  2014-08-01 14:39     ` AW: " Priebe, Sebastian
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Rutland @ 2014-08-01 14:12 UTC (permalink / raw)
  To: Priebe, Sebastian; +Cc: devicetree-u79uwXL29TY76Z2rM5mHXA

On Fri, Aug 01, 2014 at 02:55:42PM +0100, Priebe, Sebastian wrote:
> Hello,
> 
> I want to use kernel command line parameters within my machine file.
> If I use the __setup macro I get the following build error:
> error: __setup_str_model_bt causes a section type conflict with myboard_dt_board_compat
> 
> static const char *myboard_dt_board_compat[] __initconst = {
>         "vendor,model",
>         NULL
> };

You have a section mismatch because your code evidently doesn't live in
an init section, but is trying to access data which does. The fact that
the data happens to be a list of compatible strings is irrelevant, and
this is in no way related to dt.

Figure out whether your function should live in an init section or if
the data should not. Make sure that you don't reference anything in init
section from anything else which does not itself live in an init
section. That will solve your build issue.

The name of the function sounds suspicious to begin with from a DT
perspective. You shouldn't need to override DT properties from the
command line.

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* AW: core command line parameters with dt
  2014-08-01 14:12   ` Mark Rutland
@ 2014-08-01 14:39     ` Priebe, Sebastian
  0 siblings, 0 replies; 3+ messages in thread
From: Priebe, Sebastian @ 2014-08-01 14:39 UTC (permalink / raw)
  To: Mark Rutland; +Cc: devicetree-u79uwXL29TY76Z2rM5mHXA

Hello Mark,

thank you for your advice. I figured out what I did wrong now.
And my function has "bt" in its name and not "dt". So, don't worry, I don't mess with the DT there.

Greetings
Sebastian Priebe





==========================================
CADCON
Ingenieurgesellschaft mbH & Co. KG
Geschaeftsfuehrer: Robert Bauer, Andreas Gundel
Sitz der Gesellschaft: D-86368 Gersthofen
Registergericht: Amtsgericht Augsburg HRA 14521
==========================================

-----Ursprüngliche Nachricht-----
Von: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:devicetree-owner-u79uwXL29TY@public.gmane.orgnel.org] Im Auftrag von Mark Rutland
Gesendet: Freitag, 1. August 2014 16:12
An: Priebe, Sebastian
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Betreff: Re: core command line parameters with dt

On Fri, Aug 01, 2014 at 02:55:42PM +0100, Priebe, Sebastian wrote:
> Hello,
>
> I want to use kernel command line parameters within my machine file.
> If I use the __setup macro I get the following build error:
> error: __setup_str_model_bt causes a section type conflict with
> myboard_dt_board_compat
>
> static const char *myboard_dt_board_compat[] __initconst = {
>         "vendor,model",
>         NULL
> };

You have a section mismatch because your code evidently doesn't live in an init section, but is trying to access data which does. The fact that the data happens to be a list of compatible strings is irrelevant, and this is in no way related to dt.

Figure out whether your function should live in an init section or if the data should not. Make sure that you don't reference anything in init section from anything else which does not itself live in an init section. That will solve your build issue.

The name of the function sounds suspicious to begin with from a DT perspective. You shouldn't need to override DT properties from the command line.

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-08-01 14:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 13:55 core command line parameters with dt Priebe, Sebastian
     [not found] ` <E70AF999396FDF4EAE40E195B84709611F8471EA-VHQhki0MIenpQFNhCJRnZ0Yy6alPw7Wn0MAMd6zgKLc@public.gmane.org>
2014-08-01 14:12   ` Mark Rutland
2014-08-01 14:39     ` AW: " Priebe, Sebastian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.