All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about uboot initialisation
@ 2022-08-26 12:35 momo aubin
  2022-08-27  0:21 ` Simon Glass
  0 siblings, 1 reply; 12+ messages in thread
From: momo aubin @ 2022-08-26 12:35 UTC (permalink / raw)
  To: u-boot

Dear all,


Is there any way that allows us to know that uboot has initialised all his
peripherals before starting loading kernel ?

The goal of this check is to reset the board in case of bad initialisation
and choose a different uboot .

Thanks for your answer in advance.
Aubin

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

* Re: Question about uboot initialisation
  2022-08-26 12:35 Question about uboot initialisation momo aubin
@ 2022-08-27  0:21 ` Simon Glass
  2022-08-29  3:24   ` momo aubin
  0 siblings, 1 reply; 12+ messages in thread
From: Simon Glass @ 2022-08-27  0:21 UTC (permalink / raw)
  To: aubinno; +Cc: U-Boot Mailing List

Hi Aubin,

On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
>
> Dear all,
>
>
> Is there any way that allows us to know that uboot has initialised all his
> peripherals before starting loading kernel ?
>
> The goal of this check is to reset the board in case of bad initialisation
> and choose a different uboot .
>
> Thanks for your answer in advance.
> Aubin

If there is a failure then it likely results in an error-return code
from board_init_f() or board_init_r(). These generally halt U-Boot /
cause a reboot. But this only covers the peripherals that U-Boot sets
up early, like serial, clocks, pinctrl, MMC, PCI, etc.

U-Boot typically does not init a peripheral unless it is needed for U-Boot.

While U-Boot is running (e.g. a script) it may start up other
peripherals (e.g. to read a kernel from USB) and in those cases errors
can be handled by the script.

You can use 'dm tree' to see what devices have been probed successfully.

Regards,
Simon

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

* Re: Question about uboot initialisation
  2022-08-27  0:21 ` Simon Glass
@ 2022-08-29  3:24   ` momo aubin
  2022-08-29  7:40     ` momo aubin
  0 siblings, 1 reply; 12+ messages in thread
From: momo aubin @ 2022-08-29  3:24 UTC (permalink / raw)
  To: Simon Glass; +Cc: U-Boot Mailing List

Hi Simon,

Thanks for your answer.

The script that you are telling it is Env.txt right ?

What is a 'dm tree' ? Please could you provide me more infos about this ?

Thanks for your answer in advance.

On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org> wrote:

> Hi Aubin,
>
> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
> >
> > Dear all,
> >
> >
> > Is there any way that allows us to know that uboot has initialised all
> his
> > peripherals before starting loading kernel ?
> >
> > The goal of this check is to reset the board in case of bad
> initialisation
> > and choose a different uboot .
> >
> > Thanks for your answer in advance.
> > Aubin
>
> If there is a failure then it likely results in an error-return code
> from board_init_f() or board_init_r(). These generally halt U-Boot /
> cause a reboot. But this only covers the peripherals that U-Boot sets
> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
>
> U-Boot typically does not init a peripheral unless it is needed for U-Boot.
>
> While U-Boot is running (e.g. a script) it may start up other
> peripherals (e.g. to read a kernel from USB) and in those cases errors
> can be handled by the script.
>
> You can use 'dm tree' to see what devices have been probed successfully.
>
> Regards,
> Simon
>

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

* Re: Question about uboot initialisation
  2022-08-29  3:24   ` momo aubin
@ 2022-08-29  7:40     ` momo aubin
  2022-08-30  2:29       ` Simon Glass
  0 siblings, 1 reply; 12+ messages in thread
From: momo aubin @ 2022-08-29  7:40 UTC (permalink / raw)
  To: Simon Glass; +Cc: U-Boot Mailing List

[-- Attachment #1: Type: text/plain, Size: 1767 bytes --]

Hi Simon,
I got what is the 'dm tree' which is a driver model. This command could be
done only in uboot stage. but i got the situation in which the
initialisation of u-boot has not finished yet as showing in the following
picture.

[image: image.png]
 .i would like to know what is wrong in the initialisation ?

Best Regard,
Aubin

On Mon, 29 Aug 2022 at 05:24, momo aubin <aubinno@gmail.com> wrote:

> Hi Simon,
>
> Thanks for your answer.
>
> The script that you are telling it is Env.txt right ?
>
> What is a 'dm tree' ? Please could you provide me more infos about this ?
>
> Thanks for your answer in advance.
>
> On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org> wrote:
>
>> Hi Aubin,
>>
>> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
>> >
>> > Dear all,
>> >
>> >
>> > Is there any way that allows us to know that uboot has initialised all
>> his
>> > peripherals before starting loading kernel ?
>> >
>> > The goal of this check is to reset the board in case of bad
>> initialisation
>> > and choose a different uboot .
>> >
>> > Thanks for your answer in advance.
>> > Aubin
>>
>> If there is a failure then it likely results in an error-return code
>> from board_init_f() or board_init_r(). These generally halt U-Boot /
>> cause a reboot. But this only covers the peripherals that U-Boot sets
>> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
>>
>> U-Boot typically does not init a peripheral unless it is needed for
>> U-Boot.
>>
>> While U-Boot is running (e.g. a script) it may start up other
>> peripherals (e.g. to read a kernel from USB) and in those cases errors
>> can be handled by the script.
>>
>> You can use 'dm tree' to see what devices have been probed successfully.
>>
>> Regards,
>> Simon
>>
>

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 17493 bytes --]

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

* Re: Question about uboot initialisation
  2022-08-29  7:40     ` momo aubin
@ 2022-08-30  2:29       ` Simon Glass
  2022-09-11 14:29         ` momo aubin
  0 siblings, 1 reply; 12+ messages in thread
From: Simon Glass @ 2022-08-30  2:29 UTC (permalink / raw)
  To: momo aubin; +Cc: U-Boot Mailing List

Hi Aubin,

On Mon, 29 Aug 2022 at 01:40, momo aubin <aubinno@gmail.com> wrote:
>
> Hi Simon,
> I got what is the 'dm tree' which is a driver model. This command could be done only in uboot stage. but i got the situation in which the initialisation of u-boot has not finished yet as showing in the following picture.
>
>
>  .i would like to know what is wrong in the initialisation ?

Please try to avoid top posting.

I think the best thing is to move to the latest U-Boot. You are about
9 years behind! But as to your question, I am really not sure. If it
is a TI board, you could try asking them?

Regards,
Simon


>
> Best Regard,
> Aubin
>
> On Mon, 29 Aug 2022 at 05:24, momo aubin <aubinno@gmail.com> wrote:
>>
>> Hi Simon,
>>
>> Thanks for your answer.
>>
>> The script that you are telling it is Env.txt right ?
>>
>> What is a 'dm tree' ? Please could you provide me more infos about this ?
>>
>> Thanks for your answer in advance.
>>
>> On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org> wrote:
>>>
>>> Hi Aubin,
>>>
>>> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
>>> >
>>> > Dear all,
>>> >
>>> >
>>> > Is there any way that allows us to know that uboot has initialised all his
>>> > peripherals before starting loading kernel ?
>>> >
>>> > The goal of this check is to reset the board in case of bad initialisation
>>> > and choose a different uboot .
>>> >
>>> > Thanks for your answer in advance.
>>> > Aubin
>>>
>>> If there is a failure then it likely results in an error-return code
>>> from board_init_f() or board_init_r(). These generally halt U-Boot /
>>> cause a reboot. But this only covers the peripherals that U-Boot sets
>>> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
>>>
>>> U-Boot typically does not init a peripheral unless it is needed for U-Boot.
>>>
>>> While U-Boot is running (e.g. a script) it may start up other
>>> peripherals (e.g. to read a kernel from USB) and in those cases errors
>>> can be handled by the script.
>>>
>>> You can use 'dm tree' to see what devices have been probed successfully.
>>>
>>> Regards,
>>> Simon

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

* Re: Question about uboot initialisation
  2022-08-30  2:29       ` Simon Glass
@ 2022-09-11 14:29         ` momo aubin
  2022-09-12 13:34           ` Simon Glass
  0 siblings, 1 reply; 12+ messages in thread
From: momo aubin @ 2022-09-11 14:29 UTC (permalink / raw)
  To: Simon Glass; +Cc: U-Boot Mailing List

Hi Simon,

Thanks for getting back to me.

How can I avoid top posting ? i'm a new

How uboot know that the kernel has started ?
If the system is blocked during the u-boot stage, is it possible to
restart all the systems ?
It is possible to put a timer in the u-boot stage in case of the kernel has
not started , can the system reboot by choosing another u-boot ?


Thanks for your answer in advance.
Aubin


On Tue, 30 Aug 2022 at 04:30, Simon Glass <sjg@chromium.org> wrote:

> Hi Aubin,
>
> On Mon, 29 Aug 2022 at 01:40, momo aubin <aubinno@gmail.com> wrote:
> >
> > Hi Simon,
> > I got what is the 'dm tree' which is a driver model. This command could
> be done only in uboot stage. but i got the situation in which the
> initialisation of u-boot has not finished yet as showing in the following
> picture.
> >
> >
> >  .i would like to know what is wrong in the initialisation ?
>
> Please try to avoid top posting.
>
> I think the best thing is to move to the latest U-Boot. You are about
> 9 years behind! But as to your question, I am really not sure. If it
> is a TI board, you could try asking them?
>
> Regards,
> Simon
>
>
> >
> > Best Regard,
> > Aubin
> >
> > On Mon, 29 Aug 2022 at 05:24, momo aubin <aubinno@gmail.com> wrote:
> >>
> >> Hi Simon,
> >>
> >> Thanks for your answer.
> >>
> >> The script that you are telling it is Env.txt right ?
> >>
> >> What is a 'dm tree' ? Please could you provide me more infos about this
> ?
> >>
> >> Thanks for your answer in advance.
> >>
> >> On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org> wrote:
> >>>
> >>> Hi Aubin,
> >>>
> >>> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
> >>> >
> >>> > Dear all,
> >>> >
> >>> >
> >>> > Is there any way that allows us to know that uboot has initialised
> all his
> >>> > peripherals before starting loading kernel ?
> >>> >
> >>> > The goal of this check is to reset the board in case of bad
> initialisation
> >>> > and choose a different uboot .
> >>> >
> >>> > Thanks for your answer in advance.
> >>> > Aubin
> >>>
> >>> If there is a failure then it likely results in an error-return code
> >>> from board_init_f() or board_init_r(). These generally halt U-Boot /
> >>> cause a reboot. But this only covers the peripherals that U-Boot sets
> >>> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
> >>>
> >>> U-Boot typically does not init a peripheral unless it is needed for
> U-Boot.
> >>>
> >>> While U-Boot is running (e.g. a script) it may start up other
> >>> peripherals (e.g. to read a kernel from USB) and in those cases errors
> >>> can be handled by the script.
> >>>
> >>> You can use 'dm tree' to see what devices have been probed
> successfully.
> >>>
> >>> Regards,
> >>> Simon
>

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

* Re: Question about uboot initialisation
  2022-09-11 14:29         ` momo aubin
@ 2022-09-12 13:34           ` Simon Glass
       [not found]             ` <CAM3ZEw5kKHFpxE8vxNHU5xWZAem-aj2LfN+Qpmu6nTE2_uom+Q@mail.gmail.com>
  0 siblings, 1 reply; 12+ messages in thread
From: Simon Glass @ 2022-09-12 13:34 UTC (permalink / raw)
  To: momo aubin; +Cc: U-Boot Mailing List

Hi Momo,

On Sun, 11 Sept 2022 at 08:29, momo aubin <aubinno@gmail.com> wrote:
>
> Hi Simon,
>
> Thanks for getting back to me.
>
> How can I avoid top posting ? i'm a new

You can do a web search for "top posting" which explains the issue
better than I can.

>
> How uboot know that the kernel has started ?

Generally it does not. U-Boot's job is typically over once it jumps to
the kernel.

> If the system is blocked during the u-boot stage, is it possible to restart all the systems ?
> It is possible to put a timer in the u-boot stage in case of the kernel has not started , can the system reboot by choosing another u-boot ?

You can use a watchdog timer to reboot the system. It can be set up in
U-Boot, then it Linux does not kick it in time, it will cause a
reboot. To choose another U-Boot, you would need to do some scripting,
or use mender. There is some work on VBE going on (U-Boot standard
boot) but it will take a while to all land.

Regards,
SImon


>
>
> Thanks for your answer in advance.
> Aubin
>
>
> On Tue, 30 Aug 2022 at 04:30, Simon Glass <sjg@chromium.org> wrote:
>>
>> Hi Aubin,
>>
>> On Mon, 29 Aug 2022 at 01:40, momo aubin <aubinno@gmail.com> wrote:
>> >
>> > Hi Simon,
>> > I got what is the 'dm tree' which is a driver model. This command could be done only in uboot stage. but i got the situation in which the initialisation of u-boot has not finished yet as showing in the following picture.
>> >
>> >
>> >  .i would like to know what is wrong in the initialisation ?
>>
>> Please try to avoid top posting.
>>
>> I think the best thing is to move to the latest U-Boot. You are about
>> 9 years behind! But as to your question, I am really not sure. If it
>> is a TI board, you could try asking them?
>>
>> Regards,
>> Simon
>>
>>
>> >
>> > Best Regard,
>> > Aubin
>> >
>> > On Mon, 29 Aug 2022 at 05:24, momo aubin <aubinno@gmail.com> wrote:
>> >>
>> >> Hi Simon,
>> >>
>> >> Thanks for your answer.
>> >>
>> >> The script that you are telling it is Env.txt right ?
>> >>
>> >> What is a 'dm tree' ? Please could you provide me more infos about this ?
>> >>
>> >> Thanks for your answer in advance.
>> >>
>> >> On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org> wrote:
>> >>>
>> >>> Hi Aubin,
>> >>>
>> >>> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
>> >>> >
>> >>> > Dear all,
>> >>> >
>> >>> >
>> >>> > Is there any way that allows us to know that uboot has initialised all his
>> >>> > peripherals before starting loading kernel ?
>> >>> >
>> >>> > The goal of this check is to reset the board in case of bad initialisation
>> >>> > and choose a different uboot .
>> >>> >
>> >>> > Thanks for your answer in advance.
>> >>> > Aubin
>> >>>
>> >>> If there is a failure then it likely results in an error-return code
>> >>> from board_init_f() or board_init_r(). These generally halt U-Boot /
>> >>> cause a reboot. But this only covers the peripherals that U-Boot sets
>> >>> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
>> >>>
>> >>> U-Boot typically does not init a peripheral unless it is needed for U-Boot.
>> >>>
>> >>> While U-Boot is running (e.g. a script) it may start up other
>> >>> peripherals (e.g. to read a kernel from USB) and in those cases errors
>> >>> can be handled by the script.
>> >>>
>> >>> You can use 'dm tree' to see what devices have been probed successfully.
>> >>>
>> >>> Regards,
>> >>> Simon

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

* Re: Question about uboot initialisation
       [not found]               ` <CAPnjgZ1+79kNoeeeRJd1uTQxv6MPJ-c8UtGcTqDrb1HeBAeQYQ@mail.gmail.com>
@ 2022-09-12 15:13                 ` momo aubin
  2022-09-12 18:31                   ` Simon Glass
  0 siblings, 1 reply; 12+ messages in thread
From: momo aubin @ 2022-09-12 15:13 UTC (permalink / raw)
  To: Simon Glass, U-Boot Mailing List

On Mon, 12 Sept 2022 at 17:07, Simon Glass <sjg@chromium.org> wrote:

> Hi Aubin,
>
> On Mon, 12 Sept 2022 at 08:23, momo aubin <aubinno@gmail.com> wrote:
> >
> > Hi Simon,
> >
> > Thanks for your answer and explanations.
> >
> > The sequence of boot is :
> > RBL->UBL->UBOOT->Kernel->ROOTFS.
> >
> > According to this sequence, ubl is the one who chooses which uboot needs
> to be started, then writing the script means writing them inside ubl.
> However, Ubl doesn't have access to the environment variable  in order to
> know which u-boot has been used first.
> >
> > My question is .
> > Is it possible to choose another u-boot (u-boot2) inside the first
> u-boot (u-boot1) ?
>
> Can you please try that reply again, without top posting?
>
> https://www.google.com/search?q=top+posting
>
> Regards,
> Simon
>
>
> >
> > Regards,
> > Aubin
> >
> > On Mon, 12 Sept 2022 at 15:35, Simon Glass <sjg@chromium.org> wrote:
> >>
> >> Hi Momo,
> >>
> >> On Sun, 11 Sept 2022 at 08:29, momo aubin <aubinno@gmail.com> wrote:
> >> >
> >> > Hi Simon,
> >> >
> >> > Thanks for getting back to me.
> >> >
> >> > How can I avoid top posting ? i'm a new
> >>
> >> You can do a web search for "top posting" which explains the issue
> >> better than I can.
> >>
> >> >
> >> > How uboot know that the kernel has started ?
> >>
> >> Generally it does not. U-Boot's job is typically over once it jumps to
> >> the kernel.
> >>
> >> > If the system is blocked during the u-boot stage, is it possible to
> restart all the systems ?
> >> > It is possible to put a timer in the u-boot stage in case of the
> kernel has not started , can the system reboot by choosing another u-boot ?
> >>
> >> You can use a watchdog timer to reboot the system. It can be set up in
> >> U-Boot, then it Linux does not kick it in time, it will cause a
> >> reboot. To choose another U-Boot, you would need to do some scripting,
> >> or use mender. There is some work on VBE going on (U-Boot standard
> >> boot) but it will take a while to all land.
> >>
> >> Regards,
> >> SImon
> >>
> >>
> >> >
> >> >
> >> > Thanks for your answer in advance.
> >> > Aubin
> >> >
> >> >
> >> > On Tue, 30 Aug 2022 at 04:30, Simon Glass <sjg@chromium.org> wrote:
> >> >>
> >> >> Hi Aubin,
> >> >>
> >> >> On Mon, 29 Aug 2022 at 01:40, momo aubin <aubinno@gmail.com> wrote:
> >> >> >
> >> >> > Hi Simon,
> >> >> > I got what is the 'dm tree' which is a driver model. This command
> could be done only in uboot stage. but i got the situation in which the
> initialisation of u-boot has not finished yet as showing in the following
> picture.
> >> >> >
> >> >> >
> >> >> >  .i would like to know what is wrong in the initialisation ?
> >> >>
> >> >> Please try to avoid top posting.
> >> >>
> >> >> I think the best thing is to move to the latest U-Boot. You are about
> >> >> 9 years behind! But as to your question, I am really not sure. If it
> >> >> is a TI board, you could try asking them?
> >> >>
> >> >> Regards,
> >> >> Simon
> >> >>
> >> >>
> >> >> >
> >> >> > Best Regard,
> >> >> > Aubin
> >> >> >
> >> >> > On Mon, 29 Aug 2022 at 05:24, momo aubin <aubinno@gmail.com>
> wrote:
> >> >> >>
> >> >> >> Hi Simon,
> >> >> >>
> >> >> >> Thanks for your answer.
> >> >> >>
> >> >> >> The script that you are telling it is Env.txt right ?
> >> >> >>
> >> >> >> What is a 'dm tree' ? Please could you provide me more infos
> about this ?
> >> >> >>
> >> >> >> Thanks for your answer in advance.
> >> >> >>
> >> >> >> On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org>
> wrote:
> >> >> >>>
> >> >> >>> Hi Aubin,
> >> >> >>>
> >> >> >>> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com>
> wrote:
> >> >> >>> >
> >> >> >>> > Dear all,
> >> >> >>> >
> >> >> >>> >
> >> >> >>> > Is there any way that allows us to know that uboot has
> initialised all his
> >> >> >>> > peripherals before starting loading kernel ?
> >> >> >>> >
> >> >> >>> > The goal of this check is to reset the board in case of bad
> initialisation
> >> >> >>> > and choose a different uboot .
> >> >> >>> >
> >> >> >>> > Thanks for your answer in advance.
> >> >> >>> > Aubin
> >> >> >>>
> >> >> >>> If there is a failure then it likely results in an error-return
> code
> >> >> >>> from board_init_f() or board_init_r(). These generally halt
> U-Boot /
> >> >> >>> cause a reboot. But this only covers the peripherals that U-Boot
> sets
> >> >> >>> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
> >> >> >>>
> >> >> >>> U-Boot typically does not init a peripheral unless it is needed
> for U-Boot.
> >> >> >>>
> >> >> >>> While U-Boot is running (e.g. a script) it may start up other
> >> >> >>> peripherals (e.g. to read a kernel from USB) and in those cases
> errors
> >> >> >>> can be handled by the script.
> >> >> >>>
> >> >> >>> You can use 'dm tree' to see what devices have been probed
> successfully.
> >> >> >>>
> >> >> >>> Regards,
> >> >> >>> Simon
>

Hi Simon,

Thanks for your answer and explanations.

The sequence of boot is :
RBL->UBL->UBOOT->Kernel->ROOTFS.

According to this sequence, ubl is the one who chooses which uboot needs to
be started, then writing the script means writing them inside ubl. However,
Ubl doesn't have access to the environment variable  in order to know which
u-boot has been used first.

My question is .
Is it possible to choose another u-boot (u-boot2) inside the first u-boot
(u-boot1) ?

Is this correct ?

Regards,
Aubin

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

* Re: Question about uboot initialisation
  2022-09-12 15:13                 ` momo aubin
@ 2022-09-12 18:31                   ` Simon Glass
  2022-09-12 20:59                     ` momo aubin
  0 siblings, 1 reply; 12+ messages in thread
From: Simon Glass @ 2022-09-12 18:31 UTC (permalink / raw)
  To: momo aubin; +Cc: U-Boot Mailing List

Hi Aubin,

On Mon, 12 Sept 2022 at 09:13, momo aubin <aubinno@gmail.com> wrote:
>
>
>
> On Mon, 12 Sept 2022 at 17:07, Simon Glass <sjg@chromium.org> wrote:
>>
>> Hi Aubin,
>>
>> On Mon, 12 Sept 2022 at 08:23, momo aubin <aubinno@gmail.com> wrote:
>> >
>> > Hi Simon,
>> >
>> > Thanks for your answer and explanations.
>> >
>> > The sequence of boot is :
>> > RBL->UBL->UBOOT->Kernel->ROOTFS.
>> >
>> > According to this sequence, ubl is the one who chooses which uboot needs to be started, then writing the script means writing them inside ubl. However, Ubl doesn't have access to the environment variable  in order to know which u-boot has been used first.
>> >
>> > My question is .
>> > Is it possible to choose another u-boot (u-boot2) inside the first u-boot (u-boot1) ?
>>
>> Can you please try that reply again, without top posting?
>>
>> https://www.google.com/search?q=top+posting
>>
>> Regards,
>> Simon
>>
>>
>> >
>> > Regards,
>> > Aubin
>> >
>> > On Mon, 12 Sept 2022 at 15:35, Simon Glass <sjg@chromium.org> wrote:
>> >>
>> >> Hi Momo,
>> >>
>> >> On Sun, 11 Sept 2022 at 08:29, momo aubin <aubinno@gmail.com> wrote:
>> >> >
>> >> > Hi Simon,
>> >> >
>> >> > Thanks for getting back to me.
>> >> >
>> >> > How can I avoid top posting ? i'm a new
>> >>
>> >> You can do a web search for "top posting" which explains the issue
>> >> better than I can.
>> >>
>> >> >
>> >> > How uboot know that the kernel has started ?
>> >>
>> >> Generally it does not. U-Boot's job is typically over once it jumps to
>> >> the kernel.
>> >>
>> >> > If the system is blocked during the u-boot stage, is it possible to restart all the systems ?
>> >> > It is possible to put a timer in the u-boot stage in case of the kernel has not started , can the system reboot by choosing another u-boot ?
>> >>
>> >> You can use a watchdog timer to reboot the system. It can be set up in
>> >> U-Boot, then it Linux does not kick it in time, it will cause a
>> >> reboot. To choose another U-Boot, you would need to do some scripting,
>> >> or use mender. There is some work on VBE going on (U-Boot standard
>> >> boot) but it will take a while to all land.
>> >>
>> >> Regards,
>> >> SImon
>> >>
>> >>
>> >> >
>> >> >
>> >> > Thanks for your answer in advance.
>> >> > Aubin
>> >> >
>> >> >
>> >> > On Tue, 30 Aug 2022 at 04:30, Simon Glass <sjg@chromium.org> wrote:
>> >> >>
>> >> >> Hi Aubin,
>> >> >>
>> >> >> On Mon, 29 Aug 2022 at 01:40, momo aubin <aubinno@gmail.com> wrote:
>> >> >> >
>> >> >> > Hi Simon,
>> >> >> > I got what is the 'dm tree' which is a driver model. This command could be done only in uboot stage. but i got the situation in which the initialisation of u-boot has not finished yet as showing in the following picture.
>> >> >> >
>> >> >> >
>> >> >> >  .i would like to know what is wrong in the initialisation ?
>> >> >>
>> >> >> Please try to avoid top posting.
>> >> >>
>> >> >> I think the best thing is to move to the latest U-Boot. You are about
>> >> >> 9 years behind! But as to your question, I am really not sure. If it
>> >> >> is a TI board, you could try asking them?
>> >> >>
>> >> >> Regards,
>> >> >> Simon
>> >> >>
>> >> >>
>> >> >> >
>> >> >> > Best Regard,
>> >> >> > Aubin
>> >> >> >
>> >> >> > On Mon, 29 Aug 2022 at 05:24, momo aubin <aubinno@gmail.com> wrote:
>> >> >> >>
>> >> >> >> Hi Simon,
>> >> >> >>
>> >> >> >> Thanks for your answer.
>> >> >> >>
>> >> >> >> The script that you are telling it is Env.txt right ?
>> >> >> >>
>> >> >> >> What is a 'dm tree' ? Please could you provide me more infos about this ?
>> >> >> >>
>> >> >> >> Thanks for your answer in advance.
>> >> >> >>
>> >> >> >> On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org> wrote:
>> >> >> >>>
>> >> >> >>> Hi Aubin,
>> >> >> >>>
>> >> >> >>> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
>> >> >> >>> >
>> >> >> >>> > Dear all,
>> >> >> >>> >
>> >> >> >>> >
>> >> >> >>> > Is there any way that allows us to know that uboot has initialised all his
>> >> >> >>> > peripherals before starting loading kernel ?
>> >> >> >>> >
>> >> >> >>> > The goal of this check is to reset the board in case of bad initialisation
>> >> >> >>> > and choose a different uboot .
>> >> >> >>> >
>> >> >> >>> > Thanks for your answer in advance.
>> >> >> >>> > Aubin
>> >> >> >>>
>> >> >> >>> If there is a failure then it likely results in an error-return code
>> >> >> >>> from board_init_f() or board_init_r(). These generally halt U-Boot /
>> >> >> >>> cause a reboot. But this only covers the peripherals that U-Boot sets
>> >> >> >>> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
>> >> >> >>>
>> >> >> >>> U-Boot typically does not init a peripheral unless it is needed for U-Boot.
>> >> >> >>>
>> >> >> >>> While U-Boot is running (e.g. a script) it may start up other
>> >> >> >>> peripherals (e.g. to read a kernel from USB) and in those cases errors
>> >> >> >>> can be handled by the script.
>> >> >> >>>
>> >> >> >>> You can use 'dm tree' to see what devices have been probed successfully.
>> >> >> >>>
>> >> >> >>> Regards,
>> >> >> >>> Simon
>
>
> Hi Simon,
>
> Thanks for your answer and explanations.
>
> The sequence of boot is :
> RBL->UBL->UBOOT->Kernel->ROOTFS.
>
> According to this sequence, ubl is the one who chooses which uboot needs to be started, then writing the script means writing them inside ubl. However, Ubl doesn't have access to the environment variable  in order to know which u-boot has been used first.

I don't know what RBL and UBL are.

>
> My question is .
> Is it possible to choose another u-boot (u-boot2) inside the first u-boot (u-boot1) ?

Yes you can jump from one U-Boot to another. Something like 'dcache
off; go <addr>' should work.


>
> Is this correct ?

Regards,
Simon

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

* Re: Question about uboot initialisation
  2022-09-12 18:31                   ` Simon Glass
@ 2022-09-12 20:59                     ` momo aubin
  2022-10-13 19:35                       ` momo aubin
  0 siblings, 1 reply; 12+ messages in thread
From: momo aubin @ 2022-09-12 20:59 UTC (permalink / raw)
  To: Simon Glass; +Cc: U-Boot Mailing List



Sent from my iPhone

> On 12 Sep 2022, at 8:31 PM, Simon Glass <sjg@chromium.org> wrote:
> 
> Hi Aubin,
> 
>> On Mon, 12 Sept 2022 at 09:13, momo aubin <aubinno@gmail.com> wrote:
>> 
>> 
>> 
>>> On Mon, 12 Sept 2022 at 17:07, Simon Glass <sjg@chromium.org> wrote:
>>> 
>>> Hi Aubin,
>>> 
>>> On Mon, 12 Sept 2022 at 08:23, momo aubin <aubinno@gmail.com> wrote:
>>>> 
>>>> Hi Simon,
>>>> 
>>>> Thanks for your answer and explanations.
>>>> 
>>>> The sequence of boot is :
>>>> RBL->UBL->UBOOT->Kernel->ROOTFS.
>>>> 
>>>> According to this sequence, ubl is the one who chooses which uboot needs to be started, then writing the script means writing them inside ubl. However, Ubl doesn't have access to the environment variable  in order to know which u-boot has been used first.
>>>> 
>>>> My question is .
>>>> Is it possible to choose another u-boot (u-boot2) inside the first u-boot (u-boot1) ?
>>> 
>>> Can you please try that reply again, without top posting?
>>> 
>>> https://www.google.com/search?q=top+posting
>>> 
>>> Regards,
>>> Simon
>>> 
>>> 
>>>> 
>>>> Regards,
>>>> Aubin
>>>> 
>>>> On Mon, 12 Sept 2022 at 15:35, Simon Glass <sjg@chromium.org> wrote:
>>>>> 
>>>>> Hi Momo,
>>>>> 
>>>>> On Sun, 11 Sept 2022 at 08:29, momo aubin <aubinno@gmail.com> wrote:
>>>>>> 
>>>>>> Hi Simon,
>>>>>> 
>>>>>> Thanks for getting back to me.
>>>>>> 
>>>>>> How can I avoid top posting ? i'm a new
>>>>> 
>>>>> You can do a web search for "top posting" which explains the issue
>>>>> better than I can.
>>>>> 
>>>>>> 
>>>>>> How uboot know that the kernel has started ?
>>>>> 
>>>>> Generally it does not. U-Boot's job is typically over once it jumps to
>>>>> the kernel.
>>>>> 
>>>>>> If the system is blocked during the u-boot stage, is it possible to restart all the systems ?
>>>>>> It is possible to put a timer in the u-boot stage in case of the kernel has not started , can the system reboot by choosing another u-boot ?
>>>>> 
>>>>> You can use a watchdog timer to reboot the system. It can be set up in
>>>>> U-Boot, then it Linux does not kick it in time, it will cause a
>>>>> reboot. To choose another U-Boot, you would need to do some scripting,
>>>>> or use mender. There is some work on VBE going on (U-Boot standard
>>>>> boot) but it will take a while to all land.
>>>>> 
>>>>> Regards,
>>>>> SImon
>>>>> 
>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Thanks for your answer in advance.
>>>>>> Aubin
>>>>>> 
>>>>>> 
>>>>>> On Tue, 30 Aug 2022 at 04:30, Simon Glass <sjg@chromium.org> wrote:
>>>>>>> 
>>>>>>> Hi Aubin,
>>>>>>> 
>>>>>>> On Mon, 29 Aug 2022 at 01:40, momo aubin <aubinno@gmail.com> wrote:
>>>>>>>> 
>>>>>>>> Hi Simon,
>>>>>>>> I got what is the 'dm tree' which is a driver model. This command could be done only in uboot stage. but i got the situation in which the initialisation of u-boot has not finished yet as showing in the following picture.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> .i would like to know what is wrong in the initialisation ?
>>>>>>> 
>>>>>>> Please try to avoid top posting.
>>>>>>> 
>>>>>>> I think the best thing is to move to the latest U-Boot. You are about
>>>>>>> 9 years behind! But as to your question, I am really not sure. If it
>>>>>>> is a TI board, you could try asking them?
>>>>>>> 
>>>>>>> Regards,
>>>>>>> Simon
>>>>>>> 
>>>>>>> 
>>>>>>>> 
>>>>>>>> Best Regard,
>>>>>>>> Aubin
>>>>>>>> 
>>>>>>>> On Mon, 29 Aug 2022 at 05:24, momo aubin <aubinno@gmail.com> wrote:
>>>>>>>>> 
>>>>>>>>> Hi Simon,
>>>>>>>>> 
>>>>>>>>> Thanks for your answer.
>>>>>>>>> 
>>>>>>>>> The script that you are telling it is Env.txt right ?
>>>>>>>>> 
>>>>>>>>> What is a 'dm tree' ? Please could you provide me more infos about this ?
>>>>>>>>> 
>>>>>>>>> Thanks for your answer in advance.
>>>>>>>>> 
>>>>>>>>> On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>>> 
>>>>>>>>>> Hi Aubin,
>>>>>>>>>> 
>>>>>>>>>> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
>>>>>>>>>>> 
>>>>>>>>>>> Dear all,
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> Is there any way that allows us to know that uboot has initialised all his
>>>>>>>>>>> peripherals before starting loading kernel ?
>>>>>>>>>>> 
>>>>>>>>>>> The goal of this check is to reset the board in case of bad initialisation
>>>>>>>>>>> and choose a different uboot .
>>>>>>>>>>> 
>>>>>>>>>>> Thanks for your answer in advance.
>>>>>>>>>>> Aubin
>>>>>>>>>> 
>>>>>>>>>> If there is a failure then it likely results in an error-return code
>>>>>>>>>> from board_init_f() or board_init_r(). These generally halt U-Boot /
>>>>>>>>>> cause a reboot. But this only covers the peripherals that U-Boot sets
>>>>>>>>>> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
>>>>>>>>>> 
>>>>>>>>>> U-Boot typically does not init a peripheral unless it is needed for U-Boot.
>>>>>>>>>> 
>>>>>>>>>> While U-Boot is running (e.g. a script) it may start up other
>>>>>>>>>> peripherals (e.g. to read a kernel from USB) and in those cases errors
>>>>>>>>>> can be handled by the script.
>>>>>>>>>> 
>>>>>>>>>> You can use 'dm tree' to see what devices have been probed successfully.
>>>>>>>>>> 
>>>>>>>>>> Regards,
>>>>>>>>>> Simon
>> 
>> 
>> Hi Simon,
>> 
>> Thanks for your answer and explanations.
>> 
>> The sequence of boot is :
>> RBL->UBL->UBOOT->Kernel->ROOTFS.
>> 
>> According to this sequence, ubl is the one who chooses which uboot needs to be started, then writing the script means writing them inside ubl. However, Ubl doesn't have access to the environment variable  in order to know which u-boot has been used first.
> 
> I don't know what RBL and UBL are.
> 
>> 
>> My question is .
>> Is it possible to choose another u-boot (u-boot2) inside the first u-boot (u-boot1) ?
> 
> Yes you can jump from one U-Boot to another. Something like 'dcache
> off; go <addr>' should work.
I will implement a timer whenever the kernel won’t start the system will jump to another u-boot. 

> 
> 
>> 
>> Is this correct ?
> 
> Regards,
> Simon
Thanks for your answer. 

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

* Re: Question about uboot initialisation
  2022-09-12 20:59                     ` momo aubin
@ 2022-10-13 19:35                       ` momo aubin
  2022-10-14 15:56                         ` Simon Glass
  0 siblings, 1 reply; 12+ messages in thread
From: momo aubin @ 2022-10-13 19:35 UTC (permalink / raw)
  To: Simon Glass; +Cc: U-Boot Mailing List

Hi Simon, 

> On 12 Sep 2022, at 10:59 PM, momo aubin <aubinno@gmail.com> wrote:
> 
> 
> 
> Sent from my iPhone
> 
>> On 12 Sep 2022, at 8:31 PM, Simon Glass <sjg@chromium.org> wrote:
>> 
>> Hi Aubin,
>> 
>>>> On Mon, 12 Sept 2022 at 09:13, momo aubin <aubinno@gmail.com> wrote:
>>> 
>>> 
>>> 
>>>> On Mon, 12 Sept 2022 at 17:07, Simon Glass <sjg@chromium.org> wrote:
>>>> 
>>>> Hi Aubin,
>>>> 
>>>> On Mon, 12 Sept 2022 at 08:23, momo aubin <aubinno@gmail.com> wrote:
>>>>> 
>>>>> Hi Simon,
>>>>> 
>>>>> Thanks for your answer and explanations.
>>>>> 
>>>>> The sequence of boot is :
>>>>> RBL->UBL->UBOOT->Kernel->ROOTFS.
>>>>> 
>>>>> According to this sequence, ubl is the one who chooses which uboot needs to be started, then writing the script means writing them inside ubl. However, Ubl doesn't have access to the environment variable  in order to know which u-boot has been used first.
>>>>> 
>>>>> My question is .
>>>>> Is it possible to choose another u-boot (u-boot2) inside the first u-boot (u-boot1) ?
>>>> 
>>>> Can you please try that reply again, without top posting?
>>>> 
>>>> https://www.google.com/search?q=top+posting
>>>> 
>>>> Regards,
>>>> Simon
>>>> 
>>>> 
>>>>> 
>>>>> Regards,
>>>>> Aubin
>>>>> 
>>>>> On Mon, 12 Sept 2022 at 15:35, Simon Glass <sjg@chromium.org> wrote:
>>>>>> 
>>>>>> Hi Momo,
>>>>>> 
>>>>>> On Sun, 11 Sept 2022 at 08:29, momo aubin <aubinno@gmail.com> wrote:
>>>>>>> 
>>>>>>> Hi Simon,
>>>>>>> 
>>>>>>> Thanks for getting back to me.
>>>>>>> 
>>>>>>> How can I avoid top posting ? i'm a new
>>>>>> 
>>>>>> You can do a web search for "top posting" which explains the issue
>>>>>> better than I can.
>>>>>> 
>>>>>>> 
>>>>>>> How uboot know that the kernel has started ?
>>>>>> 
>>>>>> Generally it does not. U-Boot's job is typically over once it jumps to
>>>>>> the kernel.
>>>>>> 
>>>>>>> If the system is blocked during the u-boot stage, is it possible to restart all the systems ?
>>>>>>> It is possible to put a timer in the u-boot stage in case of the kernel has not started , can the system reboot by choosing another u-boot ?
>>>>>> 
>>>>>> You can use a watchdog timer to reboot the system. It can be set up in
>>>>>> U-Boot, then it Linux does not kick it in time, it will cause a
>>>>>> reboot. To choose another U-Boot, you would need to do some scripting,
>>>>>> or use mender. There is some work on VBE going on (U-Boot standard
>>>>>> boot) but it will take a while to all land.
>>>>>> 
>>>>>> Regards,
>>>>>> SImon
>>>>>> 
>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> Thanks for your answer in advance.
>>>>>>> Aubin
>>>>>>> 
>>>>>>> 
>>>>>>> On Tue, 30 Aug 2022 at 04:30, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>> 
>>>>>>>> Hi Aubin,
>>>>>>>> 
>>>>>>>> On Mon, 29 Aug 2022 at 01:40, momo aubin <aubinno@gmail.com> wrote:
>>>>>>>>> 
>>>>>>>>> Hi Simon,
>>>>>>>>> I got what is the 'dm tree' which is a driver model. This command could be done only in uboot stage. but i got the situation in which the initialisation of u-boot has not finished yet as showing in the following picture.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> .i would like to know what is wrong in the initialisation ?
>>>>>>>> 
>>>>>>>> Please try to avoid top posting.
>>>>>>>> 
>>>>>>>> I think the best thing is to move to the latest U-Boot. You are about
>>>>>>>> 9 years behind! But as to your question, I am really not sure. If it
>>>>>>>> is a TI board, you could try asking them?
>>>>>>>> 
>>>>>>>> Regards,
>>>>>>>> Simon
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Best Regard,
>>>>>>>>> Aubin
>>>>>>>>> 
>>>>>>>>> On Mon, 29 Aug 2022 at 05:24, momo aubin <aubinno@gmail.com> wrote:
>>>>>>>>>> 
>>>>>>>>>> Hi Simon,
>>>>>>>>>> 
>>>>>>>>>> Thanks for your answer.
>>>>>>>>>> 
>>>>>>>>>> The script that you are telling it is Env.txt right ?
>>>>>>>>>> 
>>>>>>>>>> What is a 'dm tree' ? Please could you provide me more infos about this ?
>>>>>>>>>> 
>>>>>>>>>> Thanks for your answer in advance.
>>>>>>>>>> 
>>>>>>>>>> On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>>>> 
>>>>>>>>>>> Hi Aubin,
>>>>>>>>>>> 
>>>>>>>>>>> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>> Dear all,
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> Is there any way that allows us to know that uboot has initialised all his
>>>>>>>>>>>> peripherals before starting loading kernel ?
>>>>>>>>>>>> 
>>>>>>>>>>>> The goal of this check is to reset the board in case of bad initialisation
>>>>>>>>>>>> and choose a different uboot .
>>>>>>>>>>>> 
>>>>>>>>>>>> Thanks for your answer in advance.
>>>>>>>>>>>> Aubin
>>>>>>>>>>> 
>>>>>>>>>>> If there is a failure then it likely results in an error-return code
>>>>>>>>>>> from board_init_f() or board_init_r(). These generally halt U-Boot /
>>>>>>>>>>> cause a reboot. But this only covers the peripherals that U-Boot sets
>>>>>>>>>>> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
>>>>>>>>>>> 
>>>>>>>>>>> U-Boot typically does not init a peripheral unless it is needed for U-Boot.
>>>>>>>>>>> 
>>>>>>>>>>> While U-Boot is running (e.g. a script) it may start up other
>>>>>>>>>>> peripherals (e.g. to read a kernel from USB) and in those cases errors
>>>>>>>>>>> can be handled by the script.
>>>>>>>>>>> 
>>>>>>>>>>> You can use 'dm tree' to see what devices have been probed successfully.
>>>>>>>>>>> 
>>>>>>>>>>> Regards,
>>>>>>>>>>> Simon
>>> 
>>> 
>>> Hi Simon,
>>> 
>>> Thanks for your answer and explanations.
>>> 
>>> The sequence of boot is :
>>> RBL->UBL->UBOOT->Kernel->ROOTFS.
>>> 
>>> According to this sequence, ubl is the one who chooses which uboot needs to be started, then writing the script means writing them inside ubl. However, Ubl doesn't have access to the environment variable  in order to know which u-boot has been used first.
>> 
>> I don't know what RBL and UBL are.
>> 
>>> 
>>> My question is .
>>> Is it possible to choose another u-boot (u-boot2) inside the first u-boot (u-boot1) ?
>> 
>> Yes you can jump from one U-Boot to another. Something like 'dcache
>> off; go <addr>' should work.
> I will implement a timer whenever the kernel won’t start the system will jump to another u-boot. 
> 
>> 
>> 
>>> 
>>> Is this correct ?
>> 
>> Regards,
>> Simon
> Thanks for your answer.

