mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Re: [HELP] Barebox porting
@ 2019-01-21 12:34 Seraphim Dolbilov
  2019-01-21 14:28 ` Seraphim Dolbilov
  2019-01-21 15:12 ` Sascha Hauer
  0 siblings, 2 replies; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-21 12:34 UTC (permalink / raw)
  To: Barebox List

Hi friends,

I need some help with barebox environment management. I've added env/config file
to arch/arm/myboard/ directory, fixed Makefile with `bbenv-y += env` string, but
this config file doesn't apply on barebox boots. What can be the reason for such a problem?

--
Yours sincerely,
Seraphim Dolbilov

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

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

* Re: [HELP] Barebox porting
  2019-01-21 12:34 [HELP] Barebox porting Seraphim Dolbilov
@ 2019-01-21 14:28 ` Seraphim Dolbilov
  2019-01-21 15:12 ` Sascha Hauer
  1 sibling, 0 replies; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-21 14:28 UTC (permalink / raw)
  To: Barebox List

Dear friends,

Still cannot make my environment be compiled into barebox final image.
Maybe I missed something? Which config parameters should be set
to do this?..


-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-21 12:34 [HELP] Barebox porting Seraphim Dolbilov
  2019-01-21 14:28 ` Seraphim Dolbilov
@ 2019-01-21 15:12 ` Sascha Hauer
  2019-01-21 15:35   ` Seraphim Dolbilov
  2019-01-21 16:35   ` Sam Ravnborg
  1 sibling, 2 replies; 38+ messages in thread
From: Sascha Hauer @ 2019-01-21 15:12 UTC (permalink / raw)
  To: Seraphim Dolbilov; +Cc: Barebox List

On Mon, Jan 21, 2019 at 03:34:49PM +0300, Seraphim Dolbilov wrote:
> Hi friends,
> 
> I need some help with barebox environment management. I've added env/config file
> to arch/arm/myboard/ directory, fixed Makefile with `bbenv-y += env` string, but
> this config file doesn't apply on barebox boots. What can be the reason for such a problem?

with bbenv-y it is only compiled it, but remains unused. You have to add
it using defaultenv_append_directory().

Regards
 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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-21 15:12 ` Sascha Hauer
@ 2019-01-21 15:35   ` Seraphim Dolbilov
  2019-01-21 16:35   ` Sam Ravnborg
  1 sibling, 0 replies; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-21 15:35 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

21.01.2019, 18:12, "Sascha Hauer" <s.hauer@pengutronix.de>:
> with bbenv-y it is only compiled it, but remains unused. You have to add
> it using defaultenv_append_directory().

Well, it seems, I've solved this problem by adding path to my board's env to
CONFIG_DEFAULT_ENVIRONMENT_PATH (without bbenv-y entry in Makefile). 
Is it a right way, or I shall compile env into binary manually somehow?
If use defaultenv_append_directory(), where exactly it must be used?

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-21 15:12 ` Sascha Hauer
  2019-01-21 15:35   ` Seraphim Dolbilov
@ 2019-01-21 16:35   ` Sam Ravnborg
  2019-01-21 16:43     ` Seraphim Dolbilov
  2019-01-22  6:33     ` Sascha Hauer
  1 sibling, 2 replies; 38+ messages in thread
From: Sam Ravnborg @ 2019-01-21 16:35 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

On Mon, Jan 21, 2019 at 04:12:32PM +0100, Sascha Hauer wrote:
> On Mon, Jan 21, 2019 at 03:34:49PM +0300, Seraphim Dolbilov wrote:
> > Hi friends,
> > 
> > I need some help with barebox environment management. I've added env/config file
> > to arch/arm/myboard/ directory, fixed Makefile with `bbenv-y += env` string, but
> > this config file doesn't apply on barebox boots. What can be the reason for such a problem?
> 
> with bbenv-y it is only compiled it, but remains unused. You have to add
> it using defaultenv_append_directory().

Or even better I think to add the path to:
DEFAULT_ENVIRONMENT_PATH

See sama5d4_xplained as an example.

	Sam

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

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

* Re: [HELP] Barebox porting
  2019-01-21 16:35   ` Sam Ravnborg
@ 2019-01-21 16:43     ` Seraphim Dolbilov
  2019-01-22  6:33     ` Sascha Hauer
  1 sibling, 0 replies; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-21 16:43 UTC (permalink / raw)
  To: Sam Ravnborg, Sascha Hauer; +Cc: Barebox List



21.01.2019, 19:35, "Sam Ravnborg" <sam@ravnborg.org>:
> Or even better I think to add the path to:
> DEFAULT_ENVIRONMENT_PATH

Got that. However this option seems to be not so universal as if env
is linked straight to binary image.

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-21 16:35   ` Sam Ravnborg
  2019-01-21 16:43     ` Seraphim Dolbilov
@ 2019-01-22  6:33     ` Sascha Hauer
  2019-01-22 14:07       ` Seraphim Dolbilov
  1 sibling, 1 reply; 38+ messages in thread
From: Sascha Hauer @ 2019-01-22  6:33 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Barebox List

On Mon, Jan 21, 2019 at 05:35:03PM +0100, Sam Ravnborg wrote:
> On Mon, Jan 21, 2019 at 04:12:32PM +0100, Sascha Hauer wrote:
> > On Mon, Jan 21, 2019 at 03:34:49PM +0300, Seraphim Dolbilov wrote:
> > > Hi friends,
> > > 
> > > I need some help with barebox environment management. I've added env/config file
> > > to arch/arm/myboard/ directory, fixed Makefile with `bbenv-y += env` string, but
> > > this config file doesn't apply on barebox boots. What can be the reason for such a problem?
> > 
> > with bbenv-y it is only compiled it, but remains unused. You have to add
> > it using defaultenv_append_directory().
> 
> Or even better I think to add the path to:
> DEFAULT_ENVIRONMENT_PATH

This only works when you want to add something to the environment for
all boards. When you only want to change the environment for a single
board then defaultenv_append_directory() is the right choice.

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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-22  6:33     ` Sascha Hauer
@ 2019-01-22 14:07       ` Seraphim Dolbilov
  2019-01-22 14:42         ` Sascha Hauer
  0 siblings, 1 reply; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-22 14:07 UTC (permalink / raw)
  To: Sascha Hauer, Sam Ravnborg; +Cc: Barebox List

