* [PATCH] docs/system: Add entry for LoongArch system
@ 2025-03-12 6:26 Bibo Mao
2025-03-18 9:49 ` gaosong
0 siblings, 1 reply; 2+ messages in thread
From: Bibo Mao @ 2025-03-12 6:26 UTC (permalink / raw)
To: Song Gao; +Cc: Jiaxun Yang, qemu-devel
Add index entry for LoongArch system and do some small modification
with LoongArch document with rst syntax.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
docs/system/loongarch/virt.rst | 31 ++++++++++---------------------
docs/system/target-loongarch.rst | 19 +++++++++++++++++++
docs/system/targets.rst | 1 +
3 files changed, 30 insertions(+), 21 deletions(-)
create mode 100644 docs/system/target-loongarch.rst
diff --git a/docs/system/loongarch/virt.rst b/docs/system/loongarch/virt.rst
index 172fba079e..7845878469 100644
--- a/docs/system/loongarch/virt.rst
+++ b/docs/system/loongarch/virt.rst
@@ -12,14 +12,15 @@ Supported devices
-----------------
The ``virt`` machine supports:
-- Gpex host bridge
-- Ls7a RTC device
-- Ls7a IOAPIC device
-- ACPI GED device
-- Fw_cfg device
-- PCI/PCIe devices
-- Memory device
-- CPU device. Type: la464.
+
+* Gpex host bridge
+* Ls7a RTC device
+* Ls7a IOAPIC device
+* ACPI GED device
+* Fw_cfg device
+* PCI/PCIe devices
+* Memory device
+* CPU device. Type: la464.
CPU and machine Type
--------------------
@@ -39,13 +40,7 @@ can be accessed by following steps.
.. code-block:: bash
- ./configure --disable-rdma --prefix=/usr \
- --target-list="loongarch64-softmmu" \
- --disable-libiscsi --disable-libnfs --disable-libpmem \
- --disable-glusterfs --enable-libusb --enable-usb-redir \
- --disable-opengl --disable-xen --enable-spice \
- --enable-debug --disable-capstone --disable-kvm \
- --enable-profiler
+ ./configure --target-list="loongarch64-softmmu"
make -j8
(2) Set cross tools:
@@ -53,9 +48,7 @@ can be accessed by following steps.
.. code-block:: bash
wget https://github.com/loongson/build-tools/releases/download/2022.09.06/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz
-
tar -vxf loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz -C /opt
-
export PATH=/opt/cross-tools/bin:$PATH
export LD_LIBRARY_PATH=/opt/cross-tools/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/cross-tools/loongarch64-unknown-linux-gnu/lib/:$LD_LIBRARY_PATH
@@ -74,13 +67,9 @@ Note: To build the release version of the bios, set --buildtarget=RELEASE,
.. code-block:: bash
git clone https://github.com/loongson/linux.git
-
cd linux
-
git checkout loongarch-next
-
make ARCH=loongarch CROSS_COMPILE=loongarch64-unknown-linux-gnu- loongson3_defconfig
-
make ARCH=loongarch CROSS_COMPILE=loongarch64-unknown-linux-gnu- -j32
Note: The branch of linux source code is loongarch-next.
diff --git a/docs/system/target-loongarch.rst b/docs/system/target-loongarch.rst
new file mode 100644
index 0000000000..316c604b91
--- /dev/null
+++ b/docs/system/target-loongarch.rst
@@ -0,0 +1,19 @@
+.. _LoongArch-System-emulator:
+
+LoongArch System emulator
+-------------------------
+
+QEMU can emulate loongArch 64 bit systems via the
+``qemu-system-loongarch64`` binary. Only one machine type ``virt`` is
+supported.
+
+When using KVM as accelerator, QEMU can emulate la464 cpu model. And when
+using the default cpu model with TCG as accelerator, QEMU will emulate a
+subset of la464 cpu features that should be enough to run distributions
+built for the la464.
+
+Board-specific documentation
+============================
+
+.. toctree::
+ loongarch/virt
diff --git a/docs/system/targets.rst b/docs/system/targets.rst
index 224fadae71..38e2418801 100644
--- a/docs/system/targets.rst
+++ b/docs/system/targets.rst
@@ -18,6 +18,7 @@ Contents:
target-arm
target-avr
+ target-loongarch
target-m68k
target-mips
target-ppc
base-commit: 825b96dbcee23d134b691fc75618b59c5f53da32
--
2.39.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] docs/system: Add entry for LoongArch system
2025-03-12 6:26 [PATCH] docs/system: Add entry for LoongArch system Bibo Mao
@ 2025-03-18 9:49 ` gaosong
0 siblings, 0 replies; 2+ messages in thread
From: gaosong @ 2025-03-18 9:49 UTC (permalink / raw)
To: Bibo Mao; +Cc: Jiaxun Yang, qemu-devel
在 2025/3/12 下午2:26, Bibo Mao 写道:
> Add index entry for LoongArch system and do some small modification
> with LoongArch document with rst syntax.
>
> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> ---
> docs/system/loongarch/virt.rst | 31 ++++++++++---------------------
> docs/system/target-loongarch.rst | 19 +++++++++++++++++++
> docs/system/targets.rst | 1 +
> 3 files changed, 30 insertions(+), 21 deletions(-)
> create mode 100644 docs/system/target-loongarch.rst
Reviewed-by: Song Gao <gaosong@loongson.cn>
thanks.
Song Gao
>
> diff --git a/docs/system/loongarch/virt.rst b/docs/system/loongarch/virt.rst
> index 172fba079e..7845878469 100644
> --- a/docs/system/loongarch/virt.rst
> +++ b/docs/system/loongarch/virt.rst
> @@ -12,14 +12,15 @@ Supported devices
> -----------------
>
> The ``virt`` machine supports:
> -- Gpex host bridge
> -- Ls7a RTC device
> -- Ls7a IOAPIC device
> -- ACPI GED device
> -- Fw_cfg device
> -- PCI/PCIe devices
> -- Memory device
> -- CPU device. Type: la464.
> +
> +* Gpex host bridge
> +* Ls7a RTC device
> +* Ls7a IOAPIC device
> +* ACPI GED device
> +* Fw_cfg device
> +* PCI/PCIe devices
> +* Memory device
> +* CPU device. Type: la464.
>
> CPU and machine Type
> --------------------
> @@ -39,13 +40,7 @@ can be accessed by following steps.
>
> .. code-block:: bash
>
> - ./configure --disable-rdma --prefix=/usr \
> - --target-list="loongarch64-softmmu" \
> - --disable-libiscsi --disable-libnfs --disable-libpmem \
> - --disable-glusterfs --enable-libusb --enable-usb-redir \
> - --disable-opengl --disable-xen --enable-spice \
> - --enable-debug --disable-capstone --disable-kvm \
> - --enable-profiler
> + ./configure --target-list="loongarch64-softmmu"
> make -j8
>
> (2) Set cross tools:
> @@ -53,9 +48,7 @@ can be accessed by following steps.
> .. code-block:: bash
>
> wget https://github.com/loongson/build-tools/releases/download/2022.09.06/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz
> -
> tar -vxf loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz -C /opt
> -
> export PATH=/opt/cross-tools/bin:$PATH
> export LD_LIBRARY_PATH=/opt/cross-tools/lib:$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=/opt/cross-tools/loongarch64-unknown-linux-gnu/lib/:$LD_LIBRARY_PATH
> @@ -74,13 +67,9 @@ Note: To build the release version of the bios, set --buildtarget=RELEASE,
> .. code-block:: bash
>
> git clone https://github.com/loongson/linux.git
> -
> cd linux
> -
> git checkout loongarch-next
> -
> make ARCH=loongarch CROSS_COMPILE=loongarch64-unknown-linux-gnu- loongson3_defconfig
> -
> make ARCH=loongarch CROSS_COMPILE=loongarch64-unknown-linux-gnu- -j32
>
> Note: The branch of linux source code is loongarch-next.
> diff --git a/docs/system/target-loongarch.rst b/docs/system/target-loongarch.rst
> new file mode 100644
> index 0000000000..316c604b91
> --- /dev/null
> +++ b/docs/system/target-loongarch.rst
> @@ -0,0 +1,19 @@
> +.. _LoongArch-System-emulator:
> +
> +LoongArch System emulator
> +-------------------------
> +
> +QEMU can emulate loongArch 64 bit systems via the
> +``qemu-system-loongarch64`` binary. Only one machine type ``virt`` is
> +supported.
> +
> +When using KVM as accelerator, QEMU can emulate la464 cpu model. And when
> +using the default cpu model with TCG as accelerator, QEMU will emulate a
> +subset of la464 cpu features that should be enough to run distributions
> +built for the la464.
> +
> +Board-specific documentation
> +============================
> +
> +.. toctree::
> + loongarch/virt
> diff --git a/docs/system/targets.rst b/docs/system/targets.rst
> index 224fadae71..38e2418801 100644
> --- a/docs/system/targets.rst
> +++ b/docs/system/targets.rst
> @@ -18,6 +18,7 @@ Contents:
>
> target-arm
> target-avr
> + target-loongarch
> target-m68k
> target-mips
> target-ppc
>
> base-commit: 825b96dbcee23d134b691fc75618b59c5f53da32
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-18 9:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 6:26 [PATCH] docs/system: Add entry for LoongArch system Bibo Mao
2025-03-18 9:49 ` gaosong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).