summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2007-06-08 20:45:44 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2007-06-08 20:45:44 +0000
commit95be099de22b520bb945b0457e9d5064999df03a (patch)
tree1f0c36fdfbc0f815028390718912737902d0882e /meta/classes
parent2b22125a85d60943c6cfe0f36a92841207b1a288 (diff)
downloadpoky-95be099de22b520bb945b0457e9d5064999df03a.tar.gz
bootimg.bbclass: fixed generation of ISO & HDD images
bootimg.bbclass supported creation of FAT filesystem images for usage with syslinux (kernel and initrd in /boot/) and creation of ISO images with kernel and initrd on it. ISO images contained also not needed /boot/ directory from FAT image. Now still two files are created as result but both contain only needed files. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1899 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/bootimg.bbclass33
1 files changed, 18 insertions, 15 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index 9df8e9e27c..90bc3a430a 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -17,40 +17,43 @@ do_rootfs[depends] += "dosfstools-native:do_populate_staging \
17 mtools-native:do_populate_staging \ 17 mtools-native:do_populate_staging \
18 cdrtools-native:do_populate_staging" 18 cdrtools-native:do_populate_staging"
19 19
20BDIR = "${WORKDIR}/boot" 20PACKAGES = " "
21ISODIR = "${IMAGE_ROOTFS}/isolinux/" 21
22HDDDIR = "${S}/hdd/boot"
23ISODIR = "${S}/cd/isolinux"
22 24
23BOOTIMG_VOLUME_ID ?= "oe" 25BOOTIMG_VOLUME_ID ?= "oe"
24BOOTIMG_EXTRA_SPACE ?= "64" 26BOOTIMG_EXTRA_SPACE ?= "64"
25 27
26# Get the build_syslinux_cfg() function from the syslinux class 28# Get the build_syslinux_cfg() function from the syslinux class
27 29
28SYSLINUXCFG = "${BDIR}/syslinux.cfg" 30SYSLINUXCFG = "${HDDDIR}/syslinux.cfg"
29SYSLINUXMENU = "${BDIR}/menu" 31SYSLINUXMENU = "${HDDDIR}/menu"
30 32
31inherit syslinux 33inherit syslinux
32 34
33build_boot_bin() { 35build_boot_bin() {
34 install -d ${BDIR} 36 install -d ${HDDDIR}
35 install -m 0644 ${STAGING_KERNEL_DIR}/bzImage \ 37 install -m 0644 ${STAGING_KERNEL_DIR}/bzImage \
36 ${BDIR}/vmlinuz 38 ${HDDDIR}/vmlinuz
37 39
38 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then 40 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
39 install -m 0644 ${INITRD} ${BDIR}/initrd 41 install -m 0644 ${INITRD} ${HDDDIR}/initrd
40 fi 42 fi
41 43
42 install -m 444 ${STAGING_DIR}/${BUILD_SYS}/share/syslinux/ldlinux.sys \ 44 install -m 444 ${STAGING_DIR}/${BUILD_SYS}/share/syslinux/ldlinux.sys \
43 ${BDIR}/ldlinux.sys 45 ${HDDDIR}/ldlinux.sys
44 46
45 # Do a little math, bash style 47 # Do a little math, bash style
46 #BLOCKS=`du -s ${BDIR} | cut -f 1` 48 #BLOCKS=`du -s ${HDDDIR} | cut -f 1`
47 BLOCKS=`du -bks ${BDIR} | cut -f 1` 49 BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
48 SIZE=`expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}` 50 SIZE=`expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}`
49 51
50 mkdosfs -F 12 -n ${BOOTIMG_VOLUME_ID} -d ${BDIR} \ 52 mkdosfs -F 12 -n ${BOOTIMG_VOLUME_ID} -d ${HDDDIR} \
51 -C ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-boot.bin $SIZE 53 -C ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg $SIZE
52 54
53 syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-boot.bin 55 syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
56 chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
54 57
55 #Create an ISO if we have an INITRD 58 #Create an ISO if we have an INITRD
56 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ] && [ "${NOISO}" != "1" ] ; then 59 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ] && [ "${NOISO}" != "1" ] ; then
@@ -63,7 +66,7 @@ build_boot_bin() {
63 66
64 # Install the configuration files 67 # Install the configuration files
65 68
66 cp ${BDIR}/syslinux.cfg ${ISODIR}/isolinux.cfg 69 cp ${HDDDIR}/syslinux.cfg ${ISODIR}/isolinux.cfg
67 70
68 if [ -f ${SYSLINUXMENU} ]; then 71 if [ -f ${SYSLINUXMENU} ]; then
69 cp ${SYSLINUXMENU} ${ISODIR} 72 cp ${SYSLINUXMENU} ${ISODIR}
@@ -79,7 +82,7 @@ build_boot_bin() {
79 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \ 82 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
80 -b isolinux/isolinux.bin -c isolinux/boot.cat -r \ 83 -b isolinux/isolinux.bin -c isolinux/boot.cat -r \
81 -no-emul-boot -boot-load-size 4 -boot-info-table \ 84 -no-emul-boot -boot-load-size 4 -boot-info-table \
82 ${IMAGE_ROOTFS} 85 ${S}/cd/
83 fi 86 fi
84} 87}
85 88