Hi, Sascha

22.01.2019, 09:33, "Sascha Hauer" <s.hauer@pengutronix.de>:
> This only works when you want to add something to the environment for
> all boards. When you only want to change the environment for a single
> board then defaultenv_append_directory() is the right choice.

Thanks, did so! However, environment is not recompiled on change,
so I have to do `make clean && make` in order to get the newest one.
Is it a bug or an expected behaviour?

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-22 14:07       ` Seraphim Dolbilov
@ 2019-01-22 14:42         ` Sascha Hauer
  2019-01-22 16:12           ` Seraphim Dolbilov
  0 siblings, 1 reply; 38+ messages in thread
From: Sascha Hauer @ 2019-01-22 14:42 UTC (permalink / raw)
  To: Seraphim Dolbilov; +Cc: Barebox List, Sam Ravnborg

On Tue, Jan 22, 2019 at 05:07:23PM +0300, Seraphim Dolbilov wrote:
> Hi, Sascha
> 
> 22.01.2019, 09:33, "Sascha Hauer" <s.hauer@pengutronix.de>:
> > This only works when you want to add something to the environment for
> > all boards. When you only want to change the environment for a single
> > board then defaultenv_append_directory() is the right choice.
> 
> Thanks, did so! However, environment is not recompiled on change,
> so I have to do `make clean && make` in order to get the newest one.
> Is it a bug or an expected behaviour?

It's an expected bug ;)

I know this behaviour and it's definitely a bug, but unfortunately I
have no idea how to fix this.

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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-22 14:42         ` Sascha Hauer
@ 2019-01-22 16:12           ` Seraphim Dolbilov
  2019-01-23  9:11             ` Sascha Hauer
  0 siblings, 1 reply; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-22 16:12 UTC (permalink / raw)
  To: Sascha Hauer, Barebox List

