NUC980 platform supports two Buildroot distributions based on Linux kernel 5.10: - MA35D1_Buildroot
- buildroot_2024 (newer version)
These two Buildroot versions use different OpenSSL versions: - MA35D1_Buildroot uses OpenSSL 1.1
- buildroot_2024 uses OpenSSL 3.2.1
On MA35D1_Buildroot, OpenSSL works correctly with either software-only computation or hardware acceleration. However, on buildroot_2024, enabling OpenSSL hardware acceleration causes runtime errors. This is because AF_ALG support is disabled in the OpenSSL build, resulting in the absence of afalg.so, which is required to interface with the NUC980 Crypto Engine.
Step-by-Step Fix for buildroot_20241. Enable OpenSSL and Engines in BuildrootLaunch menuconfig and ensure both OpenSSL binary and engine support are selected:
Navigate to:
Target packages ---> Libraries ---> Crypto ---> -*- openssl support ---> openssl binary and openssl additional engines
2. Patch OpenSSL Build to Enable AF_ALGOpen the OpenSSL build rule file: buildroot_2024/package/libopenssl/libopenssl.mk
Find line 86 and remove the no-afalgeng \ option. This enables the AF_ALG engine (afalg.so) during the build. 3. Rebuild OpenSSL$ make libopenssl-rebuild
4. Verify Output FilesConfirm the following files are generated: - buildroot_2024/output/target/usr/bin/openssl
- buildroot_2024/output/target/usr/lib/engines-3/afalg.so
5. Rebuild the Final Image$ make
You can now use OpenSSL on the NUC980 platform with or without hardware acceleration. Benchmark TestSoftware-only AES-128-CBC:
# openssl speed -evp aes-128-cbc -elapsed
Using NUC980 Crypto Engine (via afalg):
# openssl speed -evp aes-128-cbc -elapsed -engine afalg
This resolves the issue of missing AF_ALG hardware acceleration support in the newer Buildroot.
|