Skip to contentSkip to conversation

riscv: boot the K230 from qemu-machine-images

PATCH Applied Chao Liu 3 participants 8 messages Oct 31 – Nov 12 RISC-V

lore
Share & tools
lore

Chao Liu

author
#0 lore raw

cover riscv: boot the K230 from qemu-machine-images

The K230 machine has many hardware models now, so I simplify firmware booting flow documentation in this series.

The K230 images now come from qemu-machine-images[1], which builds them with the standard Buildroot image build tools, replacing my own repository that the K230 images.

The series has two changes:

Patch1: Update the k230 functional test for firmeware booting
Patch2: Simplify the k230 boot process desc in k230.rst

Link:
[1]: https://github.com/processmission/qemu-machine-images

Thanks,
Chao

Chao Liu (2):
tests/functional/riscv64: boot K230 from qemu-machine-images docs/system/riscv: simplify the K230 U-Boot boot flow

 docs/system/riscv/k230.rst            | 60 +++++-------------
 tests/functional/riscv64/test_k230.py | 90 +++++++++------------------
 2 files changed, 43 insertions(+), 107 deletions(-)
Signature · 1 line
2.56.0
author
#1 lore raw

PATCH 1/2 tests/functional/riscv64: boot K230 from qemu-machine-images

Fetch the prebuilt K230 images from the processmission qemu-machine-images v1.2.0 release archive instead of the zevorn/k230-boot-assets repository.

---
 tests/functional/riscv64/test_k230.py | 90 +++++++++------------------
 1 file changed, 29 insertions(+), 61 deletions(-)
tests/functional/riscv64/test_k230.py +29 -61
index 6ccbf2d581..c2a3f44849 100755
@@ -11,96 +11,64 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-import os
-
 from qemu_test import Asset, LinuxKernelTest
 from qemu_test import exec_command_and_wait_for_pattern
-from qemu_test import interrupt_interactive_console_until_pattern
+from qemu_test import skipIfMissingCommands
+from qemu_test import wait_for_console_pattern
 
 
 class K230Machine(LinuxKernelTest):
 
-    ASSET_KERNEL = Asset(
-        ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/'
-         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/'
-         'yocto/direct-boot/Image'),
-        '3a44970213fa68ad318d308518adfc0bf4bee72ed1b2926f9b468f82ef7d7829')
-    ASSET_DTB = Asset(
-        ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/'
-         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/'
-         'yocto/direct-boot/k230-canmv.dtb'),
-        '5050240b48ce0988c73eaefa73e4945a40abca503cf488d22a3adf6ef50bbe4c')
-    ASSET_INITRD = Asset(
-        ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/'
-         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/'
-         'yocto/direct-boot/rootfs.cpio.gz'),
-        '4e1869a99a232ee60324f71f3a9e84a79b03ccabb5b73f8a727c5ff5be5c0914')
-    ASSET_UBOOT = Asset(
-        ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/'
-         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/common/u-boot'),
-        '0915b9a92a7c911846a8cf691866ef14ef050a51d04209f884ae8e9ec33f36d2')
-    ASSET_FW_JUMP = Asset(
-        ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/'
-         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/'
-         'common/fw_jump.uImage'),
-        'cf7788e470f1d6e8c85491ecdc2705518db1b6af54080e8c7a3464bad0d902b7')
+    # The release archive contains Image, rootfs.cpio.gz, k230-qemu.dtb,
+    # u-boot, fw_jump.uImage, and boot.itb under the images/ directory.
+    ASSET_IMAGES = Asset(
+        ('https://github.com/processmission/qemu-machine-images/releases/'
+         'download/v1.2.0/riscv64-k230-v1.2.0.tar.zst'),
+        'fde65d0542127486078121c1748c7edacfe9d3ca29b5c2bcc93c67485139385c')
+
+    def extract_images(self):
+        archive = self.uncompress(self.ASSET_IMAGES, target='images.tar',
+                                  format='zstd')
+        self.archive_extract(archive, format='tar')
 
     def wait_for_linux_shell(self):
-        self.wait_for_console_pattern('meta-k230 initramfs starting...')
-        self.wait_for_console_pattern('~ #')
+        wait_for_console_pattern(self, 'k230 login:')
+        exec_command_and_wait_for_pattern(self, 'root', '# ')
 
+    @skipIfMissingCommands('zstd')
     def test_k230_direct_boot(self):
         self.set_machine('k230')
