Message ID | 20170112021328.27200-3-raltherr@google.com |
---|---|
State | Accepted, archived |
Headers | show |
On Thu, Jan 12, 2017 at 1:13 PM, Rick Altherr <raltherr@google.com> wrote: > If the kernel FIT specifies a ramdisk, use it. Otherwise, expect a > ramdisk at 0x20300000. > > Signed-off-by: Rick Altherr <raltherr@google.com> > --- > > include/configs/ast-common.h | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h > index b39ea33ce7..110c780070 100644 > --- a/include/configs/ast-common.h > +++ b/include/configs/ast-common.h > @@ -96,7 +96,11 @@ > #define CONFIG_ENV_OFFSET 0x60000 /* environment starts here */ > #define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */ > > -#define CONFIG_BOOTCOMMAND "bootm 20080000 20300000" > +#define CONFIG_BOOTCOMMAND \ > + "fdt addr 20080000; " \ > + "if fdt get value ramdisk_conf /configurations/conf@1 ramdisk; then " \ > + " bootm 20080000; else bootm 20080000 20300000; " \ > + "fi" This feels a little clunky. Is this the method upstream suggests to solve this problem? Cheers, Joel
I couldn't find any prior examples. I'll ask upstream what they think. On Mon, Jan 16, 2017 at 4:33 PM, Joel Stanley <joel@jms.id.au> wrote: > On Thu, Jan 12, 2017 at 1:13 PM, Rick Altherr <raltherr@google.com> wrote: > > If the kernel FIT specifies a ramdisk, use it. Otherwise, expect a > > ramdisk at 0x20300000. > > > > Signed-off-by: Rick Altherr <raltherr@google.com> > > --- > > > > include/configs/ast-common.h | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h > > index b39ea33ce7..110c780070 100644 > > --- a/include/configs/ast-common.h > > +++ b/include/configs/ast-common.h > > @@ -96,7 +96,11 @@ > > #define CONFIG_ENV_OFFSET 0x60000 /* environment starts > here */ > > #define CONFIG_ENV_SIZE 0x20000 /* Total Size of > Environment Sector */ > > > > -#define CONFIG_BOOTCOMMAND "bootm 20080000 20300000" > > +#define CONFIG_BOOTCOMMAND \ > > + "fdt addr 20080000; " \ > > + "if fdt get value ramdisk_conf /configurations/conf@1 ramdisk; > then " \ > > + " bootm 20080000; else bootm 20080000 20300000; " \ > > + "fi" > > This feels a little clunky. Is this the method upstream suggests to > solve this problem? > > Cheers, > > Joel >
On 17 January 2017 at 16:33, Rick Altherr <raltherr@google.com> wrote: > I couldn't find any prior examples. I'll ask upstream what they think. > > On Mon, Jan 16, 2017 at 4:33 PM, Joel Stanley <joel@jms.id.au> wrote: >> >> On Thu, Jan 12, 2017 at 1:13 PM, Rick Altherr <raltherr@google.com> wrote: >> > If the kernel FIT specifies a ramdisk, use it. Otherwise, expect a >> > ramdisk at 0x20300000. >> > >> > Signed-off-by: Rick Altherr <raltherr@google.com> >> > --- >> > >> > include/configs/ast-common.h | 6 +++++- >> > 1 file changed, 5 insertions(+), 1 deletion(-) >> > >> > diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h >> > index b39ea33ce7..110c780070 100644 >> > --- a/include/configs/ast-common.h >> > +++ b/include/configs/ast-common.h >> > @@ -96,7 +96,11 @@ >> > #define CONFIG_ENV_OFFSET 0x60000 /* environment starts >> > here */ >> > #define CONFIG_ENV_SIZE 0x20000 /* Total Size of >> > Environment Sector */ >> > >> > -#define CONFIG_BOOTCOMMAND "bootm 20080000 20300000" >> > +#define CONFIG_BOOTCOMMAND \ >> > + "fdt addr 20080000; " \ >> > + "if fdt get value ramdisk_conf /configurations/conf@1 ramdisk; >> > then " \ >> > + " bootm 20080000; else bootm 20080000 20300000; " \ >> > + "fi" >> >> This feels a little clunky. Is this the method upstream suggests to >> solve this problem? >> Clunky, but it works. In general people don't mind too much what you put in your own board scripts. Reviewed-by: Simon Glass <sjg@chromium.org> Regards, Simon
diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h index b39ea33ce7..110c780070 100644 --- a/include/configs/ast-common.h +++ b/include/configs/ast-common.h @@ -96,7 +96,11 @@ #define CONFIG_ENV_OFFSET 0x60000 /* environment starts here */ #define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */ -#define CONFIG_BOOTCOMMAND "bootm 20080000 20300000" +#define CONFIG_BOOTCOMMAND \ + "fdt addr 20080000; " \ + "if fdt get value ramdisk_conf /configurations/conf@1 ramdisk; then " \ + " bootm 20080000; else bootm 20080000 20300000; " \ + "fi" #define CONFIG_ENV_OVERWRITE #define ASPEED_ENV_SETTINGS \
If the kernel FIT specifies a ramdisk, use it. Otherwise, expect a ramdisk at 0x20300000. Signed-off-by: Rick Altherr <raltherr@google.com> --- include/configs/ast-common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)