2025-05-30 2:58 AM
Dear Support Team,
I am using the STM32MP257f-ev1 board. While the Starter Package boots Linux successfully, when I build the kernel using the Developer Package and copy the generated Image.gz, dtb, and lib/modules, the system reaches U-Boot but fails to boot the Linux kernel with the following error:
```
root '/dev/disk/by-partuuid/e91c4e10-16e6-4c0e-bd0e-77becf4a3582' doesn't exist.
```
I followed the official wiki instructions here:
[https://wiki.stmicroelectronics.cn/stm32mpu/wiki/STM32MPU\_Developer\_Package](https://wiki.stmicroelectronics.cn/stm32mpu/wiki/STM32MPU_Developer_Package)
using kernel version 6.6.48.
I have some questions:
1. The official README suggests running
```
make O="${OUTPUT_BUILD_DIR}" defconfig fragment*.config
```
but when I try this, zsh returns the error:
```
zsh: no matches found: fragment*.config
```
Therefore, I only ran
```
make O="${OUTPUT_BUILD_DIR}" defconfig
```
to proceed. Could this be the reason for the root partition recognition failure?
2. How should the fragment\*.config files in the Developer Package be correctly applied?
If they are not applied, will that affect the kernel’s ability to recognize the root partition?
3. Simply copying the Starter Package’s kernel, dtb, and modules into the Developer Package environment does not result in a successful boot.
Are there any important differences or precautions to be aware of when building with the Developer Package to ensure proper boot and root partition recognition?
I would greatly appreciate your guidance on these points. Thank you very much for your support.
Here is the script I created based on the instructions in the README.
#!/bin/bash
set -e
# Path settings
OUTPUT_BUILD_DIR="$(pwd)/../build"
INSTALL_DIR="${OUTPUT_BUILD_DIR}/install_artifact"
ARCH="arm64" # Change to 'arm' if needed
# Step 0: Clean and recreate build directory
if [ -d "${OUTPUT_BUILD_DIR}" ]; then
echo "Cleaning existing build directory: ${OUTPUT_BUILD_DIR}"
rm -rf "${OUTPUT_BUILD_DIR:?}"/*
else
echo "Creating build directory: ${OUTPUT_BUILD_DIR}"
fi
mkdir -p "${OUTPUT_BUILD_DIR}"
mkdir -p "${INSTALL_DIR}/boot/"
# Step 1: Run defconfig
echo "Running defconfig..."
make O="${OUTPUT_BUILD_DIR}" defconfig
# Step 2: Merge custom config fragments
echo "Merging config fragments..."
scripts/kconfig/merge_config.sh -m -r -O "${OUTPUT_BUILD_DIR}" \
"${OUTPUT_BUILD_DIR}/.config" \
../fragment-03-systemd.config \
../fragment-04-modules.config
# Step 3: Run oldconfig (non-interactive)
echo "Running oldconfig..."
yes '' | make oldconfig O="${OUTPUT_BUILD_DIR}"
# Step 4: Build kernel, modules, and device trees
echo "Building kernel, vmlinux, dtbs..."
IMG_TARGET="Image.gz"
export IMAGE_KERNEL="${IMG_TARGET}"
make -j$(nproc) ${IMAGE_KERNEL} vmlinux dtbs LOADADDR=0xC2000040 O="${OUTPUT_BUILD_DIR}"
make -j$(nproc) modules O="${OUTPUT_BUILD_DIR}"
# Step 5: Install modules
echo "Installing modules..."
make INSTALL_MOD_PATH="${INSTALL_DIR}" modules_install O="${OUTPUT_BUILD_DIR}"
# Step 6: Copy Image and DTBs
echo "Copying Image and DTBs..."
cp "${OUTPUT_BUILD_DIR}/arch/${ARCH}/boot/${IMAGE_KERNEL}" "${INSTALL_DIR}/boot/"
find "${OUTPUT_BUILD_DIR}/arch/${ARCH}/boot/dts/" -name 'st*.dtb' -exec cp '{}' "${INSTALL_DIR}/boot/" \;