diff options
Diffstat (limited to 'meta/classes/syslinux.bbclass')
-rw-r--r-- | meta/classes/syslinux.bbclass | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass index 91c4275747..1569074b21 100644 --- a/meta/classes/syslinux.bbclass +++ b/meta/classes/syslinux.bbclass | |||
@@ -18,42 +18,34 @@ do_bootimg[depends] += "syslinux:do_populate_sysroot \ | |||
18 | SYSLINUXCFG = "${S}/syslinux.cfg" | 18 | SYSLINUXCFG = "${S}/syslinux.cfg" |
19 | SYSLINUXMENU = "${S}/menu" | 19 | SYSLINUXMENU = "${S}/menu" |
20 | 20 | ||
21 | SYSLINUX_ISODIR = "${ISODIR}/isolinux" | 21 | ISOLINUXDIR = "/isolinux" |
22 | SYSLINUX_HDDDIR = "${HDDDIR}" | 22 | SYSLINUXDIR = "/" |
23 | ISO_BOOTIMG = "isolinux/isolinux.bin" | 23 | ISO_BOOTIMG = "isolinux/isolinux.bin" |
24 | ISO_BOOTCAT = "isolinux/boot.cat" | 24 | ISO_BOOTCAT = "isolinux/boot.cat" |
25 | MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table" | 25 | MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table" |
26 | 26 | ||
27 | syslinux_populate() { | 27 | syslinux_populate() { |
28 | DEST=$1 | 28 | DEST=$1 |
29 | CFGNAME=$2 | 29 | BOOTDIR=$2 |
30 | CFGNAME=$3 | ||
30 | 31 | ||
31 | install -d ${DEST} | 32 | install -d ${DEST}${BOOTDIR} |
32 | |||
33 | # Install the kernel, initrd, and rootfs | ||
34 | install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage ${DEST}/vmlinuz | ||
35 | if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then | ||
36 | install -m 0644 ${INITRD} ${DEST}/initrd | ||
37 | fi | ||
38 | if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then | ||
39 | install -m 0644 ${ROOTFS} ${DEST}/rootfs.img | ||
40 | fi | ||
41 | 33 | ||
42 | # Install the config files | 34 | # Install the config files |
43 | install -m 0644 ${SYSLINUXCFG} ${DEST}/${CFGNAME} | 35 | install -m 0644 ${SYSLINUXCFG} ${DEST}${BOOTDIR}/${CFGNAME} |
44 | if [ -f ${SYSLINUXMENU} ]; then | 36 | if [ -f ${SYSLINUXMENU} ]; then |
45 | install -m 0644 ${SYSLINUXMENU} ${DEST} | 37 | install -m 0644 ${SYSLINUXMENU} ${DEST}${BOOTDIR} |
46 | fi | 38 | fi |
47 | } | 39 | } |
48 | 40 | ||
49 | syslinux_iso_populate() { | 41 | syslinux_iso_populate() { |
50 | syslinux_populate ${SYSLINUX_ISODIR} isolinux.cfg | 42 | syslinux_populate ${ISODIR} ${ISOLINUXDIR} isolinux.cfg |
51 | install -m 0644 ${STAGING_LIBDIR}/syslinux/isolinux.bin ${SYSLINUX_ISODIR} | 43 | install -m 0644 ${STAGING_LIBDIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR} |
52 | } | 44 | } |
53 | 45 | ||
54 | syslinux_hddimg_populate() { | 46 | syslinux_hddimg_populate() { |
55 | syslinux_populate ${SYSLINUX_HDDDIR} syslinux.cfg | 47 | syslinux_populate ${HDDDIR} ${SYSLINUXDIR} syslinux.cfg |
56 | install -m 0444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${SYSLINUX_HDDDIR}/ldlinux.sys | 48 | install -m 0444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}${SYSLINUXDIR}/ldlinux.sys |
57 | } | 49 | } |
58 | 50 | ||
59 | syslinux_hddimg_install() { | 51 | syslinux_hddimg_install() { |
@@ -187,7 +179,7 @@ python build_syslinux_cfg () { | |||
187 | localdata.setVar('OVERRIDES', label + ':' + overrides) | 179 | localdata.setVar('OVERRIDES', label + ':' + overrides) |
188 | bb.data.update_data(localdata) | 180 | bb.data.update_data(localdata) |
189 | 181 | ||
190 | cfgfile.write('LABEL %s\nKERNEL vmlinuz\n' % (label)) | 182 | cfgfile.write('LABEL %s\nKERNEL /vmlinuz\n' % (label)) |
191 | 183 | ||
192 | append = localdata.getVar('APPEND', 1) | 184 | append = localdata.getVar('APPEND', 1) |
193 | initrd = localdata.getVar('INITRD', 1) | 185 | initrd = localdata.getVar('INITRD', 1) |
@@ -196,7 +188,7 @@ python build_syslinux_cfg () { | |||
196 | cfgfile.write('APPEND ') | 188 | cfgfile.write('APPEND ') |
197 | 189 | ||
198 | if initrd: | 190 | if initrd: |
199 | cfgfile.write('initrd=initrd ') | 191 | cfgfile.write('initrd=/initrd ') |
200 | 192 | ||
201 | cfgfile.write('LABEL=%s '% (label)) | 193 | cfgfile.write('LABEL=%s '% (label)) |
202 | 194 | ||