Message ID | 1636594528-8175-2-git-send-email-yangxiaojuan@loongson.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add Loongarch softmmu support. | expand |
Hi, Xiaojuan, On Thu, Nov 11, 2021 at 9:41 AM Xiaojuan Yang <yangxiaojuan@loongson.cn> wrote: > > Mainly introduce how to run the softmmu > > Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn> > Signed-off-by: Song Gao <gaosong@loongson.cn> > --- > target/loongarch/README | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/target/loongarch/README b/target/loongarch/README > index 09f809cf80..6f64bde22f 100644 > --- a/target/loongarch/README > +++ b/target/loongarch/README > @@ -71,6 +71,26 @@ > ./qemu-loongarch64 /opt/clfs/usr/bin/pwd > ... > > +- Softmmu emulation > + > + Add support softmmu emulation support in the following series patches. > + Mainly emulate a virt 3A5000 board that is not exactly the same as the host. > + Kernel code is on the github and the uefi code will be opened in the near future. > + All required binaries can get from github for test. > + > + 1.Download kernel and the cross-tools.(vmlinux) > + > + wget https://github.com/loongson/linux This is a git repo URL, I think we cannot use wget to download. > + wget https://github.com/loongson/build-tools/releases/latest/download/loongarch64-clfs-20210831-cross-tools.tar.xz > + > + 2.Download the clfs-system and made a ramdisk with busybox.(ramdisk) > + > + 3.Run with command,eg: > + > + ./build/qemu-system-loongarch64 -m 4G -smp 16 --cpu Loongson-3A5000 --machine loongson7a -kernel ./vmlinux -initrd ./ramdisk -append "root=/dev/ram console=ttyS0,115200 rdinit=/sbin/init loglevel=8" -monitor tcp::4000,server,nowait -nographic It isn't recommended to use "loongson7a" as the machine name. In my opinion, we will have two types of machines run in qemu (One is an emulated LS7A and the other is pure virtual). I think we can call them "loongson3-ls7a" and "loongson3-virt". Huacai > + > +The vmlinux, ramdisk and uefi binary loongarch_bios.bin can get from : > + git clone https://github.com/yangxiaojuan-loongson/qemu-binary > > - Note. > We can get the latest LoongArch documents or LoongArch tools at https://github.com/loongson/ > -- > 2.27.0 > >
On 11/11/2021 07:50 PM, chen huacai wrote: > Hi, Xiaojuan, > > On Thu, Nov 11, 2021 at 9:41 AM Xiaojuan Yang <yangxiaojuan@loongson.cn> wrote: >> >> Mainly introduce how to run the softmmu >> >> Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn> >> Signed-off-by: Song Gao <gaosong@loongson.cn> >> --- >> target/loongarch/README | 20 ++++++++++++++++++++ >> 1 file changed, 20 insertions(+) >> >> diff --git a/target/loongarch/README b/target/loongarch/README >> index 09f809cf80..6f64bde22f 100644 >> --- a/target/loongarch/README >> +++ b/target/loongarch/README >> @@ -71,6 +71,26 @@ >> ./qemu-loongarch64 /opt/clfs/usr/bin/pwd >> ... >> >> +- Softmmu emulation >> + >> + Add support softmmu emulation support in the following series patches. >> + Mainly emulate a virt 3A5000 board that is not exactly the same as the host. >> + Kernel code is on the github and the uefi code will be opened in the near future. >> + All required binaries can get from github for test. >> + >> + 1.Download kernel and the cross-tools.(vmlinux) >> + >> + wget https://github.com/loongson/linux > This is a git repo URL, I think we cannot use wget to download. oh, sorry, I will modify. > >> + wget https://github.com/loongson/build-tools/releases/latest/download/loongarch64-clfs-20210831-cross-tools.tar.xz >> + >> + 2.Download the clfs-system and made a ramdisk with busybox.(ramdisk) >> + >> + 3.Run with command,eg: >> + >> + ./build/qemu-system-loongarch64 -m 4G -smp 16 --cpu Loongson-3A5000 --machine loongson7a -kernel ./vmlinux -initrd ./ramdisk -append "root=/dev/ram console=ttyS0,115200 rdinit=/sbin/init loglevel=8" -monitor tcp::4000,server,nowait -nographic > It isn't recommended to use "loongson7a" as the machine name. In my > opinion, we will have two types of machines run in qemu (One is an > emulated LS7A and the other is pure virtual). I think we can call them > "loongson3-ls7a" and "loongson3-virt". > > Huacai Thank you for your advice, I didn't think comprehensively. I will modify in the next versison. Thanks, Xiaojuan >> + >> +The vmlinux, ramdisk and uefi binary loongarch_bios.bin can get from : >> + git clone https://github.com/yangxiaojuan-loongson/qemu-binary >> >> - Note. >> We can get the latest LoongArch documents or LoongArch tools at https://github.com/loongson/ >> -- >> 2.27.0 >> >> > >
diff --git a/target/loongarch/README b/target/loongarch/README index 09f809cf80..6f64bde22f 100644 --- a/target/loongarch/README +++ b/target/loongarch/README @@ -71,6 +71,26 @@ ./qemu-loongarch64 /opt/clfs/usr/bin/pwd ... +- Softmmu emulation + + Add support softmmu emulation support in the following series patches. + Mainly emulate a virt 3A5000 board that is not exactly the same as the host. + Kernel code is on the github and the uefi code will be opened in the near future. + All required binaries can get from github for test. + + 1.Download kernel and the cross-tools.(vmlinux) + + wget https://github.com/loongson/linux + wget https://github.com/loongson/build-tools/releases/latest/download/loongarch64-clfs-20210831-cross-tools.tar.xz + + 2.Download the clfs-system and made a ramdisk with busybox.(ramdisk) + + 3.Run with command,eg: + + ./build/qemu-system-loongarch64 -m 4G -smp 16 --cpu Loongson-3A5000 --machine loongson7a -kernel ./vmlinux -initrd ./ramdisk -append "root=/dev/ram console=ttyS0,115200 rdinit=/sbin/init loglevel=8" -monitor tcp::4000,server,nowait -nographic + +The vmlinux, ramdisk and uefi binary loongarch_bios.bin can get from : + git clone https://github.com/yangxiaojuan-loongson/qemu-binary - Note. We can get the latest LoongArch documents or LoongArch tools at https://github.com/loongson/