When the system is running and we have two uboot in two différents partition, is there a way to check if the second uboot is corrupted ? 

Thanks in advance for your answer.

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

* Re: Question about uboot initialisation
  2022-10-13 19:35                       ` momo aubin
@ 2022-10-14 15:56                         ` Simon Glass
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Glass @ 2022-10-14 15:56 UTC (permalink / raw)
  To: momo aubin; +Cc: U-Boot Mailing List

Hi Momo,

On Thu, 13 Oct 2022 at 13:35, momo aubin <aubinno@gmail.com> wrote:
>
> Hi Simon,
>
> > On 12 Sep 2022, at 10:59 PM, momo aubin <aubinno@gmail.com> wrote:
> >
> > 
> >
> > Sent from my iPhone
> >
> >> On 12 Sep 2022, at 8:31 PM, Simon Glass <sjg@chromium.org> wrote:
> >>
> >> Hi Aubin,
> >>
> >>>> On Mon, 12 Sept 2022 at 09:13, momo aubin <aubinno@gmail.com> wrote:
> >>>
> >>>
> >>>
> >>>> On Mon, 12 Sept 2022 at 17:07, Simon Glass <sjg@chromium.org> wrote:
> >>>>
> >>>> Hi Aubin,
> >>>>
> >>>> On Mon, 12 Sept 2022 at 08:23, momo aubin <aubinno@gmail.com> wrote:
> >>>>>
> >>>>> Hi Simon,
> >>>>>
> >>>>> Thanks for your answer and explanations.
> >>>>>
> >>>>> The sequence of boot is :
> >>>>> RBL->UBL->UBOOT->Kernel->ROOTFS.
> >>>>>
> >>>>> According to this sequence, ubl is the one who chooses which uboot needs to be started, then writing the script means writing them inside ubl. However, Ubl doesn't have access to the environment variable  in order to know which u-boot has been used first.
> >>>>>
> >>>>> My question is .
> >>>>> Is it possible to choose another u-boot (u-boot2) inside the first u-boot (u-boot1) ?
> >>>>
> >>>> Can you please try that reply again, without top posting?
> >>>>
> >>>> https://www.google.com/search?q=top+posting
> >>>>
> >>>> Regards,
> >>>> Simon
> >>>>
> >>>>
> >>>>>
> >>>>> Regards,
> >>>>> Aubin
> >>>>>
> >>>>> On Mon, 12 Sept 2022 at 15:35, Simon Glass <sjg@chromium.org> wrote:
> >>>>>>
> >>>>>> Hi Momo,
> >>>>>>
> >>>>>> On Sun, 11 Sept 2022 at 08:29, momo aubin <aubinno@gmail.com> wrote:
> >>>>>>>
> >>>>>>> Hi Simon,
> >>>>>>>
> >>>>>>> Thanks for getting back to me.
> >>>>>>>
> >>>>>>> How can I avoid top posting ? i'm a new
> >>>>>>
> >>>>>> You can do a web search for "top posting" which explains the issue
> >>>>>> better than I can.
> >>>>>>
> >>>>>>>
> >>>>>>> How uboot know that the kernel has started ?
> >>>>>>
> >>>>>> Generally it does not. U-Boot's job is typically over once it jumps to
> >>>>>> the kernel.
> >>>>>>
> >>>>>>> If the system is blocked during the u-boot stage, is it possible to restart all the systems ?
> >>>>>>> It is possible to put a timer in the u-boot stage in case of the kernel has not started , can the system reboot by choosing another u-boot ?
> >>>>>>
> >>>>>> You can use a watchdog timer to reboot the system. It can be set up in
> >>>>>> U-Boot, then it Linux does not kick it in time, it will cause a
> >>>>>> reboot. To choose another U-Boot, you would need to do some scripting,
> >>>>>> or use mender. There is some work on VBE going on (U-Boot standard
> >>>>>> boot) but it will take a while to all land.
> >>>>>>
> >>>>>> Regards,
> >>>>>> SImon
> >>>>>>
> >>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> Thanks for your answer in advance.
> >>>>>>> Aubin
> >>>>>>>
> >>>>>>>
> >>>>>>> On Tue, 30 Aug 2022 at 04:30, Simon Glass <sjg@chromium.org> wrote:
> >>>>>>>>
> >>>>>>>> Hi Aubin,
> >>>>>>>>
> >>>>>>>> On Mon, 29 Aug 2022 at 01:40, momo aubin <aubinno@gmail.com> wrote:
> >>>>>>>>>
> >>>>>>>>> Hi Simon,
> >>>>>>>>> I got what is the 'dm tree' which is a driver model. This command could be done only in uboot stage. but i got the situation in which the initialisation of u-boot has not finished yet as showing in the following picture.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> .i would like to know what is wrong in the initialisation ?
> >>>>>>>>
> >>>>>>>> Please try to avoid top posting.
> >>>>>>>>
> >>>>>>>> I think the best thing is to move to the latest U-Boot. You are about
> >>>>>>>> 9 years behind! But as to your question, I am really not sure. If it
> >>>>>>>> is a TI board, you could try asking them?
> >>>>>>>>
> >>>>>>>> Regards,
> >>>>>>>> Simon
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Best Regard,
> >>>>>>>>> Aubin
> >>>>>>>>>
> >>>>>>>>> On Mon, 29 Aug 2022 at 05:24, momo aubin <aubinno@gmail.com> wrote:
> >>>>>>>>>>
> >>>>>>>>>> Hi Simon,
> >>>>>>>>>>
> >>>>>>>>>> Thanks for your answer.
> >>>>>>>>>>
> >>>>>>>>>> The script that you are telling it is Env.txt right ?
> >>>>>>>>>>
> >>>>>>>>>> What is a 'dm tree' ? Please could you provide me more infos about this ?
> >>>>>>>>>>
> >>>>>>>>>> Thanks for your answer in advance.
> >>>>>>>>>>
> >>>>>>>>>> On Sat, 27 Aug 2022 at 02:21, Simon Glass <sjg@chromium.org> wrote:
> >>>>>>>>>>>
> >>>>>>>>>>> Hi Aubin,
> >>>>>>>>>>>
> >>>>>>>>>>> On Fri, 26 Aug 2022 at 06:41, momo aubin <aubinno@gmail.com> wrote:
> >>>>>>>>>>>>
> >>>>>>>>>>>> Dear all,
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> Is there any way that allows us to know that uboot has initialised all his
> >>>>>>>>>>>> peripherals before starting loading kernel ?
> >>>>>>>>>>>>
> >>>>>>>>>>>> The goal of this check is to reset the board in case of bad initialisation
> >>>>>>>>>>>> and choose a different uboot .
> >>>>>>>>>>>>
> >>>>>>>>>>>> Thanks for your answer in advance.
> >>>>>>>>>>>> Aubin
> >>>>>>>>>>>
> >>>>>>>>>>> If there is a failure then it likely results in an error-return code
> >>>>>>>>>>> from board_init_f() or board_init_r(). These generally halt U-Boot /
> >>>>>>>>>>> cause a reboot. But this only covers the peripherals that U-Boot sets
> >>>>>>>>>>> up early, like serial, clocks, pinctrl, MMC, PCI, etc.
> >>>>>>>>>>>
> >>>>>>>>>>> U-Boot typically does not init a peripheral unless it is needed for U-Boot.
> >>>>>>>>>>>
> >>>>>>>>>>> While U-Boot is running (e.g. a script) it may start up other
> >>>>>>>>>>> peripherals (e.g. to read a kernel from USB) and in those cases errors
> >>>>>>>>>>> can be handled by the script.
> >>>>>>>>>>>
> >>>>>>>>>>> You can use 'dm tree' to see what devices have been probed successfully.
> >>>>>>>>>>>
> >>>>>>>>>>> Regards,
> >>>>>>>>>>> Simon
> >>>
> >>>
> >>> Hi Simon,
> >>>
> >>> Thanks for your answer and explanations.
> >>>
> >>> The sequence of boot is :
> >>> RBL->UBL->UBOOT->Kernel->ROOTFS.
> >>>
> >>> According to this sequence, ubl is the one who chooses which uboot needs to be started, then writing the script means writing them inside ubl. However, Ubl doesn't have access to the environment variable  in order to know which u-boot has been used first.
> >>
> >> I don't know what RBL and UBL are.
> >>
> >>>
> >>> My question is .
> >>> Is it possible to choose another u-boot (u-boot2) inside the first u-boot (u-boot1) ?
> >>
> >> Yes you can jump from one U-Boot to another. Something like 'dcache
> >> off; go <addr>' should work.
> > I will implement a timer whenever the kernel won’t start the system will jump to another u-boot.
> >
> >>
> >>
> >>>
> >>> Is this correct ?
> >>
> >> Regards,
> >> Simon
> > Thanks for your answer.
>
> When the system is running and we have two uboot in two différents partition, is there a way to check if the second uboot is corrupted ?
>

