* [PATCH] Avoid name collisions of deployed kernels and initrds
@ 2018-03-26 7:01 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2018-03-26 7:01 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 2515 bytes --]
From: Jan Kiszka <jan.kiszka@siemens.com>
While distro kernels tend to have individualizing version names, this
need not be the case for custom kernels. If we deploy them as is into
the common image folder, they can easily overwrite each other when
building images for different distro-machine tuples.
Avoid this by appending <distro>-<machine> to the deployed image names.
Take this into account when using the images in the start_vm script.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/image.bbclass | 4 ++--
scripts/start_vm | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2c255f4..3c73ae3 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -31,12 +31,12 @@ do_rootfs[deptask] = "do_deploy_deb"
do_copy_boot_files() {
KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')}
if [ -n "${KERNEL_IMAGE}" ]; then
- cp -f ${IMAGE_ROOTFS}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
+ cp -f ${IMAGE_ROOTFS}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}_${DISTRO}-${MACHINE}
fi
INITRD_IMAGE=${@get_image_name(d, 'initrd.img')}
if [ -n "${INITRD_IMAGE}" ]; then
- sudo cp -f ${IMAGE_ROOTFS}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
+ sudo cp -f ${IMAGE_ROOTFS}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}_${DISTRO}-${MACHINE}
fi
}
diff --git a/scripts/start_vm b/scripts/start_vm
index 0717193..98fc463 100755
--- a/scripts/start_vm
+++ b/scripts/start_vm
@@ -25,8 +25,8 @@ qemu-system-$QEMU_ARCH \\\\\n\
-M $QEMU_MACHINE \\\\\n\
$QCPU\\\\\n\
-nographic \\\\\n\
- -kernel \$IMAGE_DIR/$KERNEL_IMAGE \\\\\n\
- -initrd \$IMAGE_DIR/$INITRD_IMAGE \\\\\n\
+ -kernel \$IMAGE_DIR/${KERNEL_IMAGE}_debian-$DISTRO-qemu$ARCH \\\\\n\
+ -initrd \$IMAGE_DIR/${INITRD_IMAGE}_debian-$DISTRO-qemu$ARCH \\\\\n\
-append \"console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw\" \\\\\n\
$EXTRA_ARGS \\\\\n\
$root1"
@@ -38,8 +38,8 @@ qemu-system-$QEMU_ARCH \\\\\n\
-M $QEMU_MACHINE \
$QCPU \
-nographic \
- -kernel $IMAGE_DIR/$KERNEL_IMAGE \
- -initrd $IMAGE_DIR/$INITRD_IMAGE \
+ -kernel $IMAGE_DIR/${KERNEL_IMAGE}_debian-$DISTRO-qemu$ARCH \
+ -initrd $IMAGE_DIR/${INITRD_IMAGE}_debian-$DISTRO-qemu$ARCH \
-append "console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw" \
$EXTRA_ARGS \
$root2
--
2.13.6
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-26 7:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26 7:01 [PATCH] Avoid name collisions of deployed kernels and initrds Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox