From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DFF7C5B56A for ; Wed, 12 Aug 2026 09:39:03 +0000 (UTC) Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.4310.1786527533576952097 for ; Wed, 12 Aug 2026 02:38:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=vrC7pYNY; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 4C40A4E411D1; Wed, 12 Aug 2026 09:38:51 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 20D296045E; Wed, 12 Aug 2026 09:38:51 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id AFE1B11C4CB1E; Wed, 12 Aug 2026 11:38:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1786527526; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=wJQJj94WwuP+tN0rE9P61L+ppTY22sRUoTpi+ONVwm8=; b=vrC7pYNYBvI8ttHRpGPlSjnsWItuyNVYNCiPsjokGF8c/6AXfzJMOhXp7jDRgaNsxvaudn aOiCmdg7DlnZED0utSFOfchL1py8ElhapIZxv8CHz3UEKD66tmm/xhJysHf2OLybKGaO+t LJAujeov0vKWhYt5zow4BDs6jPggZwA2lXuycN3z9HYJ+GNilbhJDVxMrSqH/cAg9W2hWL 6JE+8r63LCGJMpcWUKIaB/fns+6dflQ3uQ9gaKMdRHaveKDRtcZRapbgIM46Qer7XESxu5 bOcFHEZcqtaNzvyW9fCjrHoXFE8CXPuRbuq2QE2ZqevQygNktlR1VpCh0Kf+fg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 12 Aug 2026 11:38:44 +0200 Message-Id: To: "Quentin Schulz" , Subject: Re: [docs] [PATCH] ref-manual: add uboot-extlinux-config class documentation Cc: "Thomas Petazzoni" From: "Antonin Godard" References: <20260804-uboot-extlinux-config-v1-1-f6cb1603c383@bootlin.com> <660eefaa-9011-4057-870f-036bd8cf01e0@cherry.de> In-Reply-To: <660eefaa-9011-4057-870f-036bd8cf01e0@cherry.de> X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 12 Aug 2026 09:39:03 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10272 Hi, On Thu Aug 6, 2026 at 11:54 AM CEST, Quentin Schulz wrote: [...] >> +The :ref:`ref-classes-uboot-extlinux-config` class provides support for >> +generating an ``extlinux.conf`` file part of the `Boot Loader Specifica= tion >> +`__. >> + > > I think this is incorrect. We don't actually implement the Boot Loader=20 > Specification in U-Boot and I'm not even sure it is related to extlinux= =20 > at all (cannot check right now as I'm traveling). > > In U-Boot, please have a look at the "Boot Configuration Files" section= =20 > in doc/develop/distro.rst. > > Specifically: > > """ > The standard format for boot configuration files is that of=20 > extlinux.conf, as > handled by U-Boot's "syslinux" (disk) or "pxe boot" (network). This=20 > format is > not formally standardized and documented in a single location. However,= =20 > other > implementations do document it and we attempt to be as compatible as=20 > possible. > > * The UAPI Group Specifications `Boot Loader Specification`_ > > * The Syslinux Project documents both `PXELINUX`_ and `SYSLINUX`_ files= =20 > and is > the originator of the format. > > That said, we have some differences to these documents, namely: > [...] > """ > > I vaguely recall BSL v2 being discussed on the U-Boot mailing list in=20 > the past few months. Thanks for the pointer! I'll link to here as it is more relevant indeed. [...] >> + When using the :ref:`bootloader ` >> + command with WIC, you should explicitly configure the ``.wks.in`` fi= le to use >> + the ``extlinux.conf`` file generated by this class with >> + ``--configfile=3D"${DEPLOY_DIR_IMAGE}/extlinux.conf"``. Otherwise it= generates >> + a default ``extlinux.conf`` file without taking this class into acco= unt. >> + > > Uh? We use extlinux.conf in meta-rockchip, as well as this WIC command=20 > and we don't have this set so not sure this is true? I used the beaglebone-yocto machine and wks file from here: https://git.yoctoproject.org/meta-yocto/tree/meta-yocto-bsp/files/wic/beagl= ebone-yocto.wks And here's what I had to do to make it work: diff --git a/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf b/meta-yocto= -bsp/conf/machine/beaglebone-yocto.conf index b3c15d5aa6..bcc5838b99 100644 --- a/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf +++ b/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf @@ -12,7 +12,7 @@ include conf/machine/include/arm/armv7a/tune-cortexa8.inc =20 IMAGE_FSTYPES +=3D "tar.zst wic.zst wic.bmap" EXTRA_IMAGECMD:jffs2 =3D "-lnp " -WKS_FILE ?=3D "beaglebone-yocto.wks" +WKS_FILE ?=3D "beaglebone-yocto.wks.in" MACHINE_ESSENTIAL_EXTRA_RDEPENDS +=3D "kernel-image kernel-devicetree" do_image_wic[depends] +=3D "mtools-native:do_populate_sysroot dosfstools-n= ative:do_populate_sysroot virtual/bootloader:do_deploy" =20 diff --git a/meta-yocto-bsp/files/wic/beaglebone-yocto.wks b/meta-yocto-bsp= /files/wic/beaglebone-yocto.wks.in similarity index 82% rename from meta-yocto-bsp/files/wic/beaglebone-yocto.wks rename to meta-yocto-bsp/files/wic/beaglebone-yocto.wks.in index 335e2b9bd5..5dc55cfb66 100644 --- a/meta-yocto-bsp/files/wic/beaglebone-yocto.wks +++ b/meta-yocto-bsp/files/wic/beaglebone-yocto.wks.in @@ -4,4 +4,4 @@ =20 part /boot --source bootimg_partition --ondisk mmcblk0 --fstype=3Dvfat --l= abel boot --active --align 4 --fixed-size 32 --sourceparams=3D"loader=3Du-b= oot" --use-uuid part / --source rootfs --ondisk mmcblk0 --fstype=3Dext4 --label root --ali= gn 4 --use-uuid -bootloader --append=3D"console=3DttyS0,115200" +bootloader --append=3D"console=3DttyS0,115200" --configfile=3D"${DEPLOY_DI= R_IMAGE}/extlinux.conf" And even with my UBOOT_EXTLINUX set to "1" (I could verify that it was prop= erly generated), it wasn't deployed in my boot partition. Instead I always got t= he one generated by Wic: https://git.yoctoproject.org/wic/tree/src/wic/plugins/source/bootimg_partit= ion.py#n114 I had to hit this codepath to get mine used: https://git.yoctoproject.org/wic/tree/src/wic/plugins/source/bootimg_partit= ion.py#n80 Which is hit when cr.ks.bootloader.configfile is defined. [...] >> + assignments. For example, if the :term:`UBOOT_EXTLINUX_LABELS` va= riable >> + contains:: >> + >> + UBOOT_EXTLINUX_LABELS =3D "compressed uncompressed" >> + >> + Then the :term:`UBOOT_EXTLINUX_KERNEL_IMAGE` variable can be spec= ified >> + multiple times as follows:: >> + >> + UBOOT_EXTLINUX_KERNEL_IMAGE:compressed =3D "../zImage" >> + UBOOT_EXTLINUX_KERNEL_IMAGE:uncompressed =3D "../Image" >> + >> + This will make the value of the ``KERNEL`` property be different = in each >> + of the associated labels. >> + >> + Note that default values are used when no overrides-style assignm= ents are >> + found for the current label. For example, taking the above exampl= e again, >> + the following assignment would apply to both ``compressed`` and >> + ``uncompressed`` labels:: > > **if and only if** UBOOT_EXTLINUX_FDT:compressed and/or=20 > UBOOT_EXTLINUX_FDT:uncompressed aren't set. > > I'm assuming all operators can be used when this override-style is used?= =20 > E.g. UBOOT_EXTLINUX_FDT:compressed:append =3D " something"? I do have an= =20 > :append and :remove in meta-cherry-es, but not with an override-style=20 > syntax. Yes, this works. [...] >> + ``root=3D`` parameter of the `Linux kernel command-line >> + `__. = For >> + example, the following would set this value to instruct the kerne= l to use >> + the second partition of MMC block device 0 as its root partition:= : >> + >> + UBOOT_EXTLINUX_ROOT =3D "root=3D/dev/mmcblk0p2" >> + > > We're also missing: > - UBOOT_EXTLINUX_CONFIG, I'd rather document UBOOT_EXTLINUX_INSTALL_DIR and UBOOT_EXTLINUX_CONF_NAME which really control how the file is named and where it's deployed. Will do= in v2. > - UBOOT_EXTLINUX_TIMEOUT, > - UBOOT_EXTLINUX_DEFAULT_LABEL, > - UBOOT_EXTLINUX_INITRD, > > Cheers, > Quentin Thanks! Antonin