From: Quentin Schulz Date: Thu, 19 Dec 2024 15:25:16 +0000 (+0100) Subject: uboot-extlinux-config.bbclass: simplify FDT/FDTDIR logic X-Git-Tag: yocto-5.2~840 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=544c0f72774e17d1dca4664c0bc21f8281dade5b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git uboot-extlinux-config.bbclass: simplify FDT/FDTDIR logic The three blocks share the same LABEL and KERNEL content, so let's factor that part out. Signed-off-by: Quentin Schulz Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/uboot-extlinux-config.bbclass b/meta/classes-recipe/uboot-extlinux-config.bbclass index 0413e760bd1..a6938ab0631 100644 --- a/meta/classes-recipe/uboot-extlinux-config.bbclass +++ b/meta/classes-recipe/uboot-extlinux-config.bbclass @@ -137,14 +137,12 @@ python do_create_extlinux_config() { fdt = localdata.getVar('UBOOT_EXTLINUX_FDT') + cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image)) + if fdt: - cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDT %s\n' % - (menu_description, kernel_image, fdt)) + cfgfile.write('\tFDT %s\n' % (fdt)) elif fdtdir: - cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDTDIR %s\n' % - (menu_description, kernel_image, fdtdir)) - else: - cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image)) + cfgfile.write('\tFDTDIR %s\n' % (fdtdir)) kernel_args = localdata.getVar('UBOOT_EXTLINUX_KERNEL_ARGS')