blob: 26b6d0654c95faf879b30c4bea05ef0b2e121246 [file] [log] [blame]
Patrick Williamsd849ec72016-08-17 14:59:38 -05001DESCRIPTION = "A minimal xen image"
2
3INITRD_IMAGE = "core-image-minimal-initramfs"
4
5IMAGE_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
19LICENSE = "MIT"
20
21inherit core-image
22
23syslinux_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
28syslinux_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
33grubefi_populate_append() {
34 install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}${EFIDIR}/xen.gz
35}
36
37populate_append() {
38 install -m 0644 ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.gz ${DEST}/xen.gz
39}
40
41SYSLINUX_XEN_ARGS ?= "loglvl=all guest_loglvl=all console=com1,vga com1=115200,8n1"
42SYSLINUX_KERNEL_ARGS ?= "ramdisk_size=32768 root=/dev/ram0 rw console=hvc0 earlyprintk=xen console=tty0 panic=10 LABEL=boot debugshell=5"
43
44build_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