summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/boot-directdisk.bbclass13
-rw-r--r--meta/classes/bootimg.bbclass27
-rw-r--r--meta/classes/grub-efi.bbclass2
-rw-r--r--meta/classes/syslinux.bbclass2
4 files changed, 34 insertions, 10 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 0da9932f4f..995d3e7fc6 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -71,10 +71,17 @@ boot_direct_populate() {
71 # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use. 71 # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
72 install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $dest/vmlinuz 72 install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $dest/vmlinuz
73 73
74 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then 74 # initrd is made of concatenation of multiple filesystem images
75 install -m 0644 ${INITRD} $dest/initrd 75 if [ -n "${INITRD}" ]; then
76 rm -f $dest/initrd
77 for fs in ${INITRD}
78 do
79 if [ -n "${fs}" ] && [ -s "${fs}" ]; then
80 cat ${fs} >> $dest/initrd
81 fi
82 done
83 chmod 0644 $dest/initrd
76 fi 84 fi
77
78} 85}
79 86
80build_boot_dd() { 87build_boot_dd() {
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index d52aacea81..7b3ce65910 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -18,7 +18,7 @@
18# an hdd) 18# an hdd)
19 19
20# External variables (also used by syslinux.bbclass) 20# External variables (also used by syslinux.bbclass)
21# ${INITRD} - indicates a filesystem image to use as an initrd (optional) 21# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
22# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1 22# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
23# ${NOISO} - skip building the ISO image if set to 1 23# ${NOISO} - skip building the ISO image if set to 1
24# ${NOHDD} - skip building the HDD image if set to 1 24# ${NOHDD} - skip building the HDD image if set to 1
@@ -67,9 +67,17 @@ populate() {
67 67
68 # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use. 68 # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
69 install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${DEST}/vmlinuz 69 install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${DEST}/vmlinuz
70 70
71 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then 71 # initrd is made of concatenation of multiple filesystem images
72 install -m 0644 ${INITRD} ${DEST}/initrd 72 if [ -n "${INITRD}" ]; then
73 rm -f ${DEST}/initrd
74 for fs in ${INITRD}
75 do
76 if [ -s "${fs}" ]; then
77 cat ${fs} >> ${DEST}/initrd
78 fi
79 done
80 chmod 0644 ${DEST}/initrd
73 fi 81 fi
74 82
75 if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then 83 if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
@@ -80,10 +88,19 @@ populate() {
80 88
81build_iso() { 89build_iso() {
82 # Only create an ISO if we have an INITRD and NOISO was not set 90 # Only create an ISO if we have an INITRD and NOISO was not set
83 if [ -z "${INITRD}" ] || [ ! -s "${INITRD}" ] || [ "${NOISO}" = "1" ]; then 91 if [ -z "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
84 bbnote "ISO image will not be created." 92 bbnote "ISO image will not be created."
85 return 93 return
86 fi 94 fi
95 # ${INITRD} is a list of multiple filesystem images
96 for fs in ${INITRD}
97 do
98 if [ ! -s "${fs}" ]; then
99 bbnote "ISO image will not be created. ${fs} is invalid."
100 return
101 fi
102 done
103
87 104
88 populate ${ISODIR} 105 populate ${ISODIR}
89 106
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 505d032cc8..47bd35e049 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -7,7 +7,7 @@
7# Provide grub-efi specific functions for building bootable images. 7# Provide grub-efi specific functions for building bootable images.
8 8
9# External variables 9# External variables
10# ${INITRD} - indicates a filesystem image to use as an initrd (optional) 10# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
11# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional) 11# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
12# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu 12# ${GRUB_GFXSERIAL} - set this to 1 to have graphics and serial in the boot menu
13# ${LABELS} - a list of targets for the automatic config 13# ${LABELS} - a list of targets for the automatic config
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index b9701bf237..d6498d98bb 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -5,7 +5,7 @@
5# Provide syslinux specific functions for building bootable images. 5# Provide syslinux specific functions for building bootable images.
6 6
7# External variables 7# External variables
8# ${INITRD} - indicates a filesystem image to use as an initrd (optional) 8# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
9# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional) 9# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
10# ${AUTO_SYSLINUXMENU} - set this to 1 to enable creating an automatic menu 10# ${AUTO_SYSLINUXMENU} - set this to 1 to enable creating an automatic menu
11# ${LABELS} - a list of targets for the automatic config 11# ${LABELS} - a list of targets for the automatic config