Regular/riscv64: Difference between revisions

From ALT Linux Wiki
m (→‎Manual install: Replace .tar to .tar.xz.)
 
(24 intermediate revisions by 5 users not shown)
Line 1: Line 1:


'''<big>Regular image builds for SoC with RISC-V (rv64gc) CPU</big>
'''
{| style="border:1px solid #AAA; background:#F9F9FF; width:100px; margin: 0 0 1em 1em; padding:.2em; text-align:left; float: right;" class=noprint
{| style="border:1px solid #AAA; background:#F9F9FF; width:100px; margin: 0 0 1em 1em; padding:.2em; text-align:left; float: right;" class=noprint
| __TOC__
| __TOC__
Line 7: Line 5:
| [[:ru:Regular/riscv64|Русский]]
| [[:ru:Regular/riscv64|Русский]]
|}
|}
= '''Overview''' =
Regular image builds are intended to test and develop the RISC-V (rv64gc) [https://en.altlinux.org/Ports/riscv64 port] of the [https://en.altlinux.org/Sisyphus Sisyphus] repository.


To learn more about regular image builds one could refer to [https://en.altlinux.org/Regular this article].
[[Regular|Regular image]] builds are intended for testing and development of the [[Ports/riscv64|RISC-V (rv64gc) port]] of [[Sisyphus]] repository.


To make a bug report or discuss any suggestions please refer to the [[#Feedback|"Feedback"]] section on this page.
Additional information:
* on Regular images: [[Regular]];
* on riscv64 Sisyphus port: [[Ports/riscv64]];
* [[#Feedback]].


To enter the system, after the boot with one of the images listed below, please use the following username/password:
The images are intended to be run in qemu without modification and written according to the instructions to removable storage devices for sequent loading on target boards. Аfter booting from one of the images below, use the following credentials to login:  
<br>
'''<tt>login: root</tt>'''
<br>
'''<tt>password: alt</tt>'''


In the case of the developer image ('''builder''') there is an another user:
  login: root
<br>
  password: altlinux
'''<tt>login: altlinux</tt>'''
<br>
'''<tt>password: alt</tt>'''


{{Attention|It is recommended to '''change the password as soon as possible''' after the first log-in to the system.}}
For images with graphics the user will be asked to complete the initial setup in a graphical setup wizard at the first boot. During configuration, you can set the timezone, root password, password for connecting to VNC (if launched via VNC), create a new user, etc. On boards without a graphics adapter the graphical setup wizard must be run via VNC.


== HiFive Unleashed ==
== Download ==
Two types of the images for the [https://www.sifive.com SiFive's] [https://www.crowdsupply.com/sifive/hifive-unleashed HiFive Unleashed] board currently available:


* Minimal system with systemd -- [http://nightly.altlinux.org/sisyphus-riscv64/alpha/regular-jeos-systemd-latest-riscv64.tar.xz link] ([http://nightly.altlinux.org/sisyphus-riscv64/alpha/MD5SUM MD5], [http://nightly.altlinux.org/sisyphus-riscv64/alpha/SHA1SUM SHA1])
=== '''Direct download links''' ===
* Minimal system with SysV -- [http://nightly.altlinux.org/sisyphus-riscv64/alpha/regular-jeos-sysv-latest-riscv64.tar.xz ссылка] ([http://nightly.altlinux.org/sisyphus-riscv64/alpha/MD5SUM MD5], [http://nightly.altlinux.org/sisyphus-riscv64/alpha/SHA1SUM SHA1])
 
* Minimal system for developer (rpmbuild, [https://www.altlinux.org/Hasher hasher], gcc-8, ssh) -- [http://nightly.altlinux.org/sisyphus-riscv64/alpha/regular-builder-latest-riscv64.tar.xz link] ([http://nightly.altlinux.org/sisyphus-riscv64/alpha/MD5SUM MD5], [http://nightly.altlinux.org/sisyphus-riscv64/alpha/SHA1SUM SHA1])
These images are marked as '''tested''':
<br>
 
The instructions on how to run these images on HiFive Unleashed in [[#How to run on HiFive Unleashed|this section]].
* jeos-systemd: [http://nightly.altlinux.org/sisyphus-riscv64/tested/regular-jeos-systemd-latest-riscv64.img.xz riscv64] <ref>No GUI </ref>
 
* lxqt: [http://nightly.altlinux.org/sisyphus-riscv64/tested/regular-lxqt-latest-riscv64.img.xz riscv64]
 
* mate: [http://nightly.altlinux.org/sisyphus-riscv64/tested/regular-mate-latest-riscv64.img.xz riscv64]
 
* xfce: [http://nightly.altlinux.org/sisyphus-riscv64/tested/regular-xfce-latest-riscv64.img.xz riscv64]
 
 
=== Additional downloads ===
 
Some additional images  are available on http://nightly.altlinux.org/sisyphus-riscv64/:
 
* images in other formats (e.g. rootfs tarballs, or ISO images with installer);
* stapshots -- builds from the past weeks, and the newest images that were not tested yet (if any).


== QEMU ==
== QEMU ==
The images for the [https://www.qemu.org QEMU] listed below:
* Minimal system with systemd -- [http://nightly.altlinux.org/sisyphus-riscv64/alpha/regular-jeos-systemd-latest-riscv64.qcow2c link] ([http://nightly.altlinux.org/sisyphus-riscv64/alpha/MD5SUM MD5], [http://nightly.altlinux.org/sisyphus-riscv64/alpha/SHA1SUM SHA1])
* Minimal sytem with SysV -- [http://nightly.altlinux.org/sisyphus-riscv64/alpha/regular-jeos-sysv-latest-riscv64.qcow2c ссылка] ([http://nightly.altlinux.org/sisyphus-riscv64/alpha/MD5SUM MD5], [http://nightly.altlinux.org/sisyphus-riscv64/alpha/SHA1SUM SHA1])
* Minimal system for developer (rpmbuild, [https://www.altlinux.org/Hasher hasher], gcc-8, ssh) -- [http://nightly.altlinux.org/sisyphus-riscv64/alpha/regular-builder-latest-riscv64.qcow2c link] ([http://nightly.altlinux.org/sisyphus-riscv64/alpha/MD5SUM MD5], [http://nightly.altlinux.org/sisyphus-riscv64/alpha/SHA1SUM SHA1])
<br>
The instructions on how to run these images on QEMU in [[#How to run on QEMU|this section]].


= '''How to run on QEMU''' =
The img.xz images must be unpacked and run according to the instructions: [[Ports/riscv64/QEMU]].
In order to run the image on the QEMU system one need to follow these steps:
 
== HiFive Unmatched and Unleashed ==


'''Step 1.''' Install QEMU with riscv64 support. For example, in the case of ALT x86_64 system: [http://sisyphus.ru/en/srpm/Sisyphus/qemu qemu-system-riscv-core].
Images write in instructions are available on the board pages: [[HiFive Unmatched]] and [[HiFive Unleashed]].  


'''Step 2.''' Get the [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/kernel-image-qemu-un-def-5.0.19-alt2.rv64gc.noarch.rpm Linux kernel for QEMU] and install it:
== VNC ==
<source lang="shell">rpm --install <kernel package>.rpm</source>
After that, the Linux kernel for QEMU compressed with gzip could be found at /usr/share/qemu-riscv64/vmlinuz.
Decompress the Linux kernel:
<source lang="shell">$ gzip -d -c /usr/share/qemu-riscv64/vmlinuz > ~/vmlinux</source>


'''Step 3.''' Download one of the images for QEMU listed ([[#QEMU|above]]) and just replace <IMAGE> to the path of just downloaded qcow2c image:
Images with graphical desktop environments provide an option to work remotely via VNC, which is especially useful if your board does not have a (working) video card. To use this option:
<source lang="shell">
$ qemu-system-riscv64 -nographic -machine virt \
                      -kernel ~/vmlinux \
                      -m 2G -smp cpus=4,threads=2,maxcpus=8 \
                      -drive file=<IMAGE>.qcow2c,id=hd0 -device virtio-blk-device,drive=hd0 \
                      -append "earlyprintk root=/dev/vda1 fastboot rootwait console=ttyS0 debug sunrpc.debug" \
                      -netdev user,id=eth0 -device virtio-net-device,netdev=eth0
</source>


= '''How to run on HiFive Unleashed''' =
* enable vnc mode in alterator-setup by uncommenting or adding a line to /etc/alterator-setup/config:
This instruction assumes that the user is working on the computer with ALT Sisyphus installed on it.
In order to run the image on the HiFive Unleashed one need to follow these steps:


'''Step 1.''' [[#HiFive Unleashed|Download]] minimal system image with systemd, which is a ''tar'' archive with rootfs. To install the system one could choose between two options: [[#Automatic install on ALT Sisyphus|automatic install on ALT Sisyphus]] and [[#Manual install|manual]].
<source lang="shell">ALTERATOR_SETUP_VNC=1</source>


== Automatic install on ALT Sisyphus ==
or add a --vnc=1 argument for alt-rootfs-installer when it writes to a removable storage device.
'''Step 2.''' Install the [http://sisyphus.ru/en/srpm/Sisyphus/alt-rootfs-installer alt-rootfs-installer].


'''Step 3.''' Run the <tt>alt-rootfs-installer</tt>. This script will automatically install the system on microSD card. For example, to install <tt>regular-builder-alpha20190329-riscv64.tar.xz</tt> image on <tt>/dev/sdX</tt> with log output to <tt>/home/user/alt-rootfs-installer.log</tt>:
* connect to the board's serial port and wait for the information about the board network address and the VNC connection password:
<source lang="shell">
<source lang="shell">
$ alt-rootfs-installer --rootfs=/home/user/images/regular-builder-alpha20190329-riscv64.tar.xz \
localhost login: ALTERATOR SETUP === VNC access enabled
                      --media=/dev/sdX \
ALTERATOR SETUP === VNC Password="cobra-angel"
                      --target=HiFive-Unleashed-bbl --log /home/user/alt-rootfs-installer.log
ALTERATOR SETUP === Default network device: "eth0"
ALTERATOR SETUP === IPv4: "10.0.2.15/24"
ALTERATOR SETUP === IPv6: "fec0::bee1:6f2d:ce4a:9c1d/64
fe80::6a0:ddd0:df03:e44d/64"
PORT=5900
</source>
</source>
<br>
After this procedure the /dev/sdX disk will contain two partitions. The first partition will contain bbl bootloader with Linux kernel, which is statically linked with bbl. The second partition will contain root file system.


Now, microSD card is ready to use with HiFive Unleashed.
To connect to a serial console (usually /dev/ttyUSB1) you can use GNU/screen:
 
== Manual install ==
'''Step 2.''' Untar the /boot directory from the archive from ''step 1''. For example, in the case of minimal system image with systemd:
<source lang="shell">
<source lang="shell">
$ tar -xf regular-jeos-latest-riscv64.tar.xz ./boot
$ screen /dev/ttyUSB1 115200
</source>
</source>
The ./boot/vmlinuz will contain symlink to the Linux kernel.


'''Step 3.''' Create the GPT table with two partitions on the microSD card:
* connect to the VNC server. You can use <tt>remote-viewer</tt> -- a VNC client from the virt-viewer package:
* The first partition must contain specific GUID 2E54B353-1271-4842-806F-E436D6AF6985
<source lang="shell">$ remote-viewer vnc://<ip_address>:<Port></source>
* The second partition is a typical Linux Filesystem GUID 0FC63DAF-8483-4772-8E79-3D69D8477DE4
The example command for <tt>/dev/sdX</tt>:
<source lang="shell">
$ sgdisk -g --clear \
        --new=1:2048:67583 --change-name=1:bootloader --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \
        --new=2:264192:    --change-name=2:root      --typecode=2:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \
        "/dev/sdX"
</source>


'''Step 4.''' Write the bbl+Linux kernel to the first partition of microSD:
== Feedback ==
<source lang="shell">
$ dd if=boot/vmlinuz of=/dev/sdX1 bs=4M status=progress
</source>


'''Step 5.''' Create filesystem on second partition of microSD. Mount it and untar the archive with rootfs:
'''• Bug reports''' are tracked at [https://bugzilla.altlinux.org ALT Linux Team bugzilla] (see also: [[BugTracking]]):
<source lang="shell">
* In the case of any issue with a package choose product ''Sisyphus''.
$ mkfs.ext4 /dev/sdX2
* In the case of an issue with the images choose product ''Regular'' .
$ mount /dev/sdX2 /mnt
$ tar -xpvf regular-jeos-latest-riscv64.tar -C /mnt/
$ umount /dev/sdX2
</source>


Now, microSD is ready to use with HiFive Unleashed.
'''IMPORTANT''':
* set platform field (drop-down list at the right) to ''riscv64'';
* assign the issue to <tt>iv@altlinux.org</tt>.


= '''Feedback''' =
'''• Mailing list:''' [https://lists.altlinux.org/mailman/listinfo/riscv-devel riscv-devel@lists.altlinux.org]
'''• Bug reports''' submission form at [https://bugzilla.altlinux.org bugzilla].
* In the case of any issue with a package please choose ''Sisyphus''.
* In the case of an issue with the images please choose ''Regular''.


Set ''riscv64'' as a platform (drop-down list at the right). In the field "''Assign to''" set <tt>arei@altlinux.org</tt>.
== Footnotes ==
<br>
'''• IRC''' channel [http://irc.netsplit.de/channels/details.php?room=%23altlinux-riscv&net=freenode #altlinux-riscv] at [https://freenode.net/ freenode].
<br>
'''• Mailing list:''' riscv-devel@lists.altlinux.org


[[Category:Sisyphus]]
[[Category:Regular]]
[[Category:RISC-V]]
[[ru:Regular/riscv64]]
[[ru:Regular/riscv64]]
[[Category:Regular]]
[[Category:Sisyphus]]

Latest revision as of 12:15, 27 January 2023

Русский

Regular image builds are intended for testing and development of the RISC-V (rv64gc) port of Sisyphus repository.

Additional information:

The images are intended to be run in qemu without modification and written according to the instructions to removable storage devices for sequent loading on target boards. Аfter booting from one of the images below, use the following credentials to login:

 login: root
 password: altlinux

For images with graphics the user will be asked to complete the initial setup in a graphical setup wizard at the first boot. During configuration, you can set the timezone, root password, password for connecting to VNC (if launched via VNC), create a new user, etc. On boards without a graphics adapter the graphical setup wizard must be run via VNC.

Download

Direct download links

These images are marked as tested:


Additional downloads

Some additional images are available on http://nightly.altlinux.org/sisyphus-riscv64/:

  • images in other formats (e.g. rootfs tarballs, or ISO images with installer);
  • stapshots -- builds from the past weeks, and the newest images that were not tested yet (if any).

QEMU

The img.xz images must be unpacked and run according to the instructions: Ports/riscv64/QEMU.

HiFive Unmatched and Unleashed

Images write in instructions are available on the board pages: HiFive Unmatched and HiFive Unleashed.

VNC

Images with graphical desktop environments provide an option to work remotely via VNC, which is especially useful if your board does not have a (working) video card. To use this option:

  • enable vnc mode in alterator-setup by uncommenting or adding a line to /etc/alterator-setup/config:
ALTERATOR_SETUP_VNC=1

or add a --vnc=1 argument for alt-rootfs-installer when it writes to a removable storage device.

  • connect to the board's serial port and wait for the information about the board network address and the VNC connection password:
localhost login: ALTERATOR SETUP === VNC access enabled
ALTERATOR SETUP === VNC Password="cobra-angel"
ALTERATOR SETUP === Default network device: "eth0"
ALTERATOR SETUP === IPv4: "10.0.2.15/24"
ALTERATOR SETUP === IPv6: "fec0::bee1:6f2d:ce4a:9c1d/64
fe80::6a0:ddd0:df03:e44d/64"
PORT=5900

To connect to a serial console (usually /dev/ttyUSB1) you can use GNU/screen:

$ screen /dev/ttyUSB1 115200
  • connect to the VNC server. You can use remote-viewer -- a VNC client from the virt-viewer package:
$ remote-viewer vnc://<ip_address>:<Port>

Feedback

• Bug reports are tracked at ALT Linux Team bugzilla (see also: BugTracking):

  • In the case of any issue with a package choose product Sisyphus.
  • In the case of an issue with the images choose product Regular .

IMPORTANT:

  • set platform field (drop-down list at the right) to riscv64;
  • assign the issue to iv@altlinux.org.

• Mailing list: riscv-devel@lists.altlinux.org

Footnotes

  1. No GUI