Skip to main content
Associate II
July 27, 2026
Question

Issue with yocto build with version openstlinux-6.6-yocto-scarthgap-mpu-v25 and v26 in building USB security feature

  • July 27, 2026
  • 0 replies
  • 38 views

Hi community,

I am using yocto build ( version - openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11) in this I am facing challenge over below build time error.

Exception: subprocess.CalledProcessError: Command 'tar --exclude=./sysroot-only -cf - -C .../linux-libc-headers/6.6/image -p -S . | tar -xf - -C .../linux-libc-headers/6.6/package' returned non-zero exit status 2. got *at() syscall for unknown directory, fd 4 unknown base path for fd 4, path include couldn't allocate absolute path for 'include'.

 

function package_prepare_pkgdata finished DEBUG: Executing python function perform_packagecopy ERROR: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:perform_packagecopy(d) 0003: File: '/home/datadir/EVK-build-CMS/layers/openembedded-core/meta/classes-global/package.bbclass', lineno: 363, function: perform_packagecopy 0359: rpath_replace (dvar, d) 0360:} 0361:perform_packagecopy[cleandirs] = "${PKGD}" 0362:perform_packagecopy[dirs] = "${PKGD}" *** 0363: 0364:python populate_packages () { 0365: oe.package.populate_packages(d) 0366:} 0367:populate_packages[dirs] = "${D}" File: '/usr/lib/python3.12/subprocess.py', lineno: 466, function: check_output 0462: else: 0463: empty = b'' 0464: kwargs['input'] = empty 0465: *** 0466: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, 0467: **kwargs).stdout 0468: 0469: 0470:class CompletedProcess(object): File: '/usr/lib/python3.12/subprocess.py', lineno: 571, function: run 0567: # We don't call process.wait() as .exit does that for us. 0568: raise 0569: retcode = process.poll() 0570: if check and retcode: *** 0571: raise CalledProcessError(retcode, process.args, 0572: output=stdout, stderr=stderr) 0573: return CompletedProcess(process.args, retcode, stdout, stderr) 0574: 0575: Exception: subprocess.CalledProcessError: Command 'tar --exclude=./sysroot-only -cf - -C /home/datadir/EVK-build-CMS/source/evk-build-glibc/work/cortexa35-ostl-linux/linux-libc-headers/6.6/image -p -S . | tar -xf - -C /home/datadir/EVK-build-CMS/source/evk-build-glibc/work/cortexa35-ostl-linux/linux-libc-headers/6.6/package' returned non-zero exit status 2.
Subprocess output: got *at() syscall for unknown directory, fd 4 unknown base path for fd 4, path include couldn't allocate absolute path for 'include'. tar: ./usr/include: Cannot mkdir: Bad address got *at() syscall for unknown directory, fd 4 unknown base path for fd 4, path include couldn't allocate absolute path for 'include'. got *at() syscall for unknown directory, fd 4 unknown base path for fd 4, path include couldn't allocate absolute path for 'include'. tar: ./usr/include: Cannot mkdir: Bad address tar: ./usr/include/video: Cannot mkdir: No such file or directory got *at() syscall for unknown directory, fd 4 unknown base path for fd 4, path include couldn't allocate absolute path for 'include'. tar: ./usr/include/video: Cannot mkdir: No such file or directory tar: ./usr/include/video/uvesafb.h: Cannot open: No such file or directory got *at() syscall for unknown directory, fd 4 unknown base path for fd 4, path include
 

 

I made configuration as below, 

# =============================================================================

# usb-mass-storage-only.cfg

# Layer 1 - Kernel Driver Restrictions (USB Security)

# Target: STM32MP257F-EV1 / linux-stm32mp (6.6, scarthgap)

#

# Purpose: compile-time exclusion of all non-mass-storage USB class drivers.

# Blocks BadUSB keyboard injection, malicious HID, USB network adapter attacks.

# =============================================================================

 

# --- Keep: USB Mass Storage path ---

CONFIG_USB=y

CONFIG_USB_STORAGE=y

CONFIG_USB_UAS=y

CONFIG_SCSI=y

CONFIG_BLK_DEV_SD=y

 

# --- Block: USB HID class (keyboards, mice, BadUSB HID injection) ---

# NOTE: CONFIG_HID itself is left untouched - I2C-HID / on-board input

# devices are a separate bus. Only the USB transport is removed.

# CONFIG_USB_HID is not set

# CONFIG_USB_HIDDEV is not set

# CONFIG_USB_KBD is not set

# CONFIG_USB_MOUSE is not set

 

# --- Block: USB networking / tethering / RNDIS class drivers ---

# CONFIG_USB_USBNET is not set

# CONFIG_USB_NET_CDCETHER is not set

# CONFIG_USB_NET_CDC_EEM is not set

# CONFIG_USB_NET_CDC_NCM is not set

# CONFIG_USB_NET_CDC_MBIM is not set

# CONFIG_USB_NET_CDC_SUBSET is not set

# CONFIG_USB_NET_RNDIS_HOST is not set

# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set

# CONFIG_USB_NET_AX8817X is not set

# CONFIG_USB_NET_AX88179_178A is not set

# CONFIG_USB_RTL8150 is not set

# CONFIG_USB_RTL8152 is not set

# CONFIG_USB_LAN78XX is not set

# CONFIG_USB_IPHETH is not set

 

# --- Block: other non-storage USB device classes (optional hardening) ---

# CONFIG_USB_SERIAL is not set

# CONFIG_USB_ACM is not set

# CONFIG_USB_PRINTER is not set

 

 

my intend is to accept only USB mass storage , it should block manual insert module related to USB , in this case I am facing above build time error . 

 

I tried with latest yocto build release from st version as follows ( openstlinux-6.6-yocto-scarthgap-mpu-v26.06.10), i am facing below error .

| checking for getpgrp... yes | checking if getpgrp accepts zero args... yes | checking for openssl... /home/datadir/EVK-build-CMS/build/tmp-glibc/work/x86_64-linux/openssh-native/9.6p1/recipe-sysroot-native/usr/bin/openssl | checking for openssl/opensslv.h... yes | checking OpenSSL header version... 30500050 (OpenSSL 3.5.5 27 Jan 2026) | checking for OpenSSL_version... yes | checking for OpenSSL_version_num... yes | checking OpenSSL library version... configure: error: Unknown/unsupported OpenSSL version ("30500050 (OpenSSL 3.5.5 27 Jan 2026)") | NOTE: The following config.log files may provide further information. | NOTE: /home/datadir/EVK-build-CMS/build/tmp-glibc/work/x86_64-linux/openssh-native/9.6p1/openssh-9.6p1/config.log | ERROR: configure failed | WARNING: exit code 1 from a shell command. ERROR: Task (virtual:native:/home/datadir/EVK-build-CMS/layers/openembedded-core/meta/recipes-connectivity/openssh/openssh_9.6p1.bb:do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 236 tasks of which 225 didn't need to be rerun and 1 failed. NOTE: Writing buildhistory NOTE: Writing buildhistory took: 3 seconds Summary: 1 task failed: virtual:native:/home/datadir/EVK-build-CMS/layers/openembedded-core/meta/recipes-connectivity/openssh/openssh_9.6p1.bb:do_configure log: /home/datadir/EVK-build-CMS/build/tmp-glibc/work/x86_64-linux/openssh-native/9.6p1/temp/log.do_configure.181437 Summary: There were 2 ERROR messages, returning a non-zero exit code.

 

I would really appreciate if anyone help me on this ?