* [PATCH] docs/system: riscv: Update Microchip Icicle Kit for direct kernel boot
@ 2021-07-06 9:50 Bin Meng
2021-07-08 4:49 ` Alistair Francis
2021-07-09 3:50 ` Alistair Francis
0 siblings, 2 replies; 5+ messages in thread
From: Bin Meng @ 2021-07-06 9:50 UTC (permalink / raw)
To: Alistair Francis, qemu-devel, qemu-riscv; +Cc: Bin Meng
From: Bin Meng <bin.meng@windriver.com>
This adds a new section in the documentation to demonstrate how to
use the new direct kernel boot feature for Microchip Icicle Kit,
other than the HSS bootflow, using an upstream U-Boot v2021.07 image
as an example.
It also updates the truth table to have a new '-dtb' column which is
required by direct kernel boot.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
---
docs/system/riscv/microchip-icicle-kit.rst | 54 +++++++++++++++++++---
1 file changed, 47 insertions(+), 7 deletions(-)
diff --git a/docs/system/riscv/microchip-icicle-kit.rst b/docs/system/riscv/microchip-icicle-kit.rst
index 54ced661e3..817d2aec9c 100644
--- a/docs/system/riscv/microchip-icicle-kit.rst
+++ b/docs/system/riscv/microchip-icicle-kit.rst
@@ -47,13 +47,13 @@ The user provided DTB should have the following requirements:
QEMU follows below truth table to select which payload to execute:
-===== ========== =======
--bios -kernel payload
-===== ========== =======
- N N HSS
- Y don't care HSS
- N Y kernel
-===== ========== =======
+===== ========== ========== =======
+-bios -kernel -dtb payload
+===== ========== ========== =======
+ N N don't care HSS
+ Y don't care don't care HSS
+ N Y Y kernel
+===== ========== ========== =======
The memory is set to 1537 MiB by default which is the minimum required high
memory size by HSS. A sanity check on ram size is performed in the machine
@@ -106,4 +106,44 @@ HSS output is on the first serial port (stdio) and U-Boot outputs on the
second serial port. U-Boot will automatically load the Linux kernel from
the SD card image.
+Direct Kernel Boot
+------------------
+
+Sometimes we just want to test booting a new kernel, and transforming the
+kernel image to the format required by the HSS bootflow is tedious. We can
+use '-kernel' for direct kernel booting just like other RISC-V machines do.
+
+In this mode, the OpenSBI fw_dynamic BIOS image for 'generic' platform is
+used to boot an S-mode payload like U-Boot or OS kernel directly.
+
+For example, the following commands show building a U-Boot image from U-Boot
+mainline v2021.07 for the Microchip Icicle Kit board:
+
+.. code-block:: bash
+
+ $ export CROSS_COMPILE=riscv64-linux-
+ $ make microchip_mpfs_icicle_defconfig
+
+Then we can boot the machine by:
+
+.. code-block:: bash
+
+ $ qemu-system-riscv64 -M microchip-icicle-kit -smp 5 -m 2G \
+ -sd path/to/sdcard.img \
+ -nic user,model=cadence_gem \
+ -nic tap,ifname=tap,model=cadence_gem,script=no \
+ -display none -serial stdio \
+ -kernel path/to/u-boot/build/dir/u-boot.bin \
+ -dtb path/to/u-boot/build/dir/u-boot.dtb
+
+CAVEATS:
+
+* Check the "stdout-path" property in the /chosen node in the DTB to determine
+ which serial port is used for the serial console, e.g.: if the console is set
+ to the second serial port, change to use "-serial null -serial stdio".
+* The default U-Boot configuration uses CONFIG_OF_SEPARATE hence the ELF image
+ ``u-boot`` cannot be passed to "-kernel" as it does not contain the DTB hence
+ ``u-boot.bin`` has to be used which does contain one. To use the ELF image,
+ we need to change to CONFIG_OF_EMBED or CONFIG_OF_PRIOR_STAGE.
+
.. _HSS: https://github.com/polarfire-soc/hart-software-services
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] docs/system: riscv: Update Microchip Icicle Kit for direct kernel boot
2021-07-06 9:50 [PATCH] docs/system: riscv: Update Microchip Icicle Kit for direct kernel boot Bin Meng
@ 2021-07-08 4:49 ` Alistair Francis
2021-07-09 3:50 ` Alistair Francis
1 sibling, 0 replies; 5+ messages in thread
From: Alistair Francis @ 2021-07-08 4:49 UTC (permalink / raw)
To: Bin Meng
Cc: open list:RISC-V, Bin Meng, Alistair Francis,
qemu-devel@nongnu.org Developers
On Tue, Jul 6, 2021 at 7:50 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> This adds a new section in the documentation to demonstrate how to
> use the new direct kernel boot feature for Microchip Icicle Kit,
> other than the HSS bootflow, using an upstream U-Boot v2021.07 image
> as an example.
>
> It also updates the truth table to have a new '-dtb' column which is
> required by direct kernel boot.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
>
> docs/system/riscv/microchip-icicle-kit.rst | 54 +++++++++++++++++++---
> 1 file changed, 47 insertions(+), 7 deletions(-)
>
> diff --git a/docs/system/riscv/microchip-icicle-kit.rst b/docs/system/riscv/microchip-icicle-kit.rst
> index 54ced661e3..817d2aec9c 100644
> --- a/docs/system/riscv/microchip-icicle-kit.rst
> +++ b/docs/system/riscv/microchip-icicle-kit.rst
> @@ -47,13 +47,13 @@ The user provided DTB should have the following requirements:
>
> QEMU follows below truth table to select which payload to execute:
>
> -===== ========== =======
> --bios -kernel payload
> -===== ========== =======
> - N N HSS
> - Y don't care HSS
> - N Y kernel
> -===== ========== =======
> +===== ========== ========== =======
> +-bios -kernel -dtb payload
> +===== ========== ========== =======
> + N N don't care HSS
> + Y don't care don't care HSS
> + N Y Y kernel
> +===== ========== ========== =======
>
> The memory is set to 1537 MiB by default which is the minimum required high
> memory size by HSS. A sanity check on ram size is performed in the machine
> @@ -106,4 +106,44 @@ HSS output is on the first serial port (stdio) and U-Boot outputs on the
> second serial port. U-Boot will automatically load the Linux kernel from
> the SD card image.
>
> +Direct Kernel Boot
> +------------------
> +
> +Sometimes we just want to test booting a new kernel, and transforming the
> +kernel image to the format required by the HSS bootflow is tedious. We can
> +use '-kernel' for direct kernel booting just like other RISC-V machines do.
> +
> +In this mode, the OpenSBI fw_dynamic BIOS image for 'generic' platform is
> +used to boot an S-mode payload like U-Boot or OS kernel directly.
> +
> +For example, the following commands show building a U-Boot image from U-Boot
> +mainline v2021.07 for the Microchip Icicle Kit board:
> +
> +.. code-block:: bash
> +
> + $ export CROSS_COMPILE=riscv64-linux-
> + $ make microchip_mpfs_icicle_defconfig
> +
> +Then we can boot the machine by:
> +
> +.. code-block:: bash
> +
> + $ qemu-system-riscv64 -M microchip-icicle-kit -smp 5 -m 2G \
> + -sd path/to/sdcard.img \
> + -nic user,model=cadence_gem \
> + -nic tap,ifname=tap,model=cadence_gem,script=no \
> + -display none -serial stdio \
> + -kernel path/to/u-boot/build/dir/u-boot.bin \
> + -dtb path/to/u-boot/build/dir/u-boot.dtb
> +
> +CAVEATS:
> +
> +* Check the "stdout-path" property in the /chosen node in the DTB to determine
> + which serial port is used for the serial console, e.g.: if the console is set
> + to the second serial port, change to use "-serial null -serial stdio".
> +* The default U-Boot configuration uses CONFIG_OF_SEPARATE hence the ELF image
> + ``u-boot`` cannot be passed to "-kernel" as it does not contain the DTB hence
> + ``u-boot.bin`` has to be used which does contain one. To use the ELF image,
> + we need to change to CONFIG_OF_EMBED or CONFIG_OF_PRIOR_STAGE.
> +
> .. _HSS: https://github.com/polarfire-soc/hart-software-services
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs/system: riscv: Update Microchip Icicle Kit for direct kernel boot
@ 2021-07-08 4:49 ` Alistair Francis
0 siblings, 0 replies; 5+ messages in thread
From: Alistair Francis @ 2021-07-08 4:49 UTC (permalink / raw)
To: Bin Meng
Cc: Alistair Francis, qemu-devel@nongnu.org Developers,
open list:RISC-V, Bin Meng
On Tue, Jul 6, 2021 at 7:50 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> This adds a new section in the documentation to demonstrate how to
> use the new direct kernel boot feature for Microchip Icicle Kit,
> other than the HSS bootflow, using an upstream U-Boot v2021.07 image
> as an example.
>
> It also updates the truth table to have a new '-dtb' column which is
> required by direct kernel boot.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
>
> docs/system/riscv/microchip-icicle-kit.rst | 54 +++++++++++++++++++---
> 1 file changed, 47 insertions(+), 7 deletions(-)
>
> diff --git a/docs/system/riscv/microchip-icicle-kit.rst b/docs/system/riscv/microchip-icicle-kit.rst
> index 54ced661e3..817d2aec9c 100644
> --- a/docs/system/riscv/microchip-icicle-kit.rst
> +++ b/docs/system/riscv/microchip-icicle-kit.rst
> @@ -47,13 +47,13 @@ The user provided DTB should have the following requirements:
>
> QEMU follows below truth table to select which payload to execute:
>
> -===== ========== =======
> --bios -kernel payload
> -===== ========== =======
> - N N HSS
> - Y don't care HSS
> - N Y kernel
> -===== ========== =======
> +===== ========== ========== =======
> +-bios -kernel -dtb payload
> +===== ========== ========== =======
> + N N don't care HSS
> + Y don't care don't care HSS
> + N Y Y kernel
> +===== ========== ========== =======
>
> The memory is set to 1537 MiB by default which is the minimum required high
> memory size by HSS. A sanity check on ram size is performed in the machine
> @@ -106,4 +106,44 @@ HSS output is on the first serial port (stdio) and U-Boot outputs on the
> second serial port. U-Boot will automatically load the Linux kernel from
> the SD card image.
>
> +Direct Kernel Boot
> +------------------
> +
> +Sometimes we just want to test booting a new kernel, and transforming the
> +kernel image to the format required by the HSS bootflow is tedious. We can
> +use '-kernel' for direct kernel booting just like other RISC-V machines do.
> +
> +In this mode, the OpenSBI fw_dynamic BIOS image for 'generic' platform is
> +used to boot an S-mode payload like U-Boot or OS kernel directly.
> +
> +For example, the following commands show building a U-Boot image from U-Boot
> +mainline v2021.07 for the Microchip Icicle Kit board:
> +
> +.. code-block:: bash
> +
> + $ export CROSS_COMPILE=riscv64-linux-
> + $ make microchip_mpfs_icicle_defconfig
> +
> +Then we can boot the machine by:
> +
> +.. code-block:: bash
> +
> + $ qemu-system-riscv64 -M microchip-icicle-kit -smp 5 -m 2G \
> + -sd path/to/sdcard.img \
> + -nic user,model=cadence_gem \
> + -nic tap,ifname=tap,model=cadence_gem,script=no \
> + -display none -serial stdio \
> + -kernel path/to/u-boot/build/dir/u-boot.bin \
> + -dtb path/to/u-boot/build/dir/u-boot.dtb
> +
> +CAVEATS:
> +
> +* Check the "stdout-path" property in the /chosen node in the DTB to determine
> + which serial port is used for the serial console, e.g.: if the console is set
> + to the second serial port, change to use "-serial null -serial stdio".
> +* The default U-Boot configuration uses CONFIG_OF_SEPARATE hence the ELF image
> + ``u-boot`` cannot be passed to "-kernel" as it does not contain the DTB hence
> + ``u-boot.bin`` has to be used which does contain one. To use the ELF image,
> + we need to change to CONFIG_OF_EMBED or CONFIG_OF_PRIOR_STAGE.
> +
> .. _HSS: https://github.com/polarfire-soc/hart-software-services
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs/system: riscv: Update Microchip Icicle Kit for direct kernel boot
2021-07-06 9:50 [PATCH] docs/system: riscv: Update Microchip Icicle Kit for direct kernel boot Bin Meng
@ 2021-07-09 3:50 ` Alistair Francis
2021-07-09 3:50 ` Alistair Francis
1 sibling, 0 replies; 5+ messages in thread
From: Alistair Francis @ 2021-07-09 3:50 UTC (permalink / raw)
To: Bin Meng
Cc: open list:RISC-V, Bin Meng, Alistair Francis,
qemu-devel@nongnu.org Developers
On Tue, Jul 6, 2021 at 7:50 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> This adds a new section in the documentation to demonstrate how to
> use the new direct kernel boot feature for Microchip Icicle Kit,
> other than the HSS bootflow, using an upstream U-Boot v2021.07 image
> as an example.
>
> It also updates the truth table to have a new '-dtb' column which is
> required by direct kernel boot.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
Thanks!
Applied to riscv-to-apply.next
Alistair
> ---
>
> docs/system/riscv/microchip-icicle-kit.rst | 54 +++++++++++++++++++---
> 1 file changed, 47 insertions(+), 7 deletions(-)
>
> diff --git a/docs/system/riscv/microchip-icicle-kit.rst b/docs/system/riscv/microchip-icicle-kit.rst
> index 54ced661e3..817d2aec9c 100644
> --- a/docs/system/riscv/microchip-icicle-kit.rst
> +++ b/docs/system/riscv/microchip-icicle-kit.rst
> @@ -47,13 +47,13 @@ The user provided DTB should have the following requirements:
>
> QEMU follows below truth table to select which payload to execute:
>
> -===== ========== =======
> --bios -kernel payload
> -===== ========== =======
> - N N HSS
> - Y don't care HSS
> - N Y kernel
> -===== ========== =======
> +===== ========== ========== =======
> +-bios -kernel -dtb payload
> +===== ========== ========== =======
> + N N don't care HSS
> + Y don't care don't care HSS
> + N Y Y kernel
> +===== ========== ========== =======
>
> The memory is set to 1537 MiB by default which is the minimum required high
> memory size by HSS. A sanity check on ram size is performed in the machine
> @@ -106,4 +106,44 @@ HSS output is on the first serial port (stdio) and U-Boot outputs on the
> second serial port. U-Boot will automatically load the Linux kernel from
> the SD card image.
>
> +Direct Kernel Boot
> +------------------
> +
> +Sometimes we just want to test booting a new kernel, and transforming the
> +kernel image to the format required by the HSS bootflow is tedious. We can
> +use '-kernel' for direct kernel booting just like other RISC-V machines do.
> +
> +In this mode, the OpenSBI fw_dynamic BIOS image for 'generic' platform is
> +used to boot an S-mode payload like U-Boot or OS kernel directly.
> +
> +For example, the following commands show building a U-Boot image from U-Boot
> +mainline v2021.07 for the Microchip Icicle Kit board:
> +
> +.. code-block:: bash
> +
> + $ export CROSS_COMPILE=riscv64-linux-
> + $ make microchip_mpfs_icicle_defconfig
> +
> +Then we can boot the machine by:
> +
> +.. code-block:: bash
> +
> + $ qemu-system-riscv64 -M microchip-icicle-kit -smp 5 -m 2G \
> + -sd path/to/sdcard.img \
> + -nic user,model=cadence_gem \
> + -nic tap,ifname=tap,model=cadence_gem,script=no \
> + -display none -serial stdio \
> + -kernel path/to/u-boot/build/dir/u-boot.bin \
> + -dtb path/to/u-boot/build/dir/u-boot.dtb
> +
> +CAVEATS:
> +
> +* Check the "stdout-path" property in the /chosen node in the DTB to determine
> + which serial port is used for the serial console, e.g.: if the console is set
> + to the second serial port, change to use "-serial null -serial stdio".
> +* The default U-Boot configuration uses CONFIG_OF_SEPARATE hence the ELF image
> + ``u-boot`` cannot be passed to "-kernel" as it does not contain the DTB hence
> + ``u-boot.bin`` has to be used which does contain one. To use the ELF image,
> + we need to change to CONFIG_OF_EMBED or CONFIG_OF_PRIOR_STAGE.
> +
> .. _HSS: https://github.com/polarfire-soc/hart-software-services
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs/system: riscv: Update Microchip Icicle Kit for direct kernel boot
@ 2021-07-09 3:50 ` Alistair Francis
0 siblings, 0 replies; 5+ messages in thread
From: Alistair Francis @ 2021-07-09 3:50 UTC (permalink / raw)
To: Bin Meng
Cc: Alistair Francis, qemu-devel@nongnu.org Developers,
open list:RISC-V, Bin Meng
On Tue, Jul 6, 2021 at 7:50 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> This adds a new section in the documentation to demonstrate how to
> use the new direct kernel boot feature for Microchip Icicle Kit,
> other than the HSS bootflow, using an upstream U-Boot v2021.07 image
> as an example.
>
> It also updates the truth table to have a new '-dtb' column which is
> required by direct kernel boot.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
Thanks!
Applied to riscv-to-apply.next
Alistair
> ---
>
> docs/system/riscv/microchip-icicle-kit.rst | 54 +++++++++++++++++++---
> 1 file changed, 47 insertions(+), 7 deletions(-)
>
> diff --git a/docs/system/riscv/microchip-icicle-kit.rst b/docs/system/riscv/microchip-icicle-kit.rst
> index 54ced661e3..817d2aec9c 100644
> --- a/docs/system/riscv/microchip-icicle-kit.rst
> +++ b/docs/system/riscv/microchip-icicle-kit.rst
> @@ -47,13 +47,13 @@ The user provided DTB should have the following requirements:
>
> QEMU follows below truth table to select which payload to execute:
>
> -===== ========== =======
> --bios -kernel payload
> -===== ========== =======
> - N N HSS
> - Y don't care HSS
> - N Y kernel
> -===== ========== =======
> +===== ========== ========== =======
> +-bios -kernel -dtb payload
> +===== ========== ========== =======
> + N N don't care HSS
> + Y don't care don't care HSS
> + N Y Y kernel
> +===== ========== ========== =======
>
> The memory is set to 1537 MiB by default which is the minimum required high
> memory size by HSS. A sanity check on ram size is performed in the machine
> @@ -106,4 +106,44 @@ HSS output is on the first serial port (stdio) and U-Boot outputs on the
> second serial port. U-Boot will automatically load the Linux kernel from
> the SD card image.
>
> +Direct Kernel Boot
> +------------------
> +
> +Sometimes we just want to test booting a new kernel, and transforming the
> +kernel image to the format required by the HSS bootflow is tedious. We can
> +use '-kernel' for direct kernel booting just like other RISC-V machines do.
> +
> +In this mode, the OpenSBI fw_dynamic BIOS image for 'generic' platform is
> +used to boot an S-mode payload like U-Boot or OS kernel directly.
> +
> +For example, the following commands show building a U-Boot image from U-Boot
> +mainline v2021.07 for the Microchip Icicle Kit board:
> +
> +.. code-block:: bash
> +
> + $ export CROSS_COMPILE=riscv64-linux-
> + $ make microchip_mpfs_icicle_defconfig
> +
> +Then we can boot the machine by:
> +
> +.. code-block:: bash
> +
> + $ qemu-system-riscv64 -M microchip-icicle-kit -smp 5 -m 2G \
> + -sd path/to/sdcard.img \
> + -nic user,model=cadence_gem \
> + -nic tap,ifname=tap,model=cadence_gem,script=no \
> + -display none -serial stdio \
> + -kernel path/to/u-boot/build/dir/u-boot.bin \
> + -dtb path/to/u-boot/build/dir/u-boot.dtb
> +
> +CAVEATS:
> +
> +* Check the "stdout-path" property in the /chosen node in the DTB to determine
> + which serial port is used for the serial console, e.g.: if the console is set
> + to the second serial port, change to use "-serial null -serial stdio".
> +* The default U-Boot configuration uses CONFIG_OF_SEPARATE hence the ELF image
> + ``u-boot`` cannot be passed to "-kernel" as it does not contain the DTB hence
> + ``u-boot.bin`` has to be used which does contain one. To use the ELF image,
> + we need to change to CONFIG_OF_EMBED or CONFIG_OF_PRIOR_STAGE.
> +
> .. _HSS: https://github.com/polarfire-soc/hart-software-services
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-09 3:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 9:50 [PATCH] docs/system: riscv: Update Microchip Icicle Kit for direct kernel boot Bin Meng
2021-07-08 4:49 ` Alistair Francis
2021-07-08 4:49 ` Alistair Francis
2021-07-09 3:50 ` Alistair Francis
2021-07-09 3:50 ` Alistair Francis
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.