Canonical just announced official support for VF2

https://wiki.ubuntu.com/RISC-V/StarFive%20VisionFive%202

It is great to see official support and I’m relieved to see that they got all the pitfalls mentioned in the instruction (firmware updates and board type). Looking forward for the features and quality (no NVMe timeouts) to catch up with the private StarFive Debian fork.

6 Likes

They do have an official announcement web page about it, but it’s interesting to note on that wiki page there isn’t actually a link to download the ubuntu server image for vf2. They provided a link to the starfive github stuff.

https://cdimage.ubuntu.com/releases/23.04/release/ubuntu-23.04-preinstalled-server-riscv64+visionfive2.img.xz

which is found on this page:

2 Likes

I just assumed the announcement had raced the actual download, at least I hope so. Based on the VF1 imaging being available I feel confident that VF2 will get one as well, eventually.

Not that I’m holding my breath - Thanks to agreenbhm I’ve been using Ubuntu (headlessly) for a while now.

<deleted, Ninja’d…>

Please note the following (from the bottom of the install page):

Limitations

USB and PCIe are not supported by the 6.2 kernel. We expect future upstream kernel revisions to add these.

Not for me, yet.

3 Likes

The 32k content limit is very annoying which explains why I resorted to using gist github to share this with everybody:

Verbose UART output from first time booting Ubuntu server vf2.

First time logging into Ubuntu Server on Starfive Visionfive 2

I tweaked apt sources are recommended here: Daily Ubuntu Kernel Builds - Now With 100% More APT Repo! - #13 by omac777

And here is the respective Rolling Release Ubuntu Server Kernel UART output and first login

1 Like

I just tried building ring crate for rust on this ubuntu server image with agreenbhm’s rolling release kernel. I’m discussing the ring crate because it’s important for security’s sake.

There is still an error with the default ring crate:

error: failed to run custom build command for `ring v0.16.20`

There has been a fix for a while for riscv64, but it hasn’t been propagated yet:

Why is that?

This repeatable build/test of the fixed ring crate was done on an sdcard:


git clone https://github.com/briansmith/ring.git
cd ring
git fetch origin pull/1574/head:testupdateriscvbuild
git checkout testupdateriscvbuild

RUSTFLAGS=-Awarnings cargo +nightly build --release
    Updating crates.io index
  Downloaded untrusted v0.9.0
  Downloaded 1 crate (14.4 KB) in 0.48s
   Compiling libc v0.2.144
   Compiling cc v1.0.79
   Compiling cfg-if v1.0.0
   Compiling untrusted v0.9.0
   Compiling ring v0.17.0-not-released-yet
   Compiling getrandom v0.2.9
    Finished release [optimized] target(s) in 1m 44s

RUSTFLAGS=-Awarnings cargo +nightly test --release
  Downloaded oorandom v11.1.3
  Downloaded cast v0.3.0
  Downloaded half v1.8.2
  Downloaded tinytemplate v1.2.1
  Downloaded os_str_bytes v6.5.0
  Downloaded criterion v0.4.0
  Downloaded clap v3.2.25
  Downloaded anes v0.1.6
  Downloaded criterion-plot v0.5.0
  Downloaded ciborium v0.2.1
  Downloaded textwrap v0.16.0
  Downloaded clap_lex v0.2.4
  Downloaded ciborium-ll v0.2.1
  Downloaded ciborium-io v0.2.1
  Downloaded 14 crates (607.7 KB) in 1.02s
   Compiling proc-macro2 v1.0.56
   Compiling unicode-ident v1.0.8
   Compiling quote v1.0.27
   Compiling autocfg v1.1.0
   Compiling serde_derive v1.0.162
   Compiling serde v1.0.162
   Compiling serde_json v1.0.96
   Compiling indexmap v1.9.3
   Compiling num-traits v0.2.15
   Compiling ryu v1.0.13
   Compiling os_str_bytes v6.5.0
   Compiling either v1.8.1
   Compiling hashbrown v0.12.3
   Compiling itoa v1.0.6
   Compiling half v1.8.2
   Compiling syn v2.0.15
   Compiling ciborium-io v0.2.1
   Compiling ciborium-ll v0.2.1
   Compiling itertools v0.10.5
   Compiling clap_lex v0.2.4
   Compiling bitflags v1.3.2
   Compiling regex-syntax v0.7.1
   Compiling cast v0.3.0
   Compiling same-file v1.0.6
   Compiling textwrap v0.16.0
   Compiling criterion-plot v0.5.0
   Compiling clap v3.2.25
   Compiling regex v1.8.1
   Compiling walkdir v2.3.3
   Compiling atty v0.2.14
   Compiling anes v0.1.6
   Compiling lazy_static v1.4.0
   Compiling oorandom v11.1.3
   Compiling ciborium v0.2.1
   Compiling tinytemplate v1.2.1
   Compiling criterion v0.4.0
   Compiling ring v0.17.0-not-released-yet
    Finished release [optimized] target(s) in 10m 35s
     Running unittests src/lib.rs (target/release/deps/ring-bc8c002d4ee50f8a)

