All of lore.kernel.org
 help / color / mirror / Atom feed
From: Icenowy Zheng <icenowy@aosc.xyz>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] Re: [RFC PATCH 08/11] sunxi: SPL: add FIT config selector for Pine64 boards
Date: Sat, 21 Jan 2017 10:16:55 +0800	[thread overview]
Message-ID: <1546411484965015@web12g.yandex.ru> (raw)
In-Reply-To: <a5652ef0-abbc-95c7-400e-867a8adb9a35@arm.com>



21.01.2017, 05:56, "Andr? Przywara" <andre.przywara@arm.com>:
> On 20/01/17 21:35, Maxime Ripard wrote:
>
> Hi Maxime,
>
> thanks for having a look!
>
>> ?On Fri, Jan 20, 2017 at 01:53:28AM +0000, Andre Przywara wrote:
>>> ?For a board or platform to support FIT loading in the SPL, it has to
>>> ?provide a board_fit_config_name_match() routine, which helps to select
>>> ?one of possibly multiple DTBs contained in a FIT image.
>>> ?Provide a simple function to cover the two different Pine64 models,
>>> ?which can be easily told apart by looking at the amount of installed
>>> ?RAM.
>>>
>>> ?Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>> ?---
>>> ??board/sunxi/board.c | 13 +++++++++++++
>>> ??1 file changed, 13 insertions(+)
>>>
>>> ?diff --git a/board/sunxi/board.c b/board/sunxi/board.c
>>> ?index 5365638..bbbb826 100644
>>> ?--- a/board/sunxi/board.c
>>> ?+++ b/board/sunxi/board.c
>>> ?@@ -726,3 +726,16 @@ int ft_board_setup(void *blob, bd_t *bd)
>>> ??#endif
>>> ??????????return 0;
>>> ??}
>>> ?+
>>> ?+#ifdef CONFIG_SPL_LOAD_FIT
>>> ?+int board_fit_config_name_match(const char *name)
>>> ?+{
>>> ?+#ifdef CONFIG_MACH_SUN50I
>>> ?+ if ((gd->ram_size > 512 * 1024 * 1024))
>>> ?+ return !strcmp(name, "sun50i-a64-pine64-plus");
>>> ?+ else
>>> ?+ return !strcmp(name, "sun50i-a64-pine64");
>>> ?+#endif
>>> ?+ return -1;
>>> ?+}
>>
>> ?That looks fishy. It means that any A64 board with CONFIG_SPL_LOAD_FIT
>> ?enabled will be considered a pine64 board?
>
> Yes, at least for now, because that's the only A64 board we officially
> support so far.
> And yes again, it is fishy. It is more a demo or a placeholder for now,
> because you _need_ an implementation of board_fit_config_name_match()
> once you enable CONFIG_SPL_LOAD_FIT.

You have a Banana Pi M64, right?

And I do not want to change code every time we have a new A64 board...

> One solution would be to have only one DTB supported per build, so
> board_fit_config_name_match() always returns 0.
>

I think that's what we're did in previous u-boot-sunxi-with-spl.bin .

> Another (better) solution would be to store the board name in the SPL
> header, which could be done later when flashing the image. Then this
> function would just return strcmp(name, spl_header_name) or 0 if no name
> is found for whatever reason.
>
> Ideas welcome. To be honest, this .dtb selection is nice, but I am not
> married to it. It usefulness maybe limited at the moment.
>
> Cheers,
> Andre.
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2017-01-21  2:16 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20  1:53 [U-Boot] [RFC PATCH 00/11] extend FIT loading support (plus Pine64/ATF support) Andre Przywara
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 01/11] SPL: FIT: refactor FDT loading Andre Przywara
2017-01-23  8:56   ` Lokesh Vutla
2017-01-27 21:29   ` Simon Glass
2017-01-28  0:38     ` André Przywara
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 02/11] SPL: FIT: rework U-Boot image loading Andre Przywara
2017-01-23  8:56   ` Lokesh Vutla
2017-01-27 21:29   ` Simon Glass
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 03/11] SPL: FIT: factor out spl_load_fit_image() Andre Przywara
2017-01-22  7:16   ` Kever Yang
2017-01-22 10:42     ` André Przywara
2017-01-23  2:37       ` Kever Yang
2017-01-23  8:53   ` Lokesh Vutla
2017-01-23 12:58     ` Tom Rini
2017-01-23 13:31       ` Lokesh Vutla
2017-01-23 13:50         ` Tom Rini
2017-01-23 23:07     ` André Przywara
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 04/11] SPL: FIT: allow loading multiple images Andre Przywara
2017-01-22  7:08   ` Kever Yang
2017-01-22 10:58     ` André Przywara
2017-01-23  2:49       ` Kever Yang
2017-01-23 12:47         ` Michal Simek
2017-01-23 23:52         ` André Przywara
2017-01-23  8:57   ` Lokesh Vutla
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 05/11] tools: mksunxiboot: allow larger SPL binaries Andre Przywara
2017-01-21  4:24   ` Siarhei Siamashka
2017-01-21 11:17     ` André Przywara
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 06/11] sunxi: A64: SPL: allow large SPL binary Andre Przywara
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 07/11] sunxi: A64: move SPL stack to end of SRAM A2 Andre Przywara
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 08/11] sunxi: SPL: add FIT config selector for Pine64 boards Andre Przywara
2017-01-20 21:35   ` Maxime Ripard
2017-01-20 21:55     ` André Przywara
2017-01-21  2:16       ` [U-Boot] [linux-sunxi] " Icenowy Zheng
2017-01-21  2:16       ` Icenowy Zheng [this message]
2017-01-21  4:05       ` [U-Boot] " Siarhei Siamashka
2017-01-21 15:15         ` André Przywara
2017-01-23 17:29           ` Maxime Ripard
2017-01-23 22:55             ` André Przywara
2017-01-26 10:55               ` Maxime Ripard
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 09/11] sunxi: Pine64: defconfig: enable SPL FIT support Andre Przywara
2017-01-20 21:36   ` Maxime Ripard
2017-01-20 21:55     ` André Przywara
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 10/11] sunxi: Pine64: add FIT image source Andre Przywara
2017-01-20  1:53 ` [U-Boot] [RFC PATCH 11/11] SPL: SPI: sunxi: add SPL FIT image support Andre Przywara
2017-01-20 21:37   ` Maxime Ripard
2017-01-20 21:58     ` André Przywara
2017-01-20 17:02 ` [U-Boot] [RFC PATCH 00/11] extend FIT loading support (plus Pine64/ATF support) Andrew F. Davis
2017-01-20 17:17   ` Andre Przywara
2017-01-20 17:35     ` Andrew F. Davis
2017-01-20 17:48       ` Andre Przywara
2017-01-20 19:07         ` [U-Boot] [linux-sunxi] " Icenowy Zheng
2017-01-20 22:21       ` [U-Boot] " André Przywara
2017-01-27 21:29 ` Simon Glass
2017-01-28  1:47   ` André Przywara
2017-02-06 15:33     ` Simon Glass
2017-02-06 16:09       ` Andre Przywara
2017-02-06 16:17       ` Andrew F. Davis
2017-02-06 16:32         ` Andre Przywara
2017-02-06 16:37           ` Andrew F. Davis
2017-01-24  6:30 [U-Boot] [linux-sunxi] Re: [RFC PATCH 08/11] sunxi: SPL: add FIT config selector for Pine64 boards Icenowy Zheng
2017-01-26 10:57 ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1546411484965015@web12g.yandex.ru \
    --to=icenowy@aosc.xyz \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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.