diff options
Diffstat (limited to 'meta/classes/bootimg.bbclass')
| -rw-r--r-- | meta/classes/bootimg.bbclass | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass index a717600cf9..1d1a3d04af 100644 --- a/meta/classes/bootimg.bbclass +++ b/meta/classes/bootimg.bbclass | |||
| @@ -8,13 +8,13 @@ | |||
| 8 | # End result is two things: | 8 | # End result is two things: |
| 9 | # | 9 | # |
| 10 | # 1. A .hddimg file which is an msdos filesystem containing syslinux, a kernel, | 10 | # 1. A .hddimg file which is an msdos filesystem containing syslinux, a kernel, |
| 11 | # an initrd and a rootfs image. These can be written to harddisks directly and | 11 | # an initrd and a rootfs image. These can be written to harddisks directly and |
| 12 | # also booted on USB flash disks (write them there with dd). | 12 | # also booted on USB flash disks (write them there with dd). |
| 13 | # | 13 | # |
| 14 | # 2. A CD .iso image | 14 | # 2. A CD .iso image |
| 15 | 15 | ||
| 16 | # Boot process is that the initrd will boot and process which label was selected | 16 | # Boot process is that the initrd will boot and process which label was selected |
| 17 | # in syslinux. Actions based on the label are then performed (e.g. installing to | 17 | # in syslinux. Actions based on the label are then performed (e.g. installing to |
| 18 | # an hdd) | 18 | # an hdd) |
| 19 | 19 | ||
| 20 | # External variables (also used by syslinux.bbclass) | 20 | # External variables (also used by syslinux.bbclass) |
| @@ -29,8 +29,8 @@ do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \ | |||
| 29 | PACKAGES = " " | 29 | PACKAGES = " " |
| 30 | EXCLUDE_FROM_WORLD = "1" | 30 | EXCLUDE_FROM_WORLD = "1" |
| 31 | 31 | ||
| 32 | HDDDIR = "${S}/hdd/boot" | 32 | HDDDIR = "${S}/hddimg" |
| 33 | ISODIR = "${S}/cd" | 33 | ISODIR = "${S}/iso" |
| 34 | 34 | ||
| 35 | BOOTIMG_VOLUME_ID ?= "boot" | 35 | BOOTIMG_VOLUME_ID ?= "boot" |
| 36 | BOOTIMG_EXTRA_SPACE ?= "512" | 36 | BOOTIMG_EXTRA_SPACE ?= "512" |
| @@ -58,6 +58,22 @@ PCBIOS_CLASS = ${@pcbios_class(d)} | |||
| 58 | inherit ${PCBIOS_CLASS} | 58 | inherit ${PCBIOS_CLASS} |
| 59 | inherit ${EFI_CLASS} | 59 | inherit ${EFI_CLASS} |
| 60 | 60 | ||
| 61 | populate() { | ||
| 62 | DEST=$1 | ||
| 63 | install -d ${DEST} | ||
| 64 | |||
| 65 | # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use. | ||
| 66 | install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage ${DEST}/vmlinuz | ||
| 67 | |||
| 68 | if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then | ||
| 69 | install -m 0644 ${INITRD} ${DEST}/initrd | ||
| 70 | fi | ||
| 71 | |||
| 72 | if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then | ||
| 73 | install -m 0644 ${ROOTFS} ${DEST}/rootfs.img | ||
| 74 | fi | ||
| 75 | |||
| 76 | } | ||
| 61 | 77 | ||
| 62 | build_iso() { | 78 | build_iso() { |
| 63 | # Only create an ISO if we have an INITRD and NOISO was not set | 79 | # Only create an ISO if we have an INITRD and NOISO was not set |
| @@ -66,7 +82,7 @@ build_iso() { | |||
| 66 | return | 82 | return |
| 67 | fi | 83 | fi |
| 68 | 84 | ||
| 69 | install -d ${ISODIR} | 85 | populate ${ISODIR} |
| 70 | 86 | ||
| 71 | if [ "${PCBIOS}" = "1" ]; then | 87 | if [ "${PCBIOS}" = "1" ]; then |
| 72 | syslinux_iso_populate | 88 | syslinux_iso_populate |
| @@ -95,7 +111,8 @@ build_iso() { | |||
| 95 | build_hddimg() { | 111 | build_hddimg() { |
| 96 | # Create an HDD image | 112 | # Create an HDD image |
| 97 | if [ "${NOHDD}" != "1" ] ; then | 113 | if [ "${NOHDD}" != "1" ] ; then |
| 98 | install -d ${HDDDIR} | 114 | populate ${HDDDIR} |
| 115 | |||
| 99 | if [ "${PCBIOS}" = "1" ]; then | 116 | if [ "${PCBIOS}" = "1" ]; then |
| 100 | syslinux_hddimg_populate | 117 | syslinux_hddimg_populate |
| 101 | fi | 118 | fi |