running 88 tests
test aead::aes::tests::test_aes ... ok
test aead::aes_gcm::tests::max_input_len_test ... ok
test aead::chacha20_poly1305::tests::max_input_len_test ... ok
test aead::poly1305::tests::test_poly1305 ... ok
test aead::chacha::tests::chacha20_test_fallback ... ok
test aead::chacha::tests::chacha20_test_default ... ok
test arithmetic::bigint::tests::test_elem_reduced_once ... ok
test arithmetic::bigint::tests::test_elem_mul ... ok
test arithmetic::bigint::tests::test_modulus_debug ... ok
test arithmetic::bigint::tests::test_mul_add_words ... ok
test bssl::tests::result::semantics ... ok
test bssl::tests::result::size_and_alignment ... ok
test c::tests::test_libc_compatible ... ok
test constant_time::tests::test_constant_time ... ok
test arithmetic::bigint::tests::test_elem_reduced ... ok
test digest::tests::max_input::SHA1_FOR_LEGACY_USE_ONLY::max_input_test ... ok
test digest::tests::max_input::SHA1_FOR_LEGACY_USE_ONLY::too_long_input_test_block - should panic ... ok
test digest::tests::max_input::SHA1_FOR_LEGACY_USE_ONLY::too_long_input_test_byte - should panic ... ok
test digest::tests::max_input::SHA256::max_input_test ... ok
test digest::tests::max_input::SHA256::too_long_input_test_block - should panic ... ok
test digest::tests::max_input::SHA384::max_input_test ... ok
test digest::tests::max_input::SHA256::too_long_input_test_byte - should panic ... ok
test digest::tests::max_input::SHA384::too_long_input_test_block - should panic ... ok
test digest::tests::max_input::SHA512::max_input_test ... ok
test digest::tests::max_input::SHA384::too_long_input_test_byte - should panic ... ok
test arithmetic::bigint::tests::test_elem_squared ... ok
test digest::tests::max_input::SHA512::too_long_input_test_block - should panic ... ok
test digest::tests::max_input::SHA512::too_long_input_test_byte - should panic ... ok
test ec::suite_b::ecdh::tests::test_agreement_suite_b_ecdh_generate ... ok
test ec::suite_b::ecdsa::digest_scalar::tests::test ... ok
test ec::suite_b::ecdsa::signing::tests::signature_ecdsa_sign_asn1_test ... ok
test ec::suite_b::ops::tests::p256_elem_add_test ... ok
test ec::suite_b::ops::tests::p256_elem_mul_test ... ok
test ec::suite_b::ops::tests::p256_point_double_test ... ok
test arithmetic::bigint::tests::test_elem_exp_consttime ... ok
test ec::suite_b::ops::tests::p256_point_mul_serialized_test ... ok
test ec::suite_b::ops::tests::p256_point_mul_base_test ... ok
test ec::suite_b::ops::tests::p256_point_sum_mixed_test ... ok
test ec::suite_b::ops::tests::p256_point_sum_test ... ok
test ec::suite_b::ops::tests::p256_q_minus_n_plus_n_equals_0_test ... ok
test ec::suite_b::ops::tests::p256_scalar_inv_to_mont_zero_panic_test - should panic ... ok
test ec::suite_b::ops::tests::p256_scalar_mul_test ... ok
test ec::suite_b::ops::tests::p256_scalar_square_test ... ok
test ec::suite_b::ops::tests::p384_elem_add_test ... ok
test ec::suite_b::ops::tests::p384_elem_div_by_2_test ... ok
test ec::suite_b::ops::tests::p384_elem_mul_test ... ok
test ec::suite_b::ops::tests::p384_elem_neg_test ... ok
test ec::suite_b::ops::tests::p384_elem_sub_test ... ok
test ec::suite_b::ops::tests::p384_point_double_test ... ok
test ec::suite_b::ecdsa::signing::tests::signature_ecdsa_sign_fixed_test ... ok
test ec::suite_b::ops::tests::p256_point_mul_test ... ok
test ec::suite_b::ops::tests::p384_point_sum_test ... ok
test ec::suite_b::ops::tests::p384_q_minus_n_plus_n_equals_0_test ... ok
test ec::suite_b::ops::tests::p384_scalar_inv_to_mont_zero_panic_test - should panic ... ok
test ec::suite_b::ops::tests::p384_scalar_mul_test ... ok
test ec::suite_b::public_key::tests::parse_uncompressed_point_test ... ok
test endian::tests::test_big_endian ... ok
test hmac::tests::hmac_signing_key_coverage ... ok
test io::der::tests::test_positive_integer ... ok
test io::der::tests::test_small_nonnegative_integer ... ok
test io::positive::tests::test_from_be_bytes ... ok
test limb::tests::test_big_endian_from_limbs_fewer_limbs - should panic ... ok
test limb::tests::test_big_endian_from_limbs_same_length ... ok
test limb::tests::test_limbs_are_even ... ok
test limb::tests::test_limbs_are_zero ... ok
test limb::tests::test_limbs_equal_limb ... ok
test limb::tests::test_limbs_less_than_limb_constant_time ... ok
test limb::tests::test_limbs_minimal_bits ... ok
test limb::tests::test_parse_big_endian_and_pad_consttime ... ok
test polyfill::array_flat_map::tests::test_array_flat_map ... ok
test polyfill::array_flat_map::tests::test_array_flat_map_len_overflow ... ok
test polyfill::leading_zeros_skipped::tests::test_leading_zeroes_stripped ... ok
test rsa::padding::test::test_pss_padding_encode ... ok
test rsa::padding::test::test_pss_padding_verify ... ok
test rsa::public_exponent::tests::test_public_exponent_constants ... ok
test test::tests::first_err - should panic ... ok
test test::tests::first_panic - should panic ... ok
test test::tests::last_err - should panic ... ok
test test::tests::last_panic - should panic ... ok
test test::tests::middle_err - should panic ... ok
test test::tests::middle_panic - should panic ... ok
test test::tests::one_err - should panic ... ok
test test::tests::one_ok ... ok
test test::tests::one_panics - should panic ... ok
test test::tests::syntax_error - should panic ... ok
test ec::suite_b::ecdsa::verification::tests::test_digest_based_test_vectors ... ok
test ec::suite_b::ops::tests::p384_point_mul_base_test ... ok
test ec::suite_b::ops::tests::p384_point_mul_test ... ok

