CINXE.COM
Documentation/Platforms/RISCV: Difference between revisions - QEMU
<!DOCTYPE html> <html class="client-nojs" lang="en" dir="ltr"> <head> <meta charset="UTF-8"/> <title>Documentation/Platforms/RISCV: Difference between revisions - QEMU</title> <script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"c682d068b5ab8fcfb44013cf","wgCSPNonce":false,"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Documentation/Platforms/RISCV","wgTitle":"Documentation/Platforms/RISCV","wgCurRevisionId":10741,"wgRevisionId":9967,"wgArticleId":1252,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Documentation/Platforms/RISCV","wgRelevantArticleId":1252,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgVector2022PreviewPages":[], "wgDiffOldId":9930,"wgDiffNewId":9967};RLSTATE={"skins.vector.user.styles":"ready","site.styles":"ready","user.styles":"ready","skins.vector.user":"ready","user":"ready","user.options":"loading","mediawiki.interface.helpers.styles":"ready","mediawiki.diff.styles":"ready","mediawiki.ui.button":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","mediawiki.ui.icon":"ready"};RLPAGEMODULES=["mediawiki.diff","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","skins.vector.es6"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.implement("user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});});});</script> <link rel="stylesheet" href="/load.php?lang=en&modules=mediawiki.diff.styles%7Cmediawiki.interface.helpers.styles%7Cmediawiki.ui.button%2Cicon%7Cskins.vector.icons%2Cstyles&only=styles&skin=vector-2022"/> <script async="" src="/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="generator" content="MediaWiki 1.39.7"/> <meta name="robots" content="noindex,nofollow"/> <meta name="format-detection" content="telephone=no"/> <meta name="viewport" content="width=1000"/> <link rel="icon" href="/favicon.ico"/> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch_desc.php" title="QEMU (en)"/> <link rel="EditURI" type="application/rsd+xml" href="https://wiki.qemu.org/api.php?action=rsd"/> <link rel="license" href="http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"/> <link rel="alternate" type="application/atom+xml" title="QEMU Atom feed" href="/index.php?title=Special:RecentChanges&feed=atom"/> </head> <body class="skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Documentation_Platforms_RISCV rootpage-Documentation_Platforms_RISCV skin-vector-2022 action-view skin-vector-disable-max-width vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-language-alert-in-sidebar-disabled vector-feature-sticky-header-disabled vector-feature-sticky-header-edit-disabled vector-feature-table-of-contents-disabled vector-feature-visual-enhancement-next-disabled"><div class="mw-page-container"> <span id="top-page"></span> <a class="mw-jump-link" href="#content">Jump to content</a> <div class="mw-page-container-inner"> <input type="checkbox" id="mw-sidebar-checkbox" class="mw-checkbox-hack-checkbox" > <header class="mw-header"> <div class="mw-header-aside"> <label id="mw-sidebar-button" class="mw-checkbox-hack-button mw-ui-icon mw-ui-button mw-ui-quiet mw-ui-icon-element" for="mw-sidebar-checkbox" role="button" aria-controls="mw-panel" data-event-name="ui.sidebar" tabindex="0" title="Main menu"> <span>Toggle sidebar</span> </label> <a href="/Main_Page" class="mw-logo"> <span class="mw-logo-container"> <img class="mw-logo-wordmark" alt="QEMU" src="/images/Qemu-logo-small.png" style="width: 9.375em; height: 3em;"> </span> </a> </div> <div class="mw-header-content"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/Special:Search" title="Search QEMU [f]" accesskey="f" class="mw-ui-button mw-ui-quiet mw-ui-icon mw-ui-icon-element mw-ui-icon-wikimedia-search search-toggle"> <span>Search</span> </a> <div> <form action="/index.php" id="searchform" class="vector-search-box-form"> <div id="simpleSearch" class="vector-search-box-inner" data-search-loc="header-moved"> <input class="vector-search-box-input" type="search" name="search" placeholder="Search QEMU" aria-label="Search QEMU" autocapitalize="sentences" title="Search QEMU [f]" accesskey="f" id="searchInput" > <input type="hidden" name="title" value="Special:Search"> <input id="mw-searchButton" class="searchButton mw-fallbackSearchButton" type="submit" name="fulltext" title="Search the pages for this text" value="Search"> <input id="searchButton" class="searchButton" type="submit" name="go" title="Go to a page with this exact name if it exists" value="Go"> </div> </form> </div> </div> <nav class="vector-user-links" aria-label="Personal tools" role="navigation" > <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet mw-portlet-vector-user-menu-overflow emptyPortlet vector-user-menu-overflow" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"></ul> </div> </div> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal vector-user-menu vector-user-menu-logged-out vector-menu-dropdown" title="More options" > <input type="checkbox" id="p-personal-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-personal" class="vector-menu-checkbox" /> <label id="p-personal-label" for="p-personal-checkbox" class="vector-menu-heading mw-ui-button mw-ui-quiet mw-ui-icon mw-ui-icon-element mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis" > <span class="vector-menu-heading-label">Personal tools</span> </label> <div class="vector-menu-content"> <div class="vector-user-menu-create-account"><a href="/index.php?title=Special:CreateAccount&returnto=Documentation%2FPlatforms%2FRISCV&returntoquery=diff%3D9967%26oldid%3D9930" class="vector-menu-content-item user-links-collapsible-item" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="mw-ui-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></div> <div class="vector-user-menu-login"><a href="/index.php?title=Special:UserLogin&returnto=Documentation%2FPlatforms%2FRISCV&returntoquery=diff%3D9967%26oldid%3D9930" class="vector-menu-content-item vector-menu-content-item-login" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span class="mw-ui-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></div> <ul class="vector-menu-content-list"></ul> </div> </div> </nav> </div> </header> <div class="vector-sidebar-container "> <div id="mw-navigation"> <nav id="mw-panel" class="mw-sidebar" aria-label="Site" role="navigation"> <div id="p-Link_to_website" class="vector-menu mw-portlet mw-portlet-Link_to_website vector-menu-portal portal" > <div id="p-Link_to_website-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Link to website</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-About-QEMU" class="mw-list-item"><a href="/QEMU:About"><span>About QEMU</span></a></li></ul> </div> </div> <div id="p-Get" class="vector-menu mw-portlet mw-portlet-Get vector-menu-portal portal" > <div id="p-Get-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Get</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-Download" class="mw-list-item"><a href="/Download"><span>Download</span></a></li><li id="n-License" class="mw-list-item"><a href="/License"><span>License</span></a></li></ul> </div> </div> <div id="p-Contribute" class="vector-menu mw-portlet mw-portlet-Contribute vector-menu-portal portal" > <div id="p-Contribute-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Contribute</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-Start-Here" class="mw-list-item"><a href="/Contribute"><span>Start Here</span></a></li><li id="n-Report-a-Bug" class="mw-list-item"><a href="/Contribute/ReportABug"><span>Report a Bug</span></a></li><li id="n-Report-a-security-issue" class="mw-list-item"><a href="/SecurityProcess"><span>Report a security issue</span></a></li><li id="n-Submit-a-Patch" class="mw-list-item"><a href="/Contribute/SubmitAPatch"><span>Submit a Patch</span></a></li><li id="n-Mailing-Lists" class="mw-list-item"><a href="/Contribute/MailingLists"><span>Mailing Lists</span></a></li><li id="n-Testing-QEMU" class="mw-list-item"><a href="/Testing"><span>Testing QEMU</span></a></li></ul> </div> </div> <div id="p-Learn" class="vector-menu mw-portlet mw-portlet-Learn vector-menu-portal portal" > <div id="p-Learn-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Learn</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-Documentation" class="mw-list-item"><a href="/Documentation"><span>Documentation</span></a></li><li id="n-Links" class="mw-list-item"><a href="/Links"><span>Links</span></a></li></ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb vector-menu-portal portal" > <div id="p-tb-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Tools</span> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="t-whatlinkshere" class="mw-list-item"><a href="/Special:WhatLinksHere/Documentation/Platforms/RISCV" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/Special:RecentChangesLinked/Documentation/Platforms/RISCV" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/index.php?title=Documentation/Platforms/RISCV&oldid=9967" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/index.php?title=Documentation/Platforms/RISCV&action=info" title="More information about this page"><span>Page information</span></a></li></ul> </div> </div> </nav> </div> </div> <div class="vector-sitenotice-container"> <div id="siteNotice"></div> </div> <input type="checkbox" id="vector-toc-collapsed-checkbox" class="mw-checkbox-hack-checkbox"> <div class="mw-table-of-contents-container"> <div class="vector-sticky-toc-container mw-sticky-header-element"> <nav id="mw-panel-toc" class="sidebar-toc" role="navigation" aria-labelledby="sidebar-toc-label" data-event-name="ui.sidebar-toc"> <div id="sidebar-toc-label" class="sidebar-toc-header"> <p class="sidebar-toc-title"> Contents <button class="vector-toc-uncollapse-button">move to sidebar</button> <button class="vector-toc-collapse-button">hide</button> </p> </div> <ul class="sidebar-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="sidebar-toc-list-item sidebar-toc-level-1"> <a href="#top-page" class="sidebar-toc-link"> <div class="sidebar-toc-text">Beginning</div> </a> </li> <li id="toc-Description" class="sidebar-toc-list-item sidebar-toc-level-1 sidebar-toc-list-item-expanded"> <a class="sidebar-toc-link" href="#Description"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">1</span>Description</div> </a> <ul id="toc-Description-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Build_Directions" class="sidebar-toc-list-item sidebar-toc-level-1 sidebar-toc-list-item-expanded"> <a class="sidebar-toc-link" href="#Build_Directions"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">2</span>Build Directions</div> </a> <ul id="toc-Build_Directions-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Booting_Linux" class="sidebar-toc-list-item sidebar-toc-level-1 sidebar-toc-list-item-expanded"> <a class="sidebar-toc-link" href="#Booting_Linux"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">3</span>Booting Linux</div> </a> <button aria-controls="toc-Booting_Linux-sublist" class="mw-ui-icon mw-ui-icon-wikimedia-expand mw-ui-icon-small sidebar-toc-toggle"> Toggle Booting Linux subsection </button> <ul id="toc-Booting_Linux-sublist" class="sidebar-toc-list"> <li id="toc-Booting_64-bit_Debian" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#Booting_64-bit_Debian"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">3.1</span>Booting 64-bit Debian</div> </a> <ul id="toc-Booting_64-bit_Debian-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Booting_64-bit_Fedora" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#Booting_64-bit_Fedora"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">3.2</span>Booting 64-bit Fedora</div> </a> <ul id="toc-Booting_64-bit_Fedora-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Booting_32-bit_OpenEmbedded_Images" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#Booting_32-bit_OpenEmbedded_Images"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">3.3</span>Booting 32-bit OpenEmbedded Images</div> </a> <ul id="toc-Booting_32-bit_OpenEmbedded_Images-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Booting_64-bit_OpenEmbedded_Images" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#Booting_64-bit_OpenEmbedded_Images"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">3.4</span>Booting 64-bit OpenEmbedded Images</div> </a> <ul id="toc-Booting_64-bit_OpenEmbedded_Images-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Booting_32-bit_Buildroot_Images" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#Booting_32-bit_Buildroot_Images"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">3.5</span>Booting 32-bit Buildroot Images</div> </a> <ul id="toc-Booting_32-bit_Buildroot_Images-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Booting_64-bit_Buildroot_Images" class="sidebar-toc-list-item sidebar-toc-level-2"> <a class="sidebar-toc-link" href="#Booting_64-bit_Buildroot_Images"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">3.6</span>Booting 64-bit Buildroot Images</div> </a> <ul id="toc-Booting_64-bit_Buildroot_Images-sublist" class="sidebar-toc-list"> </ul> </li> </ul> </li> <li id="toc-Microchip_PolarFire_SoC_Icicle_Kit" class="sidebar-toc-list-item sidebar-toc-level-1 sidebar-toc-list-item-expanded"> <a class="sidebar-toc-link" href="#Microchip_PolarFire_SoC_Icicle_Kit"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">4</span>Microchip PolarFire SoC Icicle Kit</div> </a> <ul id="toc-Microchip_PolarFire_SoC_Icicle_Kit-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Attaching_GDB" class="sidebar-toc-list-item sidebar-toc-level-1 sidebar-toc-list-item-expanded"> <a class="sidebar-toc-link" href="#Attaching_GDB"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">5</span>Attaching GDB</div> </a> <ul id="toc-Attaching_GDB-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Links" class="sidebar-toc-list-item sidebar-toc-level-1 sidebar-toc-list-item-expanded"> <a class="sidebar-toc-link" href="#Links"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">6</span>Links</div> </a> <ul id="toc-Links-sublist" class="sidebar-toc-list"> </ul> </li> <li id="toc-Contacts" class="sidebar-toc-list-item sidebar-toc-level-1 sidebar-toc-list-item-expanded"> <a class="sidebar-toc-link" href="#Contacts"> <div class="sidebar-toc-text"> <span class="sidebar-toc-numb">7</span>Contacts</div> </a> <ul id="toc-Contacts-sublist" class="sidebar-toc-list"> </ul> </li> </ul> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body" role="main"> <a id="top"></a> <header class="mw-body-header"> <label id="vector-toc-collapsed-button" class="mw-ui-button mw-ui-quiet mw-ui-icon mw-ui-icon-element mw-ui-icon-wikimedia-listBullet mw-checkbox-hack-button" for="vector-toc-collapsed-checkbox" role="button" aria-controls="toc-toggle-list" data-event-name="vector.toc-toggle-list" tabindex="0" title="Table of Contents"> Toggle the table of contents </label> <h1 id="firstHeading" class="firstHeading mw-first-heading">Documentation/Platforms/RISCV: Difference between revisions</h1> </header> <nav class="vector-article-toolbar" aria-label="Tools" role="navigation"> <div class="mw-article-toolbar-container"> <div id="left-navigation"> <div id="p-associated-pages" class="vector-menu mw-portlet mw-portlet-associated-pages vector-menu-tabs" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="ca-nstab-main" class="selected mw-list-item"><a href="/Documentation/Platforms/RISCV" title="View the content page [c]" accesskey="c"><span>Page</span></a></li><li id="ca-talk" class="new mw-list-item"><a href="/index.php?title=Talk:Documentation/Platforms/RISCV&action=edit&redlink=1" rel="discussion" title="Discussion about the content page (page does not exist) [t]" accesskey="t"><span>Discussion</span></a></li></ul> </div> </div> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet vector-menu-dropdown" > <input type="checkbox" id="p-variants-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-variants" class="vector-menu-checkbox" aria-label="Change language variant" /> <label id="p-variants-label" for="p-variants-checkbox" class="vector-menu-heading " > <span class="vector-menu-heading-label">English</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"></ul> </div> </div> </div> <div id="right-navigation" class="vector-collapsible "> <div id="p-views" class="vector-menu mw-portlet mw-portlet-views vector-menu-tabs" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="ca-view" class="selected mw-list-item"><a href="/Documentation/Platforms/RISCV"><span>Read</span></a></li><li id="ca-viewsource" class="mw-list-item"><a href="/index.php?title=Documentation/Platforms/RISCV&action=edit&oldid=9967" title="This page is protected. You can view its source [e]" accesskey="e"><span>View source</span></a></li><li id="ca-history" class="mw-list-item"><a href="/index.php?title=Documentation/Platforms/RISCV&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li></ul> </div> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-menu-dropdown vector-has-collapsible-items" title="More options" > <input type="checkbox" id="p-cactions-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-cactions" class="vector-menu-checkbox" /> <label id="p-cactions-label" for="p-cactions-checkbox" class="vector-menu-heading " > <span class="vector-menu-heading-label">More</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/Documentation/Platforms/RISCV"><span>Read</span></a></li><li id="ca-more-viewsource" class="vector-more-collapsible-item mw-list-item"><a href="/index.php?title=Documentation/Platforms/RISCV&action=edit&oldid=9967"><span>View source</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/index.php?title=Documentation/Platforms/RISCV&action=history"><span>View history</span></a></li></ul> </div> </div> </div> </div> </nav> <div id="bodyContent" class="vector-body" data-mw-ve-target-container> <div class="mw-body-subheader"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From QEMU</div> </div> <div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" class="diff-otitle diff-side-deleted"><div id="mw-diff-otitle1"><strong><a href="/index.php?title=Documentation/Platforms/RISCV&oldid=9930" title="Documentation/Platforms/RISCV">Revision as of 06:18, 28 October 2020</a> <span class="mw-diff-edit">(<a href="/index.php?title=Documentation/Platforms/RISCV&action=edit&oldid=9930" title="Documentation/Platforms/RISCV">view source</a>)</span></strong></div><div id="mw-diff-otitle2"><a href="/index.php?title=User:Bmeng&action=edit&redlink=1" class="new mw-userlink" title="User:Bmeng (page does not exist)"><bdi>Bmeng</bdi></a> <span class="mw-usertoollinks">(<a href="/index.php?title=User_talk:Bmeng&action=edit&redlink=1" class="new mw-usertoollinks-talk" title="User talk:Bmeng (page does not exist)">talk</a> | <a href="/Special:Contributions/Bmeng" class="mw-usertoollinks-contribs" title="Special:Contributions/Bmeng">contribs</a>)</span></div><div id="mw-diff-otitle3"><span class="comment mw-comment-none">No edit summary</span></div><div id="mw-diff-otitle5"></div><div id="mw-diff-otitle4"><a href="/index.php?title=Documentation/Platforms/RISCV&diff=prev&oldid=9930" title="Documentation/Platforms/RISCV" id="differences-prevlink">← Older edit</a></div></td> <td colspan="2" class="diff-ntitle diff-side-added"><div id="mw-diff-ntitle1"><strong><a href="/index.php?title=Documentation/Platforms/RISCV&oldid=9967" title="Documentation/Platforms/RISCV">Revision as of 02:36, 4 November 2020</a> <span class="mw-diff-edit">(<a href="/index.php?title=Documentation/Platforms/RISCV&action=edit&oldid=9967" title="Documentation/Platforms/RISCV">view source</a>)</span> </strong></div><div id="mw-diff-ntitle2"><a href="/index.php?title=User:Bmeng&action=edit&redlink=1" class="new mw-userlink" title="User:Bmeng (page does not exist)"><bdi>Bmeng</bdi></a> <span class="mw-usertoollinks">(<a href="/index.php?title=User_talk:Bmeng&action=edit&redlink=1" class="new mw-usertoollinks-talk" title="User talk:Bmeng (page does not exist)">talk</a> | <a href="/Special:Contributions/Bmeng" class="mw-usertoollinks-contribs" title="Special:Contributions/Bmeng">contribs</a>)</span> </div><div id="mw-diff-ntitle3"><abbr class="minoredit" title="This is a minor edit">m</abbr><span class="comment mw-comment-none">No edit summary</span></div><div id="mw-diff-ntitle5"></div><div id="mw-diff-ntitle4"><a href="/index.php?title=Documentation/Platforms/RISCV&diff=next&oldid=9967" title="Documentation/Platforms/RISCV" id="differences-nextlink">Newer edit →</a></div></td> </tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l162">Line 162:</td> <td colspan="2" class="diff-lineno">Line 162:</td></tr> <tr><td class="diff-marker"></td><td class="diff-context diff-side-deleted"><div> $ qemu-img resize core-image-minimal-dev-icicle-kit-es-sd-20201009141623.rootfs.wic 4G</div></td><td class="diff-marker"></td><td class="diff-context diff-side-added"><div> $ qemu-img resize core-image-minimal-dev-icicle-kit-es-sd-20201009141623.rootfs.wic 4G</div></td></tr> <tr><td class="diff-marker"></td><td class="diff-context diff-side-deleted"><br/></td><td class="diff-marker"></td><td class="diff-context diff-side-added"><br/></td></tr> <tr><td class="diff-marker" data-marker="−"></td><td class="diff-deletedline diff-side-deleted"><div>The memory is set to <del class="diffchange diffchange-inline">2 GiB </del>by default. A sanity check on ram size is performed in the machine init routine to prompt user to increase the RAM size to > <del class="diffchange diffchange-inline">2 GiB </del>when less than <del class="diffchange diffchange-inline">2 GiB </del>ram is detected.</div></td><td class="diff-marker" data-marker="+"></td><td class="diff-addedline diff-side-added"><div>The memory is set to <ins class="diffchange diffchange-inline">1537 MiB </ins>by default <ins class="diffchange diffchange-inline">which is the minimum required high memory size by HSS</ins>. A sanity check on ram size is performed in the machine init routine to prompt user to increase the RAM size to > <ins class="diffchange diffchange-inline">1537 MiB </ins>when less than <ins class="diffchange diffchange-inline">1537 MiB </ins>ram is detected.</div></td></tr> <tr><td class="diff-marker"></td><td class="diff-context diff-side-deleted"><br/></td><td class="diff-marker"></td><td class="diff-context diff-side-added"><br/></td></tr> <tr><td class="diff-marker"></td><td class="diff-context diff-side-deleted"><div>HSS output is on the first serial port (stdio) and U-Boot/Linux outputs on the 2nd serial port. OpenSBI outputs on a random serial port due to the lottery mechanism used during the multi-core boot.</div></td><td class="diff-marker"></td><td class="diff-context diff-side-added"><div>HSS output is on the first serial port (stdio) and U-Boot/Linux outputs on the 2nd serial port. OpenSBI outputs on a random serial port due to the lottery mechanism used during the multi-core boot.</div></td></tr> </table><hr class='diff-hr' id='mw-oldid' /> <h2 class='diff-currentversion-title'>Revision as of 02:36, 4 November 2020</h2> <div class="mw-parser-output"><mw:tocplace></mw:tocplace> <h2><span class="mw-headline" id="Description">Description</span></h2> <p>RISC-V is an open source instruction set. It is a modular with only a small set of mandatory instructions. Every other module might be implemented by vendors allowing RISC-V to be suitable for small embedded systems up to large supercomputers. </p> <h2><span class="mw-headline" id="Build_Directions">Build Directions</span></h2> <p>For RV64: </p> <pre> ./configure --target-list=riscv64-softmmu && make </pre> <p>For RV32: </p> <pre> ./configure --target-list=riscv32-softmmu && make </pre> <h2><span class="mw-headline" id="Booting_Linux">Booting Linux</span></h2> <h3><span class="mw-headline" id="Booting_64-bit_Debian">Booting 64-bit Debian</span></h3> <p>Follow the instructions on the Debian wiki to boot Debian on QEMU: <a rel="nofollow" class="external free" href="https://wiki.debian.org/RISC-V">https://wiki.debian.org/RISC-V</a> </p> <h3><span class="mw-headline" id="Booting_64-bit_Fedora">Booting 64-bit Fedora</span></h3> <p>Download the Fedora prebuilt images from: <a rel="nofollow" class="external free" href="https://dl.fedoraproject.org/pub/alt/risc-v/repo/virt-builder-images/images/">https://dl.fedoraproject.org/pub/alt/risc-v/repo/virt-builder-images/images/</a> You will want to download Fedora-Minimal-Rawhide-*-fw_payload-uboot-qemu-virt-smode.elf and Fedora-Minimal-Rawhide-*-sda.raw.xz images </p><p>Decompress the rootFS: </p> <pre> unxz Fedora-Minimal-Rawhide-*-sda.raw.xz </pre> <p>Boot linux using RV64GC qemu: </p> <pre> qemu-system-riscv64 \ -nographic \ -machine virt \ -smp 4 \ -m 2G \ -kernel Fedora-Minimal-Rawhide-*-fw_payload-uboot-qemu-virt-smode.elf \ -bios none \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-device,rng=rng0 \ -device virtio-blk-device,drive=hd0 \ -drive file=Fedora-Minimal-Rawhide-20200108.n.0-sda.raw,format=raw,id=hd0 \ -device virtio-net-device,netdev=usernet \ -netdev user,id=usernet,hostfwd=tcp::10000-:22 </pre> <ul><li>Login: root</li> <li>Password: riscv</li></ul> <p>For more details on running Fedora see the Fedora Wiki: <a rel="nofollow" class="external free" href="https://fedoraproject.org/wiki/Architectures/RISC-V/Installing">https://fedoraproject.org/wiki/Architectures/RISC-V/Installing</a> </p> <h3><span class="mw-headline" id="Booting_32-bit_OpenEmbedded_Images">Booting 32-bit OpenEmbedded Images</span></h3> <p>Follow the usual OpenEmbedded build flow using meta-riscv to build for the qemuriscv32 machine. More details on doing this can be found here: <a rel="nofollow" class="external free" href="https://github.com/riscv/meta-riscv/#build-image">https://github.com/riscv/meta-riscv/#build-image</a> </p><p>Once the images are build you can boot them using: </p> <pre> qemu-system-riscv32 \ -bios ./tmp-glibc/deploy/images/qemuriscv32/fw_jump.elf \ -device virtio-net-device,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::2323-:23 \ -drive id=disk0,file=./tmp-glibc/deploy/images/qemuriscv64/core-image-minimal-qemuriscv32.ext4,if=none,format=raw \ -device virtio-blk-device,drive=disk0 \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-device,rng=rng0 \ -kernel ./tmp-glibc/deploy/images/qemuriscv32/Image \ -append 'root=/dev/vda rw highres=off console=ttyS0 mem=512M ip=dhcp earlycon=sbi ' \ -show-cursor -nographic -machine virt -m 512 -serial mon:stdio -serial null </pre> <p>The above command will open up SSH and telnet ports which can be used to communicate with the guest. It will also pass in host entropy to the guest, allowing entropy to be available on boot. </p><p>NOTE: When using OpenEmbedded it is recommended to use the runqemu script to boot QEMU. It will dynamically handle display options as well as advanced networking </p> <h3><span class="mw-headline" id="Booting_64-bit_OpenEmbedded_Images">Booting 64-bit OpenEmbedded Images</span></h3> <p>Follow the usual OpenEmbedded build flow using meta-riscv to build for the qemuriscv64 machine. More details on doing this can be found here: <a rel="nofollow" class="external free" href="https://github.com/riscv/meta-riscv/#build-image">https://github.com/riscv/meta-riscv/#build-image</a> </p><p>Once the images are build you can boot them using: </p> <pre> qemu-system-riscv64 \ -bios ./tmp-glibc/deploy/images/qemuriscv64/fw_jump.elf \ -device virtio-net-device,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::2323-:23 \ -drive id=disk0,file=./tmp-glibc/deploy/images/qemuriscv64/core-image-minimal-qemuriscv64.ext4,if=none,format=raw \ -device virtio-blk-device,drive=disk0 \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-device,rng=rng0 \ -kernel ./tmp-glibc/deploy/images/qemuriscv64/Image \ -append 'root=/dev/vda rw highres=off console=ttyS0 mem=512M ip=dhcp earlycon=sbi ' \ -show-cursor -nographic -machine virt -m 512 -serial mon:stdio -serial null </pre> <p>The above command will open up SSH and telnet ports which can be used to communicate with the guest. It will also pass in host entropy to the guest, allowing entropy to be available on boot. </p><p>NOTE: When using OpenEmbedded it is recommended to use the runqemu script to boot QEMU. It will dynamically handle display options as well as advanced networking </p> <h3><span class="mw-headline" id="Booting_32-bit_Buildroot_Images">Booting 32-bit Buildroot Images</span></h3> <p>Clone the Buildroot source code and cd into the directory. </p><p>Generate the default config: </p> <pre> make qemu_riscv32_virt_defconfig </pre> <p>Build the images </p> <pre> make </pre> <p>Boot the images: </p> <pre> qemu-system-riscv32 \ -M virt -nographic \ -bios output/images/fw_jump.elf \ -kernel output/images/Image \ -append "root=/dev/vda ro" \ -drive file=output/images/rootfs.ext2,format=raw,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -netdev user,id=net0 -device virtio-net-device,netdev=net0 </pre> <h3><span class="mw-headline" id="Booting_64-bit_Buildroot_Images">Booting 64-bit Buildroot Images</span></h3> <p>Clone the Buildroot source code and cd into the directory. </p><p>Generate the default config: </p> <pre> make qemu_riscv64_virt_defconfig </pre> <p>Build the images </p> <pre> make </pre> <p>Boot the images: </p> <pre> qemu-system-riscv64 \ -M virt -nographic \ -bios output/images/fw_jump.elf \ -kernel output/images/Image \ -append "root=/dev/vda ro" \ -drive file=output/images/rootfs.ext2,format=raw,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -netdev user,id=net0 -device virtio-net-device,netdev=net0 </pre> <h2><span class="mw-headline" id="Microchip_PolarFire_SoC_Icicle_Kit">Microchip PolarFire SoC Icicle Kit</span></h2> <p>QEMU 5.2.0 supports a new machine: Microchip PolarFire SoC Icicle Kit. The Icicle Kit board integrates a PolarFire SoC, with one SiFive's E51 plus four U54 cores and many on-chip peripherals and an FPGA. </p><p>For more details about Microchip PolarFire Soc, please see: <a rel="nofollow" class="external free" href="https://www.microsemi.com/product-directory/soc-fpgas/5498-polarfire-soc-fpga">https://www.microsemi.com/product-directory/soc-fpgas/5498-polarfire-soc-fpga</a> </p><p>The Icicle Kit board information can be found here: <a rel="nofollow" class="external free" href="https://www.microsemi.com/existing-parts/parts/152514">https://www.microsemi.com/existing-parts/parts/152514</a> </p><p>Boot the images: </p> <pre> qemu-system-riscv64 -M microchip-icicle-kit -smp 5 \ -bios path/to/hss.bin -sd path/to/sdcard.img \ -nic user,model=cadence_gem \ -nic tap,ifname=tap,model=cadence_gem \ -display none -serial stdio \ -chardev socket,id=serial1,path=serial1.sock,server,wait \ -serial chardev:serial1 </pre> <p>The BIOS image used by this machine is hss.bin, aka Hart Software Services, which can be built from: <a rel="nofollow" class="external free" href="https://github.com/polarfire-soc/hart-software-services">https://github.com/polarfire-soc/hart-software-services</a> </p><p>QEMU does not support eMMC hence the SD configuration shall be used in the HSS and Yocto BSP build. The eMMC configuration is not supported. </p><p>Instructions to build HSS: </p> <pre> $ cp boards/icicle-kit-es/def_config.sdcard .config $ make BOARD=icicle-kit-es </pre> <p>The following commit of HSS was tested: </p> <pre> commit 078ce16d8cb3a89e4c3e93916621b816dbdaa274 Merge: 76b34dd 2cd45c9 Author: Cyril-Jean <cyril.jean@microchip.com> Date: Fri Oct 9 17:07:12 2020 +0100 Merge pull request #7 from avpatel/custom_boot_flow_v1 Custom boot flow for PolarFire boards </pre> <p>For Yocto build, "MACHINE=icicle-kit-es-sd" should be specified, otherwise when booting Linux kernel the rootfs cannot be mounted. The generated image is something like: mpfs-dev-cli-icicle-kit-es-sd.rootfs.wic. Resize the file with 'qemu-image' to a power of 2 before passing to QEMU '-sd' command line. </p><p>The following commands download the official SD card image released by Microchip and prepare it for QEMU usage: </p> <pre> $ wget <a rel="nofollow" class="external free" href="ftp://ftpsoc.microsemi.com/outgoing/core-image-minimal-dev-icicle-kit-es-sd-20201009141623.rootfs.wic.gz">ftp://ftpsoc.microsemi.com/outgoing/core-image-minimal-dev-icicle-kit-es-sd-20201009141623.rootfs.wic.gz</a> $ gunzip core-image-minimal-dev-icicle-kit-es-sd-20201009141623.rootfs.wic.gz $ qemu-img resize core-image-minimal-dev-icicle-kit-es-sd-20201009141623.rootfs.wic 4G </pre> <p>The memory is set to 1537 MiB by default which is the minimum required high memory size by HSS. A sanity check on ram size is performed in the machine init routine to prompt user to increase the RAM size to > 1537 MiB when less than 1537 MiB ram is detected. </p><p>HSS output is on the first serial port (stdio) and U-Boot/Linux outputs on the 2nd serial port. OpenSBI outputs on a random serial port due to the lottery mechanism used during the multi-core boot. </p> <h2><span class="mw-headline" id="Attaching_GDB">Attaching GDB</span></h2> <p>To attach GDB to a QEMU RISC-V instance with only a single cluster (every machine except the sifive_u) run these commands from GDB: </p> <pre> target extended-remote :1234 info threads </pre> <p>To attach GDB to a QEMU RISC-V instance with multiple clusters (the sifive_u) run these commands from GDB: </p> <pre> target extended-remote :1234 add-inferior inferior 2 attach 2 set schedule-multiple info threads </pre> <p>The above commands assume the default GDB port exposed from QEMU of 1234. This will happen when you run QEMU with the '-s' command line argument. </p><p>If you would like QEMU to not run the guest until you have connected GDB, you can specify the '-S' command line argument as well. </p> <h2><span class="mw-headline" id="Links">Links</span></h2> <ul><li><a rel="nofollow" class="external text" href="https://fedoraproject.org/wiki/Architectures/RISC-V">Fedora RISC-V wiki</a></li> <li><a rel="nofollow" class="external text" href="https://github.com/riscv/meta-riscv/">OpenEmbedded meta-riscv</a></li> <li><a rel="nofollow" class="external text" href="https://www.youtube.com/watch?v=b5g8u3GA-lo">Video: QEMU Support for the RISC-V Instruction Set Architecture</a></li></ul> <h2><span class="mw-headline" id="Contacts">Contacts</span></h2> <p>Maintainers: </p> <ul><li><a rel="nofollow" class="external text" href="mailto:palmer@sifive.com">Palmer Dabbelt</a></li> <li><a rel="nofollow" class="external text" href="mailto:alistair.francis@wdc.com">Alistair Francis</a></li></ul></div> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://wiki.qemu.org/index.php?title=Documentation/Platforms/RISCV&oldid=9967">https://wiki.qemu.org/index.php?title=Documentation/Platforms/RISCV&oldid=9967</a>"</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" role="contentinfo" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 4 November 2020, at 02:36.</li> <li id="footer-info-copyright">Content is available under <a class="external" rel="nofollow" href="http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt">GNU Free Documentation License 1.2</a>.<br />QEMU is a trademark of Fabrice Bellard.<br /></li> </ul> <ul id="footer-places"> <li id="footer-places-about"><a href="/QEMU:About">About QEMU</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"><img src="/resources/assets/licenses/gnu-fdl.png" alt="GNU Free Documentation License 1.2" width="88" height="31" loading="lazy"/></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/"><img src="/resources/assets/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="/resources/assets/poweredby_mediawiki_132x47.png 1.5x, /resources/assets/poweredby_mediawiki_176x62.png 2x" width="88" height="31" loading="lazy"/></a></li> </ul> </footer> </div> </div> </div> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.012","walltime":"0.013","ppvisitednodes":{"value":38,"limit":1000000},"postexpandincludesize":{"value":0,"limit":2097152},"templateargumentsize":{"value":0,"limit":2097152},"expansiondepth":{"value":2,"limit":100},"expensivefunctioncount":{"value":0,"limit":100},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":0,"limit":5000000},"timingprofile":["100.00% 0.000 1 -total"]},"cachereport":{"timestamp":"20241128093811","ttl":86400,"transientcontent":false}}});mw.config.set({"wgBackendResponseTime":159});});</script> </body> </html>