{"id":367260,"date":"2024-05-21T03:17:23","date_gmt":"2024-05-21T03:17:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=367260"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=367260","title":{"rendered":"<span>Xv6: \u0443\u0447\u0435\u0431\u043d\u0430\u044f Unix-\u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u041e\u0421. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 xv6 \u043f\u043e\u0434 QEMU<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p>\u042d\u0442\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f &#8212; \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a <a href=\"https:\/\/habr.com\/ru\/article\/789478\/\" rel=\"noopener noreferrer nofollow\">\u043a\u043d\u0438\u0433\u0435 \u043e\u0431 \u0443\u0447\u0435\u0431\u043d\u043e\u0439 \u041e\u0421 xv6<\/a>.<\/p>\n<\/blockquote>\n<p>Xv6 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 RISC-V. \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u043e\u0434\u0430 xv6 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0434 QEMU \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f RISC-V \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: QEMU 5.1+, GDB 8.3+, GCC, \u0438 Binutils.<\/p>\n<h3>Debian \u0438 Ubuntu<\/h3>\n<pre><code>sudo apt-get install git build-essential gdb-multiarch qemu-system-misc gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu <\/code><\/pre>\n<h3>Arch Linux<\/h3>\n<pre><code>sudo pacman -S riscv64-linux-gnu-binutils riscv64-linux-gnu-gcc riscv64-linux-gnu-gdb qemu-emulators-full <\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043e\u0434 Windows<\/h3>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c <s>\u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 Windows<\/s> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Linux \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WSL2 &#8212; Windows Subsystem for Linux 2.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <a href=\"https:\/\/apps.microsoft.com\/store\/detail\/windows-terminal\/9N0DX20HK701\" rel=\"noopener noreferrer nofollow\">Windows Terminal<\/a> \u0432\u043c\u0435\u0441\u0442\u043e Powershell\/Command Prompt.<\/p>\n<p><strong>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 WSL2<\/strong>. WSL1 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438\u043d\u0430\u0447\u0435, \u0447\u0442\u043e \u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442. \u0421\u043a\u043e\u043c\u0430\u043d\u0434\u0443\u0439\u0442\u0435 <code>wsl -l -v<\/code> \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 WSL2 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Ubuntu.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435<\/p>\n<pre><code>sudo apt-get update &amp;&amp; sudo apt-get upgrade sudo apt-get install git build-essential gdb-multiarch qemu-system-misc gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu <\/code><\/pre>\n<p>\u0412\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0444\u0430\u0439\u043b\u044b WSL \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\"\\\\wsl$\\\"<\/code>. \u041f\u0440\u0438\u043c\u0435\u0440: \u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Ubuntu 20.04 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043a\u0430\u043a <code>\"\\\\wsl$\\Ubuntu-20.04\\home\\&lt;username>\\\"<\/code>.<\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Linux<\/h3>\n<p>Linux \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043f\u043e\u0434 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439. \u0412\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\" rel=\"noopener noreferrer nofollow\">VirtualBox<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/www.vmware.com\/products\/player\/\" rel=\"noopener noreferrer nofollow\">VMware Player<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/www.vmware.com\/products\/fusion\/\" rel=\"noopener noreferrer nofollow\">VMware Fusion<\/a> (\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0434\u043b\u044f <a href=\"https:\/\/ist.mit.edu\/about\" rel=\"noopener noreferrer nofollow\">IS&amp;T<\/a>)<\/p>\n<\/li>\n<\/ul>\n<p>VirtualBox \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u0437\u0430\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439.<\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u043a \u041e\u0421, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"http:\/\/www.ubuntu.com\/download\/desktop\" rel=\"noopener noreferrer nofollow\">Ubuntu Desktop<\/a> \u0434\u043b\u044f 64-\u0431\u0438\u0442\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 64-\u0431\u0438\u0442\u043d\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u041e\u0421 \u0441 \u0434\u0438\u0441\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430 macOS<\/h3>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430:<\/p>\n<pre><code>xcode-select --install <\/code><\/pre>\n<p>\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 <a href=\"https:\/\/brew.sh\/\" rel=\"noopener noreferrer nofollow\">Homebrew<\/a>:<\/p>\n<pre><code>\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\" <\/code><\/pre>\n<p><a href=\"https:\/\/github.com\/riscv\/homebrew-riscv\" rel=\"noopener noreferrer nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 RISC-V<\/a>:<\/p>\n<pre><code>brew tap riscv\/riscv brew install riscv-tools <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u0443\u0442\u044c \u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0432 $PATH:<\/p>\n<pre><code>PATH=$PATH:\/usr\/local\/opt\/riscv-gnu-toolchain\/bin <\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 QEMU:<\/p>\n<pre><code>brew install qemu <\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c xv6, \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/pdos.csail.mit.edu\/6.828\/2023\/labs\/util.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435<\/a>:<\/p>\n<pre><code>cd xv6-riscv\/ make qemu <\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f QEMU:<\/p>\n<pre><code>$ qemu-system-riscv64 --version QEMU emulator version 5.1.0 <\/code><\/pre>\n<p>\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 RISC-V \u0432\u0435\u0440\u0441\u0438\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 GCC:<\/p>\n<pre><code>$ riscv64-linux-gnu-gcc --version riscv64-linux-gnu-gcc (Debian 10.3.0-8) 10.3.0 ... <\/code><\/pre>\n<pre><code>$ riscv64-unknown-elf-gcc --version riscv64-unknown-elf-gcc (GCC) 10.1.0 ... <\/code><\/pre>\n<pre><code>$ riscv64-unknown-linux-gnu-gcc --version riscv64-unknown-linux-gnu-gcc (GCC) 10.1.0 ... <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/791286\/\"> https:\/\/habr.com\/ru\/articles\/791286\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p>\u042d\u0442\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f &#8212; \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a <a href=\"https:\/\/habr.com\/ru\/article\/789478\/\" rel=\"noopener noreferrer nofollow\">\u043a\u043d\u0438\u0433\u0435 \u043e\u0431 \u0443\u0447\u0435\u0431\u043d\u043e\u0439 \u041e\u0421 xv6<\/a>.<\/p>\n<\/blockquote>\n<p>Xv6 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 RISC-V. \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u043e\u0434\u0430 xv6 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0434 QEMU \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f RISC-V \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: QEMU 5.1+, GDB 8.3+, GCC, \u0438 Binutils.<\/p>\n<h3>Debian \u0438 Ubuntu<\/h3>\n<pre><code>sudo apt-get install git build-essential gdb-multiarch qemu-system-misc gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu <\/code><\/pre>\n<h3>Arch Linux<\/h3>\n<pre><code>sudo pacman -S riscv64-linux-gnu-binutils riscv64-linux-gnu-gcc riscv64-linux-gnu-gdb qemu-emulators-full <\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043e\u0434 Windows<\/h3>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c <s>\u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 Windows<\/s> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Linux \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WSL2 &#8212; Windows Subsystem for Linux 2.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <a href=\"https:\/\/apps.microsoft.com\/store\/detail\/windows-terminal\/9N0DX20HK701\" rel=\"noopener noreferrer nofollow\">Windows Terminal<\/a> \u0432\u043c\u0435\u0441\u0442\u043e Powershell\/Command Prompt.<\/p>\n<p><strong>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 WSL2<\/strong>. WSL1 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438\u043d\u0430\u0447\u0435, \u0447\u0442\u043e \u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442. \u0421\u043a\u043e\u043c\u0430\u043d\u0434\u0443\u0439\u0442\u0435 <code>wsl -l -v<\/code> \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 WSL2 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Ubuntu.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435<\/p>\n<pre><code>sudo apt-get update &amp;&amp; sudo apt-get upgrade sudo apt-get install git build-essential gdb-multiarch qemu-system-misc gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu <\/code><\/pre>\n<p>\u0412\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0444\u0430\u0439\u043b\u044b WSL \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\"\\\\wsl$\\\"<\/code>. \u041f\u0440\u0438\u043c\u0435\u0440: \u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Ubuntu 20.04 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043a\u0430\u043a <code>\"\\\\wsl$\\Ubuntu-20.04\\home\\&lt;username>\\\"<\/code>.<\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Linux<\/h3>\n<p>Linux \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043f\u043e\u0434 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439. \u0412\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\" rel=\"noopener noreferrer nofollow\">VirtualBox<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/www.vmware.com\/products\/player\/\" rel=\"noopener noreferrer nofollow\">VMware Player<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/www.vmware.com\/products\/fusion\/\" rel=\"noopener noreferrer nofollow\">VMware Fusion<\/a> (\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0434\u043b\u044f <a href=\"https:\/\/ist.mit.edu\/about\" rel=\"noopener noreferrer nofollow\">IS&amp;T<\/a>)<\/p>\n<\/li>\n<\/ul>\n<p>VirtualBox \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u0437\u0430\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439.<\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u043a \u041e\u0421, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"http:\/\/www.ubuntu.com\/download\/desktop\" rel=\"noopener noreferrer nofollow\">Ubuntu Desktop<\/a> \u0434\u043b\u044f 64-\u0431\u0438\u0442\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 64-\u0431\u0438\u0442\u043d\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u041e\u0421 \u0441 \u0434\u0438\u0441\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430 macOS<\/h3>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430:<\/p>\n<pre><code>xcode-select --install <\/code><\/pre>\n<p>\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 <a href=\"https:\/\/brew.sh\/\" rel=\"noopener noreferrer nofollow\">Homebrew<\/a>:<\/p>\n<pre><code>\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\" <\/code><\/pre>\n<p><a href=\"https:\/\/github.com\/riscv\/homebrew-riscv\" rel=\"noopener noreferrer nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 RISC-V<\/a>:<\/p>\n<pre><code>brew tap riscv\/riscv brew install riscv-tools <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u0443\u0442\u044c \u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0432 $PATH:<\/p>\n<pre><code>PATH=$PATH:\/usr\/local\/opt\/riscv-gnu-toolchain\/bin <\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 QEMU:<\/p>\n<pre><code>brew install qemu <\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c xv6, \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/pdos.csail.mit.edu\/6.828\/2023\/labs\/util.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435<\/a>:<\/p>\n<pre><code>cd xv6-riscv\/ make qemu <\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f QEMU:<\/p>\n<pre><code>$ qemu-system-riscv64 --version QEMU emulator version 5.1.0 <\/code><\/pre>\n<p>\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 RISC-V \u0432\u0435\u0440\u0441\u0438\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 GCC:<\/p>\n<pre><code>$ riscv64-linux-gnu-gcc --version riscv64-linux-gnu-gcc (Debian 10.3.0-8) 10.3.0 ... <\/code><\/pre>\n<pre><code>$ riscv64-unknown-elf-gcc --version riscv64-unknown-elf-gcc (GCC) 10.1.0 ... <\/code><\/pre>\n<pre><code>$ riscv64-unknown-linux-gnu-gcc --version riscv64-unknown-linux-gnu-gcc (GCC) 10.1.0 ... <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/791286\/\"> https:\/\/habr.com\/ru\/articles\/791286\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-367260","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=367260"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367260\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=367260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=367260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=367260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}