diff options
Diffstat (limited to 'meta/classes/syslinux.bbclass')
| -rw-r--r-- | meta/classes/syslinux.bbclass | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass index 7d324c31de..defad73a11 100644 --- a/meta/classes/syslinux.bbclass +++ b/meta/classes/syslinux.bbclass | |||
| @@ -33,7 +33,7 @@ AUTO_SYSLINUXMENU ?= "1" | |||
| 33 | SYSLINUX_ROOT ?= "${ROOT}" | 33 | SYSLINUX_ROOT ?= "${ROOT}" |
| 34 | SYSLINUX_CFG_VM ?= "${S}/syslinux_vm.cfg" | 34 | SYSLINUX_CFG_VM ?= "${S}/syslinux_vm.cfg" |
| 35 | SYSLINUX_CFG_LIVE ?= "${S}/syslinux_live.cfg" | 35 | SYSLINUX_CFG_LIVE ?= "${S}/syslinux_live.cfg" |
| 36 | APPEND_prepend = " ${SYSLINUX_ROOT} " | 36 | APPEND ?= "" |
| 37 | 37 | ||
| 38 | # Need UUID utility code. | 38 | # Need UUID utility code. |
| 39 | inherit fs-uuid | 39 | inherit fs-uuid |
| @@ -164,6 +164,10 @@ python build_syslinux_cfg () { | |||
| 164 | btypes = [ [ "Graphics console ", syslinux_default_console ], | 164 | btypes = [ [ "Graphics console ", syslinux_default_console ], |
| 165 | [ "Serial console ", syslinux_serial_tty ] ] | 165 | [ "Serial console ", syslinux_serial_tty ] ] |
| 166 | 166 | ||
| 167 | root= d.getVar('SYSLINUX_ROOT', True) | ||
| 168 | if not root: | ||
| 169 | raise bb.build.FuncFailed('SYSLINUX_ROOT not defined') | ||
| 170 | |||
| 167 | for btype in btypes: | 171 | for btype in btypes: |
| 168 | cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label)) | 172 | cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label)) |
| 169 | 173 | ||
| @@ -174,17 +178,15 @@ python build_syslinux_cfg () { | |||
| 174 | append = localdata.getVar('APPEND', True) | 178 | append = localdata.getVar('APPEND', True) |
| 175 | initrd = localdata.getVar('INITRD', True) | 179 | initrd = localdata.getVar('INITRD', True) |
| 176 | 180 | ||
| 177 | if append: | 181 | append = root + " " + append |
| 178 | cfgfile.write('APPEND ') | 182 | cfgfile.write('APPEND ') |
| 179 | 183 | ||
| 180 | if initrd: | 184 | if initrd: |
| 181 | cfgfile.write('initrd=/initrd ') | 185 | cfgfile.write('initrd=/initrd ') |
| 182 | 186 | ||
| 183 | cfgfile.write('LABEL=%s '% (label)) | 187 | cfgfile.write('LABEL=%s '% (label)) |
| 184 | append = replace_rootfs_uuid(d, append) | 188 | append = replace_rootfs_uuid(d, append) |
| 185 | cfgfile.write('%s %s\n' % (append, btype[1])) | 189 | cfgfile.write('%s %s\n' % (append, btype[1])) |
| 186 | else: | ||
| 187 | cfgfile.write('APPEND %s\n' % btype[1]) | ||
| 188 | 190 | ||
| 189 | cfgfile.close() | 191 | cfgfile.close() |
| 190 | } | 192 | } |
