diff options
| author | Raymond Danks <ray.danks@se-eng.com> | 2012-06-21 15:49:45 -0600 |
|---|---|---|
| committer | Raymond Danks <ray.danks@se-eng.com> | 2012-06-21 15:49:45 -0600 |
| commit | fb46a2bb6bfc520c2888e17a0fa3a92acd167859 (patch) | |
| tree | 9a5036e5b738d66aadcdf0314e02e13c327883f9 /recipes-extended/images | |
| parent | 9feac4f2a1907522806ba42a19091222b861159c (diff) | |
| download | meta-virtualization-fb46a2bb6bfc520c2888e17a0fa3a92acd167859.tar.gz | |
images/xen-image-minimal: Initial meta file for a minimal xen image.
Signed-off-by: Raymond Danks <ray.danks@se-eng.com>
Diffstat (limited to 'recipes-extended/images')
| -rw-r--r-- | recipes-extended/images/xen-bootimg.inc | 35 | ||||
| -rw-r--r-- | recipes-extended/images/xen-image-minimal.bb | 14 |
2 files changed, 49 insertions, 0 deletions
diff --git a/recipes-extended/images/xen-bootimg.inc b/recipes-extended/images/xen-bootimg.inc new file mode 100644 index 00000000..093aa683 --- /dev/null +++ b/recipes-extended/images/xen-bootimg.inc | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | SYSLINUX_TIMEOUT = "10" | ||
| 2 | SYSLINUX_LABEL = "boot" | ||
| 3 | SYSLINUX_XEN_APPEND = "dom0_mem=1048576" | ||
| 4 | SYSLINUX_KERNEL_APPEND = "ramdisk_size=32768 root=/dev/ram0 rw console=tty0 console=ttyS0,115200n8" | ||
| 5 | #LABELS_append = " ${SYSLINUX_LABEL} " | ||
| 6 | |||
| 7 | INITRD = "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.cpio.lzma" | ||
| 8 | |||
| 9 | do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs" | ||
| 10 | |||
| 11 | inherit bootimg | ||
| 12 | |||
| 13 | syslinux_populate_append() { | ||
| 14 | install -m 0444 ${STAGING_LIBDIR}/syslinux/mboot.c32 ${HDDDIR}${SYSLINUXDIR}/mboot.c32 | ||
| 15 | } | ||
| 16 | |||
| 17 | grubefi_populate_append() { | ||
| 18 | install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}${EFIDIR}/xen.gz | ||
| 19 | } | ||
| 20 | |||
| 21 | populate_append() { | ||
| 22 | install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}/xen.gz | ||
| 23 | } | ||
| 24 | |||
| 25 | build_syslinux_cfg() { | ||
| 26 | echo ALLOWOPTIONS 1 > ${SYSLINUXCFG} | ||
| 27 | echo SERIAL 0 115200 > ${SYSLINUXCFG} | ||
| 28 | echo DEFAULT ${SYSLINUX_LABEL} >> ${SYSLINUXCFG} | ||
| 29 | echo TIMEOUT ${SYSLINUX_TIMEOUT} >> ${SYSLINUXCFG} | ||
| 30 | echo PROMPT 1 >> ${SYSLINUXCFG} | ||
| 31 | echo LABEL ${SYSLINUX_LABEL} >> ${SYSLINUXCFG} | ||
| 32 | echo KERNEL mboot.c32 >> ${SYSLINUXCFG} | ||
| 33 | echo APPEND xen.gz ${SYSLINUX_XEN_APPEND} --- vmlinuz ${SYSLINUX_KERNEL_APPEND} --- initrd >> ${SYSLINUXCFG} | ||
| 34 | } | ||
| 35 | |||
diff --git a/recipes-extended/images/xen-image-minimal.bb b/recipes-extended/images/xen-image-minimal.bb new file mode 100644 index 00000000..f9e75d7a --- /dev/null +++ b/recipes-extended/images/xen-image-minimal.bb | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | DESCRIPTION = "A minimal xen image" | ||
| 2 | IMAGE_INSTALL = "task-core-boot xen-minimal dropbear mdadm" | ||
| 3 | |||
| 4 | IMAGE_LINGUAS = " " | ||
| 5 | LICENSE = "MIT" | ||
| 6 | |||
| 7 | inherit core-image | ||
| 8 | |||
| 9 | IMAGE_ROOTFS_SIZE = "8192" | ||
| 10 | |||
| 11 | # remove not needed ipkg informations | ||
| 12 | ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; " | ||
| 13 | |||
| 14 | require xen-bootimg.inc | ||
