diff options
Diffstat (limited to 'meta/classes/syslinux.bbclass')
| -rw-r--r-- | meta/classes/syslinux.bbclass | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass index 44ef9a9176..1b644b2561 100644 --- a/meta/classes/syslinux.bbclass +++ b/meta/classes/syslinux.bbclass | |||
| @@ -20,8 +20,6 @@ | |||
| 20 | do_bootimg[depends] += "${MLPREFIX}syslinux:do_populate_sysroot \ | 20 | do_bootimg[depends] += "${MLPREFIX}syslinux:do_populate_sysroot \ |
| 21 | syslinux-native:do_populate_sysroot" | 21 | syslinux-native:do_populate_sysroot" |
| 22 | 22 | ||
| 23 | SYSLINUXCFG = "${S}/syslinux.cfg" | ||
| 24 | |||
| 25 | ISOLINUXDIR = "/isolinux" | 23 | ISOLINUXDIR = "/isolinux" |
| 26 | SYSLINUXDIR = "/" | 24 | SYSLINUXDIR = "/" |
| 27 | # The kernel has an internal default console, which you can override with | 25 | # The kernel has an internal default console, which you can override with |
| @@ -29,6 +27,9 @@ SYSLINUXDIR = "/" | |||
| 29 | SYSLINUX_DEFAULT_CONSOLE ?= "" | 27 | SYSLINUX_DEFAULT_CONSOLE ?= "" |
| 30 | SYSLINUX_SERIAL ?= "0 115200" | 28 | SYSLINUX_SERIAL ?= "0 115200" |
| 31 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" | 29 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" |
| 30 | SYSLINUX_PROMPT ?= "0" | ||
| 31 | SYSLINUX_TIMEOUT ?= "50" | ||
| 32 | AUTO_SYSLINUXMENU ?= "1" | ||
| 32 | ISO_BOOTIMG = "isolinux/isolinux.bin" | 33 | ISO_BOOTIMG = "isolinux/isolinux.bin" |
| 33 | ISO_BOOTCAT = "isolinux/boot.cat" | 34 | ISO_BOOTCAT = "isolinux/boot.cat" |
| 34 | MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table" | 35 | MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table" |
| @@ -37,6 +38,18 @@ APPEND_prepend = " ${SYSLINUX_ROOT} " | |||
| 37 | # Need UUID utility code. | 38 | # Need UUID utility code. |
| 38 | inherit fs-uuid | 39 | inherit fs-uuid |
| 39 | 40 | ||
| 41 | # Some of the vars for vm and live image are conflicted, this function | ||
| 42 | # is used for fixing the problem. | ||
| 43 | def syslinux_set_vars(d, suffix): | ||
| 44 | vars = ['SYSLINUX_ROOT', 'SYSLINUX_CFG', 'LABELS', 'INITRD'] | ||
| 45 | for var in vars: | ||
| 46 | var_with_suffix = var + '_' + suffix | ||
| 47 | if d.getVar(var, True): | ||
| 48 | bb.warn('Found potential conflicted var %s, please use %s rather than %s' % \ | ||
| 49 | (var, var_with_suffix, var)) | ||
| 50 | elif d.getVar(var_with_suffix, True): | ||
| 51 | d.setVar(var, d.getVar(var_with_suffix, True)) | ||
| 52 | |||
| 40 | syslinux_populate() { | 53 | syslinux_populate() { |
| 41 | DEST=$1 | 54 | DEST=$1 |
| 42 | BOOTDIR=$2 | 55 | BOOTDIR=$2 |
| @@ -45,7 +58,7 @@ syslinux_populate() { | |||
| 45 | install -d ${DEST}${BOOTDIR} | 58 | install -d ${DEST}${BOOTDIR} |
| 46 | 59 | ||
| 47 | # Install the config files | 60 | # Install the config files |
| 48 | install -m 0644 ${SYSLINUXCFG} ${DEST}${BOOTDIR}/${CFGNAME} | 61 | install -m 0644 ${SYSLINUX_CFG} ${DEST}${BOOTDIR}/${CFGNAME} |
| 49 | if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then | 62 | if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then |
| 50 | install -m 0644 ${STAGING_DATADIR}/syslinux/vesamenu.c32 ${DEST}${BOOTDIR}/vesamenu.c32 | 63 | install -m 0644 ${STAGING_DATADIR}/syslinux/vesamenu.c32 ${DEST}${BOOTDIR}/vesamenu.c32 |
| 51 | install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${DEST}${BOOTDIR}/libcom32.c32 | 64 | install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${DEST}${BOOTDIR}/libcom32.c32 |
| @@ -96,9 +109,9 @@ python build_syslinux_cfg () { | |||
| 96 | bb.debug(1, "No labels, nothing to do") | 109 | bb.debug(1, "No labels, nothing to do") |
| 97 | return | 110 | return |
| 98 | 111 | ||
| 99 | cfile = d.getVar('SYSLINUXCFG', True) | 112 | cfile = d.getVar('SYSLINUX_CFG', True) |
| 100 | if not cfile: | 113 | if not cfile: |
| 101 | raise bb.build.FuncFailed('Unable to read SYSLINUXCFG') | 114 | raise bb.build.FuncFailed('Unable to read SYSLINUX_CFG') |
| 102 | 115 | ||
| 103 | try: | 116 | try: |
| 104 | cfgfile = file(cfile, 'w') | 117 | cfgfile = file(cfile, 'w') |