How can I get an output of a shell command in hush shell?
Backticks and $() cannot do not work :(

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-22 16:12           ` Seraphim Dolbilov
@ 2019-01-23  9:11             ` Sascha Hauer
  2019-01-23 10:01               ` Seraphim Dolbilov
  0 siblings, 1 reply; 38+ messages in thread
From: Sascha Hauer @ 2019-01-23  9:11 UTC (permalink / raw)
  To: Seraphim Dolbilov; +Cc: Barebox List

On Tue, Jan 22, 2019 at 07:12:16PM +0300, Seraphim Dolbilov wrote:
> How can I get an output of a shell command in hush shell?
> Backticks and $() cannot do not work :(

You can't get the output of a command, that's not implemented. Some
commands work around this in the way that you can pass a variable name
on the commandline and after exit the variable will be filled with the
desired result. the "readline" command is an example for this.

What are you trying to archieve? Often the desire to parse the output of
a command is a sign that you are stretching the barebox scripting
capabilities beyond their limits. Some piece of C code is doing the job
in a much more robust way.

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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-23  9:11             ` Sascha Hauer
@ 2019-01-23 10:01               ` Seraphim Dolbilov
  2019-01-23 10:17                 ` Sascha Hauer
  0 siblings, 1 reply; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-23 10:01 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

23.01.2019, 12:11, "Sascha Hauer" <s.hauer@pengutronix.de>:
> What are you trying to archieve?

My board contains mcp79411 - it's an I2C RTC with EEPROM, which contains
global-registered MAC address. I want this MAC address to be read by Barebox
and passed to Linux kernel FEC driver through bootargs. I was trying to find
solution for shell, but 've already realized that it's impossible to get command's
output into env variable, so I've to implement it right in board's code.

Moreover, I had an idea of my device's image having capability to be updated 
from USB drive using memcpy command (flashing image file from USB drive right
away into EMMC), but I also cannot check integrity of image flie from 
Barebox's shell, due to its inability to get command's output.

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-23 10:01               ` Seraphim Dolbilov
@ 2019-01-23 10:17                 ` Sascha Hauer
  2019-01-25 12:18                   ` Seraphim Dolbilov
  0 siblings, 1 reply; 38+ messages in thread
From: Sascha Hauer @ 2019-01-23 10:17 UTC (permalink / raw)
  To: Seraphim Dolbilov; +Cc: Barebox List

On Wed, Jan 23, 2019 at 01:01:46PM +0300, Seraphim Dolbilov wrote:
> 23.01.2019, 12:11, "Sascha Hauer" <s.hauer@pengutronix.de>:
> > What are you trying to archieve?
> 
> My board contains mcp79411 - it's an I2C RTC with EEPROM, which contains
> global-registered MAC address. I want this MAC address to be read by Barebox
> and passed to Linux kernel FEC driver through bootargs. I was trying to find
> solution for shell, but 've already realized that it's impossible to get command's
> output into env variable, so I've to implement it right in board's code.

Indeed, that's better.

You shouldn't use bootargs to pass the MAC address though. There's
of_eth_register_ethaddr() which you can pass the pointer to the fec
device tree node and the MAC address you found in the EEPROM. The rest
is done automatically by barebox.

> 
> Moreover, I had an idea of my device's image having capability to be updated 
> from USB drive using memcpy command (flashing image file from USB drive right
> away into EMMC), but I also cannot check integrity of image flie from 
> Barebox's shell, due to its inability to get command's output.

How is the integrity checked? Some md5sum or something? Anyway, you're
better off doing that in C.

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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-23 10:17                 ` Sascha Hauer
@ 2019-01-25 12:18                   ` Seraphim Dolbilov
  2019-01-25 14:11                     ` Seraphim Dolbilov
  2019-01-28  8:44                     ` [HELP] Barebox porting Sascha Hauer
  0 siblings, 2 replies; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-25 12:18 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

Hello Sascha,

23.01.2019, 13:17, "Sascha Hauer" <s.hauer@pengutronix.de>:
> How is the integrity checked? Some md5sum or something? Anyway, you're
> better off doing that in C.

Well, how can I call C functions from shell without implementing own shell command?

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-25 12:18                   ` Seraphim Dolbilov
@ 2019-01-25 14:11                     ` Seraphim Dolbilov
  2019-01-28  8:46                       ` Sascha Hauer
  2019-01-28  8:44                     ` [HELP] Barebox porting Sascha Hauer
  1 sibling, 1 reply; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-25 14:11 UTC (permalink / raw)
  To: Barebox List

Hello, friends!

I'm interested if there is any internal Barebox convention about
return types and values of initcall functions. What shall return
my initcall if I want to stop booting and display error message?

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-25 12:18                   ` Seraphim Dolbilov
  2019-01-25 14:11                     ` Seraphim Dolbilov
@ 2019-01-28  8:44                     ` Sascha Hauer
  1 sibling, 0 replies; 38+ messages in thread
From: Sascha Hauer @ 2019-01-28  8:44 UTC (permalink / raw)
  To: Seraphim Dolbilov; +Cc: Barebox List

On Fri, Jan 25, 2019 at 03:18:04PM +0300, Seraphim Dolbilov wrote:
> Hello Sascha,
> 
> 23.01.2019, 13:17, "Sascha Hauer" <s.hauer@pengutronix.de>:
> > How is the integrity checked? Some md5sum or something? Anyway, you're
> > better off doing that in C.
> 
> Well, how can I call C functions from shell without implementing own shell command?

Well you can't, but maybe I misunderstand you.

What I tried to express is that whenever you implement something complex
in barebox shell, you are better off going a step back, look what you
are trying to archieve and implement that in C.
Doing correct error handling in a limited shell is hard and printing
useful error messages even harder.

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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-25 14:11                     ` Seraphim Dolbilov
@ 2019-01-28  8:46                       ` Sascha Hauer
  2019-02-04 10:13                         ` [HELP] DT isues Seraphim Dolbilov
  0 siblings, 1 reply; 38+ messages in thread
From: Sascha Hauer @ 2019-01-28  8:46 UTC (permalink / raw)
  To: Seraphim Dolbilov; +Cc: Barebox List

On Fri, Jan 25, 2019 at 05:11:01PM +0300, Seraphim Dolbilov wrote:
> Hello, friends!
> 
> I'm interested if there is any internal Barebox convention about
> return types and values of initcall functions. What shall return
> my initcall if I want to stop booting and display error message?

An error message will be printed whenever you return an initcall with an
error. barebox won't stop then, but instead continues. This is done to
be able to tell the user something went wrong without adding many
printfs. If your error is so severe that you can't continue you have to
use panic() instead.

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] 38+ messages in thread

* Re: [HELP] DT isues
  2019-01-28  8:46                       ` Sascha Hauer
@ 2019-02-04 10:13                         ` Seraphim Dolbilov
  2019-02-05 11:52                           ` Sascha Hauer
  0 siblings, 1 reply; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-02-04 10:13 UTC (permalink / raw)
  To: Barebox List

Hello friends,

I'm trying to modify DT dynamically while Barebox is running, but it
doesn't work the way I expect. E.g. I use of_delete_node(), but `of_dump`
shows all nodes that are expected to be deleted, so the corresponding 
devices are available both from Barebox and Linux.

So is there any workaround here?

-- 
Yours sincerely,
Seraphim Dolbilov



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

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

* Re: [HELP] DT isues
  2019-02-04 10:13                         ` [HELP] DT isues Seraphim Dolbilov
@ 2019-02-05 11:52                           ` Sascha Hauer
  2019-02-05 13:45                             ` Seraphim Dolbilov
  0 siblings, 1 reply; 38+ messages in thread
From: Sascha Hauer @ 2019-02-05 11:52 UTC (permalink / raw)
  To: Seraphim Dolbilov; +Cc: Barebox List

On Mon, Feb 04, 2019 at 01:13:42PM +0300, Seraphim Dolbilov wrote:
> Hello friends,
> 
> I'm trying to modify DT dynamically while Barebox is running, but it
> doesn't work the way I expect. E.g. I use of_delete_node(), but `of_dump`
> shows all nodes that are expected to be deleted, so the corresponding 
> devices are available both from Barebox and Linux.

I have no indication that of_delete_node() doesn't work. Are you sure
you are deleting nodes from the same tree that you actually show with
of_dump?

Note that of_delete_node() only deletes from the current barebox device
tree. When you start Linux with another devicetree then the node will
be there again of course. If you want to delete a node from the Linux
Device tree then have a look at the -f option to the of_node command.

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] 38+ messages in thread

* Re: [HELP] DT isues
  2019-02-05 11:52                           ` Sascha Hauer
@ 2019-02-05 13:45                             ` Seraphim Dolbilov
  0 siblings, 0 replies; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-02-05 13:45 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List



05.02.2019, 14:52, "Sascha Hauer" <s.hauer@pengutronix.de>:
> I have no indication that of_delete_node() doesn't work. Are you sure
> you are deleting nodes from the same tree that you actually show with
> of_dump?
>
> Note that of_delete_node() only deletes from the current barebox device
> tree. When you start Linux with another devicetree then the node will
> be there again of course. If you want to delete a node from the Linux
> Device tree then have a look at the -f option to the of_node command.

Sorry, it was my fault, everything is OK. I have been calling it from block 
of code which was never conditionally reached.
-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-18 15:14                     ` Sascha Hauer
@ 2019-01-18 16:30                       ` Seraphim Dolbilov
  0 siblings, 0 replies; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-18 16:30 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List



18.01.2019, 18:14, "Sascha Hauer" <s.hauer@pengutronix.de>:
> Note for device tree based boards you should turn off
> CONFIG_CONSOLE_ACTIVATE_FIRST as the console will be activated by the
> /chosen/stdout-path property.

So I need to chose CONFIG_CONSOLE_ACTIVATE_NONE parameter?

18.01.2019, 18:14, "Sascha Hauer" <s.hauer@pengutronix.de>:
>Maybe this is your problem already or are really all four
> consoles activated?

Sorry, no, only 2 of them

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-18 15:01                   ` Seraphim Dolbilov
@ 2019-01-18 15:14                     ` Sascha Hauer
  2019-01-18 16:30                       ` Seraphim Dolbilov
  0 siblings, 1 reply; 38+ messages in thread
From: Sascha Hauer @ 2019-01-18 15:14 UTC (permalink / raw)
  To: Seraphim Dolbilov; +Cc: Barebox List

Hi Seraphim,

On Fri, Jan 18, 2019 at 06:01:28PM +0300, Seraphim Dolbilov wrote:
> Dear friends, 
> I faced a strange problem with serial ports on my board. I have 4 imx-uart's enabled with DT,
> and barebox console is available on all of them even when:
> - CONFIG_CONSOLE_ACTIVATE_FIRST is set Y,
> - CONFIG_CONSOLE_ACTIVATE_ALL is set N
> - `chosen` section of my DTS contains `stdout-path = &uart1;` string.
> 
> Is it a bug or an expected behaviour?

No, this shouldn't happen.

Note for device tree based boards you should turn off
CONFIG_CONSOLE_ACTIVATE_FIRST as the console will be activated by the
/chosen/stdout-path property. With CONFIG_CONSOLE_ACTIVATE_FIRST
enabled it can happen that the first to be registered console gets
activated by this option and another one from the /chosen/stdout-path
property. Maybe this is your problem already or are really all four
consoles activated?

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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-17 21:06                 ` Sascha Hauer
@ 2019-01-18 15:01                   ` Seraphim Dolbilov
  2019-01-18 15:14                     ` Sascha Hauer
  0 siblings, 1 reply; 38+ messages in thread
From: Seraphim Dolbilov @ 2019-01-18 15:01 UTC (permalink / raw)
  To: Barebox List

Dear friends, 
I faced a strange problem with serial ports on my board. I have 4 imx-uart's enabled with DT,
and barebox console is available on all of them even when:
- CONFIG_CONSOLE_ACTIVATE_FIRST is set Y,
- CONFIG_CONSOLE_ACTIVATE_ALL is set N
- `chosen` section of my DTS contains `stdout-path = &uart1;` string.

Is it a bug or an expected behaviour?

-- 
Yours sincerely,
Seraphim Dolbilov



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

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

* Re: [HELP] Barebox porting
  2019-01-17 16:26               ` Sam Ravnborg
@ 2019-01-17 21:06                 ` Sascha Hauer
  2019-01-18 15:01                   ` Seraphim Dolbilov
  0 siblings, 1 reply; 38+ messages in thread
From: Sascha Hauer @ 2019-01-17 21:06 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Barebox List,
	Серафим
	Долбилов

On Thu, Jan 17, 2019 at 05:26:18PM +0100, Sam Ravnborg wrote:
> Hi Serapim
> 
> > BTW, am I right to suppose that all functions in `obj-y` marked
> > as `initcall` and `exitcall` are invoked in the beginning and in the
> > end of barebox main code respectively?
> Enabel initcall debug - then you can see when they are called.
> It is a very usefull debug tool.
> Use the .map file to go from an address to a function.

Or enable CONFIG_KALLSYMS, then the name of the function is printed.

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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-17 14:48             ` Серафим Долбилов
@ 2019-01-17 16:26               ` Sam Ravnborg
  2019-01-17 21:06                 ` Sascha Hauer
  0 siblings, 1 reply; 38+ messages in thread
From: Sam Ravnborg @ 2019-01-17 16:26 UTC (permalink / raw)
  To: Серафим
	Долбилов
  Cc: Barebox List

Hi Serapim

> BTW, am I right to suppose that all functions in `obj-y` marked
> as `initcall` and `exitcall` are invoked in the beginning and in the
> end of barebox main code respectively?
Enabel initcall debug - then you can see when they are called.
It is a very usefull debug tool.
Use the .map file to go from an address to a function.


Note: Please try to limit your line length in your mails.
This makes replying simpler.

	Sam

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

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

* Re: [HELP] Barebox porting
  2019-01-17 13:28           ` Sascha Hauer
  2019-01-17 13:43             ` Roland Hieber
@ 2019-01-17 14:48             ` Серафим Долбилов
  2019-01-17 16:26               ` Sam Ravnborg
  1 sibling, 1 reply; 38+ messages in thread
From: Серафим Долбилов @ 2019-01-17 14:48 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List



17.01.2019, 16:28, "Sascha Hauer" <s.hauer@pengutronix.de>:
> This is what barebox does by default.

Happy ya! Thanx :)

> PBL is for PreBootLoader. Yes, it's a self extracting image. During
> building of barebox a single barebox binary and one to many PBL images
> are built. Each PBL image is for one specific board. It's the PBL which
> actually knows the board type and it'll pass the device tree to the
> barebox binary to let it know which hardware it is running on. This is
> all done to build barebox for multiple boards in a single go.

Well, thanks a lot for such detailed explanation!

I was just trying to find the source of problems with SMSC 8720A (ethernet PHY) and IMX's USBOTG devices detection. They are mapped in my DTS in a pretty correct way (Linux detects them successfully), but are inaccessible from the running Barebox, though drivers for them are enabled in my defconfig... Maybe some specific configuration is needed?

BTW, am I right to suppose that all functions in `obj-y` marked as `initcall` and `exitcall` are invoked in the beginning and in the end of barebox main code respectively?

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-17 13:28           ` Sascha Hauer
@ 2019-01-17 13:43             ` Roland Hieber
  2019-01-17 14:48             ` Серафим Долбилов
  1 sibling, 0 replies; 38+ messages in thread
From: Roland Hieber @ 2019-01-17 13:43 UTC (permalink / raw)
  To: Серафим
	Долбилов
  Cc: Barebox List

On Thu, Jan 17, 2019 at 02:28:45PM +0100, Sascha Hauer wrote:
> On Thu, Jan 17, 2019 at 03:44:22PM +0300, Серафим Долбилов wrote:
> > Reading Barebox's source code I found that `examle.dts` (e.g.) becomes
> > `example.dtb`, then `example.dtb.o`, and is finally linked into PBL,
> > being "catched" in lwl-code by `extern char __dtb_example_start[];`
> > symbol. Then this symbol is used in `barebox_arm_entry()` function,
> > etc... So I just want to know, why do we link DT into PBL, and what is
> > PBL exactly, if not an self-unpacking-and-relocating image?
> 
> PBL is for PreBootLoader. Yes, it's a self extracting image. During
> building of barebox a single barebox binary and one to many PBL images
> are built. Each PBL image is for one specific board. It's the PBL which
> actually knows the board type and it'll pass the device tree to the
> barebox binary to let it know which hardware it is running on. This is
> all done to build barebox for multiple boards in a single go.

There are also these two section in the docs, if it helps:

https://www.barebox.org/doc/latest/user/pbl.html
https://www.barebox.org/doc/latest/user/multi-image.html

 - Roland

-- 
Roland Hieber                     | r.hieber@pengutronix.de     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-17 12:44         ` Серафим Долбилов
@ 2019-01-17 13:28           ` Sascha Hauer
  2019-01-17 13:43             ` Roland Hieber
  2019-01-17 14:48             ` Серафим Долбилов
  0 siblings, 2 replies; 38+ messages in thread
From: Sascha Hauer @ 2019-01-17 13:28 UTC (permalink / raw)
  To: Серафим
	Долбилов
  Cc: Barebox List

On Thu, Jan 17, 2019 at 03:44:22PM +0300, Серафим Долбилов wrote:
> 17.01.2019, 10:59, "Sascha Hauer" <s.hauer@pengutronix.de>:
> > You can have any devicetree by adding it to arch/arm/dts/Makefile:
> >
> > pbl-dtb-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o
> >
> > Then add a declaration for it (replace beginning of filename with
> > __dtb_, .dtb.o with _start and '-' with '_'):
> >
> > extern char __dtb_imx51_babbage_start[];
> >
> > And then you can use it. Use obj-dtb-$(CONFIG_MACH_FREESCALE_MX51_PDK)
> > when you want to have it in the full barebox image rather than in the
> > PBL.
> 
> In which cases do I need to link it to the full image? 
> 
> Frankly speaking, I just want DT to be parsed by the bootloader (in
> order to detect such devices as USB, ethernet PHY, etc, and run their
> drivers) and then passed to Linux kernel (when boot command is
> invoked). 
> So all my questions about DT are coming from around this problem.

This is what barebox does by default.

> 
> Reading Barebox's source code I found that `examle.dts` (e.g.) becomes
> `example.dtb`, then `example.dtb.o`, and is finally linked into PBL,
> being "catched" in lwl-code by `extern char __dtb_example_start[];`
> symbol. Then this symbol is used in `barebox_arm_entry()` function,
> etc... So I just want to know, why do we link DT into PBL, and what is
> PBL exactly, if not an self-unpacking-and-relocating image?

PBL is for PreBootLoader. Yes, it's a self extracting image. During
building of barebox a single barebox binary and one to many PBL images
are built. Each PBL image is for one specific board. It's the PBL which
actually knows the board type and it'll pass the device tree to the
barebox binary to let it know which hardware it is running on. This is
all done to build barebox for multiple boards in a single go.

Regards
 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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-17  7:59       ` Sascha Hauer
@ 2019-01-17 12:44         ` Серафим Долбилов
  2019-01-17 13:28           ` Sascha Hauer
  0 siblings, 1 reply; 38+ messages in thread
From: Серафим Долбилов @ 2019-01-17 12:44 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

17.01.2019, 10:59, "Sascha Hauer" <s.hauer@pengutronix.de>:
> You can have any devicetree by adding it to arch/arm/dts/Makefile:
>
> pbl-dtb-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o
>
> Then add a declaration for it (replace beginning of filename with
> __dtb_, .dtb.o with _start and '-' with '_'):
>
> extern char __dtb_imx51_babbage_start[];
>
> And then you can use it. Use obj-dtb-$(CONFIG_MACH_FREESCALE_MX51_PDK)
> when you want to have it in the full barebox image rather than in the
> PBL.

In which cases do I need to link it to the full image? 

Frankly speaking, I just want DT to be parsed by the bootloader (in order to detect such devices as USB, ethernet PHY, etc, and run their drivers) and then passed to Linux kernel (when boot command is invoked). 
So all my questions about DT are coming from around this problem.

Reading Barebox's source code I found that `examle.dts` (e.g.) becomes `example.dtb`, then `example.dtb.o`, and is finally linked into PBL, being "catched" in lwl-code by `extern char __dtb_example_start[];` symbol. Then this symbol is used in `barebox_arm_entry()` function, etc... So I just want to know, why do we link DT into PBL, and what is PBL exactly, if not an self-unpacking-and-relocating image?

-- 
Yours sincerely,
Seraphim Dolbilov


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

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

* Re: [HELP] Barebox porting
  2019-01-16 15:59     ` Серафим Долбилов
@ 2019-01-17  7:59       ` Sascha Hauer
  2019-01-17 12:44         ` Серафим Долбилов
  0 siblings, 1 reply; 38+ messages in thread
From: Sascha Hauer @ 2019-01-17  7:59 UTC (permalink / raw)
  To: Серафим
	Долбилов
  Cc: Barebox List

On Wed, Jan 16, 2019 at 06:59:46PM +0300, Серафим Долбилов wrote:
> Is there any another way to link DT to the image besides imx*_barebox_entry(void *boarddata) functions?

You can have any devicetree by adding it to arch/arm/dts/Makefile:

pbl-dtb-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o

Then add a declaration for it (replace beginning of filename with
__dtb_, .dtb.o with _start and '-' with '_'):

extern char __dtb_imx51_babbage_start[];

And then you can use it. Use obj-dtb-$(CONFIG_MACH_FREESCALE_MX51_PDK)
when you want to have it in the full barebox image rather than in the
PBL.

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] 38+ messages in thread

* Re: [HELP] Barebox porting
  2019-01-16 17:28       ` Sam Ravnborg
@ 2019-01-16 18:48         ` Antony Pavlov
  0 siblings, 0 replies; 38+ messages in thread
From: Antony Pavlov @ 2019-01-16 18:48 UTC (permalink / raw)
  To: Sam Ravnborg,
	Серафим
	Долбилов
  Cc: Barebox List

On Wed, 16 Jan 2019 18:28:06 +0100
Sam Ravnborg <sam@ravnborg.org> wrote:

Hi!

> On Wed, Jan 16, 2019 at 06:14:03PM +0300, Серафим Долбилов wrote:
> > 
> > A new portion of questions is ready:)
> > 1. dlmalloc or tlsf - what are pros and cons of each of them?
> 
> Looking at the history I could see that dlmalloc was present since barebox
> was forked from U-boot. So and old implmentation.
> 
> Later tlsf was added, wihtout any explanation why.
> But based on the fact that Jean (who added tlsf) did is when we already
> had dlmalloc I tentatively conclude that tlsf is the better alternative.
> And I can see line of code is less than dlmalloc too - so maybe it is even smaller.
> I would go for tlsf based on the above and not botheting about this anymore.

Please see this Sascha's comment on tlsf:

  http://lists.infradead.org/pipermail/barebox/2011-December/005288.html

