Skip to content

Commit a377f28

Browse files
authored
Merge pull request #243 from LedgerHQ/y333/patch_for_nanos_build
Emergency patch for building Nano S apps
2 parents 552a800 + a54165f commit a377f28

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ledger_device_sdk/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ledger_device_sdk"
3-
version = "1.21.0"
3+
version = "1.21.1"
44
authors = ["yhql", "yogh333", "agrojean-ledger", "kingofpayne"]
55
edition = "2021"
66
license.workspace = true
@@ -21,7 +21,7 @@ rand_core = { version = "0.6.3", default-features = false }
2121
zeroize = { version = "1.6.0", default-features = false }
2222
numtoa = "0.2.4"
2323
const-zero = "0.1.1"
24-
ledger_secure_sdk_sys = { path = "../ledger_secure_sdk_sys", version = "1.7.0" }
24+
ledger_secure_sdk_sys = { path = "../ledger_secure_sdk_sys", version = "1.7.1" }
2525

2626
[features]
2727
debug = []

ledger_secure_sdk_sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ledger_secure_sdk_sys"
3-
version = "1.7.0"
3+
version = "1.7.1"
44
authors = ["yhql", "agrojean-ledger", "yogh333"]
55
edition = "2021"
66
license.workspace = true

ledger_secure_sdk_sys/build.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,13 @@ impl SDKBuilder<'_> {
204204
name: DeviceName::NanoS,
205205
c_sdk: Default::default(),
206206
target: "thumbv6m-none-eabi",
207-
defines: header2define("csdk_nanos.h"),
207+
defines: {
208+
let mut v = header2define("csdk_nanos.h");
209+
println!("cargo:warning=BAGL is built");
210+
println!("cargo:rustc-env=C_SDK_GRAPHICS={}", "bagl");
211+
v.push((String::from("HAVE_BAGL"), None));
212+
v
213+
},
208214
cflags: Vec::from(CFLAGS_NANOS),
209215
glyphs_folders: Vec::new(),
210216
arm_libs: Default::default(),
@@ -468,7 +474,9 @@ impl SDKBuilder<'_> {
468474
let path = self.device.arm_libs.clone();
469475
println!("cargo:rustc-link-lib=c");
470476
println!("cargo:rustc-link-lib=m");
471-
println!("cargo:rustc-link-lib=gcc");
477+
if self.device.name != DeviceName::NanoS {
478+
println!("cargo:rustc-link-lib=gcc");
479+
}
472480
println!("cargo:rustc-link-search={path}");
473481
Ok(())
474482
}

0 commit comments

Comments
 (0)