Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error? #23

Closed
N6RFM opened this issue Jan 22, 2024 · 6 comments
Closed

Update error? #23

N6RFM opened this issue Jan 22, 2024 · 6 comments

Comments

@N6RFM
Copy link

N6RFM commented Jan 22, 2024

Hi Dani,

While attempting to update to the latest version, my practice has been to perform cargo clean, then cargo build --release, in the following folders -
/galileo-osnma
/galileo-osnma/galmon-osnma
/galileo-osnma/osnma-longan-nano
/galileo-osnma/osnma-longan-nano-client

all goes well except in the /galileo-osnma/osnma-longan-nano folder where I get an error near the end of the build.

Compiling riscv-rt-macros v0.2.1
error: instruction requires the following: 'M' (Integer Multiplication and Division) or 'Zmmul' (Integer Multiplication)
mul t0, t2, t0
^
error: instruction requires the following: 'M' (Integer Multiplication and Division) or 'Zmmul' (Integer Multiplication)
mul t0, t2, t0
^
error: instruction requires the following: 'M' (Integer Multiplication and Division) or 'Zmmul' (Integer Multiplication)
mul t0, t2, t0
^
Finished release [optimized] target(s) in 13.01s

Despite this, I am able to build the firmware using the command from with the /galileo-osnma/osnma-longan-nano folder

~/riscv-binutils-gdb/binutils/objcopy -O binary target/riscv32imac-unknown-none-elf/release/osnma-longan-nano firmware.bin

Any suggestions as to why this may be happening?

Thanks,
Bob

@daniestevez
Copy link
Owner

I'm also getting that error, even in CI. It seems that it is a problem with riscv-rt, a dependency. The problem seems harmless though. The firmware image builds and works just fine. I will try to replicate this problem in a minimal case and report upstream.

@N6RFM
Copy link
Author

N6RFM commented Jan 22, 2024

Thanks Dani. In the meantime, I'll flash the update.

@N6RFM
Copy link
Author

N6RFM commented Jan 22, 2024

Hi Dani,
Realized that I had to update the public key. Done.

There is also a file in the /galileo-osnma/osnma-longan-nano folder called merkle_tree_root.txt. Is this where the new string copied from the Merkl_tree XML file is to be placed or should the entire line 40256<x_ji>...</x_ji> be placed somewhere else?

I am now seeing a different error when doing a cargo clean then cargo build from the /galileo-osnma/osnma-longan-nano folder. This occurs near the end of the build process. Is Rust looking for a file that's missing perhaps? Thanks. Bob

Compiling log v0.4.20
error: failed to run custom build command for osnma-longan-nano v0.1.0 (/home/bob/galileo-osnma/osnma-longan-nano)

Caused by:
process didn't exit successfully: /home/bob/galileo-osnma/osnma-longan-nano/target/release/build/osnma-longan-nano-701dfc9cb301faee/build-script-build (exit status: 101)
--- stdout
cargo:rustc-link-search=/home/bob/galileo-osnma/osnma-longan-nano/target/riscv32imac-unknown-none-elf/release/build/osnma-longan-nano-ff52b1e4d79b3421/out
cargo:rerun-if-changed=memory-cb.x

--- stderr
thread 'main' panicked at 'called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', build.rs:53:74
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
bob@bob:~/galileo-osnma/osnma-longan-nano$

@daniestevez
Copy link
Owner

There is also a file in the /galileo-osnma/osnma-longan-nano folder called merkle_tree_root.txt. Is this where the new string copied from the Merkl_tree XML file is to be placed or should the entire line 40256<x_ji>...</x_ji> be placed somewhere else?

You should only put the hexadecimal number in merkle_tree_root.txt. Today I added a Python script that extracts the required hexadecimal number from the XML file. So this is now the easiest way to obtain the appropriate data for merkle_tree_root.txt. You run the script as extract_merkle_tree_root.py InputFile.xml > merkle_tree_root.txt . When I have merged this branch and added some error handling to the script I'll update the main README to describe this method.

thread 'main' panicked at 'called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', build.rs:53:74

That is this line. It seems that pubkey.pem or pubkey_id.txt is missing. Both files are in the repository but have dummy values (their contents must be replaced with the real cryptographic data). Maybe you've removed one of these files accidentally?

@N6RFM
Copy link
Author

N6RFM commented Jan 22, 2024

Thank you Dani! Now working. :-)

@daniestevez
Copy link
Owner

Closing, since this is working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants