-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Issue Report: rpi-splash-screen layer fails when /tmp is a tmpfs mount
Repository: raspberrypi/rpi-image-gen
Component: layer/rpi/device/splash-screen
Description
The rpi-splash-screen layer fails to configure the splash image in build environments where mmdebstrap or the container runtime mounts a tmpfs filesystem over /tmp inside the chroot.
The build fails with:
Error: Splash image file not found
Root Cause
The splash-screen.yaml hook currently uses /tmp as a staging area to transfer the splash image from the Host to the Guest (Chroot):
# splash-screen.yaml
TEMP_IMAGE="/tmp/splash-screen-source.tga"
cp "$SPLASH_IMAGE" "$1$TEMP_IMAGE" # Copies to the underlying backing store of /tmpHowever, when configure-splash runs inside the chroot:
chroot $1 /usr/bin/configure-splash ... $TEMP_IMAGEIf /tmp is mounted as tmpfs (which is standard behavior for mmdebstrap and many containerized builds), the configure-splash process sees an empty RAM disk instead of the file that was copied to the underlying disk. The file is effectively "masked".
Suggested Fix
Avoid using /tmp for transferring files across the chroot boundary, as its persistence guarantees are weak in chroot/container environments.
Instead, stage the file in the root directory (/) or another persistent location (like /opt), and ensure it is removed after configuration.
Proposed Patch (splash-screen.yaml):
- TEMP_IMAGE="/tmp/splash-screen-source.tga"
+ TEMP_IMAGE="/splash-screen-source.tga"
cp "$SPLASH_IMAGE" "$1$TEMP_IMAGE"
```
This ensures the file lands on the root filesystem, which is visible to the chroot process regardless of mount points.