Ports/riscv64: различия между версиями

Материал из ALT Linux Wiki
(Initial commit)
м (→‎RISC-V: небольшая вычитка)
Строка 16: Строка 16:
* <tt>'''C'''</tt> - Compressed instructions
* <tt>'''C'''</tt> - Compressed instructions


At this page one could find the latest information about the status of the ALT
At this page one could find the latest information about ALT port status for the new platform - RISC-V (RV64GC). We're building it on the [https://www.crowdsupply.com/sifive/hifive-unleashed HiFive Unleashed] board from SiFive.
porting to the new platform - RISC-V (RV64GC). The ALT port is building on the [https://www.crowdsupply.com/sifive/hifive-unleashed HiFive Unleashed] board from SiFive.
 


== '''Working plan''' ==
== '''Working plan''' ==


* The following Linux kernels has been bare metal tested on SiFive HiFive Unleashed:
* The following Linux kernels have been bare metal tested on SiFive HiFive Unleashed:
** 4.15
** 4.15
** 4.19-rc2
** 4.19-rc2
Строка 31: Строка 29:
** U-BOOT ([http://git.altlinux.org/people/lineprinter/public/u-boot.git?p=u-boot.git;a=blob;f=README.alt;hb=HEAD link]) -- '''DONE'''
** U-BOOT ([http://git.altlinux.org/people/lineprinter/public/u-boot.git?p=u-boot.git;a=blob;f=README.alt;hb=HEAD link]) -- '''DONE'''


* Sisyphus port -- '''IN PROGRESS'''
* [[Sisyphus]] port -- '''IN PROGRESS'''
*# Toolchain (see the status above) -- '''DONE'''
*# Toolchain (see the status above) -- '''DONE'''
*# Linux Kernel -- '''DONE'''
*# Linux Kernel -- '''DONE'''
*# X11 -- '''DONE'''
*# X11 -- '''DONE'''
*# Desktop Environment -- '''IN PROGRESS'''
*# Desktop Environments -- '''IN PROGRESS'''
* ALT image metaprofile -- '''IN PROGRESS'''
* ALT image [[m-p|metaprofile]] -- '''IN PROGRESS'''
* Girar Builder -- '''IN PROGRESS'''
* [[girar_builder|Girar Builder]] -- '''IN PROGRESS'''
* QEMU image ([[#QEMU|see below]]) -- '''DONE'''
* QEMU image ([[#QEMU|see below]]) -- '''DONE'''


One could find the rootfs latest snapshot (Nov 2018) at [http://ftp.altlinux.org/pub/people/arei/riscv/rootfs here].
One could find the latest rootfs snapshot (Nov 2018) [http://ftp.altlinux.org/pub/people/arei/riscv/rootfs here].
The RPM/SRPM repository at [http://ftp.altlinux.org/pub/people/arei/riscv/repo/riscv64 here].
The RPM/SRPM repository at [http://ftp.altlinux.org/pub/people/arei/riscv/repo/riscv64 here].


== '''QEMU''' ==
== '''QEMU''' ==


To run the ALT RISC-V port on QEMU one need to install the QEMU with riscv64 support.
You've got to install QEMU with riscv64 support to run ALT RISC-V port on QEMU.


In case of the ALT x86-64 host system for example: [http://sisyphus.ru/en/srpm/Sisyphus/qemu qemu-system-riscv-core].
In case of the ALT x86_64 host system, for example: [http://sisyphus.ru/en/srpm/Sisyphus/qemu qemu-system-riscv-core].


Next stuff are needed:
These bits are needed:
* rootfs -- [http://ftp.altlinux.org/pub/people/arei/riscv/qemu/rootfs.raw raw image] or to build a new one there is a [http://ftp.altlinux.org/pub/people/arei/riscv/qemu/rootfs.tgz tgz packed version]
* rootfs -- [http://ftp.altlinux.org/pub/people/arei/riscv/qemu/rootfs.raw raw image] or to build a new one there is a [http://ftp.altlinux.org/pub/people/arei/riscv/qemu/rootfs.tgz tgz packed version]
* [http://ftp.altlinux.org/pub/people/arei/riscv/repo/riscv64/RPMS.hasher/kernel-image-qemu-un-def-4.19.6-alt3.noarch.rpm kernel for QEMU]
* [http://ftp.altlinux.org/pub/people/arei/riscv/repo/riscv64/RPMS.hasher/kernel-image-qemu-un-def-4.19.6-alt3.noarch.rpm kernel for QEMU]


After this steps were done it's time to run a kernel!
After these steps are done it's time to run a kernel!


(possibly need to change path to the kernel and rootfs according to particular system)
(one possibly needs to change paths to the kernel and rootfs according to a particular system)
<source lang="shell">
<source lang="shell">
  qemu-system-riscv64 \
  qemu-system-riscv64 \
Строка 64: Строка 62:
</source>
</source>


To log-in to the shell:
To log into the shell:
Username: root
Username: root
Password: 123
Password: 123
Строка 70: Строка 68:
== Useful links: ==
== Useful links: ==


* [https://github.com/dalegr/riscv-bbl-utils Berkeley bootloader utils] to merge the linux kernel in to the bbl.bin with the dummy payload.
* [https://github.com/dalegr/riscv-bbl-utils Berkeley bootloader utils] to merge the linux kernel into the bbl.bin with dummy payload.
* [https://riscv.org/specifications RISC-V specifications]
* [https://riscv.org/specifications RISC-V specifications]
* [https://www.sifive.com/blog/all-aboard-part-0-introduction All Aboard] -- cool series of blog posts by Palmer Dabbelt about RISC-V, toolchain, etc.
* [https://www.sifive.com/blog/all-aboard-part-0-introduction All Aboard] -- cool series of blog posts by Palmer Dabbelt about RISC-V, toolchain, etc.
* [http://0x1.tv/20180929H OSSDEVCONF-2018 (russian language)]
* [http://0x1.tv/20180929H OSSDEVCONF-2018 (in Russian)]


[[Категория:Sisyphus]]
[[Категория:Sisyphus]]
{{Category navigation|title=Ports|category=Ports|sortkey=*}}
{{Category navigation|title=Ports|category=Ports|sortkey=*}}

Версия от 22:06, 7 марта 2019

RISC-V

RISC-V is an open and free instruction set architecture (ISA). The RISC-V ISA specifications are licensed under a Creative Commons license (CC BY 4.0). Anyone could get the final versions of the user-level ISA specifications and drafts of the compressed and privileged ISA specifications.

Another key feature of the RISC-V architecture that it is scalable and allows multiple implementations. The minimal specification has the commands to store and load, jump and integer arithmetic. It supports the 32-, 64- and 128-bit register sizes: "RV32I, RV64I and RV128I" ("I" stands for integer). This Linux port runs on "RV64IMAFDC" or "RV64GC" ("G" == "IMAFD"):

  • I - Integer and basic instructions
  • M - Multiply and divide
  • A - Atomic operations
  • F - Single precision floating point
  • D - Double precision floating point
  • C - Compressed instructions

At this page one could find the latest information about ALT port status for the new platform - RISC-V (RV64GC). We're building it on the HiFive Unleashed board from SiFive.

Working plan

  • The following Linux kernels have been bare metal tested on SiFive HiFive Unleashed:
  • BOOT methods:
    • Berkeley bootloader -- DONE
    • U-BOOT (link) -- DONE
  • Sisyphus port -- IN PROGRESS
    1. Toolchain (see the status above) -- DONE
    2. Linux Kernel -- DONE
    3. X11 -- DONE
    4. Desktop Environments -- IN PROGRESS
  • ALT image metaprofile -- IN PROGRESS
  • Girar Builder -- IN PROGRESS
  • QEMU image (see below) -- DONE

One could find the latest rootfs snapshot (Nov 2018) here. The RPM/SRPM repository at here.

QEMU

You've got to install QEMU with riscv64 support to run ALT RISC-V port on QEMU.

In case of the ALT x86_64 host system, for example: qemu-system-riscv-core.

These bits are needed:

After these steps are done it's time to run a kernel!

(one possibly needs to change paths to the kernel and rootfs according to a particular system)

 qemu-system-riscv64 \
  -nographic -machine virt -kernel /boot/vmlinux-4.19.6-un-def-alt3 \
  -drive file=rootfs.raw,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 \
  -append "earlyprintk root=/dev/vda rootwait fastboot console=ttyS0 debug sunrpc.debug STOP=udev" \
  -netdev user,id=eth0 -device virtio-net-device,netdev=eth0

To log into the shell: Username: root Password: 123

Useful links: