Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame^] | 1 | DESCRIPTION = "A minimal xen image" |
| 2 | |
| 3 | INITRD_IMAGE = "core-image-minimal-initramfs" |
| 4 | |
| 5 | IMAGE_INSTALL += " \ |
| 6 | packagegroup-core-boot \ |
| 7 | packagegroup-core-ssh-openssh \ |
| 8 | ${@bb.utils.contains('MACHINE_FEATURES', 'acpi', 'kernel-module-xen-acpi-processor', '', d)} \ |
| 9 | kernel-module-xen-blkback \ |
| 10 | kernel-module-xen-gntalloc \ |
| 11 | kernel-module-xen-gntdev \ |
| 12 | kernel-module-xen-netback \ |
| 13 | ${@bb.utils.contains('MACHINE_FEATURES', 'pci', 'kernel-module-xen-pciback', '', d)} \ |
| 14 | kernel-module-xen-wdt \ |
| 15 | xen-base \ |
| 16 | qemu \ |
| 17 | " |
| 18 | |
| 19 | LICENSE = "MIT" |
| 20 | |
| 21 | inherit core-image |
| 22 | |
| 23 | syslinux_iso_populate_append() { |
| 24 | install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${ISODIR}${ISOLINUXDIR} |
| 25 | install -m 0444 ${STAGING_DATADIR}/syslinux/mboot.c32 ${ISODIR}${ISOLINUXDIR} |
| 26 | } |
| 27 | |
| 28 | syslinux_hddimg_populate_append() { |
| 29 | install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${HDDDIR}${SYSLINUXDIR} |
| 30 | install -m 0444 ${STAGING_DATADIR}/syslinux/mboot.c32 ${HDDDIR}${SYSLINUXDIR} |
| 31 | } |
| 32 | |
| 33 | grubefi_populate_append() { |
| 34 | install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}${EFIDIR}/xen.gz |
| 35 | } |
| 36 | |
| 37 | populate_append() { |
| 38 | install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}/xen.gz |
| 39 | } |
| 40 | |
| 41 | SYSLINUX_XEN_ARGS ?= "loglvl=all guest_loglvl=all console=com1,vga com1=115200,8n1" |
| 42 | SYSLINUX_KERNEL_ARGS ?= "ramdisk_size=32768 root=/dev/ram0 rw console=hvc0 earlyprintk=xen console=tty0 panic=10 LABEL=boot debugshell=5" |
| 43 | |
| 44 | build_syslinux_cfg () { |
| 45 | echo "ALLOWOPTIONS 1" > ${SYSLINUXCFG} |
| 46 | echo "DEFAULT boot" >> ${SYSLINUXCFG} |
| 47 | echo "TIMEOUT 10" >> ${SYSLINUXCFG} |
| 48 | echo "PROMPT 1" >> ${SYSLINUXCFG} |
| 49 | echo "LABEL boot" >> ${SYSLINUXCFG} |
| 50 | echo " KERNEL mboot.c32" >> ${SYSLINUXCFG} |
| 51 | echo " APPEND /xen.gz ${SYSLINUX_XEN_ARGS} --- /vmlinuz ${SYSLINUX_KERNEL_ARGS} --- /initrd" >> ${SYSLINUXCFG} |
| 52 | } |
| 53 | |