From patchwork Tue Sep 22 18:32:48 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 98920 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 27CFDC98302 for ; Tue, 22 Sep 2026 18:33:17 +0000 (UTC) Received: from mail-qk2-f12.google.com (mail-qk2-f12.google.com [74.125.230.204]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.2914.1790101987925111560 for ; Tue, 22 Sep 2026 11:33:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=JxbZXBfb; spf=pass (domain: gmail.com, ip: 74.125.230.204, mailfrom: twoerner@gmail.com) Received: by mail-qk2-f12.google.com with SMTP id d75a77b69052e-53122c5bbb4so1687501cf.2 for ; Tue, 22 Sep 2026 11:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790101987; x=1790706787; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=BTKGLzqLZ6sV/cb4oyrDoj/Jfd/8YQD5vQ9IzEi69MU=; b=JxbZXBfboLDWpiuGCWfJUt/4Vu7l6W+tWwd7sPnQT+nKAYJiImA/jJ5VKhADneKP/I GLUz6bx59AYoCftpBgNdctxKfUXtC4ZwkCaxrb9tmjefK4kk1RbtYlbNNU1nR1+ExQaD g6C0ANx52jNzV/u5EYfthYNMyDS4ZHBg4qBA5PhKa3Xurd2TAbz4dHYI0HRtkJsvKP7E IlV2X4bl5e9mAPUVwKQUf57UgzH38xAh4OKSKAjN4+DrDLD2i5HMHG4FcDTpDYES3n9x cI7D/xlMVZ8v/Dl+O4NPGrihmFQj6YT4Je9IvsIRfHKNgntO5kAEVJOAq39XwgG+pE3f S7sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790101987; x=1790706787; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=BTKGLzqLZ6sV/cb4oyrDoj/Jfd/8YQD5vQ9IzEi69MU=; b=t/pM3xdw1etnN//noimE3WP2CvRJXqIwUrI/p0S6fmgspudbL5F4MlQ5+nmz0AMjHo QOrhx/bpk3dq+RDM2ikyfWbvuaJW7ooLDrSXmR9dB7+cLFnr1x7QgjiS+1pP4gt2pIHk AIyeUDS8iPC2UrPCBDM1A6KHlGUJWTFAtYCOu0CyEHcWW9MM1h2UZtYXCyQjbOzPV9oe 1DTm0n2bW2BdY6vxqKyjvXplNpl3cYhZokT2FdFlyXJnfYuqlZeXlyCTls24exfqvHZj ctbQ1osJmm2VW9owvS+x50CnRvAXLwco/UD2717w5+brBoLx7yN79GezyM47FNKXbPjF MrHA== X-Gm-Message-State: AFuF++mnw8Jhsb2udMbb2CLXNYvUu1u5gEhcL5KFQuIm70YhbEQfaveg tIcoRgRLCVw7GE4DTUNh9+bGUo5h2h98vm7o4lIeVXYwW3KM1pnxT/+TQJizQA== X-Gm-Gg: AYBFou1QNJr37LuSMN39+BN1qhpItuO6digC5ninSBIYMvjBZ9nL98uAnTN3af1hX/Q poscVgcCGv+ED7YjzO2lFtNsDIpEaJEmR7S4BV1FKZw+t8MMbnMhOEM/BTunV7cpELDYAUNhogW yJsQvAmvjQA2wSkvCgXv4aTs6IKi6FolTDc2gke+v4lrggVM6Qm+PZnpijmSYPaaPZ5Bz766Jca ZF2sXXIybYNLXGJf/kgqF5obnPUI5XSguLtDb/A3eI2idf0goAdCxHLfKfVIXIKxa79j/PjlJ1W c8Wt6lB6Kpa8qQ8Ez/a2DIvM4bod8Qb3k7nxfUsc0xNOJNO8IXUuNNSC6xXTZ+DDtHq9HzJqUo5 /Y348pSPY6dikP1nQrd9XG1F83Uaf63xxFRpBv8oSqDQB0FUmJiDwJKh1MUIlP7CgjdXd+tKON5 HfNYk7ocQNIU/dtsv5wt9USc/ipmrb+xOvZvvxoj1X+ROesKHXLj3uc4x94diXi6w/F0xpuiSlI K+Wfn+bsLm0y3Z3SAPgfy46KUn233hVzkuL8S3D X-Received: by 2002:a05:622a:1786:b0:532:a0dc:ab3d with SMTP id d75a77b69052e-532eae4f20cmr6383821cf.63.1790101986746; Tue, 22 Sep 2026 11:33:06 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-532eb3396f6sm3112821cf.19.2026.09.22.11.33.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2026 11:33:04 -0700 (PDT) From: Trevor Woerner To: docs@lists.yoctoproject.org Subject: [PATCH v2 7/8] kernel-dev: give each example block one thing to hold Date: Tue, 22 Sep 2026 14:32:48 -0400 Message-ID: <20260922183249.2433345-8-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260922183249.2433345-1-twoerner@gmail.com> References: <20260922183249.2433345-1-twoerner@gmail.com> MIME-Version: 1.0 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 ; Tue, 22 Sep 2026 18:33:17 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10596 Several kernel metadata examples put a filename label inside the block, and some go on to hold more than one file, in more than one language, under a single "::". A block shaped that way is not any one language, so it can only ever be shown unhighlighted. Split them into a block each, dedent what is left, and move the filename to the code-block caption, which keeps it attached to the block it names and renders it inside the block's frame. The theme centres a caption in italics, which reads as prose, so it is restyled to look like the filename it is. AI-Generated: codex/claude-opus 5 (xhigh) Signed-off-by: Trevor Woerner --- changes in v2: - the caption takes the theme's whole font stack; the shortened copy dropped Liberation Mono, which is why it rendered in a different face --- documentation/kernel-dev/advanced.rst | 139 ++++++++++-------- .../sphinx-static/theme_overrides.css | 28 ++++ 2 files changed, 104 insertions(+), 63 deletions(-) diff --git a/documentation/kernel-dev/advanced.rst b/documentation/kernel-dev/advanced.rst index 321033b7bd49..ecd0137fa5fd 100644 --- a/documentation/kernel-dev/advanced.rst +++ b/documentation/kernel-dev/advanced.rst @@ -216,24 +216,28 @@ used with the ``linux-yocto-4.12`` kernel as defined outside of the recipe space (i.e. ``yocto-kernel-cache``). This Metadata consists of two files: ``smp.scc`` and ``smp.cfg``. You can find these files in the ``cfg`` directory of the ``yocto-4.12`` branch in the -``yocto-kernel-cache`` Git repository:: +``yocto-kernel-cache`` Git repository. + +.. code-block:: + :caption: cfg/smp.scc + + define KFEATURE_DESCRIPTION "Enable SMP for 32 bit builds" + define KFEATURE_COMPATIBILITY all - cfg/smp.scc: - define KFEATURE_DESCRIPTION "Enable SMP for 32 bit builds" - define KFEATURE_COMPATIBILITY all + kconf hardware smp.cfg - kconf hardware smp.cfg +.. code-block:: + :caption: cfg/smp.cfg - cfg/smp.cfg: - CONFIG_SMP=y - CONFIG_SCHED_SMT=y - # Increase default NR_CPUS from 8 to 64 so that platform with - # more than 8 processors can be all activated at boot time - CONFIG_NR_CPUS=64 - # The following is needed when setting NR_CPUS to something - # greater than 8 on x86 architectures, it should be automatically - # disregarded by Kconfig when using a different arch - CONFIG_X86_BIGSMP=y + CONFIG_SMP=y + CONFIG_SCHED_SMT=y + # Increase default NR_CPUS from 8 to 64 so that platform with + # more than 8 processors can be all activated at boot time + CONFIG_NR_CPUS=64 + # The following is needed when setting NR_CPUS to something + # greater than 8 on x86 architectures, it should be automatically + # disregarded by Kconfig when using a different arch + CONFIG_X86_BIGSMP=y You can find general information on configuration fragment files in the ":ref:`kernel-dev/common:creating configuration fragments`" section. @@ -278,36 +282,39 @@ kernel as defined outside of the recipe space (i.e. in the ``patches/build`` directory of the ``yocto-4.12`` branch in the ``yocto-kernel-cache`` Git repository. -The following listings show the ``build.scc`` file and part of the -``modpost-mask-trivial-warnings.patch`` file:: +.. code-block:: + :caption: patches/build/build.scc - patches/build/build.scc: - patch arm-serialize-build-targets.patch - patch powerpc-serialize-image-targets.patch - patch kbuild-exclude-meta-directory-from-distclean-processi.patch + patch arm-serialize-build-targets.patch + patch powerpc-serialize-image-targets.patch + patch kbuild-exclude-meta-directory-from-distclean-processi.patch - # applied by kgit - # patch kbuild-add-meta-files-to-the-ignore-li.patch + # applied by kgit + # patch kbuild-add-meta-files-to-the-ignore-li.patch - patch modpost-mask-trivial-warnings.patch - patch menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch + patch modpost-mask-trivial-warnings.patch + patch menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch - patches/build/modpost-mask-trivial-warnings.patch: - From bd48931bc142bdd104668f3a062a1f22600aae61 Mon Sep 17 00:00:00 2001 - From: Paul Gortmaker - Date: Sun, 25 Jan 2009 17:58:09 -0500 - Subject: [PATCH] modpost: mask trivial warnings +and part of the patch it names: - Newer HOSTCC will complain about various stdio fcns because - . - . - . - char *dump_write = NULL, *files_source = NULL; - int opt; - -- - 2.10.1 +.. code-block:: + :caption: patches/build/modpost-mask-trivial-warnings.patch - generated by cgit v0.10.2 at 2017-09-28 15:23:23 (GMT) + From bd48931bc142bdd104668f3a062a1f22600aae61 Mon Sep 17 00:00:00 2001 + From: Paul Gortmaker + Date: Sun, 25 Jan 2009 17:58:09 -0500 + Subject: [PATCH] modpost: mask trivial warnings + + Newer HOSTCC will complain about various stdio fcns because + . + . + . + char *dump_write = NULL, *files_source = NULL; + int opt; + -- + 2.10.1 + + generated by cgit v0.10.2 at 2017-09-28 15:23:23 (GMT) The description file can include multiple patch statements where each statement handles a single @@ -325,16 +332,18 @@ Features Features are complex kernel Metadata types that consist of configuration fragments, patches, and possibly other feature description files. As an -example, consider the following generic listing:: +example, consider the following generic listing: + +.. code-block:: + :caption: features/myfeature.scc - features/myfeature.scc - define KFEATURE_DESCRIPTION "Enable myfeature" + define KFEATURE_DESCRIPTION "Enable myfeature" - patch 0001-myfeature-core.patch - patch 0002-myfeature-interface.patch + patch 0001-myfeature-core.patch + patch 0002-myfeature-interface.patch - include cfg/myfeature_dependency.scc - kconf non-hardware myfeature.cfg + include cfg/myfeature_dependency.scc + kconf non-hardware myfeature.cfg This example shows how the ``patch`` and ``kconf`` commands are used as well as how an additional feature description file is included with the @@ -873,17 +882,19 @@ new branch as the :term:`KBRANCH` to use for the board as follows:: KBRANCH = "mynewbranch" Another method is to use the ``branch`` command in the BSP -description:: +description: - mybsp.scc: - define KMACHINE mybsp - define KTYPE standard - define KARCH i386 - include standard.scc +.. code-block:: + :caption: mybsp.scc - branch mynewbranch + define KMACHINE mybsp + define KTYPE standard + define KARCH i386 + include standard.scc + + branch mynewbranch - include mybsp-hw.scc + include mybsp-hw.scc If you find yourself with numerous branches, you might consider using a hierarchical branching system similar to what the Yocto Linux Kernel Git @@ -925,18 +936,20 @@ that have to be regularly updated. The Yocto Project Linux kernel tools provide for this with the ``git merge`` command. To merge a feature branch into a BSP, insert the ``git merge`` command -after any ``branch`` commands:: +after any ``branch`` commands: - mybsp.scc: - define KMACHINE mybsp - define KTYPE standard - define KARCH i386 - include standard.scc +.. code-block:: + :caption: mybsp.scc + + define KMACHINE mybsp + define KTYPE standard + define KARCH i386 + include standard.scc - branch mynewbranch - git merge myfeature + branch mynewbranch + git merge myfeature - include mybsp-hw.scc + include mybsp-hw.scc SCC Description File Reference ============================== diff --git a/documentation/sphinx-static/theme_overrides.css b/documentation/sphinx-static/theme_overrides.css index f9e067239b8e..3912872e1890 100644 --- a/documentation/sphinx-static/theme_overrides.css +++ b/documentation/sphinx-static/theme_overrides.css @@ -107,6 +107,34 @@ section#welcome-to-the-yocto-project-documentation p.caption { display: none; } +/* A code-block caption names the file the block came from, so it + should read as a filename rather than as prose, and sit on the block + it titles rather than floating above it. */ +.rst-content .literal-block-wrapper .code-block-caption { + font-style: normal; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, + Liberation Mono, Courier New, Courier, monospace; + font-size: 80%; + text-align: left; + color: #e6edf3; + background: #2b3137; + padding: .45em .9em; + margin: 0; + line-height: 1.5; + border-radius: 4px 4px 0 0; +} + +.rst-content .literal-block-wrapper .code-block-caption .headerlink { + color: #93a1ad; +} + +/* No gap and no doubled border between a caption and its block. */ +.rst-content .literal-block-wrapper .code-block-caption + div[class^=highlight] { + margin-top: 0; + border-top: none; + border-radius: 0 0 4px 4px; +} + @media screen { .wy-nav-content { max-width: 1000px;