1+ diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
2+ index 31b4bd9afd..0c304f62e1 100644
3+ --- a/meta/classes-recipe/rust-target-config.bbclass
4+ +++ b/meta/classes-recipe/rust-target-config.bbclass
5+ @@ -127,7 +127,7 @@ def llvm_features(d):
6+ llvm_features[vardepvalue] = "${@llvm_features(d)}"
7+
8+ ## arm-unknown-linux-gnueabihf
9+ - DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
10+ + DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
11+ TARGET_ENDIAN[arm-eabi] = "little"
12+ TARGET_POINTER_WIDTH[arm-eabi] = "32"
13+ TARGET_C_INT_WIDTH[arm-eabi] = "32"
14+ @@ -135,7 +135,7 @@ MAX_ATOMIC_WIDTH[arm-eabi] = "64"
15+ FEATURES[arm-eabi] = "+v6,+vfp2"
16+
17+ ## armv7-unknown-linux-gnueabihf
18+ - DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
19+ + DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
20+ TARGET_ENDIAN[armv7-eabi] = "little"
21+ TARGET_POINTER_WIDTH[armv7-eabi] = "32"
22+ TARGET_C_INT_WIDTH[armv7-eabi] = "32"
23+ @@ -143,14 +143,14 @@ MAX_ATOMIC_WIDTH[armv7-eabi] = "64"
24+ FEATURES[armv7-eabi] = "+v7,+vfp2,+thumb2"
25+
26+ ## aarch64-unknown-linux-{gnu, musl}
27+ - DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
28+ + DATA_LAYOUT[aarch64] = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
29+ TARGET_ENDIAN[aarch64] = "little"
30+ TARGET_POINTER_WIDTH[aarch64] = "64"
31+ TARGET_C_INT_WIDTH[aarch64] = "32"
32+ MAX_ATOMIC_WIDTH[aarch64] = "128"
33+
34+ ## x86_64-unknown-linux-{gnu, musl}
35+ - DATA_LAYOUT[x86_64] = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
36+ + DATA_LAYOUT[x86_64] = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
37+ TARGET_ENDIAN[x86_64] = "little"
38+ TARGET_POINTER_WIDTH[x86_64] = "64"
39+ TARGET_C_INT_WIDTH[x86_64] = "32"
40+ @@ -397,6 +397,15 @@ def rust_gen_target(d, thing, wd, arch):
41+ tspec['position-independent-executables'] = True
42+ tspec['panic-strategy'] = d.getVar("RUST_PANIC_STRATEGY")
43+
44+ + # fix for: "Error loading target specification: ARM targets must set `llvm-floatabi` to `hard` or `soft`."
45+ + if "arm" in tspec['arch']:
46+ + tspec['llvm-floatabi'] = d.getVar('TARGET_FPU')
47+ +
48+ + # Convert width fields from strings to integers for Rust 1.93+
49+ + for field in ['target-pointer-width', 'target-c-int-width', 'max-atomic-width']:
50+ + if field in tspec and isinstance(tspec[field], str):
51+ + tspec[field] = int(tspec[field])
52+ +
53+ # write out the target spec json file
54+ with open(wd + rustsys + '.json', 'w') as f:
55+ json.dump(tspec, f, indent=4)
56+ @@ -404,7 +413,7 @@ def rust_gen_target(d, thing, wd, arch):
57+ # These are accounted for in tmpdir path names so don't need to be in the task sig
58+ rust_gen_target[vardepsexclude] += "ABIEXTENSION llvm_cpu"
59+
60+ - do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES"
61+ + do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES LLVM_TARGET"
62+
63+ RUST_TARGETS_DIR = "${WORKDIR}/rust-targets/"
64+ export RUST_TARGET_PATH = "${RUST_TARGETS_DIR}"
65+ diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
66+ index 4d09619a28..495f51b602 100644
67+ --- a/meta/conf/layer.conf
68+ +++ b/meta/conf/layer.conf
69+ @@ -133,3 +133,5 @@ PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' != '' else ''}${HOSTTOOLS_DIR}
70+ BB_GLOBAL_PYMODULES = "os sys time"
71+
72+ addpylib ${LAYERDIR}/lib oe
73+ +
74+ + LAYERDIR_core = "${LAYERDIR}"
175diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
2- index 7cc5131541..4e899200f1 100644
76+ index 37d07093f5..7a63453f2e 100644
377--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
478+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
579@@ -297,113 +297,17 @@ class BootimgEFIPlugin(SourcePlugin):
6-
80+
781 hdddir = "%s/hdd/boot" % cr_workdir
8-
82+
983- kernel = get_bitbake_var("KERNEL_IMAGETYPE")
1084- if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
1185- if get_bitbake_var("INITRAMFS_IMAGE"):
@@ -124,7 +198,7 @@ index 7cc5131541..4e899200f1 100644
124198+ for grub_efi_sb_file in grub_efi_sb_files:
125199+ efi_install_cmd = "install -m 0644 -D %s/%s %s/EFI/BOOT/%s" % (deploy_dir_img, grub_efi_sb_file, hdddir, grub_efi_sb_file)
126200+ exec_cmd(efi_install_cmd)
127-
201+
128202 if get_bitbake_var("IMAGE_EFI_BOOT_FILES"):
129203 for src_path, dst_path in cls.install_task:
130204diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
@@ -133,7 +207,7 @@ index efbf2610f9..330c964f87 100644
133207+++ b/meta/conf/layer.conf
134208@@ -132,3 +132,5 @@ PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' != '' else ''}${HOSTTOOLS_DIR}
135209 BB_GLOBAL_PYMODULES = "os sys time"
136-
210+
137211 addpylib ${LAYERDIR}/lib oe
138212+
139213+ LAYERDIR_core = "${LAYERDIR}"
@@ -143,7 +217,7 @@ index 31b4bd9afd..0c304f62e1 100644
143217+++ b/meta/classes-recipe/rust-target-config.bbclass
144218@@ -127,7 +127,7 @@ def llvm_features(d):
145219 llvm_features[vardepvalue] = "${@llvm_features(d)}"
146-
220+
147221 ## arm-unknown-linux-gnueabihf
148222- DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
149223+ DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
@@ -152,7 +226,7 @@ index 31b4bd9afd..0c304f62e1 100644
152226 TARGET_C_INT_WIDTH[arm-eabi] = "32"
153227@@ -135,7 +135,7 @@ MAX_ATOMIC_WIDTH[arm-eabi] = "64"
154228 FEATURES[arm-eabi] = "+v6,+vfp2"
155-
229+
156230 ## armv7-unknown-linux-gnueabihf
157231- DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
158232+ DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
@@ -161,15 +235,15 @@ index 31b4bd9afd..0c304f62e1 100644
161235 TARGET_C_INT_WIDTH[armv7-eabi] = "32"
162236@@ -143,14 +143,14 @@ MAX_ATOMIC_WIDTH[armv7-eabi] = "64"
163237 FEATURES[armv7-eabi] = "+v7,+vfp2,+thumb2"
164-
238+
165239 ## aarch64-unknown-linux-{gnu, musl}
166240- DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
167241+ DATA_LAYOUT[aarch64] = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
168242 TARGET_ENDIAN[aarch64] = "little"
169243 TARGET_POINTER_WIDTH[aarch64] = "64"
170244 TARGET_C_INT_WIDTH[aarch64] = "32"
171245 MAX_ATOMIC_WIDTH[aarch64] = "128"
172-
246+
173247 ## x86_64-unknown-linux-{gnu, musl}
174248- DATA_LAYOUT[x86_64] = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
175249+ DATA_LAYOUT[x86_64] = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
@@ -179,7 +253,7 @@ index 31b4bd9afd..0c304f62e1 100644
179253@@ -397,6 +397,15 @@ def rust_gen_target(d, thing, wd, arch):
180254 tspec['position-independent-executables'] = True
181255 tspec['panic-strategy'] = d.getVar("RUST_PANIC_STRATEGY")
182-
256+
183257+ # fix for: "Error loading target specification: ARM targets must set `llvm-floatabi` to `hard` or `soft`."
184258+ if "arm" in tspec['arch']:
185259+ tspec['llvm-floatabi'] = d.getVar('TARGET_FPU')
@@ -195,9 +269,9 @@ index 31b4bd9afd..0c304f62e1 100644
195269@@ -404,7 +413,7 @@ def rust_gen_target(d, thing, wd, arch):
196270 # These are accounted for in tmpdir path names so don't need to be in the task sig
197271 rust_gen_target[vardepsexclude] += "ABIEXTENSION llvm_cpu"
198-
272+
199273- do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES"
200274+ do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES LLVM_TARGET"
201-
275+
202276 RUST_TARGETS_DIR = "${WORKDIR}/rust-targets/"
203277 export RUST_TARGET_PATH = "${RUST_TARGETS_DIR}"
0 commit comments