-        kernel_path = self.ASSET_KERNEL.fetch()
-        dtb_path = self.ASSET_DTB.fetch()
-        initrd_path = self.ASSET_INITRD.fetch()
+        self.extract_images()
+        kernel_path = self.scratch_file('images', 'Image')
+        dtb_path = self.scratch_file('images', 'k230-qemu.dtb')
+        initrd_path = self.scratch_file('images', 'rootfs.cpio.gz')
 
         self.vm.set_console()
         self.vm.add_args('-kernel', kernel_path,
                          '-dtb', dtb_path,
                          '-initrd', initrd_path,
-                         '-append', 'console=ttyS0,115200 earlycon=sbi',
+                         '-append', 'console=ttyS0,115200 '
+                         'earlycon=uart8250,mmio32,0x91400000 cma=0',
                          '-no-reboot')
         self.vm.launch()
         self.wait_for_linux_shell()
 
-    def test_k230_uboot_boot(self):
+    @skipIfMissingCommands('zstd')
+    def test_k230_firmware_boot(self):
         self.set_machine('k230')
-        kernel_path = self.ASSET_KERNEL.fetch()
-        dtb_path = self.ASSET_DTB.fetch()
-        initrd_path = self.ASSET_INITRD.fetch()
-        uboot_path = self.ASSET_UBOOT.fetch()
-        fw_jump_path = self.ASSET_FW_JUMP.fetch()
-        initrd_end = 0x0a100000 + os.path.getsize(initrd_path)
+        self.extract_images()
+        uboot_path = self.scratch_file('images', 'u-boot')
+        boot_itb_path = self.scratch_file('images', 'boot.itb')
 
         self.vm.set_console()
         self.vm.add_args(
             '-bios', uboot_path,
             '-device',
-            f'loader,file={fw_jump_path},addr=0xc100000,force-raw=on',
-            '-device',
-            f'loader,file={kernel_path},addr=0x8200000,force-raw=on',
-            '-device',
-            f'loader,file={initrd_path},addr=0xa100000,force-raw=on',
-            '-device',
-            f'loader,file={dtb_path},addr=0xa000000,force-raw=on',
+            f'loader,file={boot_itb_path},addr=0xc100000,force-raw=on',
             '-no-reboot')
         self.vm.launch()
 
-        interrupt_interactive_console_until_pattern(self, 'K230#')
-        commands = (
-            'setenv bootargs console=ttyS0,115200 earlycon=sbi',
-            'fdt addr 0xa000000',
-            'fdt resize 8192',
-            'fdt set /chosen linux,initrd-start <0x0 0xa100000>',
-            f'fdt set /chosen linux,initrd-end <0x0 0x{initrd_end:x}>',
-        )
-        for command in commands:
-            exec_command_and_wait_for_pattern(self, command, 'K230#')
-
-        exec_command_and_wait_for_pattern(
-            self, 'bootm 0xc100000 - 0xa000000',
-            'Starting kernel ...', failure_message='ERROR')
+        wait_for_console_pattern(self, 'Starting kernel ...')
         self.wait_for_linux_shell()
 
 
Signature · 1 line
2.56.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] tests/functional/riscv64: boot K230 from qemu-machine-images

Quoted 8 lines · Chao Liu

Fetch the prebuilt K230 images from the processmission qemu-machine-images v1.2.0 release archive instead of the zevorn/k230-boot-assets repository.

---
 tests/functional/riscv64/test_k230.py | 90 +++++++++------------------
 1 file changed, 29 insertions(+), 61 deletions(-)
Acked-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] tests/functional/riscv64: boot K230 from qemu-machine-images

In reply to Chao Liu
Quoted 5 lines · Chao Liu

Fetch the prebuilt K230 images from the processmission qemu-machine-images v1.2.0 release archive instead of the zevorn/k230-boot-assets repository.

Alistair

Quoted 160 lines

---
 tests/functional/riscv64/test_k230.py | 90 +++++++++---------------- --

 1 file changed, 29 insertions(+), 61 deletions(-)
tests/functional/riscv64/test_k230.py +0 -0
index 6ccbf2d581..c2a3f44849 100755
@@ -11,96 +11,64 @@
  #
  # SPDX-License-Identifier: GPL-2.0-or-later

