Skip to content

Instantly share code, notes, and snippets.

@evadeflow
Created August 2, 2017 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evadeflow/d6796747e28d07bb34d18a0b4c13bb5e to your computer and use it in GitHub Desktop.
Save evadeflow/d6796747e28d07bb34d18a0b4c13bb5e to your computer and use it in GitHub Desktop.
Flawed attempt to inject one image file into another
stuff_ramfs_into_rootfs() {
mkdir mnt-dom0
mount -o loop ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ext4 mnt-dom0
cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz mnt-dom0/boot/dom0.cpio.gz
sync
umount mnt-dom0
rmdir mnt-dom0
}
IMAGE_POSTPROCESS_COMMAND += "stuff_ramfs_into_rootfs; "
The above gives this error:
| DEBUG: Executing shell function stuff_ramfs_into_rootfs
| mount: mnt-dom0: mount failed: Unknown error -1
| WARNING: exit code 32 from a shell command.
If I add sudo to the mount/unmount commands, I get this instead:
| DEBUG: Executing shell function stuff_ramfs_into_rootfs
| ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
| mount: could not find any free loop device
| WARNING: exit code 2 from a shell command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment