* [U-Boot PATCH 0/2] aspeed: Use FIT-provided ramdisk if available
@ 2017-01-12 2:13 Rick Altherr
2017-01-12 2:13 ` [U-Boot PATCH 1/2] aspeed: Use HUSH shell Rick Altherr
2017-01-12 2:13 ` [U-Boot PATCH 2/2] aspeed: use FIT-provided ramdisk if available Rick Altherr
0 siblings, 2 replies; 7+ messages in thread
From: Rick Altherr @ 2017-01-12 2:13 UTC (permalink / raw)
To: openbmc
Changes the default boot command on Aspeed SoCs to use a ramdisk from
the kernel's FIT image, if available, and fallback to loading a separate
ramdisk image from a fixed flash location if not. Supporting both
allows for an upgrade path while the ramdisk location is changed.
Rick Altherr (2):
aspeed: Use HUSH shell
aspeed: use FIT-provided ramdisk if available
configs/ast_g4_ncsi_defconfig | 1 +
configs/ast_g4_phy_defconfig | 1 +
configs/ast_g5_ncsi_defconfig | 1 +
configs/ast_g5_phy_defconfig | 1 +
include/configs/ast-common.h | 6 +++++-
5 files changed, 9 insertions(+), 1 deletion(-)
--
2.11.0.390.gc69c2f50cf-goog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot PATCH 1/2] aspeed: Use HUSH shell
2017-01-12 2:13 [U-Boot PATCH 0/2] aspeed: Use FIT-provided ramdisk if available Rick Altherr
@ 2017-01-12 2:13 ` Rick Altherr
2017-01-17 0:31 ` [U-Boot,1/2] " Joel Stanley
2017-01-12 2:13 ` [U-Boot PATCH 2/2] aspeed: use FIT-provided ramdisk if available Rick Altherr
1 sibling, 1 reply; 7+ messages in thread
From: Rick Altherr @ 2017-01-12 2:13 UTC (permalink / raw)
To: openbmc
HUSH is the newer command-line interface that provides scripting
capabilities. Those are needed for an boot command that can boot either
a FIT image that includes a ramdisk or a separate kernel and ramdisk.
Signed-off-by: Rick Altherr <raltherr@google.com>
---
configs/ast_g4_ncsi_defconfig | 1 +
configs/ast_g4_phy_defconfig | 1 +
configs/ast_g5_ncsi_defconfig | 1 +
configs/ast_g5_phy_defconfig | 1 +
4 files changed, 4 insertions(+)
diff --git a/configs/ast_g4_ncsi_defconfig b/configs/ast_g4_ncsi_defconfig
index ab4907cfe2..54686bee5c 100644
--- a/configs/ast_g4_ncsi_defconfig
+++ b/configs/ast_g4_ncsi_defconfig
@@ -7,6 +7,7 @@ CONFIG_CMD_PING=y
CONFIG_EFI_LOADER=n
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
+CONFIG_HUSH_PARSER=y
CONFIG_OF_LIBFDT=y
CONFIG_SPI_FLASH=y
CONFIG_SYS_NS16550=y
diff --git a/configs/ast_g4_phy_defconfig b/configs/ast_g4_phy_defconfig
index 21a56c4b96..f8db39ef13 100644
--- a/configs/ast_g4_phy_defconfig
+++ b/configs/ast_g4_phy_defconfig
@@ -8,6 +8,7 @@ CONFIG_CMD_PING=y
CONFIG_EFI_LOADER=n
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
+CONFIG_HUSH_PARSER=y
CONFIG_OF_LIBFDT=y
CONFIG_SPI_FLASH=y
CONFIG_SYS_NS16550=y
diff --git a/configs/ast_g5_ncsi_defconfig b/configs/ast_g5_ncsi_defconfig
index 7cd4fd116d..74029ed514 100644
--- a/configs/ast_g5_ncsi_defconfig
+++ b/configs/ast_g5_ncsi_defconfig
@@ -7,6 +7,7 @@ CONFIG_CMD_PING=y
CONFIG_EFI_LOADER=n
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
+CONFIG_HUSH_PARSER=y
CONFIG_OF_LIBFDT=y
CONFIG_SPI_FLASH=y
CONFIG_SYS_NS16550=y
diff --git a/configs/ast_g5_phy_defconfig b/configs/ast_g5_phy_defconfig
index c686dd2297..767f3af605 100644
--- a/configs/ast_g5_phy_defconfig
+++ b/configs/ast_g5_phy_defconfig
@@ -8,6 +8,7 @@ CONFIG_CMD_PING=y
CONFIG_EFI_LOADER=n
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
+CONFIG_HUSH_PARSER=y
CONFIG_OF_LIBFDT=y
CONFIG_SPI_FLASH=y
CONFIG_SYS_NS16550=y
--
2.11.0.390.gc69c2f50cf-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot PATCH 2/2] aspeed: use FIT-provided ramdisk if available
2017-01-12 2:13 [U-Boot PATCH 0/2] aspeed: Use FIT-provided ramdisk if available Rick Altherr
2017-01-12 2:13 ` [U-Boot PATCH 1/2] aspeed: Use HUSH shell Rick Altherr
@ 2017-01-12 2:13 ` Rick Altherr
2017-01-17 0:33 ` [U-Boot,2/2] " Joel Stanley
1 sibling, 1 reply; 7+ messages in thread
From: Rick Altherr @ 2017-01-12 2:13 UTC (permalink / raw)
To: openbmc
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"
#define CONFIG_ENV_OVERWRITE
#define ASPEED_ENV_SETTINGS \
--
2.11.0.390.gc69c2f50cf-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [U-Boot,1/2] aspeed: Use HUSH shell
2017-01-12 2:13 ` [U-Boot PATCH 1/2] aspeed: Use HUSH shell Rick Altherr
@ 2017-01-17 0:31 ` Joel Stanley
0 siblings, 0 replies; 7+ messages in thread
From: Joel Stanley @ 2017-01-17 0:31 UTC (permalink / raw)
To: Rick Altherr; +Cc: OpenBMC Maillist
Hi Rick,
On Thu, Jan 12, 2017 at 1:13 PM, Rick Altherr <raltherr@google.com> wrote:
> HUSH is the newer command-line interface that provides scripting
> capabilities. Those are needed for an boot command that can boot either
> a FIT image that includes a ramdisk or a separate kernel and ramdisk.
For some reason this patch didn't arrive in my mailbox. I found it on patchwork.
I took at look at the code size change with enabling this:
$ size u-boot && ls -la u-boot.bin
text data bss dec hex filename
215567 7152 71048 293767 47b87 u-boot
-rw-r--r-- 1 joel joel 222536 Dec 8 12:03 u-boot.bin
$ size u-boot && ls -la u-boot.bin
text data bss dec hex filename
227643 7448 71448 306539 4ad6b u-boot
-rw-r--r-- 1 joel joel 234908 Jan 16 08:30 u-boot.bin
We go up by 5.6%, or 12KB. We're still well within the 384KB partition
size, so there is no issue there.
I've merged it into our u-boot tree.
Cheers,
Joel
> Signed-off-by: Rick Altherr <raltherr@google.com>
> ---
>
> configs/ast_g4_ncsi_defconfig | 1 +
> configs/ast_g4_phy_defconfig | 1 +
> configs/ast_g5_ncsi_defconfig | 1 +
> configs/ast_g5_phy_defconfig | 1 +
> 4 files changed, 4 insertions(+)
>
> diff --git a/configs/ast_g4_ncsi_defconfig b/configs/ast_g4_ncsi_defconfig
> index ab4907cfe2..54686bee5c 100644
> --- a/configs/ast_g4_ncsi_defconfig
> +++ b/configs/ast_g4_ncsi_defconfig
> @@ -7,6 +7,7 @@ CONFIG_CMD_PING=y
> CONFIG_EFI_LOADER=n
> CONFIG_FIT=y
> CONFIG_FIT_VERBOSE=y
> +CONFIG_HUSH_PARSER=y
> CONFIG_OF_LIBFDT=y
> CONFIG_SPI_FLASH=y
> CONFIG_SYS_NS16550=y
> diff --git a/configs/ast_g4_phy_defconfig b/configs/ast_g4_phy_defconfig
> index 21a56c4b96..f8db39ef13 100644
> --- a/configs/ast_g4_phy_defconfig
> +++ b/configs/ast_g4_phy_defconfig
> @@ -8,6 +8,7 @@ CONFIG_CMD_PING=y
> CONFIG_EFI_LOADER=n
> CONFIG_FIT=y
> CONFIG_FIT_VERBOSE=y
> +CONFIG_HUSH_PARSER=y
> CONFIG_OF_LIBFDT=y
> CONFIG_SPI_FLASH=y
> CONFIG_SYS_NS16550=y
> diff --git a/configs/ast_g5_ncsi_defconfig b/configs/ast_g5_ncsi_defconfig
> index 7cd4fd116d..74029ed514 100644
> --- a/configs/ast_g5_ncsi_defconfig
> +++ b/configs/ast_g5_ncsi_defconfig
> @@ -7,6 +7,7 @@ CONFIG_CMD_PING=y
> CONFIG_EFI_LOADER=n
> CONFIG_FIT=y
> CONFIG_FIT_VERBOSE=y
> +CONFIG_HUSH_PARSER=y
> CONFIG_OF_LIBFDT=y
> CONFIG_SPI_FLASH=y
> CONFIG_SYS_NS16550=y
> diff --git a/configs/ast_g5_phy_defconfig b/configs/ast_g5_phy_defconfig
> index c686dd2297..767f3af605 100644
> --- a/configs/ast_g5_phy_defconfig
> +++ b/configs/ast_g5_phy_defconfig
> @@ -8,6 +8,7 @@ CONFIG_CMD_PING=y
> CONFIG_EFI_LOADER=n
> CONFIG_FIT=y
> CONFIG_FIT_VERBOSE=y
> +CONFIG_HUSH_PARSER=y
> CONFIG_OF_LIBFDT=y
> CONFIG_SPI_FLASH=y
> CONFIG_SYS_NS16550=y
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [U-Boot,2/2] aspeed: use FIT-provided ramdisk if available
2017-01-12 2:13 ` [U-Boot PATCH 2/2] aspeed: use FIT-provided ramdisk if available Rick Altherr
@ 2017-01-17 0:33 ` Joel Stanley
2017-01-17 23:33 ` Rick Altherr
0 siblings, 1 reply; 7+ messages in thread
From: Joel Stanley @ 2017-01-17 0:33 UTC (permalink / raw)
To: Rick Altherr, Simon Glass; +Cc: OpenBMC Maillist
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [U-Boot,2/2] aspeed: use FIT-provided ramdisk if available
2017-01-17 0:33 ` [U-Boot,2/2] " Joel Stanley
@ 2017-01-17 23:33 ` Rick Altherr
2017-01-19 13:57 ` Simon Glass
0 siblings, 1 reply; 7+ messages in thread
From: Rick Altherr @ 2017-01-17 23:33 UTC (permalink / raw)
To: Joel Stanley; +Cc: Simon Glass, OpenBMC Maillist
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
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
>
[-- Attachment #2: Type: text/html, Size: 1992 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [U-Boot,2/2] aspeed: use FIT-provided ramdisk if available
2017-01-17 23:33 ` Rick Altherr
@ 2017-01-19 13:57 ` Simon Glass
0 siblings, 0 replies; 7+ messages in thread
From: Simon Glass @ 2017-01-19 13:57 UTC (permalink / raw)
To: Rick Altherr; +Cc: Joel Stanley, OpenBMC Maillist
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-01-19 13:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 2:13 [U-Boot PATCH 0/2] aspeed: Use FIT-provided ramdisk if available Rick Altherr
2017-01-12 2:13 ` [U-Boot PATCH 1/2] aspeed: Use HUSH shell Rick Altherr
2017-01-17 0:31 ` [U-Boot,1/2] " Joel Stanley
2017-01-12 2:13 ` [U-Boot PATCH 2/2] aspeed: use FIT-provided ramdisk if available Rick Altherr
2017-01-17 0:33 ` [U-Boot,2/2] " Joel Stanley
2017-01-17 23:33 ` Rick Altherr
2017-01-19 13:57 ` 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.