CINXE.COM

Booting our RISC-V images | Haiku Project

<!doctype html><html lang=en> <head> <meta charset=utf-8> <meta http-equiv=x-ua-compatible content="IE=edge,chrome=1"> <meta name=viewport content="width=device-width,initial-scale=1"> <meta name=keywords content="haiku,software"> <meta name=copyright content="2001-2024 Haiku Inc."> <meta property="og:site_name" content="Haiku Project"> <meta property="og:title" content="Booting our RISC-V images"> <meta property="og:url" content="https://www.haiku-os.org/blog/kallisti5/2021-11-07_booting_our_risc-v_images/"> <meta property="og:type" content="article"> <meta property="og:description" content="Thanks in large part to the hard work by X512 and everyone developing on Haiku, our nightly RISCV64 images are now functional. RISC-V marks Haiku&amp;rsquo;s first functional non-Intel/x86 port! What is RISC-V? RISC-V is a modern, fully open CPU …"> <meta property="og:published_time" content="2021-11-07 07:29:13 -0600 -0600"> <meta property="og:author" content="kallisti5"> <meta property="og:image" content="https://www.haiku-os.org//files/screenshots/riscv64-qemu.png"> <title>Booting our RISC-V images | Haiku Project</title> <link rel=canonical href=https://www.haiku-os.org/blog/kallisti5/2021-11-07_booting_our_risc-v_images/> <link rel="shortcut icon" href=https://www.haiku-os.org/favicon.ico> <link href=https://www.haiku-os.org/css/bootstrap.min.css rel=stylesheet> <link href=https://www.haiku-os.org/css/bootstrap4_fixes.css rel=stylesheet> <link href=https://www.haiku-os.org/css/shijin4.css rel=stylesheet> <link href=https://www.haiku-os.org/css/fonts.css rel=stylesheet> </head> <body> <div id=page> <a href=../../../><img src=../../../images/haiku_logo_white.svg alt=Home id=logo height=100 style=padding-left:3px></a> <div id=top-links> <a href=../../../get-haiku title="Get Haiku!" class=toggleopacity><img src=../../../images/download_32.png text="get haiku!" alt=Download></a> <a href=../../../contact title="Contact the Haiku Project" class=toggleopacity><img src=../../../images/App_Mail_32.png text="contact the haiku project" alt=Contact></a> <a href=../../../community/donating_to_haiku title="Make a donation to the Haiku Project" class=toggleopacity><img src=../../../images/App_Finance_32.png alt=Donate text="make a donation to the haiku project"></a> <a href=https://dev.haiku-os.org title="Report bugs" class=toggleopacity><img src=../../../images/bug_tracker_32.png alt="Report Bugs" text="report bugs related to haiku"></a> <a href=https://depot.haiku-os.org title="Download apps for Haiku from HaikuDepot" class=toggleopacity><img src=../../../images/installer_32.png alt=HaikuDepot text="download apps for haiku from haikudepot"></a> </div> <nav class="navbar navbar-expand-sm navbar-light bg-light"> <button class="navbar-toggler collapsed" id=navbar-toggler type=button data-toggle=collapse data-target=#navbar-collapseme aria-controls=navbar-collapseme aria-expanded=false aria-label="Toggle navigation"> <span class=navbar-toggler-icon></span> </button> <div class="collapse navbar-collapse" id=navbar-collapseme> <ul class="navbar-nav mr-auto"> <li class=nav-item><a class=nav-link href=../../../about/>About</a></li> <li class=nav-item><a class=nav-link href=../../../community/>Community</a></li> <li class=nav-item><a class=nav-link href=../../../development/>Development</a></li> <li class=nav-item><a class=nav-link href=../../../documents/>Documents</a></li> </ul> <form class=form-inline role=search action=https://duckduckgo.com> <input type=hidden name=sites value=https://www.haiku-os.org> <div class=input-group> <input type=text class=form-control placeholder=Search name=q> <span class=input-group-append> <button type=submit class="btn btn-outline-secondary">&#x1f50d;</button> </span> </div> </form> </div> </nav> <div class=row id=main-front> <div class="col-md-9 order-2"> <div class=node> <h1 class=title>Booting our RISC-V images</h1> <div class=meta> Blog post by <a target=_blank href=https://discuss.haiku-os.org/u/kallisti5/>kallisti5</a> on Sun, 2021-11-07 07:29 <div class=terms> <a href=../../../tags/haiku rel=tag>haiku</a>, <a href=../../../tags/software rel=tag>software</a> </div> </div> <p><p>Thanks in large part to the hard work by X512 and everyone developing on Haiku, our nightly RISCV64 images are now functional.</p> <p>RISC-V marks Haiku&rsquo;s first functional non-Intel/x86 port!</p> <h2 id=what-is-risc-v>What is RISC-V?</h2> <p><a href=https://riscv.org/about/>RISC-V is a modern, fully open CPU instruction set</a> which can be implemented, customized, extended, and sold without royalties. Designs exist for a 32-bit, 64-bit, and even a 128-bit processor design.</p> <p>You can <a href=https://wiki.qemu.org/Documentation/Platforms/RISCV>emulate RISC-V in qemu</a>, <a href=https://aignacio.com/posts/hdls/mpsoc_riscv/>design your own CPU and synthesize it for an FPGA</a>, or you can purchase a <a href=https://www.sifive.com/boards/hifive-unmatched>commercially built and designed computer with a RISC-V processor</a>.</p> <h2 id=why-not-arm>Why not ARM?</h2> <p>Haiku developers are continuing to work on ARM and ARM64 ports of Haiku, RISC-V just finished first :-)</p> <h2 id=running-nightly-riscv64-images-in-qemu>Running nightly RISCV64 images in qemu</h2> <p><img src=../../../files/screenshots/riscv64-qemu.png alt="RISCV64 in qemu" title="RISCV64 in qemu"></p> <div class="alert alert-info"><p><strong>Beware of bugs</strong><br> There are multiple lingering bugs (<a href=https://dev.haiku-os.org/ticket/17379>#17379</a>, <a href=https://dev.haiku-os.org/ticket/17380>#17380</a>) in RISCV64 Haiku running under QEMU. If you don&rsquo;t make it to the desktop, try again. </p> </div> <p>To boot Haiku in qemu (qemu-system-riscv64), you&rsquo;ll need the following:</p> <ul> <li>qemu 6.0.0 or later</li> <li><a href=https://download.haiku-os.org/nightly-images/riscv64/>Nightly riscv64 Haiku image</a> (hrev55624 or later)</li> <li><a href=https://github.com/haiku/firmware/tree/master/u-boot/riscv64/qemu>u-boot binary for qemu riscv64</a></li> </ul> <p>Once you have the above two items, then booting Haiku is as easy as running the following command:</p> <pre tabindex=0><code>qemu-system-riscv64 -M virt -m 1G -device ati-vga -kernel u-boot.bin \ -drive file=haiku-mmc.image,format=raw,if=virtio \ -usb -device usb-ehci,id=echi -device usb-kbd -device usb-tablet </code></pre><ul> <li>You can watch technical serial output via <code>view->serial0</code></li> <li>The eventual Haiku desktop will be available via <code>view->ati-vga</code></li> </ul> <h2 id=running-nightly-riscv64-images-on-the-sifive-unmatched>Running nightly RISCV64 images on the SiFive Unmatched</h2> <div class="alert alert-info"><p><strong>Update: Working versions</strong><br> riscv64 was broken after our merge of GCC 11. hrev55697 is currently the last image to boot to a desktop until this regression is repaired. </p> </div> <p>To boot Haiku on the SiFive unmatched, you will need the following:</p> <ul> <li><a href=https://www.sifive.com/boards/hifive-unmatched>SiFive Unmatched board</a></li> <li>A Radeon HD graphics card which works with our radeon_hd driver</li> <li><a href=https://git.haiku-os.org/haiku/tree/3rdparty/kallisti5/unmatched-uboot.sh>SD Card prepared as a &ldquo;u-boot uefi bios&rdquo;</a></li> <li><a href=https://download.haiku-os.org/nightly-images/riscv64/>Nightly riscv64 Haiku image</a> (between hrev55624 and hrev55697) written to a USB Flash drive <ul> <li><code>dd if=haiku-mmc.image of=/dev/sdXX bs=4M</code></li> </ul> </li> </ul> <div class="alert alert-info"><p><strong>Serial Debugging</strong><br> In the event of trouble, attaching a Micro-USB cable to the Unmatched allows you to see serial output during startup. (minicom, 115200 8N1, no flow control) </p> </div> <p>Once you have all of the requirements above, the following process will get you booted into Haiku:</p> <ol> <li>Plug the SD Card into the SiFive Unmatched</li> <li>Plug the USB Flash drive into the SiFive Unmatched</li> <li>Power on the SiFive Unmatched. You should be greeted with a desktop within a minute or two</li> </ol> <h2 id=wrapup>Wrapup</h2> <p>Overall, RISC-V offers an exciting opportunity for us to grow our non-x86 architecture support. A lot of work still remains on RISC-V including support for SMP (multi-processor), however this is a massive first step.</p> </p> </div> <br> <div id=discourse-comments></div> <script type=text/javascript>var discourseUrl='https://discuss.haiku-os.org/',discourseEmbedUrl='https://www.haiku-os.org/blog/kallisti5/2021-11-07_booting_our_risc-v_images/';(function(){var a=document.createElement('script');a.type='text/javascript',a.async=!0,a.src=discourseUrl+'javascripts/embed.js',(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(a)})()</script> </div> <div class="col-md-3 order-1"> <div class=card> <a href=../../../blog/kallisti5/ style=margin-left:0> <div class="card-heading no-block-image" style=min-height:52px> <img src=../../../exapi/avatar/kallisti5> <h4 class=title>kallisti5's blog</h4> </div> </a> <ul> <li><a href=https://www.haiku-os.org/blog/kallisti5/2021-11-07_booting_our_risc-v_images/>Booting our RISC-V images</a></li> <li><a href=https://www.haiku-os.org/blog/kallisti5/2021-02-23_icculus_microgrant_2020/>Icculus Microgrant 2020</a></li> <li><a href=https://www.haiku-os.org/blog/kallisti5/2021-01-17_debugging_riscv-64_bootloader_in_qemu/>Debugging RISCV-64 bootloader in QEMU</a></li> <li><a href=https://www.haiku-os.org/blog/kallisti5/2019-04-16_nvme_driver_now_available/>NVMe Driver Now Available</a></li> <li><a href=https://www.haiku-os.org/blog/kallisti5/2018-11-27_haiku_r1beta1_in_vagrant/>Haiku R1/beta1 in Vagrant</a></li> <li><a href=https://www.haiku-os.org/blog/kallisti5/2018-11-06_partial_outage/>Partial Outage</a></li> <li><a href=https://www.haiku-os.org/blog/kallisti5/2018-09-11_repository_update/>Repository Update</a></li> <li><a href=https://www.haiku-os.org/blog/kallisti5/2018-06-25_data_security_incident/>[NOTICE] Data Security Incident</a></li> <li><a href=https://www.haiku-os.org/blog/kallisti5/2018-05-19_rune_-_haiku_images_on_arm/>Rune - Haiku Images on ARM</a></li> <li><a href=https://www.haiku-os.org/blog/kallisti5/2017-10-09_where_is_haiku_r1/>Where is Haiku R1?</a></li> </ul> </div> </div> </div> <footer> <div style=float:right> <a href=https://www.netlify.com> <img src=https://www.netlify.com/img/global/badges/netlify-dark.svg alt="Deploys by Netlify"> </a> </div> <p>&copy; 2001-2024 Haiku, Inc. &mdash; Haiku&reg; and the HAIKU logo&reg; are registered trademarks of <a href=https://www.haiku-inc.org target=_blank>Haiku, Inc.</a></p> <p class=last> <a href=../../../index.xml>Main feed</a> | <a href=../../../blog/index.xml>Blog-O-Sphere feed</a> | <a href=../../../community/organization/policies/>Community policies</a> | <a href=https://twitter.com/haikuOS>Twitter</a> | <a rel=me href=https://mastodon.xyz/@haiku>Mastodon</a> | <a href=https://www.linkedin.com/company/haiku-inc->LinkedIn</a> </p> </footer> </div> <script src=../../../js/navbar.js></script> <script defer src="https://metrics.haiku-os.org/script.js" data-website-id="da64a14f-40c6-4b22-ab83-1ca58d94a242"></script></body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10