At the moment we use tlsf2 in barebox. Please note that there is more recent tlsf3 at github:

  https://github.com/mattconte/tlsf

-- 
Best regards,
  Antony Pavlov

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

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

* Re: [HELP] Barebox porting
  2019-01-16 15:37       ` Серафим Долбилов
@ 2019-01-16 17:29         ` Sam Ravnborg
  0 siblings, 0 replies; 38+ messages in thread
From: Sam Ravnborg @ 2019-01-16 17:29 UTC (permalink / raw)
  To: Серафим
	Долбилов
  Cc: Barebox List

Hi Серафим

On Wed, Jan 16, 2019 at 06:37:08PM +0300, Серафим Долбилов wrote:
> Moreover, it seems that I need some reference about functions I can call from the ENTRY_FUNCTION code...
There is no such reference, but look at what other DT enabled
board support packages do.
And check if the relevant file is part of the PBL build.

With this you should be well covered.

	Sam

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

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

* Re: [HELP] Barebox porting
  2019-01-16 15:14     ` Серафим Долбилов
  2019-01-16 15:37       ` Серафим Долбилов
@ 2019-01-16 17:28       ` Sam Ravnborg
  2019-01-16 18:48         ` Antony Pavlov
  1 sibling, 1 reply; 38+ messages in thread
