From bd88ecae63e6b654239e549aa09ef118867403eb Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Thu, 19 Dec 2024 16:25:16 +0100 Subject: 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. (From OE-Core rev: 544c0f72774e17d1dca4664c0bc21f8281dade5b) Signed-off-by: Quentin Schulz Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- meta/classes-recipe/uboot-extlinux-config.bbclass | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'meta/classes-recipe/uboot-extlinux-config.bbclass') diff --git a/meta/classes-recipe/uboot-extlinux-config.bbclass b/meta/classes-recipe/uboot-extlinux-config.bbclass index 0413e760bd..a6938ab063 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') -- cgit v1.2.3-54-g00ecf