diff mbox series

[u-boot,v2016.07-aspeed-openbmc] aspeed: un-hardcode FIT configuration selection

Message ID 20180202030725.11771-1-bradleyb@fuzziesquirrel.com
State Accepted, archived
Headers show
Series [u-boot,v2016.07-aspeed-openbmc] aspeed: un-hardcode FIT configuration selection | expand

Commit Message

Brad Bishop Feb. 2, 2018, 3:07 a.m. UTC
Rely on the FDT parser to select a FIT config when looking for a
ramdisk_conf.  This allows image builders to use arbitrary configuration
names like /configurations/conf@foo.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
---
 include/configs/ast-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joel Stanley Feb. 13, 2018, 3:58 a.m. UTC | #1
On Fri, Feb 2, 2018 at 1:37 PM, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
> Rely on the FDT parser to select a FIT config when looking for a
> ramdisk_conf.  This allows image builders to use arbitrary configuration
> names like /configurations/conf@foo.

Can you elaborate?

Do we even need this script? IIRC it was in place to support pre-FIT
configurations where the initrd and the kernel were stored in seperate
locations in flash. Now that all systems use FIT, we can simply say
"bootm 2008000".

I suggest we don't need it, so we should change the environment to be

#define CONFIG_BOOTCOMMAND "bootm 20080000"

Cheers,

Joel

>
> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
> ---
>  include/configs/ast-common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
> index 89b0cd8533..fbae281811 100644
> --- a/include/configs/ast-common.h
> +++ b/include/configs/ast-common.h
> @@ -110,7 +110,7 @@
>
>  #define CONFIG_BOOTCOMMAND     \
>         "fdt addr 20080000; " \
> -       "if fdt get value ramdisk_conf /configurations/conf@1 ramdisk; then " \
> +       "if fdt get value ramdisk_conf /configurations/conf ramdisk; then " \
>         "    bootm 20080000; else bootm 20080000 20300000; " \
>         "fi"
>  #define CONFIG_ENV_OVERWRITE
> --
> 2.14.3
Brad Bishop Feb. 13, 2018, 4:03 a.m. UTC | #2
> On Feb 12, 2018, at 10:58 PM, Joel Stanley <joel@jms.id.au> wrote:
> 
> On Fri, Feb 2, 2018 at 1:37 PM, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
>> Rely on the FDT parser to select a FIT config when looking for a
>> ramdisk_conf.  This allows image builders to use arbitrary configuration
>> names like /configurations/conf@foo.
> 
> Can you elaborate?
> 
> Do we even need this script? IIRC it was in place to support pre-FIT
> configurations where the initrd and the kernel were stored in seperate
> locations in flash. Now that all systems use FIT, we can simply say
> "bootm 2008000".
> 
> I suggest we don't need it, so we should change the environment to be
> 
> #define CONFIG_BOOTCOMMAND "bootm 20080000”

Sounds good to me.
Rick Altherr Feb. 13, 2018, 5:58 p.m. UTC | #3
SGTM

On Mon, Feb 12, 2018 at 8:03 PM, Brad Bishop <bradleyb@fuzziesquirrel.com>
wrote:

>
> > On Feb 12, 2018, at 10:58 PM, Joel Stanley <joel@jms.id.au> wrote:
> >
> > On Fri, Feb 2, 2018 at 1:37 PM, Brad Bishop <bradleyb@fuzziesquirrel.com>
> wrote:
> >> Rely on the FDT parser to select a FIT config when looking for a
> >> ramdisk_conf.  This allows image builders to use arbitrary configuration
> >> names like /configurations/conf@foo.
> >
> > Can you elaborate?
> >
> > Do we even need this script? IIRC it was in place to support pre-FIT
> > configurations where the initrd and the kernel were stored in seperate
> > locations in flash. Now that all systems use FIT, we can simply say
> > "bootm 2008000".
> >
> > I suggest we don't need it, so we should change the environment to be
> >
> > #define CONFIG_BOOTCOMMAND "bootm 20080000”
>
> Sounds good to me.
<div dir="ltr">SGTM</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 12, 2018 at 8:03 PM, Brad Bishop <span dir="ltr">&lt;<a href="mailto:bradleyb@fuzziesquirrel.com" target="_blank">bradleyb@fuzziesquirrel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On Feb 12, 2018, at 10:58 PM, Joel Stanley &lt;<a href="mailto:joel@jms.id.au">joel@jms.id.au</a>&gt; wrote:<br>
&gt;<br>
&gt; On Fri, Feb 2, 2018 at 1:37 PM, Brad Bishop &lt;<a href="mailto:bradleyb@fuzziesquirrel.com">bradleyb@fuzziesquirrel.com</a>&gt; wrote:<br>
&gt;&gt; Rely on the FDT parser to select a FIT config when looking for a<br>
&gt;&gt; ramdisk_conf.  This allows image builders to use arbitrary configuration<br>
&gt;&gt; names like /configurations/conf@foo.<br>
&gt;<br>
&gt; Can you elaborate?<br>
&gt;<br>
&gt; Do we even need this script? IIRC it was in place to support pre-FIT<br>
&gt; configurations where the initrd and the kernel were stored in seperate<br>
&gt; locations in flash. Now that all systems use FIT, we can simply say<br>
&gt; &quot;bootm 2008000&quot;.<br>
&gt;<br>
&gt; I suggest we don&#39;t need it, so we should change the environment to be<br>
&gt;<br>
</span>&gt; #define CONFIG_BOOTCOMMAND &quot;bootm 20080000”<br>
<br>
Sounds good to me.</blockquote></div><br></div>
diff mbox series

Patch

diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
index 89b0cd8533..fbae281811 100644
--- a/include/configs/ast-common.h
+++ b/include/configs/ast-common.h
@@ -110,7 +110,7 @@ 
 
 #define CONFIG_BOOTCOMMAND	\
 	"fdt addr 20080000; " \
-	"if fdt get value ramdisk_conf /configurations/conf@1 ramdisk; then " \
+	"if fdt get value ramdisk_conf /configurations/conf ramdisk; then " \
 	"    bootm 20080000; else bootm 20080000 20300000; " \
 	"fi"
 #define CONFIG_ENV_OVERWRITE