diff options
Diffstat (limited to 'meta/classes-recipe/uboot-extlinux-config.bbclass')
-rw-r--r-- | meta/classes-recipe/uboot-extlinux-config.bbclass | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/meta/classes-recipe/uboot-extlinux-config.bbclass b/meta/classes-recipe/uboot-extlinux-config.bbclass index 0413e760bd..099476f5d6 100644 --- a/meta/classes-recipe/uboot-extlinux-config.bbclass +++ b/meta/classes-recipe/uboot-extlinux-config.bbclass | |||
@@ -15,6 +15,7 @@ | |||
15 | # UBOOT_EXTLINUX_KERNEL_IMAGE - Kernel image name. | 15 | # UBOOT_EXTLINUX_KERNEL_IMAGE - Kernel image name. |
16 | # UBOOT_EXTLINUX_FDTDIR - Device tree directory. | 16 | # UBOOT_EXTLINUX_FDTDIR - Device tree directory. |
17 | # UBOOT_EXTLINUX_FDT - Device tree file. | 17 | # UBOOT_EXTLINUX_FDT - Device tree file. |
18 | # UBOOT_EXTLINUX_FDTOVERLAYS - Device tree overlay files. Space-separated list. | ||
18 | # UBOOT_EXTLINUX_INITRD - Indicates a list of filesystem images to | 19 | # UBOOT_EXTLINUX_INITRD - Indicates a list of filesystem images to |
19 | # concatenate and use as an initrd (optional). | 20 | # concatenate and use as an initrd (optional). |
20 | # UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description. | 21 | # UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description. |
@@ -66,6 +67,7 @@ | |||
66 | UBOOT_EXTLINUX_CONSOLE ??= "console=${console},${baudrate}" | 67 | UBOOT_EXTLINUX_CONSOLE ??= "console=${console},${baudrate}" |
67 | UBOOT_EXTLINUX_LABELS ??= "linux" | 68 | UBOOT_EXTLINUX_LABELS ??= "linux" |
68 | UBOOT_EXTLINUX_FDT ??= "" | 69 | UBOOT_EXTLINUX_FDT ??= "" |
70 | UBOOT_EXTLINUX_FDTOVERLAYS ??= "" | ||
69 | UBOOT_EXTLINUX_FDTDIR ??= "../" | 71 | UBOOT_EXTLINUX_FDTDIR ??= "../" |
70 | UBOOT_EXTLINUX_KERNEL_IMAGE ??= "../${KERNEL_IMAGETYPE}" | 72 | UBOOT_EXTLINUX_KERNEL_IMAGE ??= "../${KERNEL_IMAGETYPE}" |
71 | UBOOT_EXTLINUX_KERNEL_ARGS ??= "rootwait rw" | 73 | UBOOT_EXTLINUX_KERNEL_ARGS ??= "rootwait rw" |
@@ -136,15 +138,17 @@ python do_create_extlinux_config() { | |||
136 | fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR') | 138 | fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR') |
137 | 139 | ||
138 | fdt = localdata.getVar('UBOOT_EXTLINUX_FDT') | 140 | fdt = localdata.getVar('UBOOT_EXTLINUX_FDT') |
141 | fdtoverlays = localdata.getVar('UBOOT_EXTLINUX_FDTOVERLAYS') | ||
142 | |||
143 | cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image)) | ||
139 | 144 | ||
140 | if fdt: | 145 | if fdt: |
141 | cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDT %s\n' % | 146 | cfgfile.write('\tFDT %s\n' % (fdt)) |
142 | (menu_description, kernel_image, fdt)) | ||
143 | elif fdtdir: | 147 | elif fdtdir: |
144 | cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDTDIR %s\n' % | 148 | cfgfile.write('\tFDTDIR %s\n' % (fdtdir)) |
145 | (menu_description, kernel_image, fdtdir)) | 149 | |
146 | else: | 150 | if fdtoverlays: |
147 | cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image)) | 151 | cfgfile.write('\tFDTOVERLAYS %s\n' % (' '.join(fdtoverlays.split()))) |
148 | 152 | ||
149 | kernel_args = localdata.getVar('UBOOT_EXTLINUX_KERNEL_ARGS') | 153 | kernel_args = localdata.getVar('UBOOT_EXTLINUX_KERNEL_ARGS') |
150 | 154 | ||
@@ -158,7 +162,7 @@ python do_create_extlinux_config() { | |||
158 | except OSError: | 162 | except OSError: |
159 | bb.fatal('Unable to open %s' % (cfile)) | 163 | bb.fatal('Unable to open %s' % (cfile)) |
160 | } | 164 | } |
161 | UBOOT_EXTLINUX_VARS = "CONSOLE MENU_DESCRIPTION ROOT KERNEL_IMAGE FDTDIR FDT KERNEL_ARGS INITRD" | 165 | UBOOT_EXTLINUX_VARS = "CONSOLE MENU_DESCRIPTION ROOT KERNEL_IMAGE FDTDIR FDT FDTOVERLAYS KERNEL_ARGS INITRD" |
162 | do_create_extlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s:%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS').split()])}" | 166 | do_create_extlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s:%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS').split()])}" |
163 | do_create_extlinux_config[vardepsexclude] += "OVERRIDES" | 167 | do_create_extlinux_config[vardepsexclude] += "OVERRIDES" |
164 | 168 | ||