tests/functional/riscv64/test_k230.py +0 -2
-import os
-

 from qemu_test import Asset, LinuxKernelTest from qemu_test import exec_command_and_wait_for_pattern

tests/functional/riscv64/test_k230.py +2 -1
-from qemu_test import interrupt_interactive_console_until_pattern
+from qemu_test import skipIfMissingCommands
+from qemu_test import wait_for_console_pattern



 class K230Machine(LinuxKernelTest):

-    ASSET_KERNEL = Asset(
- ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/' -         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/'
-         'yocto/direct-boot/Image'),
- '3a44970213fa68ad318d308518adfc0bf4bee72ed1b2926f9b468f82ef7d7829') -    ASSET_DTB = Asset(
- ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/' -         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/'
-         'yocto/direct-boot/k230-canmv.dtb'),
- '5050240b48ce0988c73eaefa73e4945a40abca503cf488d22a3adf6ef50bbe4c') -    ASSET_INITRD = Asset(
- ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/' -         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/'
-         'yocto/direct-boot/rootfs.cpio.gz'),
- '4e1869a99a232ee60324f71f3a9e84a79b03ccabb5b73f8a727c5ff5be5c0914') -    ASSET_UBOOT = Asset(
- ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/' -         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/common/u-boot'), - '0915b9a92a7c911846a8cf691866ef14ef050a51d04209f884ae8e9ec33f36d2') -    ASSET_FW_JUMP = Asset(
- ('https://raw.githubusercontent.com/zevorn/k230-boot-assets/' -         'c3c32fb46e8307c5063f13e8f367c98bf9273cd1/'
-         'common/fw_jump.uImage'),
- 'cf7788e470f1d6e8c85491ecdc2705518db1b6af54080e8c7a3464bad0d902b7') +    # The release archive contains Image, rootfs.cpio.gz, k230- qemu.dtb,
+    # u-boot, fw_jump.uImage, and boot.itb under the images/ directory.
+    ASSET_IMAGES = Asset(
+ ('https://github.com/processmission/qemu-machine-images/releases/' +         'download/v1.2.0/riscv64-k230-v1.2.0.tar.zst'), + 'fde65d0542127486078121c1748c7edacfe9d3ca29b5c2bcc93c67485139385c') +
+    def extract_images(self):
+        archive = self.uncompress(self.ASSET_IMAGES, target='images.tar',
+                                  format='zstd')
+        self.archive_extract(archive, format='tar')

     def wait_for_linux_shell(self):
-        self.wait_for_console_pattern('meta-k230 initramfs starting...')
-        self.wait_for_console_pattern('~ #')
+        wait_for_console_pattern(self, 'k230 login:')
+        exec_command_and_wait_for_pattern(self, 'root', '# ')
+    @skipIfMissingCommands('zstd')
     def test_k230_direct_boot(self):
         self.set_machine('k230')
-        kernel_path = self.ASSET_KERNEL.fetch()
-        dtb_path = self.ASSET_DTB.fetch()
-        initrd_path = self.ASSET_INITRD.fetch()
+        self.extract_images()
+        kernel_path = self.scratch_file('images', 'Image') +        dtb_path = self.scratch_file('images', 'k230-qemu.dtb') +        initrd_path = self.scratch_file('images', 'rootfs.cpio.gz')
         self.vm.set_console() self.vm.add_args('-kernel', kernel_path,
                          '-dtb', dtb_path,
                          '-initrd', initrd_path,
-                         '-append', 'console=ttyS0,115200 earlycon=sbi',
+                         '-append', 'console=ttyS0,115200 ' +                         'earlycon=uart8250,mmio32,0x91400000 cma=0',
                          '-no-reboot')
         self.vm.launch()
         self.wait_for_linux_shell()

-    def test_k230_uboot_boot(self):
+    @skipIfMissingCommands('zstd')
+    def test_k230_firmware_boot(self):
         self.set_machine('k230')
-        kernel_path = self.ASSET_KERNEL.fetch()
-        dtb_path = self.ASSET_DTB.fetch()
-        initrd_path = self.ASSET_INITRD.fetch()
-        uboot_path = self.ASSET_UBOOT.fetch()
-        fw_jump_path = self.ASSET_FW_JUMP.fetch()
-        initrd_end = 0x0a100000 + os.path.getsize(initrd_path) +        self.extract_images()
+        uboot_path = self.scratch_file('images', 'u-boot') +        boot_itb_path = self.scratch_file('images', 'boot.itb')
         self.vm.set_console()
         self.vm.add_args(
             '-bios', uboot_path,
             '-device',
-            f'loader,file={fw_jump_path},addr=0xc100000,force- raw=on',
-            '-device',
-            f'loader,file={kernel_path},addr=0x8200000,force- raw=on',
-            '-device',
-            f'loader,file={initrd_path},addr=0xa100000,force- raw=on',
-            '-device',
-            f'loader,file={dtb_path},addr=0xa000000,force-raw=on', +            f'loader,file={boot_itb_path},addr=0xc100000,force- raw=on',
             '-no-reboot')
         self.vm.launch()

-        interrupt_interactive_console_until_pattern(self, 'K230#') -        commands = (
-            'setenv bootargs console=ttyS0,115200 earlycon=sbi', -            'fdt addr 0xa000000',
-            'fdt resize 8192',
-            'fdt set /chosen linux,initrd-start <0x0 0xa100000>', -            f'fdt set /chosen linux,initrd-end <0x0 0x{initrd_end:x}>',
-        )
-        for command in commands:
-            exec_command_and_wait_for_pattern(self, command, 'K230#')
-
-        exec_command_and_wait_for_pattern(
-            self, 'bootm 0xc100000 - 0xa000000',
-            'Starting kernel ...', failure_message='ERROR') +        wait_for_console_pattern(self, 'Starting kernel ...') self.wait_for_linux_shell()

author
#4 lore raw

PATCH 2/2 docs/system/riscv: simplify the K230 U-Boot boot flow

In reply to Chao Liu

Update the firmware booting description in the documentation, and add the QEMU boot arguments for the K230 images built with Buildroot.

---
 docs/system/riscv/k230.rst | 60 +++++++++-----------------------------
 1 file changed, 14 insertions(+), 46 deletions(-)
docs/system/riscv/k230.rst +14 -46
index 237611eddf..a65cf02932 100644
@@ -26,8 +26,8 @@ The ``k230`` machine supports the following devices:
 
 Boot options
 ------------
-The ``k230`` machine supports K230 SDK boot through M-mode U-Boot, which then
-starts OpenSBI/Linux with ``bootm``. It also supports direct Linux boot.
+The ``k230`` machine boots the Buildroot based K230 SDK Linux images through
+M-mode U-Boot. It also supports direct Linux boot.
 
 The DDRC CFG and DDR PHY models allow the K230 SDK U-Boot SPL to complete DDR
 initialization before loading the next boot stage.
@@ -67,53 +67,21 @@ not emulated by this machine.
 U-Boot boot
 ~~~~~~~~~~~
 
-This flow starts SDK U-Boot in M-mode with ``-bios``. Until the SDK storage
-path is modeled, place OpenSBI, Linux, initrd, and DTB in RAM with loader
-devices and run ``bootm`` manually. The Linux Image must be rebuilt with
-standard RISC-V PTE bits before running under QEMU.
+The K230 SDK build is based on Buildroot and provides the Xuantie toolchain
+that builds Linux for this machine. The images can also be built with the
+standard Buildroot flow while reusing that toolchain. The machine boots both
+the images produced by the K230 SDK build and the images produced by the
+Buildroot build.
+
+Start SDK U-Boot in M-mode with ``-bios`` and preload the OpenSBI and Linux
+FIT image with a loader device:
 
 .. code-block:: bash
 
-   $ SDK=k230_sdk/output/k230_canmv_defconfig
-   $ IMAGE=$SDK/images/little-core/Image
-   $ INITRD=$SDK/images/little-core/rootfs.cpio.gz
-   $ DTB=$SDK/images/little-core/k230.dtb
-   $ FWJUMP_UIMAGE=/tmp/k230-fw-jump.uImage
-   $ INITRD_END=$(printf "0x%x" $((0x0a100000 + $(stat -c %s "$INITRD"))))
-   $ "$SDK/little/buildroot-ext/host/bin/mkimage" \
-      -A riscv -O linux -T kernel -C none \
-      -a 0x8000000 -e 0x8000000 -n opensbi \
-      -d "$SDK/images/little-core/fw_jump.bin" "$FWJUMP_UIMAGE"
    $ qemu-system-riscv64 -machine k230 \
-      -bios "$SDK/little/uboot/u-boot" \
-      -device loader,file="$FWJUMP_UIMAGE",addr=0xc100000,force-raw=on \
-      -device loader,file="$IMAGE",addr=0x8200000,force-raw=on \
-      -device loader,file="$INITRD",addr=0xa100000,force-raw=on \
-      -device loader,file="$DTB",addr=0xa000000,force-raw=on \
+      -bios u-boot \
+      -device loader,file=boot.itb,addr=0xc100000,force-raw=on \
       -nographic
 
-The loader addresses mirror the SDK ``k230_canmv_defconfig`` output. Read the
-U-Boot addresses from the generated environment, and read the Linux RAM base
-from the generated ``hw/k230.dts.txt``. This replaces the SDK storage and
-decompression steps.
-
-Press Enter to stop autoboot. At the U-Boot prompt, run these commands:
-
-.. code-block:: bash
-
-   K230# setenv bootargs console=ttyS0,115200 earlycon=sbi cma=0
-   K230# fdt addr 0xa000000
-   K230# fdt resize 8192
-   K230# fdt set /chosen linux,initrd-start <0x0 0xa100000>
-   K230# fdt set /chosen linux,initrd-end <0x0 ${INITRD_END}>
-   K230# fdt set /soc/sdhci0@91580000 status disabled
-   K230# fdt set /soc/sdhci1@91581000 status disabled
-   K230# bootm 0xc100000 - 0xa000000
-
-Use ``setenv`` so ``bootm`` writes the kernel command line into
-``/chosen/bootargs``. The ``fdt`` commands select the loaded DTB, add space for
-edits, describe the initrd range in ``/chosen``, and disable SDHCI nodes because
-this machine does not emulate those controllers yet. Replace ``${INITRD_END}``
-with the host-calculated value above when typing the command. ``cma=0`` avoids
-the SDK kernel reserving too much of the little-core memory window for initramfs
-boot.
+The FIT image carries OpenSBI, Linux, the device tree, and the initramfs, so
+``-dtb`` and ``-append`` cannot be used with this flow.
Signature · 1 line
2.56.0
Reviewed-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] docs/system/riscv: simplify the K230 U-Boot boot flow

Quoted 7 lines · Chao Liu

Update the firmware booting description in the documentation, and add the QEMU boot arguments for the K230 images built with Buildroot.

---
 docs/system/riscv/k230.rst | 60 +++++++++-----------------------------
 1 file changed, 14 insertions(+), 46 deletions(-)
Acked-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] docs/system/riscv: simplify the K230 U-Boot boot flow

In reply to Chao Liu
Quoted 4 lines · Chao Liu

Update the firmware booting description in the documentation, and add the QEMU boot arguments for the K230 images built with Buildroot.

Alistair

Quoted 111 lines

---
 docs/system/riscv/k230.rst | 60 +++++++++--------------------------- --

 1 file changed, 14 insertions(+), 46 deletions(-)
docs/system/riscv/k230.rst +0 -0
index 237611eddf..a65cf02932 100644
@@ -26,8 +26,8 @@ The ``k230`` machine supports the following

devices:

 Boot options
 ------------
-The ``k230`` machine supports K230 SDK boot through M-mode U-Boot, which then
-starts OpenSBI/Linux with ``bootm``. It also supports direct Linux boot.
+The ``k230`` machine boots the Buildroot based K230 SDK Linux images through
+M-mode U-Boot. It also supports direct Linux boot.

 The DDRC CFG and DDR PHY models allow the K230 SDK U-Boot SPL to complete DDR
 initialization before loading the next boot stage.

docs/system/riscv/k230.rst +0 -0
@@ -67,53 +67,21 @@ not emulated by this machine.

 U-Boot boot
 ~~~~~~~~~~~

-This flow starts SDK U-Boot in M-mode with ``-bios``. Until the SDK storage
-path is modeled, place OpenSBI, Linux, initrd, and DTB in RAM with loader
-devices and run ``bootm`` manually. The Linux Image must be rebuilt with

docs/system/riscv/k230.rst +1 -1
-standard RISC-V PTE bits before running under QEMU.
+The K230 SDK build is based on Buildroot and provides the Xuantie

toolchain
+that builds Linux for this machine. The images can also be built with the
+standard Buildroot flow while reusing that toolchain. The machine boots both
+the images produced by the K230 SDK build and the images produced by the

