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

First attempt at RasPi support #17

Closed
wants to merge 3 commits into from
Closed

First attempt at RasPi support #17

wants to merge 3 commits into from

Conversation

shawaj
Copy link
Contributor

@shawaj shawaj commented Dec 15, 2020

This is a first draft commit and a work in progress PR.

It cross compiles fine using cross build but I am having some issues with getting cargo-deb to work properly for packaging the deb file. Perhaps might be a better idea to package the .deb file manually like is done with the .ipk

Some other things to note:

  • For cargo-deb to work I had to install cmake and gcc-arm-linux-gnueabihf and rustup target add armv7-unknown-linux-gnueabihf
  • The ci.yml for github actions is a mess - need to fix

Let me know if you spot any issues or have any suggestions.

@shawaj
Copy link
Contributor Author

shawaj commented Dec 15, 2020

Just for reference, when I run the following:

cargo deb --target=arm-unknown-linux-gnueabihf --variant=raspi01

The error I am getting with cargo deb is as follows:

          /usr/bin/ld: /home/GitHub/gateway-rs/target/arm-unknown-linux-gnueabihf/release/deps/helium_gateway-0a4717c34b6d41e2.helium_gateway.1o693kuq-cgu.0.rcgu.o: relocations in generic ELF (EM: 40)
          /usr/bin/ld: /home/GitHub/gateway-rs/target/arm-unknown-linux-gnueabihf/release/deps/helium_gateway-0a4717c34b6d41e2.helium_gateway.1o693kuq-cgu.0.rcgu.o: error adding symbols: file in wrong format
          collect2: error: ld returned 1 exit status

The same happens with armv7-unknown-linux-gnueabihf as well

Based on these issues - rust-lang/rust#28924 / GuillaumeGomez/sysinfo#246 - I think I might need to define a linker.

@shawaj
Copy link
Contributor Author

shawaj commented Dec 15, 2020

Cargo-deb is basically ignoring the .config/config.toml due to the file extension...

As per the docs here the preferred config is .config/config.toml instead of .config/config but due to the code here:

https://github.com/mmstick/cargo-deb/blob/b5e4f398545a42ecbfdae7175f47c09cde103655/src/config.rs#L38

It is only looking at .config/config

See issue on cargo-deb here mmstick/cargo-deb#157

@shawaj
Copy link
Contributor Author

shawaj commented Dec 16, 2020

@madninja the fix in cargo-deb is in and so in future versions it should be ok with a config.toml.

Are you happy with the config being .config/config without the toml extension for now, until the new cargo-deb package is in the repos? Just want to make sure it doesn't break anything.

@cokes518 cokes518 added this to To do in Light Hotspots Mar 19, 2021
@cokes518 cokes518 moved this from To do to Done in Light Hotspots Mar 19, 2021
@madninja
Copy link
Member

@shawaj ok, I think we're ready to look at how this gets merged, if you're still interested?

Does the config vs config.toml work for the non cargo-deb platforms?

@madninja
Copy link
Member

Thanks for your efforts here @shawaj! I'm going to close this in favor of: #37 which takes your initial constructs and fits it more into the cargo-make approach while making packaging consistent across ipk/deb targets

@madninja madninja closed this Apr 20, 2021
@shawaj shawaj deleted the raspi branch April 20, 2021 16:54
@shawaj
Copy link
Contributor Author

shawaj commented Apr 20, 2021

Thanks @madninja

Cc @ryanteck

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

Successfully merging this pull request may close these issues.

None yet

2 participants