summaryrefslogtreecommitdiffstats
path: root/meta/classes/bootimg.bbclass
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2011-10-19 18:36:49 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-10-24 17:27:14 +0100
commit29886aa676481deb594c17af3dca6a8aef7c0059 (patch)
treeda2f3e2611e8e8858f27b680c225b688167b404d /meta/classes/bootimg.bbclass
parent5f8f114e4cc29e96942f96ef7dec6d25e18b6d4f (diff)
downloadpoky-29886aa676481deb594c17af3dca6a8aef7c0059.tar.gz
bootimg.bbclass: add support to disable HDD image building
If an image sets NOHDD = "1" the HDD image won't be build. (From OE-Core rev: 23c5a83e877efe6d86618898dd181bb75f44aa71) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/bootimg.bbclass')
-rw-r--r--meta/classes/bootimg.bbclass44
1 files changed, 23 insertions, 21 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index a5ba3cf409..eecc2bf7e3 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -48,34 +48,36 @@ SYSLINUXMENU = "${HDDDIR}/menu"
48inherit syslinux 48inherit syslinux
49 49
50build_boot_bin() { 50build_boot_bin() {
51 install -d ${HDDDIR} 51 # Create an HDD image
52 install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage \ 52 if [ "${NOHDD}" != "1" ] ; then
53 ${HDDDIR}/vmlinuz 53 install -d ${HDDDIR}
54 install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage \
55 ${HDDDIR}/vmlinuz
54 56
55 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then 57 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
56 install -m 0644 ${INITRD} ${HDDDIR}/initrd 58 install -m 0644 ${INITRD} ${HDDDIR}/initrd
57 fi 59 fi
58 60
59 if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then 61 if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
60 install -m 0644 ${ROOTFS} ${HDDDIR}/rootfs.img 62 install -m 0644 ${ROOTFS} ${HDDDIR}/rootfs.img
61 fi 63 fi
62 64
63 install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys 65 install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
64 66
65 # Do a little math, bash style 67 # Do a little math, bash style
66 #BLOCKS=`du -s ${HDDDIR} | cut -f 1` 68 BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
67 BLOCKS=`du -bks ${HDDDIR} | cut -f 1` 69 SIZE=`expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}`
68 SIZE=`expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}`
69 70
70 mkdosfs -n ${BOOTIMG_VOLUME_ID} -d ${HDDDIR} \ 71 mkdosfs -n ${BOOTIMG_VOLUME_ID} -d ${HDDDIR} \
71 -C ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg $SIZE 72 -C ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg $SIZE
72 73
73 syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg 74 syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
74 chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg 75 chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
75 76
76 cd ${DEPLOY_DIR_IMAGE} 77 cd ${DEPLOY_DIR_IMAGE}
77 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg 78 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
78 ln -s ${IMAGE_NAME}.hddimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg 79 ln -s ${IMAGE_NAME}.hddimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
80 fi
79 81
80 #Create an ISO if we have an INITRD 82 #Create an ISO if we have an INITRD
81 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ] && [ "${NOISO}" != "1" ] ; then 83 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ] && [ "${NOISO}" != "1" ] ; then