The VBE system is intended to implement all this, with SPL doing the
check. See [1] for details, but it is still under development.

For now you can script it, by hashing and then using the other one if
the hash is wrong.

Regards,
Simon

[1] https://u-boot.readthedocs.io/en/latest/develop/vbe.html?highlight=vbe





> Thanks in advance for your answer.

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

end of thread, other threads:[~2022-10-14 15:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 12:35 Question about uboot initialisation momo aubin
2022-08-27  0:21 ` Simon Glass
2022-08-29  3:24   ` momo aubin
2022-08-29  7:40     ` momo aubin
2022-08-30  2:29       ` Simon Glass
2022-09-11 14:29         ` momo aubin
2022-09-12 13:34           ` Simon Glass
     [not found]             ` <CAM3ZEw5kKHFpxE8vxNHU5xWZAem-aj2LfN+Qpmu6nTE2_uom+Q@mail.gmail.com>
     [not found]               ` <CAPnjgZ1+79kNoeeeRJd1uTQxv6MPJ-c8UtGcTqDrb1HeBAeQYQ@mail.gmail.com>
2022-09-12 15:13                 ` momo aubin
2022-09-12 18:31                   ` Simon Glass
2022-09-12 20:59                     ` momo aubin
2022-10-13 19:35                       ` momo aubin
2022-10-14 15:56                         ` Simon Glass

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.