diff options
| -rw-r--r-- | meta/classes/uboot-extlinux-config.bbclass | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/meta/classes/uboot-extlinux-config.bbclass b/meta/classes/uboot-extlinux-config.bbclass index aae21713e3..8447a047ee 100644 --- a/meta/classes/uboot-extlinux-config.bbclass +++ b/meta/classes/uboot-extlinux-config.bbclass | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | # UBOOT_EXTLINUX_KERNEL_ARGS - Add additional kernel arguments. | 12 | # UBOOT_EXTLINUX_KERNEL_ARGS - Add additional kernel arguments. |
| 13 | # UBOOT_EXTLINUX_KERNEL_IMAGE - Kernel image name. | 13 | # UBOOT_EXTLINUX_KERNEL_IMAGE - Kernel image name. |
| 14 | # UBOOT_EXTLINUX_FDTDIR - Device tree directory. | 14 | # UBOOT_EXTLINUX_FDTDIR - Device tree directory. |
| 15 | # UBOOT_EXTLINUX_FDT - Device tree file. | ||
| 15 | # UBOOT_EXTLINUX_INITRD - Indicates a list of filesystem images to | 16 | # UBOOT_EXTLINUX_INITRD - Indicates a list of filesystem images to |
| 16 | # concatenate and use as an initrd (optional). | 17 | # concatenate and use as an initrd (optional). |
| 17 | # UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description. | 18 | # UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description. |
| @@ -59,6 +60,7 @@ | |||
| 59 | # a console=...some_tty... | 60 | # a console=...some_tty... |
| 60 | UBOOT_EXTLINUX_CONSOLE ??= "console=${console}" | 61 | UBOOT_EXTLINUX_CONSOLE ??= "console=${console}" |
| 61 | UBOOT_EXTLINUX_LABELS ??= "linux" | 62 | UBOOT_EXTLINUX_LABELS ??= "linux" |
| 63 | UBOOT_EXTLINUX_FDT ??= "" | ||
| 62 | UBOOT_EXTLINUX_FDTDIR ??= "../" | 64 | UBOOT_EXTLINUX_FDTDIR ??= "../" |
| 63 | UBOOT_EXTLINUX_KERNEL_IMAGE ??= "../${KERNEL_IMAGETYPE}" | 65 | UBOOT_EXTLINUX_KERNEL_IMAGE ??= "../${KERNEL_IMAGETYPE}" |
| 64 | UBOOT_EXTLINUX_KERNEL_ARGS ??= "rootwait rw" | 66 | UBOOT_EXTLINUX_KERNEL_ARGS ??= "rootwait rw" |
| @@ -84,6 +86,8 @@ python create_extlinux_config() { | |||
| 84 | if not cfile: | 86 | if not cfile: |
| 85 | bb.fatal('Unable to read UBOOT_EXTLINUX_CONFIG') | 87 | bb.fatal('Unable to read UBOOT_EXTLINUX_CONFIG') |
| 86 | 88 | ||
| 89 | localdata = bb.data.createCopy(d) | ||
| 90 | |||
| 87 | try: | 91 | try: |
| 88 | with open(cfile, 'w') as cfgfile: | 92 | with open(cfile, 'w') as cfgfile: |
| 89 | cfgfile.write('# Generic Distro Configuration file generated by OpenEmbedded\n') | 93 | cfgfile.write('# Generic Distro Configuration file generated by OpenEmbedded\n') |
| @@ -99,9 +103,8 @@ python create_extlinux_config() { | |||
| 99 | default = localdata.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL') | 103 | default = localdata.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL') |
| 100 | if default: | 104 | if default: |
| 101 | cfgfile.write('DEFAULT %s\n' % (default)) | 105 | cfgfile.write('DEFAULT %s\n' % (default)) |
| 102 | 106 | ||
| 103 | for label in labels.split(): | 107 | for label in labels.split(): |
| 104 | localdata = bb.data.createCopy(d) | ||
| 105 | 108 | ||
| 106 | overrides = localdata.getVar('OVERRIDES') | 109 | overrides = localdata.getVar('OVERRIDES') |
| 107 | if not overrides: | 110 | if not overrides: |
| @@ -121,7 +124,13 @@ python create_extlinux_config() { | |||
| 121 | 124 | ||
| 122 | kernel_image = localdata.getVar('UBOOT_EXTLINUX_KERNEL_IMAGE') | 125 | kernel_image = localdata.getVar('UBOOT_EXTLINUX_KERNEL_IMAGE') |
| 123 | fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR') | 126 | fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR') |
| 124 | if fdtdir: | 127 | |
| 128 | fdt = localdata.getVar('UBOOT_EXTLINUX_FDT') | ||
| 129 | |||
| 130 | if fdt: | ||
| 131 | cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDT %s\n' % | ||
| 132 | (menu_description, kernel_image, fdt)) | ||
| 133 | elif fdtdir: | ||
| 125 | cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDTDIR %s\n' % | 134 | cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDTDIR %s\n' % |
| 126 | (menu_description, kernel_image, fdtdir)) | 135 | (menu_description, kernel_image, fdtdir)) |
| 127 | else: | 136 | else: |
