[u-boot,1/1] config/ast-common: hack bootopts

Message ID 20170721223326.28674-2-patrick@stwcx.xyz
State RFC, archived
Headers show

Commit Message

Patrick Williams July 21, 2017, 10:33 p.m.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
---
 include/configs/ast-common.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Rick Altherr July 24, 2017, 6:16 p.m. | #1
Why?

On Fri, Jul 21, 2017 at 3:33 PM, Patrick Williams <patrick@stwcx.xyz> wrote:

> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
> ---
>  include/configs/ast-common.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
> index 110c780070..6f2a50b854 100644
> --- a/include/configs/ast-common.h
> +++ b/include/configs/ast-common.h
> @@ -84,7 +84,10 @@
>  #define CONFIG_SYS_MAXARGS             16
>  #define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
>
> +#if 0
>  #define CONFIG_BOOTARGS                        "console=ttyS4,115200n8
> root=/dev/ram rw"
> +#endif
> +#define CONFIG_BOOTARGS                         "console=ttyS4,115200n8
> root=/dev/mtdblock4 ro"
>
>  #define CONFIG_AST_SPI_NOR    /* AST SPI NOR Flash */
>  #define CONFIG_FMC_CS                  1
> @@ -96,11 +99,14 @@
>  #define CONFIG_ENV_OFFSET              0x60000 /* environment starts
> here  */
>  #define CONFIG_ENV_SIZE                        0x20000 /* Total Size of
> Environment Sector */
>
> +#if 0
>  #define CONFIG_BOOTCOMMAND     \
>         "fdt addr 20080000; " \
>         "if fdt get value ramdisk_conf /configurations/conf@1 ramdisk;
> then " \
>         "    bootm 20080000; else bootm 20080000 20300000; " \
>         "fi"
> +#endif
> +#define CONFIG_BOOTCOMMAND                      "fdt addr 20080000; bootm
> 20080000"
>  #define CONFIG_ENV_OVERWRITE
>
>  #define ASPEED_ENV_SETTINGS \
> --
> 2.13.0
>
>
>
Patrick Williams July 25, 2017, 10:39 p.m. | #2
On Mon, Jul 24, 2017 at 11:16:20AM -0700, Rick Altherr wrote:
> Why?

Hopefully my previous email in the thread explains.  The main thing I
need to be able to change is the BOOTARGS in order to switch from an
initramfs-based boot to a direct-to-squashfs boot.  The BOOTCOMMAND
maybe isn't needed yet until we move the kernel into UBI.

> 
> On Fri, Jul 21, 2017 at 3:33 PM, Patrick Williams <patrick@stwcx.xyz> wrote:
> 
> > Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
> > ---
> >  include/configs/ast-common.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
> > index 110c780070..6f2a50b854 100644
> > --- a/include/configs/ast-common.h
> > +++ b/include/configs/ast-common.h
> > @@ -84,7 +84,10 @@
> >  #define CONFIG_SYS_MAXARGS             16
> >  #define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
> >
> > +#if 0
> >  #define CONFIG_BOOTARGS                        "console=ttyS4,115200n8
> > root=/dev/ram rw"
> > +#endif
> > +#define CONFIG_BOOTARGS                         "console=ttyS4,115200n8
> > root=/dev/mtdblock4 ro"
> >
> >  #define CONFIG_AST_SPI_NOR    /* AST SPI NOR Flash */
> >  #define CONFIG_FMC_CS                  1
> > @@ -96,11 +99,14 @@
> >  #define CONFIG_ENV_OFFSET              0x60000 /* environment starts
> > here  */
> >  #define CONFIG_ENV_SIZE                        0x20000 /* Total Size of
> > Environment Sector */
> >
> > +#if 0
> >  #define CONFIG_BOOTCOMMAND     \
> >         "fdt addr 20080000; " \
> >         "if fdt get value ramdisk_conf /configurations/conf@1 ramdisk;
> > then " \
> >         "    bootm 20080000; else bootm 20080000 20300000; " \
> >         "fi"
> > +#endif
> > +#define CONFIG_BOOTCOMMAND                      "fdt addr 20080000; bootm
> > 20080000"
> >  #define CONFIG_ENV_OVERWRITE
> >
> >  #define ASPEED_ENV_SETTINGS \
> > --
> > 2.13.0
> >
> >
> >

Patch

diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
index 110c780070..6f2a50b854 100644
--- a/include/configs/ast-common.h
+++ b/include/configs/ast-common.h
@@ -84,7 +84,10 @@ 
 #define CONFIG_SYS_MAXARGS		16
 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
+#if 0
 #define CONFIG_BOOTARGS			"console=ttyS4,115200n8 root=/dev/ram rw"
+#endif
+#define CONFIG_BOOTARGS                         "console=ttyS4,115200n8 root=/dev/mtdblock4 ro"
 
 #define CONFIG_AST_SPI_NOR    /* AST SPI NOR Flash */
 #define CONFIG_FMC_CS			1
@@ -96,11 +99,14 @@ 
 #define CONFIG_ENV_OFFSET		0x60000	/* environment starts here  */
 #define CONFIG_ENV_SIZE			0x20000	/* Total Size of Environment Sector */
 
+#if 0
 #define CONFIG_BOOTCOMMAND	\
 	"fdt addr 20080000; " \
 	"if fdt get value ramdisk_conf /configurations/conf@1 ramdisk; then " \
 	"    bootm 20080000; else bootm 20080000 20300000; " \
 	"fi"
+#endif
+#define CONFIG_BOOTCOMMAND                      "fdt addr 20080000; bootm 20080000"
 #define CONFIG_ENV_OVERWRITE
 
 #define ASPEED_ENV_SETTINGS \