找回密码
 立即注册

QQ登录

只需一步,快速开始

打印 上一主题 下一主题
开启左侧

[NUC980] Enabling OpenSSL Hardware Acceleration on NUC980 with Buildroot 2024

[复制链接]
跳转到指定楼层
楼主
admin 发表于 昨天 13:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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 Buildroot

Launch 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_ALG

    Open 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 Files

    Confirm 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 Test

    Software-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.








  • 分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏 顶 踩
    牛卧堂
    回复

    使用道具 举报

    高级模式
    B Color Image Link Quote Code Smilies |上传

    本版积分规则

    新唐MCU