test result: ok. 88 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.02s

     Running tests/aead_tests.rs (target/release/deps/aead_tests-36696a091857abd8)

running 38 tests
test aead_test::AES_128_GCM::key_sizes ... ok
test aead_chacha20_poly1305_openssh ... ok
test aead_test::AES_128_GCM::less_safe_key_open_in_place ... ok
test aead_test::AES_128_GCM::less_safe_key_seal_in_place_append_tag ... ok
test aead_test::AES_128_GCM::less_safe_key_seal_in_place_separate_tag ... ok
test aead_test::AES_128_GCM::opening_key_open_in_place ... ok
test aead_test::AES_128_GCM::sealing_key_seal_in_place_append_tag ... ok
test aead_test::AES_128_GCM::sealing_key_seal_in_place_separate_tag ... ok
test aead_test::AES_256_GCM::key_sizes ... ok
test aead_test::AES_128_GCM::test_open_in_place_seperate_tag ... ok
test aead_test::AES_256_GCM::less_safe_key_open_in_place ... ok
test aead_test::AES_256_GCM::less_safe_key_seal_in_place_append_tag ... ok
test aead_test::AES_256_GCM::less_safe_key_seal_in_place_separate_tag ... ok
test aead_test::AES_256_GCM::opening_key_open_in_place ... ok
test aead_test::AES_128_GCM::less_safe_key_open_within ... ok
test aead_test::AES_256_GCM::sealing_key_seal_in_place_append_tag ... ok
test aead_test::AES_256_GCM::sealing_key_seal_in_place_separate_tag ... ok
test aead_test::AES_256_GCM::test_open_in_place_seperate_tag ... ok
test aead_test::CHACHA20_POLY1305::key_sizes ... ok
test aead_test::AES_128_GCM::opening_key_open_within ... ok
test aead_test::CHACHA20_POLY1305::less_safe_key_open_in_place ... ok
test aead_test::CHACHA20_POLY1305::less_safe_key_seal_in_place_append_tag ... ok
test aead_test::CHACHA20_POLY1305::less_safe_key_seal_in_place_separate_tag ... ok
test aead_test::CHACHA20_POLY1305::opening_key_open_in_place ... ok
test aead_test::AES_256_GCM::less_safe_key_open_within ... ok
test aead_test::CHACHA20_POLY1305::sealing_key_seal_in_place_append_tag ... ok
test aead_test::CHACHA20_POLY1305::sealing_key_seal_in_place_separate_tag ... ok
test aead_test::CHACHA20_POLY1305::test_open_in_place_seperate_tag ... ok
test aead_test_aad_traits ... ok
test test_aead_key_debug ... ok
test test_aead_lesssafekey_clone_aes_128_gcm ... ok
test test_aead_lesssafekey_clone_aes_256_gcm ... ok
test test_aead_lesssafekey_clone_chacha20_poly1305 ... ok
test test_aead_nonce_sizes ... ok
test test_tag_traits ... ok
test aead_test::AES_256_GCM::opening_key_open_within ... ok
test aead_test::CHACHA20_POLY1305::less_safe_key_open_within ... ok
test aead_test::CHACHA20_POLY1305::opening_key_open_within ... ok

