* [PATCH 1/3] x86: coral: Update smbios tables to latest definition
@ 2020-11-09 14:12 Simon Glass
2020-11-09 14:12 ` [PATCH 2/3] x86: zimage: Update cmdline parameter to be an env var Simon Glass
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Simon Glass @ 2020-11-09 14:12 UTC (permalink / raw)
To: u-boot
The accepted binding uses multiple nodes, one for each table type. Update
coral accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/x86/dts/chromebook_coral.dts | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/arch/x86/dts/chromebook_coral.dts b/arch/x86/dts/chromebook_coral.dts
index 43f4b33da1b..d66e128ae62 100644
--- a/arch/x86/dts/chromebook_coral.dts
+++ b/arch/x86/dts/chromebook_coral.dts
@@ -55,12 +55,27 @@
write-protect-gpios = <&gpio_nw GPIO_75 GPIO_ACTIVE_HIGH>;
phase-enforce-gpios = <&gpio_n GPIO_10 GPIO_ACTIVE_HIGH>;
smbios {
- manufacturer = "Google";
- product = "Coral";
- version = "rev2";
- serial = "123456789";
- sku = "sku3";
- family = "Google_Coral";
+ /* Type 1 table */
+ system {
+ manufacturer = "Google";
+ product = "Coral";
+ version = "rev2";
+ serial = "123456789";
+ sku = "sku3";
+ family = "Google_Coral";
+ };
+
+ /* Type 2 table */
+ baseboard {
+ manufacturer = "Google";
+ product = "Coral";
+ asset-tag = "ABC123";
+ };
+
+ /* Type 3 table */
+ chassis {
+ manufacturer = "Google";
+ };
};
};
--
2.29.2.222.g5d2a92d10f8-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] x86: zimage: Update cmdline parameter to be an env var
2020-11-09 14:12 [PATCH 1/3] x86: coral: Update smbios tables to latest definition Simon Glass
@ 2020-11-09 14:12 ` Simon Glass
2020-12-16 3:26 ` Bin Meng
2020-11-09 14:12 ` [PATCH 3/3] x86: coral: Update the boot script Simon Glass
2020-11-10 1:43 ` [PATCH 1/3] x86: coral: Update smbios tables to latest definition Bin Meng
2 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2020-11-09 14:12 UTC (permalink / raw)
To: u-boot
With the updated changes to bootargs substitution[1], the zboot command
needs to be updated to get its command line from an environment variable
instead of a memory address. This is because the command-line string must
be updated to convert %U to ${uuid}, etc.
In any case it is more flexible to use a environment variable and it is
best to do this before the release to avoid a subsequent change.
Update the command accordingly.
[1] http://patchwork.ozlabs.org/project/uboot/list/?series=212481
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/x86/lib/zimage.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index f154827ec70..708025b2071 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -61,8 +61,8 @@
* BZIMAGE_LOAD_ADDR or ZIMAGE_LOAD_ADDR
* @base_ptr: Pointer to the boot parameters, typically at address
* DEFAULT_SETUP_BASE
- * @cmdline: Address of 'override' command line, or 0 to use the one in the
- * setup block
+ * @cmdline: Environment variable containing the 'override' command line, or
+ * NULL to use the one in the setup block
*/
struct zboot_state {
ulong bzimage_addr;
@@ -71,7 +71,7 @@ struct zboot_state {
ulong initrd_size;
ulong load_address;
struct boot_params *base_ptr;
- ulong cmdline;
+ char *cmdline;
} state;
enum {
@@ -420,7 +420,7 @@ static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc,
state.bzimage_addr = 0;
}
if (argc >= 7)
- state.cmdline = simple_strtoul(argv[6], NULL, 16);
+ state.cmdline = env_get(argv[6]);
return 0;
}
@@ -466,7 +466,7 @@ static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc,
}
ret = setup_zimage(base_ptr, (char *)base_ptr + COMMAND_LINE_OFFSET,
0, state.initrd_addr, state.initrd_size,
- state.cmdline);
+ (ulong)state.cmdline);
if (ret) {
puts("Setting up boot parameters failed ...\n");
return CMD_RET_FAILURE;
@@ -757,8 +757,9 @@ U_BOOT_CMDREP_COMPLETE(
" initrd size - The size of the initrd image to use, if any.\n"
" setup - The address of the kernel setup region, if this\n"
" is not at addr\n"
- " cmdline - The address of the kernel command line, to\n"
- " override U-Boot's normal cmdline generation\n"
+ " cmdline - Environment variable containing the kernel\n"
+ " command line, to override U-Boot's normal\n"
+ " cmdline generation\n"
"\n"
"Sub-commands to do part of the zboot sequence:\n"
"\tstart [addr [arg ...]] - specify arguments\n"
--
2.29.2.222.g5d2a92d10f8-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] x86: coral: Update the boot script
2020-11-09 14:12 [PATCH 1/3] x86: coral: Update smbios tables to latest definition Simon Glass
2020-11-09 14:12 ` [PATCH 2/3] x86: zimage: Update cmdline parameter to be an env var Simon Glass
@ 2020-11-09 14:12 ` Simon Glass
2020-12-16 3:26 ` Bin Meng
2020-11-10 1:43 ` [PATCH 1/3] x86: coral: Update smbios tables to latest definition Bin Meng
2 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2020-11-09 14:12 UTC (permalink / raw)
To: u-boot
Make use of the new bootargs substitution mechanism and zboot command
syntax.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/configs/chromebook_coral.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/configs/chromebook_coral.h b/include/configs/chromebook_coral.h
index d4d32758e99..6e8e8ec1709 100644
--- a/include/configs/chromebook_coral.h
+++ b/include/configs/chromebook_coral.h
@@ -15,10 +15,13 @@
"read mmc 2:2 100000 0 80; setexpr loader *001004f0; " \
"setexpr size *00100518; setexpr blocks $size / 200; " \
"read mmc 2:2 100000 80 $blocks; setexpr setup $loader - 1000; " \
- "setexpr cmdline $loader - 2000; " \
- "part uuid mmc 2:2 uuid; setenv bootargs_U $uuid; " \
- "zboot start 100000 0 0 0 $setup $cmdline; " \
- "zboot load; zboot setup; zboot dump; zboot go"
+ "setexpr cmdline_ptr $loader - 2000; " \
+ "setexpr.s cmdline *$cmdline_ptr; " \
+ "setexpr cmdline gsub %U \\\\${uuid}; " \
+ "if part uuid mmc 2:2 uuid; then " \
+ "zboot start 100000 0 0 0 $setup cmdline; " \
+ "zboot load; zboot setup; zboot dump; zboot go;" \
+ "fi"
#include <configs/x86-common.h>
#include <configs/x86-chromebook.h>
--
2.29.2.222.g5d2a92d10f8-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/3] x86: coral: Update smbios tables to latest definition
2020-11-09 14:12 [PATCH 1/3] x86: coral: Update smbios tables to latest definition Simon Glass
2020-11-09 14:12 ` [PATCH 2/3] x86: zimage: Update cmdline parameter to be an env var Simon Glass
2020-11-09 14:12 ` [PATCH 3/3] x86: coral: Update the boot script Simon Glass
@ 2020-11-10 1:43 ` Bin Meng
2020-11-10 1:45 ` Bin Meng
2 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2020-11-10 1:43 UTC (permalink / raw)
To: u-boot
On Mon, Nov 9, 2020 at 10:12 PM Simon Glass <sjg@chromium.org> wrote:
>
> The accepted binding uses multiple nodes, one for each table type. Update
> coral accordingly.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> arch/x86/dts/chromebook_coral.dts | 27 +++++++++++++++++++++------
> 1 file changed, 21 insertions(+), 6 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] x86: coral: Update smbios tables to latest definition
2020-11-10 1:43 ` [PATCH 1/3] x86: coral: Update smbios tables to latest definition Bin Meng
@ 2020-11-10 1:45 ` Bin Meng
0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2020-11-10 1:45 UTC (permalink / raw)
To: u-boot
On Tue, Nov 10, 2020 at 9:43 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Nov 9, 2020 at 10:12 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > The accepted binding uses multiple nodes, one for each table type. Update
> > coral accordingly.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > arch/x86/dts/chromebook_coral.dts | 27 +++++++++++++++++++++------
> > 1 file changed, 21 insertions(+), 6 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] x86: zimage: Update cmdline parameter to be an env var
2020-11-09 14:12 ` [PATCH 2/3] x86: zimage: Update cmdline parameter to be an env var Simon Glass
@ 2020-12-16 3:26 ` Bin Meng
2020-12-16 5:52 ` Bin Meng
0 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2020-12-16 3:26 UTC (permalink / raw)
To: u-boot
On Mon, Nov 9, 2020 at 10:12 PM Simon Glass <sjg@chromium.org> wrote:
>
> With the updated changes to bootargs substitution[1], the zboot command
> needs to be updated to get its command line from an environment variable
> instead of a memory address. This is because the command-line string must
> be updated to convert %U to ${uuid}, etc.
>
> In any case it is more flexible to use a environment variable and it is
> best to do this before the release to avoid a subsequent change.
>
> Update the command accordingly.
>
> [1] http://patchwork.ozlabs.org/project/uboot/list/?series=212481
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> arch/x86/lib/zimage.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/3] x86: coral: Update the boot script
2020-11-09 14:12 ` [PATCH 3/3] x86: coral: Update the boot script Simon Glass
@ 2020-12-16 3:26 ` Bin Meng
2020-12-16 5:52 ` Bin Meng
0 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2020-12-16 3:26 UTC (permalink / raw)
To: u-boot
On Mon, Nov 9, 2020 at 10:12 PM Simon Glass <sjg@chromium.org> wrote:
>
> Make use of the new bootargs substitution mechanism and zboot command
> syntax.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> include/configs/chromebook_coral.h | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] x86: zimage: Update cmdline parameter to be an env var
2020-12-16 3:26 ` Bin Meng
@ 2020-12-16 5:52 ` Bin Meng
0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2020-12-16 5:52 UTC (permalink / raw)
To: u-boot
On Wed, Dec 16, 2020 at 11:26 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Nov 9, 2020 at 10:12 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > With the updated changes to bootargs substitution[1], the zboot command
> > needs to be updated to get its command line from an environment variable
> > instead of a memory address. This is because the command-line string must
> > be updated to convert %U to ${uuid}, etc.
> >
> > In any case it is more flexible to use a environment variable and it is
> > best to do this before the release to avoid a subsequent change.
> >
> > Update the command accordingly.
> >
> > [1] http://patchwork.ozlabs.org/project/uboot/list/?series=212481
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > arch/x86/lib/zimage.c | 15 ++++++++-------
> > 1 file changed, 8 insertions(+), 7 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/3] x86: coral: Update the boot script
2020-12-16 3:26 ` Bin Meng
@ 2020-12-16 5:52 ` Bin Meng
0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2020-12-16 5:52 UTC (permalink / raw)
To: u-boot
On Wed, Dec 16, 2020 at 11:26 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Nov 9, 2020 at 10:12 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > Make use of the new bootargs substitution mechanism and zboot command
> > syntax.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > include/configs/chromebook_coral.h | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-12-16 5:52 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 14:12 [PATCH 1/3] x86: coral: Update smbios tables to latest definition Simon Glass
2020-11-09 14:12 ` [PATCH 2/3] x86: zimage: Update cmdline parameter to be an env var Simon Glass
2020-12-16 3:26 ` Bin Meng
2020-12-16 5:52 ` Bin Meng
2020-11-09 14:12 ` [PATCH 3/3] x86: coral: Update the boot script Simon Glass
2020-12-16 3:26 ` Bin Meng
2020-12-16 5:52 ` Bin Meng
2020-11-10 1:43 ` [PATCH 1/3] x86: coral: Update smbios tables to latest definition Bin Meng
2020-11-10 1:45 ` Bin Meng
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.