From: Sam Ravnborg @ 2019-01-16 17:28 UTC (permalink / raw)
  To: Серафим
	Долбилов
  Cc: Barebox List

Hi Серафим.

On Wed, Jan 16, 2019 at 06:14:03PM +0300, Серафим Долбилов wrote:
> 
> A new portion of questions is ready:)
> 1. dlmalloc or tlsf - what are pros and cons of each of them?

Looking at the history I could see that dlmalloc was present since barebox
was forked from U-boot. So and old implmentation.

Later tlsf was added, wihtout any explanation why.
But based on the fact that Jean (who added tlsf) did is when we already
had dlmalloc I tentatively conclude that tlsf is the better alternative.
And I can see line of code is less than dlmalloc too - so maybe it is even smaller.

I would go for tlsf based on the above and not botheting about this anymore.

> 2. Does barebox apply IMX's pinctrl settings if they are present in DT? If yes, why do we need setup_uart() function in pbl code?

pinctrl settings are applied for the nodes that are used, not for everything.
And only when the relevant driver is probed - and with DT support enabled.
In the Pre Boot Loader there is not DT support, thus to get someting
out on the serial port setup_uart() is required.

	Sam

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

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

* Re: [HELP] Barebox porting
  2019-01-09 13:03   ` Sascha Hauer
  2019-01-16 15:14     ` Серафим Долбилов