test result: ok. 38 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 20.81s

     Running tests/agreement_tests.rs (target/release/deps/agreement_tests-0650e16682f8998e)

running 3 tests
test agreement_traits ... ok
test agreement_agree_ephemeral ... ok
test test_agreement_ecdh_x25519_rfc_iterated ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.60s

     Running tests/constant_time_tests.rs (target/release/deps/constant_time_tests-a41547713342f626)

running 1 test
test test_verify_slices_are_equal ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.26s

     Running tests/digest_tests.rs (target/release/deps/digest_tests-19158cc470733aef)

running 23 tests
test digest_shavs::SHA1_FOR_LEGACY_USE_ONLY::short_msg_known_answer_test ... ok
test digest_shavs::SHA1_FOR_LEGACY_USE_ONLY::long_msg_known_answer_test ... ok
test digest_shavs::SHA256::long_msg_known_answer_test ... ok
test digest_shavs::SHA256::short_msg_known_answer_test ... ok
test digest_shavs::SHA384::long_msg_known_answer_test ... ok
test digest_misc ... ok
test digest_shavs::SHA384::short_msg_known_answer_test ... ok
test digest_shavs::SHA512::long_msg_known_answer_test ... ok
test digest_shavs::SHA1_FOR_LEGACY_USE_ONLY::monte_carlo_test ... ok
test digest_shavs::SHA512::short_msg_known_answer_test ... ok
test digest_test_fmt ... ok
test digest_shavs::SHA256::monte_carlo_test ... ok
test digest_shavs::SHA384::monte_carlo_test ... ok
test digest_shavs::SHA512::monte_carlo_test ... ok
test digest_test_i_u_f_sha1 ... ok
test digest_test_i_u_f_sha256 ... ok
test digest_test_i_u_f_sha384 ... ok
test digest_test_i_u_f_sha512 ... ok
test digest_test_large_digest_sha1 has been running for over 60 seconds
test digest_test_large_digest_sha256 has been running for over 60 seconds
test digest_test_large_digest_sha384 has been running for over 60 seconds
test digest_test_large_digest_sha512 has been running for over 60 seconds
test digest_test_large_digest_sha1 ... ok
test test_fmt_algorithm ... ok
test digest_test_large_digest_sha512 ... ok
test digest_test_large_digest_sha384 ... ok
test digest_test_large_digest_sha256 ... ok

test result: ok. 23 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 458.15s

     Running tests/ecdsa_tests.rs (target/release/deps/ecdsa_tests-49e71d68bc01a144)

running 7 tests
test ecdsa_test_public_key_coverage ... ok
test signature_ecdsa_sign_asn1_test ... ok
test ecdsa_from_pkcs8_test ... ok
test ecdsa_generate_pkcs8_test ... ok
test signature_ecdsa_verify_fixed_test ... ok
test signature_ecdsa_sign_fixed_sign_and_verify_test ... ok
test signature_ecdsa_verify_asn1_test ... ok

test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.68s

     Running tests/ed25519_tests.rs (target/release/deps/ed25519_tests-933830e5633ed663)

running 6 tests
test ed25519_test_public_key_coverage ... ok
test test_ed25519_from_seed_and_public_key_misuse ... ok
test test_signature_ed25519_verify ... ok
test test_ed25519_from_pkcs8 ... ok
test test_ed25519_from_pkcs8_unchecked ... ok
test test_signature_ed25519 ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.17s

     Running tests/error_tests.rs (target/release/deps/error_tests-59dcfa9ee417fa70)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/hkdf_tests.rs (target/release/deps/hkdf_tests-e33dc97067ebaf04)

running 2 tests
test hkdf_tests ... ok
test hkdf_output_len_tests ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

     Running tests/hmac_tests.rs (target/release/deps/hmac_tests-562db710540c66df)

running 2 tests
test hmac_debug ... ok
test hmac_tests ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

     Running tests/pbkdf2_tests.rs (target/release/deps/pbkdf2_tests-74ae449340d811bd)

running 1 test
test pbkdf2_tests ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.44s

     Running tests/quic_tests.rs (target/release/deps/quic_tests-41ac2ac959755e3b)

running 3 tests
test quic_aes_128 ... ok
test quic_chacha20 ... ok
test quic_aes_256 ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/rand_tests.rs (target/release/deps/rand_tests-a6a348f664764e3e)

running 2 tests
test test_system_random_traits ... ok
test test_system_random_lengths ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s

     Running tests/rsa_tests.rs (target/release/deps/rsa_tests-29b953937dff5a97)

running 8 tests
test rsa_test_keypair_coverage ... ok
test test_signature_rsa_pkcs1_sign_output_buffer_len ... ok
test test_signature_rsa_primitive_verification ... ok
test rsa_from_pkcs8_test ... ok
test test_signature_rsa_pss_verify ... ok
test test_signature_rsa_pkcs1_verify ... ok
test test_signature_rsa_pss_sign ... ok
test test_signature_rsa_pkcs1_sign ... ok

test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.67s

     Running tests/signature_tests.rs (target/release/deps/signature_tests-5a329bafdb91a1c9)

running 1 test
test signature_impl_test ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests ring

running 11 tests
test src/digest.rs - digest::digest (line 214) ... ok
test src/digest.rs - digest::Context (line 126) ... ok
test src/error.rs - error::Unspecified (line 34) ... ok
test src/agreement.rs - agreement (line 23) ... ok
test src/hmac.rs - hmac (line 31) ... ok
test src/hmac.rs - hmac (line 51) ... ok
test src/hmac.rs - hmac (line 75) ... ok
test src/test.rs - test (line 53) ... ignored
test src/pbkdf2.rs - pbkdf2 (line 32) ... ok
test src/signature.rs - signature (line 193) ... ok
test src/signature.rs - signature (line 129) ... ok

test result: ok. 10 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 153.62s

Indeed, I had to file a bug against nextest because it added a dependency on ring which broke riscv (because of the deficiency you mentioned). Hopefully this will all get sorted.

1 Like