Skip to content

Commit 1267e1d

Browse files
committed
docs/system: Add entry for LoongArch system
Add index entry for LoongArch system and do some small modification with LoongArch document with rst syntax. Signed-off-by: Bibo Mao <[email protected]> Reviewed-by: Song Gao <[email protected]>
1 parent ca2737d commit 1267e1d

File tree

3 files changed

+30
-21
lines changed

3 files changed

+30
-21
lines changed

docs/system/loongarch/virt.rst

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ Supported devices
1212
-----------------
1313

1414
The ``virt`` machine supports:
15-
- Gpex host bridge
16-
- Ls7a RTC device
17-
- Ls7a IOAPIC device
18-
- ACPI GED device
19-
- Fw_cfg device
20-
- PCI/PCIe devices
21-
- Memory device
22-
- CPU device. Type: la464.
15+
16+
* Gpex host bridge
17+
* Ls7a RTC device
18+
* Ls7a IOAPIC device
19+
* ACPI GED device
20+
* Fw_cfg device
21+
* PCI/PCIe devices
22+
* Memory device
23+
* CPU device. Type: la464.
2324

2425
CPU and machine Type
2526
--------------------
@@ -39,23 +40,15 @@ can be accessed by following steps.
3940

4041
.. code-block:: bash
4142
42-
./configure --disable-rdma --prefix=/usr \
43-
--target-list="loongarch64-softmmu" \
44-
--disable-libiscsi --disable-libnfs --disable-libpmem \
45-
--disable-glusterfs --enable-libusb --enable-usb-redir \
46-
--disable-opengl --disable-xen --enable-spice \
47-
--enable-debug --disable-capstone --disable-kvm \
48-
--enable-profiler
43+
./configure --target-list="loongarch64-softmmu"
4944
make -j8
5045
5146
(2) Set cross tools:
5247

5348
.. code-block:: bash
5449
5550
wget https://github.com/loongson/build-tools/releases/download/2022.09.06/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz
56-
5751
tar -vxf loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz -C /opt
58-
5952
export PATH=/opt/cross-tools/bin:$PATH
6053
export LD_LIBRARY_PATH=/opt/cross-tools/lib:$LD_LIBRARY_PATH
6154
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,
7467
.. code-block:: bash
7568
7669
git clone https://github.com/loongson/linux.git
77-
7870
cd linux
79-
8071
git checkout loongarch-next
81-
8272
make ARCH=loongarch CROSS_COMPILE=loongarch64-unknown-linux-gnu- loongson3_defconfig
83-
8473
make ARCH=loongarch CROSS_COMPILE=loongarch64-unknown-linux-gnu- -j32
8574
8675
Note: The branch of linux source code is loongarch-next.

docs/system/target-loongarch.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. _LoongArch-System-emulator:
2+
3+
LoongArch System emulator
4+
-------------------------
5+
6+
QEMU can emulate loongArch 64 bit systems via the
7+
``qemu-system-loongarch64`` binary. Only one machine type ``virt`` is
8+
supported.
9+
10+
When using KVM as accelerator, QEMU can emulate la464 cpu model. And when
11+
using the default cpu model with TCG as accelerator, QEMU will emulate a
12+
subset of la464 cpu features that should be enough to run distributions
13+
built for the la464.
14+
15+
Board-specific documentation
16+
============================
17+
18+
.. toctree::
19+
loongarch/virt

docs/system/targets.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Contents:
1818

1919
target-arm
2020
target-avr
21+
target-loongarch
2122
target-m68k
2223
target-mips
2324
target-ppc

0 commit comments

Comments
 (0)