@ 2019-01-16 15:59     ` Серафим Долбилов
  2019-01-17  7:59       ` Sascha Hauer
  1 sibling, 1 reply; 38+ messages in thread
From: Серафим Долбилов @ 2019-01-16 15:59 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

Is there any another way to link DT to the image besides imx*_barebox_entry(void *boarddata) functions?

-- 
Regards,
Seraphim Dolbilov
+7 (977) 818-10-50
s.dlblv@ya.ru


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

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

* Re: [HELP] Barebox porting
  2019-01-16 15:14     ` Серафим Долбилов
@ 2019-01-16 15:37       ` Серафим Долбилов
  2019-01-16 17:29         ` Sam Ravnborg
  2019-01-16 17:28       ` Sam Ravnborg
  1 sibling, 1 reply; 38+ messages in thread
From: Серафим Долбилов @ 2019-01-16 15:37 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

Moreover, it seems that I need some reference about functions I can call from the ENTRY_FUNCTION code...

-- 
Regards,
Seraphim Dolbilov
+7 (977) 818-10-50
s.dlblv@ya.ru

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

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

* Re: [HELP] Barebox porting
  2019-01-09 13:03   ` Sascha Hauer
@ 2019-01-16 15:14     ` Серафим Долбилов
  2019-01-16 15:37       ` Серафим Долбилов
  2019-01-16 17:28       ` Sam Ravnborg
  2019-01-16 15:59     ` Серафим Долбилов
  1 sibling, 2 replies; 38+ messages in thread
From: Серафим Долбилов @ 2019-01-16 15:14 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List


A new portion of questions is ready:)
1. dlmalloc or tlsf - what are pros and cons of each of them?
2. Does barebox apply IMX's pinctrl settings if they are present in DT? If yes, why do we need setup_uart() function in pbl code?

-- 
С уважением,
Долбилов Серафим
+7 (977) 818-10-50
s.dlblv@ya.ru

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

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

* Re: [HELP] Barebox porting
  2019-01-09 12:40 ` Серафим Долбилов
@ 2019-01-09 13:03   ` Sascha Hauer
  2019-01-16 15:14     ` Серафим Долбилов
  2019-01-16 15:59     ` Серафим Долбилов
  0 siblings, 2 replies; 38+ messages in thread
From: Sascha Hauer @ 2019-01-09 13:03 UTC (permalink / raw)
  To: Серафим
	Долбилов
  Cc: Barebox List

Hi,

On Wed, Jan 09, 2019 at 03:40:37PM +0300, Серафим Долбилов wrote:
> Hi, I'm trying to add my own custom board support to barebox. It's based on i.MX6ULL CPU.
> So, I have the following questions:
> 
> * Why does the config parameter IMX_MULTI_BOARDS exist? Why such
> boards as EUKREA CPUIMX35 and i.MX53 SMD are isolated from the others?
> So, if I add custom board, which class it must share? "Isolated" or
> "mainline"?

barebox can be built for multiple boards in a single build, referred to
as multi image support. This needs some support by the board code,
specifically it has use device tree rather than platform support. Some
boards do not support this and are in the !IMX_MULTI_BOARDS section.

For new boards you should use IMX_MULTI_BOARDS.

> * AFAIK, one of main Barebox advantages is that it can use the only DT
> for both itself and Linux kernel. I'm interested in how is this
> behaviour realized in practice. How can I use the only DTS for Barebox
> and pass it to Linux kernel on its boot?

barebox will pass the DTB (not DTS) it is probed with to the kernel
automatically. Nothing to do here.

> * I need some help with structure of images/Makefile.imx file. I cannot make any sense in why pblx-*, CFG-*, FILE-* targets are used and how does it everything interact in resulting image.

Some documentation is at the top of images/Makefile.

As an example take the realq7 entry:

pblb-$(CONFIG_MACH_REALQ7) += start_imx6_realq7
CFG_start_imx6_realq7.pblb.imximg = $(board)/datamodul-edm-qmx6/flash-header.imxcfg
FILE_barebox-datamodul-edm-qmx6.img = start_imx6_realq7.pblb.imximg
image-$(CONFIG_MACH_REALQ7) += barebox-datamodul-edm-qmx6.img

CONFIG_MACH_REALQ7 should be replaced by your own Kconfig board name.
start_imx6_realq7 is the name of the entry function, should be replaced
with whatever you pass to your ENTRY_FUNCTION macro. CFG_* should point
to your flash header config file. The resulting image will be called
barebox-datamodul-edm-qmx6.img in this example.

Hope that helps.

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] 38+ messages in thread

* [HELP] Barebox porting
       [not found] <44943261547037040@iva5-750e13568e4d.qloud-c.yandex.net>
@ 2019-01-09 12:40 ` Серафим Долбилов
  2019-01-09 13:03   ` Sascha Hauer
  0 siblings, 1 reply; 38+ messages in thread
From: Серафим Долбилов @ 2019-01-09 12:40 UTC (permalink / raw)
  To: Barebox List

Hi, I'm trying to add my own custom board support to barebox. It's based on i.MX6ULL CPU.
So, I have the following questions:

* Why does the config parameter IMX_MULTI_BOARDS exist? Why such boards as EUKREA CPUIMX35 and i.MX53 SMD are isolated from the others? So, if I add custom board, which class it must share? "Isolated" or "mainline"?
* AFAIK, one of main Barebox advantages is that it can use the only DT for both itself and Linux kernel. I'm interested in how is this behaviour realized in practice. How can I use the only DTS for Barebox and pass it to Linux kernel on its boot?
* I need some help with structure of images/Makefile.imx file. I cannot make any sense in why pblx-*, CFG-*, FILE-* targets are used and how does it everything interact in resulting image.
Thanks a lot!

-- 
С уважением,
Долбилов Серафим
+7 (977) 818-10-50
s.dlblv@ya.ru

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

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

end of thread, other threads:[~2019-02-05 13:45 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 12:34 [HELP] Barebox porting Seraphim Dolbilov
2019-01-21 14:28 ` Seraphim Dolbilov
2019-01-21 15:12 ` Sascha Hauer
2019-01-21 15:35   ` Seraphim Dolbilov
2019-01-21 16:35   ` Sam Ravnborg
2019-01-21 16:43     ` Seraphim Dolbilov
2019-01-22  6:33     ` Sascha Hauer
2019-01-22 14:07       ` Seraphim Dolbilov
2019-01-22 14:42         ` Sascha Hauer
2019-01-22 16:12           ` Seraphim Dolbilov
2019-01-23  9:11             ` Sascha Hauer
2019-01-23 10:01               ` Seraphim Dolbilov
2019-01-23 10:17                 ` Sascha Hauer
2019-01-25 12:18                   ` Seraphim Dolbilov
2019-01-25 14:11                     ` Seraphim Dolbilov
2019-01-28  8:46                       ` Sascha Hauer
2019-02-04 10:13                         ` [HELP] DT isues Seraphim Dolbilov
2019-02-05 11:52                           ` Sascha Hauer
2019-02-05 13:45                             ` Seraphim Dolbilov
2019-01-28  8:44                     ` [HELP] Barebox porting Sascha Hauer
     [not found] <44943261547037040@iva5-750e13568e4d.qloud-c.yandex.net>
2019-01-09 12:40 ` Серафим Долбилов
2019-01-09 13:03   ` Sascha Hauer
2019-01-16 15:14     ` Серафим Долбилов
2019-01-16 15:37       ` Серафим Долбилов
2019-01-16 17:29         ` Sam Ravnborg
2019-01-16 17:28       ` Sam Ravnborg
2019-01-16 18:48         ` Antony Pavlov
2019-01-16 15:59     ` Серафим Долбилов
2019-01-17  7:59       ` Sascha Hauer
2019-01-17 12:44         ` Серафим Долбилов
2019-01-17 13:28           ` Sascha Hauer
2019-01-17 13:43             ` Roland Hieber
2019-01-17 14:48             ` Серафим Долбилов
2019-01-17 16:26               ` Sam Ravnborg
2019-01-17 21:06                 ` Sascha Hauer
2019-01-18 15:01                   ` Seraphim Dolbilov
2019-01-18 15:14                     ` Sascha Hauer
2019-01-18 16:30                       ` Seraphim Dolbilov

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