From 8429f1fde5f3b08004df960c5f5c3421b55f9b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=95=E8=BE=BE?= Date: Thu, 16 Mar 2023 12:26:23 +0000 Subject: [PATCH 1/2] =?UTF-8?q?add=20en/Community-Policies-and-Rules/Discl?= =?UTF-8?q?aimer.md.=20=E7=BF=BB=E8=AF=91=20=E7=A4=BE=E5=8C=BA=E6=94=BF?= =?UTF-8?q?=E7=AD=96=E5=92=8C=E8=A7=84=E5=88=99/=E5=85=8D=E8=B4=A3?= =?UTF-8?q?=E5=A3=B0=E6=98=8E.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 滕达 --- en/Community-Policies-and-Rules/Disclaimer.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 en/Community-Policies-and-Rules/Disclaimer.md diff --git a/en/Community-Policies-and-Rules/Disclaimer.md b/en/Community-Policies-and-Rules/Disclaimer.md new file mode 100644 index 0000000..e5bdac1 --- /dev/null +++ b/en/Community-Policies-and-Rules/Disclaimer.md @@ -0,0 +1,46 @@ +--- +title: Disclaimer +description: +published: true +date: 2022-05-17T08:20:50.868Z +tags: +editor: markdown +dateCreated: 2022-03-11T03:17:44.233Z +--- +# Disclaimer +## General rule +Before accepting the services provided by openKylin open source community ([https://openkylin.top/](https://openkylin.top/)), users must carefully read this statement and agree to its terms. + +The act of directly or indirectly using the services and data of openKylin open source community (such as external API references, etc.) will be regarded as the unconditional acceptance of all contents of this statement. If users have any objections to any terms of this statement, they should stop using all services provided by openKylin open source community. + +## Article 1 + +During the process of using the services and data of openKylin open source community in any way (including but not limited to publishing, promoting, reprinting, browsing and utilizing content posted by openKylin open source community or its users), users shall not engage in any activities that violate Chinese laws and social ethics directly or indirectly through openKylin open source community. Users must adhere to the following commitments: + +1. The content published, reposted or provided shall comply with Chinese laws and social ethics. + +2. Users shall not interfere with, damage, or infringe upon the legitimate rights and interests of openKylin open source community. + +3. Users shall comply with the agreements, guidelines, management rules, and other relevant network service regulations of openKylin open source community. + +4. Users shall not interfere with, damage, or infringe upon the legitimate rights and interests of other openKylin community users. + +**OpenKylin open source community has the right to delete content that violates the above commitments.** + +## Article 2 + +1. openKylin open source community only provides storage space for the content published by users and does not provide any form of guarantee for the content published or reposted by users, including but not limited to the guarantee that the content meets the users' requirements or that the services provided by openKylin open source community will not be interrupted. openKylin open source community shall not bear any legal responsibility for the inability of users to use openKylin open source community due to network conditions, communication lines, third-party websites or requirements of management departments, or other reasons. + +2. The content published by users on openKylin open source community (including but not limited to the content in the current product functions of openKylin open source community) only represents their personal views and opinions and does not represent the views or opinions of openKylin open source community. As the publisher of the content, users shall be responsible for the content they publish. Any disputes arising from the content published shall be borne by the publisher of the content. openKylin open source community shall not bear any legal or joint liability. + +3. If users publish content that infringes on the intellectual property rights or other legal rights and interests of others on openKylin open source community, openKylin open source community has the right to delete the content and reserves the right to transfer it to judicial authorities for processing. + +4. **Since the content of web pages pointed to by external links is not actually controlled by openKylin community, openKylin cannot guarantee the accuracy and completeness of external links set up for your convenience.** + +5. **Individuals or units who believe that there is content on openKylin open source community that infringes on their legitimate rights and interests should prepare proof materials with legal effect and contact openKylin open source community in a timely manner so that openKylin open source community can promptly handle it.** + +## Supplementary Provisions + +The right to interpret, modify, and update this disclaimer belongs to openKylin open source community. + +Contact Us: [contact@openkylin.top](contact@openkylin.top) \ No newline at end of file -- Gitee From 4c26d7c3c9c1fb2b4c6a420110c912ee8e268f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=95=E8=BE=BE?= Date: Thu, 16 Mar 2023 16:12:42 +0000 Subject: [PATCH 2/2] =?UTF-8?q?add=20en/Install=5FopenKylin=5Fon=5Friscv.m?= =?UTF-8?q?d.=20=E7=BF=BB=E8=AF=91=20riscv=E4=B8=8A=E5=AE=89=E8=A3=85openK?= =?UTF-8?q?ylin.md=20=E5=B9=B6=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 滕达 --- en/Install_openKylin_on_riscv.md | 252 +++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 en/Install_openKylin_on_riscv.md diff --git a/en/Install_openKylin_on_riscv.md b/en/Install_openKylin_on_riscv.md new file mode 100644 index 0000000..cbb5e55 --- /dev/null +++ b/en/Install_openKylin_on_riscv.md @@ -0,0 +1,252 @@ +--- +title: Install openKylin on riscv +description: +published: true +date: 2022-07-22T06:40:16.074Z +tags: +editor: markdown +dateCreated: 2022-07-22T06:40:16.074Z +--- + +# Installing OpenKylin on HiFive Unmatched +## Prepare the SD Card +Even if you plan to use an NVMe SSD for the long term, an SD card is needed for the first step. This is necessary so that we can utilize the NVMe driver on Unmatched to set up the SSD later on. The OpenKylin mirror adapted for Unmatched can be downloaded from the following link. + +> https://www.openkylin.top/downloads + +Unzip using the following command: +> unxz openkylin-0.9-hifive-unmatched-riscv64.img.xz + +Please unzip using your actual path. + +## Create the SD Card Boot Disk +First, use the Disk Utility to format the SD card. + +Then use the command line to flush the mirrir into the SD card by running: + +> sudo dd if= of=/dev/mmcblk0 bs=1M status=progress + +Note: refers to the downloaded mirror path, do not include the angle brackets and English inside them, and avoid spaces in the path as much as possible. + +This command assumes that you have inserted the SD card into your computer's SD card slot. If you're using a USB card reader, it may appear as /dev/sdb or something similar instead of /dev/mmcblk0. + +Note: Be very careful with the "of" parameter in the above command. If you use the wrong disk, you could lose data. You can also use the Disk Utility's Restore Disk Mirror feature to flush the mirror into the SD card. +## Modify u-boot configuration file +> sudo mount /dev/mmcblk0p4 /mnt sudo mount /dev/mmcblk0p3 /mnt/boot sudo chroot /mnt + +Please modify the paths starting with /dev according to your actual paths. + +Open "/etc/default/u-boot" (the path after chroot, the actual path on your local machine is "/mnt/etc/default/u-boot") using a text editor and add: + +> U_BOOT_ROOT="root=/dev/mmcblk0p4" + +Then run: + +> u-boot-update + +Open "/boot/extlinux/extlinux.conf" (the path after chrooting, the actual path on your local machine is "/mnt/boot/extlinux/extlinux.conf"), and add the following between two empty lines: + +> fdt /hifive-unmatched-a00.dtb + +Then exit: + +> exit sudo umount /mnt/boot sudo umount /mnt + +## First Boot +After the first boot, there will be a default user in the system. Once the desktop environment is started, you can log in to Unmatched for the first time using the default user. Later, you can change the user or password according to your needs. The default username/password is: + +> username: openkylin password: openkylin + +The following two login methods are also supported: + +## Connect to serial console +The Getting Started Guide of HiFive explains how to connect to a serial console from various operating systems. If you are using the openkylin RISC-V computer to monitor serial output, connect it to the Micro USB port next to the SD card slot on Unmatched and run: + +> sudo screen /dev/ttyUSB1 115200 + +After pressing the power button, the startup output will begin to appear in the session. + +## Install openkylin RISC-V on NVMe drive +Using an NVMe drive with Unmatched will make a huge difference in performance and availability. Making it work requires a bit of effort, but trust me, it's worth it. Samsung 970 EVO Plus is recommended by SiFive. I used the Samsung 970 EVO (not plus) and it worked well. The easiest way to install openkylin RISC-V on an NVMe drive is to boot from the SD card and use the M.2 connector on Unmatched itself. + +After booting, download the openkylin image to Unmatched: + +> https://www.openkylin.top/downloads + +Extract it by running the following command: + +> unxz openkylin-0.9-hifive-unmatched-riscv64.img.xz + +Please modify the paths according to your actual paths to extract it. + +Make sure the NVMe drive exists by running: + +> ls -l /dev/nvme* + +On my motherboard, the NVMe drive appears as /dev/nvme0n1. First, format the NVMe disk using the disk tool. Then, run the following command to flush the mirror to NVMe: + +>sudo dd if= of=/dev/nvme0n1 bs=1M status=progress + +Note: "" refers to the downloaded mirror path, do not include the angle brackets and the English inside, and try not to have spaces in the path as much as possible. + +Congratulations! You have now installed openkylin RISC-V on the NVMe drive of HiFive Unmatched. However, there is still an issue. Unmatched still needs an SD card to boot, and there is a potential race condition that may cause it to install the root file system on the SD card instead of the NVMe drive. To prevent this, mount the new flushed NVMe drive and chroot into it by running: + +> sudo mount /dev/nvme0n1p4 /mnt sudo moubt /dev/nvme0n1p3 /mnt/boot sudo chroot /mnt + +Note: The previous chroot command is only effective when executed on a riscv64 computer. This is one of the reasons why this tutorial recommends using an M.2 drive on Unmatched to set up an NVMe drive. + +Use your favorite text editor to edit "/etc/default/u-boot" and add: + +> U_BOOT_ROOT="root=/dev/nvme0n1p4" + +To apply these changes, run: + +> u-boot-update + +Open "/boot/extlinux/extlinux.conf" with a text editor and add the following in two empty lines: + +> fdt /hifive-unmatched-a00.dtb + +Exit the chroot environment by running exit: + +>exit sudo umount /mnt/boot sudo umount /mnt + +Then restart the system, which will now boot from your NVMe drive, and you will experience a significant performance improvement! +# Installing openKylin on VisionFive + +## Prepare the SD card +The openKylin image adapted for VisionFive can be downloaded from the following link: + +> https://www.openkylin.top/downloads + +Use the following command to extract it: + +> unxz openkylin-0.9-visionfive-riscv64.img.xz + +Replace with the actual path to the downloaded mirror. + +## Create an SD card boot disk +First, use a disk utility to format the SD card. Then, use the following command to flash the mirror onto the SD card: + +> sudo dd if= of=/dev/mmcblk0 bs=1M status=progress + +Note: refers to the path to the downloaded mirror. Do not include the angle brackets or the text inside them. Also, try to avoid spaces in the path. + +This command assumes that you have inserted the SD card into the SD card slot on the development board. If you are using a USB card reader, it may appear as /dev/sdb or something similar instead of /dev/mmcblk0. + +Note: Be very careful with the "of" parameter in the previous command. If you use the wrong disk, you may lose data. You can also use the restore disk image function in the disk utility to flush the mirror onto the SD card. + +## First boot +Insert the burned SD card into the VisionFive card slot and connect the power cable. After the first boot, there will be a default user in the system. Once the desktop environment starts, you can log in to VisionFive for the first time using the default user. Later, you can change the user or password according to your needs. The default username/password is: + +> username: openkylin password: openkylin + +# Installing openKylin on Thead1520 +## Prepare the SD Card +The openKylin image for Thead1520 can be downloaded from the following link: +> https://www.openkylin.top/downloads. + +Unzip it using the following command: +> unxz openKylin-0.9.5-thead1520-riscv64.img.xz. + +## Create the SD Card Boot Disk +First, use a disk utility to format the SD card. Then, use the following command to flash the image onto the SD card via the command line: +> sudo dd if= of=/dev/mmcblk0 bs=1M status=progress. + +This command assumes that you have inserted the SD card into the SD card slot of the development board. If you are using a USB adapter, it may be displayed as /dev/sdb or similar instead of /dev/mmcblk0. + +Note: be extremely careful with the "of" parameter in the previous command. Using the wrong disk could result in data loss. You can also flash the image onto the SD card using the restore disk mirror function in the disk utility. + +## Connect to the Serial Console +You can use an openKylin computer to monitor the serial port output of the Thead1520 boot process. Connect this computer to the mini USB port next to the SD card slot on Thead1520 and run the following command to open the serial port: +>sudo minicom -s. + +In the serial settings, change A - Serial Device to: +>/dev/serial/by-path/pci-0000:00:14.0-usb-0:7:1.2-port0 + +then save and open the serial port. + +## First Boot and Modify the Development Board's U-boot Settings +Start minicom serial console on the computer for Thead1520. Insert the burned SD card into Thead1520's slot and connect the power cord. Quickly press Enter in u-boot when the development board boots to stop it at u-boot. Enter the following command in u-boot to set the development board to boot from the SD card: + +> env set -f set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/mmcblk1 rootfstype=ext4 rootwait rw earlycon clk_ignore_unused loglevel=7 eth=ethaddr rootrwoptions=rw,noatime rootrwreset={factory_reset} init=/lib/systemd/systemd' +> env save +> run gpt_partition. + +Note: the first command is a long command and may wrap to a new line on your display device. After entering this command, type reset in u-boot to restart the development board. This will allow the development board to boot the openKylin system from the SD card. + +After the first boot, there will be a default user in the system. Once the desktop environment is launched, you can log in to Thead1520 for the first time using the default user. You can change the username or password according to your needs later. + +The default username/password is: +>username: openkylin +>password: openkylin. + +# Installing openKylin on VisionFive2 + +## Prepare the SD Card +The OpenKylin image that is compatible with VisionFive 2 can be downloaded from the following link: +> https://openKylin.top/downloads/download-smp.php?id=15 + +Extract the image using the following command: +> unxz openkylin-0.9.5-visionfive2-riscv64.img.xz + +Please adjust the above path according to your actual path. +## Create an SD card boot disk +First, use the disk tool to format the SD card. Then, use the following command to flush the mirror into the SD card: +> sudo dd if= of=/dev/mmcblk0 bs=1M status=progress + +Note: The meaning of is the downloaded mirror path. Do not include the angle brackets or the English text inside. Try to avoid spaces in the path. + +This command assumes that you have inserted the SD card into the SD card slot of the development board. If you are using a USB card reader, it may appear as /dev/sdb or something similar instead of /dev/mmcblk0. + +Be very careful with the "of" parameter in the previous command. If you use the wrong disk, you may lose data. Alternatively, you can use the restore disk mirror function of the disk tool to flush the mirror into the SD card. + +## First boot +Insert the burned SD card into the card slot of VisionFive 2 and connect the power cord. After the first boot, there will be a default user in the system. When the desktop environment starts, you can use the default user to log in to VisionFive 2 for the first time. Later, you can change the user or password according to your needs. The default username/password is: + +>username: openkylin +>password: openkylin + +# Booting OpenKylin using Qemu + +## Download the Mirror +The Qemu version of the OpenKylin image can be downloaded using the following link: + +> https://openKylin.top/downloads/download-smp.php?id=16 + +Extract the image using the following command: +> unxz openKylin-0.9.5-qemu-riscv64.img.xz + +Please replace the above path with your actual path when extracting. + +## Install Required Packages for Qemu +> sudo apt install qemu-system-misc opensbi u-boot-qemu qemu-utils + +## Start in Command-line Mode +Execute the following command to start the image in Qemu command-line mode: +> sudo qemu-system-riscv64 -machine virt -nographic -m 2048 -smp 4 -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 -drive file=openKylin-0.9.5-qemu-riscv64.img,format=raw,if=virtio + +## Start in Desktop Mode +To start Qemu in desktop mode, you need to configure and compile Qemu locally. Qemu depends on sdl, so you need to compile sdl first. + +>https://github.com/libsdl-org/SDL/releases/tag/release-2.26.3 Download SDL2-2.26.3.tar.gz + +using this link, extract it, and enter the directory./configure make sudo make install + +Next, locally compile Qemu, open the terminal and enter the following commands: + +>mkdir qemu cd qemu wget https://download.qemu.org/qemu-7.0.0.tar.xz tar xvJf qemu-7.0.0.tar.xz cd qemu-7.0.0 + +To add a display for the desktop in Qemu, you need to enable the sdl parameter. You can refer to the following link to resolve common compilation errors in Qemu. + +> https://blog.csdn.net/ado11111/article/details/115705374 +>./configure --enable-sdl make make install + +Execute the following command to start the image in Qemu desktop mode: +>qemu-system-riscv64 -machine virt -m 4096 -smp 4 -vga std -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf -device VGA,id=video0,vgamem_mb=1024 -device virtio-mouse-pci -device virtio-keyboard-pci -drive file=openKylin-0.9.5-qemu-riscv64.img,format=raw,if=virtio + +## First boot +After booting, you can log in for the first time using the default user account, and later you can change the user or password as per your requirements. The default username/password is: + +>username: openkylin +>password: openkylin \ No newline at end of file -- Gitee