docs/system/riscv/k230.rst +3 -0
+Buildroot build.
+
+Start SDK U-Boot in M-mode with ``-bios`` and preload the OpenSBI

and Linux
+FIT image with a loader device:

 .. code-block:: bash

-   $ SDK=k230_sdk/output/k230_canmv_defconfig
-   $ IMAGE=$SDK/images/little-core/Image
-   $ INITRD=$SDK/images/little-core/rootfs.cpio.gz
-   $ DTB=$SDK/images/little-core/k230.dtb
-   $ FWJUMP_UIMAGE=/tmp/k230-fw-jump.uImage
-   $ INITRD_END=$(printf "0x%x" $((0x0a100000 + $(stat -c %s "$INITRD"))))
-   $ "$SDK/little/buildroot-ext/host/bin/mkimage" \
-      -A riscv -O linux -T kernel -C none \
-      -a 0x8000000 -e 0x8000000 -n opensbi \
-      -d "$SDK/images/little-core/fw_jump.bin" "$FWJUMP_UIMAGE"

    $ qemu-system-riscv64 -machine k230 \
-      -bios "$SDK/little/uboot/u-boot" \
-      -device loader,file="$FWJUMP_UIMAGE",addr=0xc100000,force-
raw=on \
-      -device loader,file="$IMAGE",addr=0x8200000,force-raw=on \
-      -device loader,file="$INITRD",addr=0xa100000,force-raw=on \
-      -device loader,file="$DTB",addr=0xa000000,force-raw=on \
+      -bios u-boot \
+      -device loader,file=boot.itb,addr=0xc100000,force-raw=on \
       -nographic
 
-The loader addresses mirror the SDK ``k230_canmv_defconfig`` output.
Read the
-U-Boot addresses from the generated environment, and read the Linux
RAM base
-from the generated ``hw/k230.dts.txt``. This replaces the SDK
storage and
docs/system/riscv/k230.rst +0 -3
-decompression steps.
-
-Press Enter to stop autoboot. At the U-Boot prompt, run these

commands:

docs/system/riscv/k230.rst +0 -14
-
-.. code-block:: bash
-
-   K230# setenv bootargs console=ttyS0,115200 earlycon=sbi cma=0
-   K230# fdt addr 0xa000000
-   K230# fdt resize 8192
-   K230# fdt set /chosen linux,initrd-start <0x0 0xa100000>
-   K230# fdt set /chosen linux,initrd-end <0x0 ${INITRD_END}>
-   K230# fdt set /soc/sdhci0@91580000 status disabled
-   K230# fdt set /soc/sdhci1@91581000 status disabled
-   K230# bootm 0xc100000 - 0xa000000
-
-Use ``setenv`` so ``bootm`` writes the kernel command line into
-``/chosen/bootargs``. The ``fdt`` commands select the loaded DTB,

add space for
-edits, describe the initrd range in ``/chosen``, and disable SDHCI nodes because
-this machine does not emulate those controllers yet. Replace ``${INITRD_END}``
-with the host-calculated value above when typing the command. ``cma=0`` avoids
-the SDK kernel reserving too much of the little-core memory window for initramfs

docs/system/riscv/k230.rst +1 -1
-boot.
+The FIT image carries OpenSBI, Linux, the device tree, and the

initramfs, so
+``-dtb`` and ``-append`` cannot be used with this flow.

#7 lore raw
In reply to Chao Liu
Quoted 15 lines · Chao Liu

The K230 machine has many hardware models now, so I simplify firmware booting flow documentation in this series.

The K230 images now come from qemu-machine-images[1], which builds them with the standard Buildroot image build tools, replacing my own repository that the K230 images.

The series has two changes:

Patch1: Update the k230 functional test for firmeware booting
Patch2: Simplify the k230 boot process desc in k230.rst

Link:
[1]: https://github.com/processmission/qemu-machine-images

Quoted 6 lines

Thanks,
Chao

Chao Liu (2):
  tests/functional/riscv64: boot K230 from qemu-machine-images docs/system/riscv: simplify the K230 U-Boot boot flow

Thanks!

Applied to riscv-to-apply.next

Alistair

Quoted 5 lines

 docs/system/riscv/k230.rst            | 60 +++++------------- tests/functional/riscv64/test_k230.py | 90 +++++++++---------------- --

 2 files changed, 43 insertions(+), 107 deletions(-)