<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/package, branch v6.16.6</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.16.6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.16.6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2025-05-12T06:03:17Z</updated>
<entry>
<title>kbuild: rpm-pkg: Add (elfutils-devel or libdw-devel) to BuildRequires</title>
<updated>2025-05-12T06:03:17Z</updated>
<author>
<name>WangYuli</name>
<email>wangyuli@uniontech.com</email>
</author>
<published>2025-04-22T10:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5bd6bdd0f76e257c029ff34100f2959cd4992486'/>
<id>urn:sha1:5bd6bdd0f76e257c029ff34100f2959cd4992486</id>
<content type='text'>
The dwarf.h header, which is included by
scripts/gendwarfksyms/gendwarfksyms.h, resides within elfutils-devel
or libdw-devel package.

This portion of the code is compiled under the condition that
CONFIG_GENDWARFKSYMS is enabled.

Consequently, add (elfutils-devel or libdw-devel) to BuildRequires to
prevent unforeseen compilation failures.

Fix follow possible error:
  In file included from scripts/gendwarfksyms/cache.c:6:
  scripts/gendwarfksyms/gendwarfksyms.h:6:10: fatal error: 'dwarf.h' file not found
      6 | #include &lt;dwarf.h&gt;
        |          ^~~~~~~~~

Link: https://lore.kernel.org/all/3e52d80d-0c60-4df5-8cb5-21d4b1fce7b7@suse.com/
Fixes: f28568841ae0 ("tools: Add gendwarfksyms")
Suggested-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
Signed-off-by: WangYuli &lt;wangyuli@uniontech.com&gt;
Reviewed-by: Nicolas Schier &lt;n.schier@avm.de&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: deb-pkg: Add libdw-dev:native to Build-Depends-Arch</title>
<updated>2025-05-12T06:03:17Z</updated>
<author>
<name>WangYuli</name>
<email>wangyuli@uniontech.com</email>
</author>
<published>2025-04-22T10:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=657f96cb7c06a2ef85d166f1b055baeb6511c324'/>
<id>urn:sha1:657f96cb7c06a2ef85d166f1b055baeb6511c324</id>
<content type='text'>
The dwarf.h header, which is included by
scripts/gendwarfksyms/gendwarfksyms.h, resides within the libdw-dev
package.

This portion of the code is compiled under the condition that
CONFIG_GENDWARFKSYMS is enabled.

Consequently, add libdw-dev to Build-Depends-Arch to prevent
unforeseen compilation failures.

Fix follow possible error:
  In file included from scripts/gendwarfksyms/symbols.c:6:
  scripts/gendwarfksyms/gendwarfksyms.h:6:10: fatal error: 'dwarf.h' file not found
      6 | #include &lt;dwarf.h&gt;
        |          ^~~~~~~~~

Fixes: f28568841ae0 ("tools: Add gendwarfksyms")
Reviewed-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Signed-off-by: WangYuli &lt;wangyuli@uniontech.com&gt;
Reviewed-by: Nicolas Schier &lt;n.schier@avm.de&gt;
Tested-by: Nicolas Schier &lt;n.schier@avm.de&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: rpm-pkg: build a debuginfo RPM</title>
<updated>2025-04-05T21:22:01Z</updated>
<author>
<name>Uday Shankar</name>
<email>ushankar@purestorage.com</email>
</author>
<published>2025-03-31T22:46:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a7c699d090a1f3795c3271c2b399230e182db06e'/>
<id>urn:sha1:a7c699d090a1f3795c3271c2b399230e182db06e</id>
<content type='text'>
The rpm-pkg make target currently suffers from a few issues related to
debuginfo:
1. debuginfo for things built into the kernel (vmlinux) is not available
   in any RPM produced by make rpm-pkg. This makes using tools like
   systemtap against a make rpm-pkg kernel impossible.
2. debug source for the kernel is not available. This means that
   commands like 'disas /s' in gdb, which display source intermixed with
   assembly, can only print file names/line numbers which then must be
   painstakingly resolved to actual source in a separate editor.
3. debuginfo for modules is available, but it remains bundled with the
   .ko files that contain module code, in the main kernel RPM. This is a
   waste of space for users who do not need to debug the kernel (i.e.
   most users).

Address all of these issues by additionally building a debuginfo RPM
when the kernel configuration allows for it, in line with standard
patterns followed by RPM distributors. With these changes:
1. systemtap now works (when these changes are backported to 6.11, since
   systemtap lags a bit behind in compatibility), as verified by the
   following simple test script:

   # stap -e 'probe kernel.function("do_sys_open").call { printf("%s\n", $$parms); }'
   dfd=0xffffffffffffff9c filename=0x7fe18800b160 flags=0x88800 mode=0x0
   ...

2. disas /s works correctly in gdb, with source and disassembly
   interspersed:

   # gdb vmlinux --batch -ex 'disas /s blk_op_str'
   Dump of assembler code for function blk_op_str:
   block/blk-core.c:
   125     {
      0xffffffff814c8740 &lt;+0&gt;:     endbr64

   127
   128             if (op &lt; ARRAY_SIZE(blk_op_name) &amp;&amp; blk_op_name[op])
      0xffffffff814c8744 &lt;+4&gt;:     mov    $0xffffffff824a7378,%rax
      0xffffffff814c874b &lt;+11&gt;:    cmp    $0x23,%edi
      0xffffffff814c874e &lt;+14&gt;:    ja     0xffffffff814c8768 &lt;blk_op_str+40&gt;
      0xffffffff814c8750 &lt;+16&gt;:    mov    %edi,%edi

   126             const char *op_str = "UNKNOWN";
      0xffffffff814c8752 &lt;+18&gt;:    mov    $0xffffffff824a7378,%rdx

   127
   128             if (op &lt; ARRAY_SIZE(blk_op_name) &amp;&amp; blk_op_name[op])
      0xffffffff814c8759 &lt;+25&gt;:    mov    -0x7dfa0160(,%rdi,8),%rax

   126             const char *op_str = "UNKNOWN";
      0xffffffff814c8761 &lt;+33&gt;:    test   %rax,%rax
      0xffffffff814c8764 &lt;+36&gt;:    cmove  %rdx,%rax

   129                     op_str = blk_op_name[op];
   130
   131             return op_str;
   132     }
      0xffffffff814c8768 &lt;+40&gt;:    jmp    0xffffffff81d01360 &lt;__x86_return_thunk&gt;
   End of assembler dump.

3. The size of the main kernel package goes down substantially,
   especially if many modules are built (quite typical). Here is a
   comparison of installed size of the kernel package (configured with
   allmodconfig, dwarf4 debuginfo, and module compression turned off)
   before and after this patch:

   # rpm -qi kernel-6.13* | grep -E '^(Version|Size)'
   Version     : 6.13.0postpatch+
   Size        : 1382874089
   Version     : 6.13.0prepatch+
   Size        : 17870795887

   This is a ~92% size reduction.

Note that a debuginfo package can only be produced if the following
configs are set:
- CONFIG_DEBUG_INFO=y
- CONFIG_MODULE_COMPRESS=n
- CONFIG_DEBUG_INFO_SPLIT=n

The first of these is obvious - we can't produce debuginfo if the build
does not generate it. The second two requirements can in principle be
removed, but doing so is difficult with the current approach, which uses
a generic rpmbuild script find-debuginfo.sh that processes all packaged
executables. If we want to remove those requirements the best path
forward is likely to add some debuginfo extraction/installation logic to
the modules_install target (controllable by flags). That way, it's
easier to operate on modules before they're compressed, and the logic
can be reused by all packaging targets.

Signed-off-by: Uday Shankar &lt;ushankar@purestorage.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: pacman-pkg: hardcode module installation path</title>
<updated>2025-03-22T15:56:13Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2025-03-15T15:15:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8bdd53e066012bed431667393676d1b5e8cce153'/>
<id>urn:sha1:8bdd53e066012bed431667393676d1b5e8cce153</id>
<content type='text'>
'make pacman-pkg' for architectures with device tree support (i.e., arm,
arm64, etc.) shows logs like follows:

  Installing dtbs...
    INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr//lib/modules/6.14.0-rc6+/dtb/actions/s700-cubieboard7.dtb
    INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr//lib/modules/6.14.0-rc6+/dtb/actions/s900-bubblegum-96.dtb
    INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr//lib/modules/6.14.0-rc6+/dtb/airoha/en7581-evb.dtb
      ...

The double slashes ('//') between 'usr' and 'lib' are somewhat ugly.

Let's hardcode the module installation path because the package contents
should remain unaffected even if ${MODLIB} is overridden. Please note that
scripts/packages/{builddeb,kernel.spec} also hardcode the module
installation path.

With this change, the log will look better, as follows:

  Installing dtbs...
    INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr/lib/modules/6.14.0-rc6+/dtb/actions/s700-cubieboard7.dtb
    INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr/lib/modules/6.14.0-rc6+/dtb/actions/s900-bubblegum-96.dtb
    INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr/lib/modules/6.14.0-rc6+/dtb/airoha/en7581-evb.dtb
      ...

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Acked-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: deb-pkg: don't set KBUILD_BUILD_VERSION unconditionally</title>
<updated>2025-03-22T15:56:12Z</updated>
<author>
<name>Alexandru Gagniuc</name>
<email>alexandru.gagniuc@hp.com</email>
</author>
<published>2025-03-14T13:10:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=62604063621fb075c7966286bdddcb057d883fa8'/>
<id>urn:sha1:62604063621fb075c7966286bdddcb057d883fa8</id>
<content type='text'>
In ThinPro, we use the convention &lt;upstream_ver&gt;+hp&lt;patchlevel&gt; for
the kernel package. This does not have a dash in the name or version.
This is built by editing ".version" before a build, and setting
EXTRAVERSION="+hp" and KDEB_PKGVERSION make variables:

    echo 68 &gt; .version
    make -j&lt;n&gt; EXTRAVERSION="+hp" bindeb-pkg KDEB_PKGVERSION=6.12.2+hp69

    .deb name: linux-image-6.12.2+hp_6.12.2+hp69_amd64.deb

Since commit 7d4f07d5cb71 ("kbuild: deb-pkg: squash
scripts/package/deb-build-option to debian/rules"), this no longer
works. The deb build logic changed, even though, the commit message
implies that the logic should be unmodified.

Before, KBUILD_BUILD_VERSION was not set if the KDEB_PKGVERSION did
not contain a dash. After the change KBUILD_BUILD_VERSION is always
set to KDEB_PKGVERSION. Since this determines UTS_VERSION, the uname
output to look off:

    (now)      uname -a: version 6.12.2+hp ... #6.12.2+hp69
    (expected) uname -a: version 6.12.2+hp ... #69

Update the debian/rules logic to restore the original behavior.

Fixes: 7d4f07d5cb71 ("kbuild: deb-pkg: squash scripts/package/deb-build-option to debian/rules")
Signed-off-by: Alexandru Gagniuc &lt;alexandru.gagniuc@hp.com&gt;
Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: deb-pkg: add comment about future removal of KDEB_COMPRESS</title>
<updated>2025-03-22T14:50:58Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2025-03-14T09:53:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a7a05b1b2739b94870b499818986b82974839fe0'/>
<id>urn:sha1:a7a05b1b2739b94870b499818986b82974839fe0</id>
<content type='text'>
'man dpkg-deb' describes as follows:

    DPKG_DEB_COMPRESSOR_TYPE
        Sets the compressor type to use (since dpkg 1.21.10).

        The -Z option overrides this value.

When commit 1a7f0a34ea7d ("builddeb: allow selection of .deb compressor")
was applied, dpkg-deb did not support this environment variable.

Later, dpkg commit c10aeffc6d71 ("dpkg-deb: Add support for
DPKG_DEB_COMPRESSOR_TYPE/LEVEL") introduced support for
DPKG_DEB_COMPRESSOR_TYPE, which provides the same functionality as
KDEB_COMPRESS.

KDEB_COMPRESS is still useful for users of older dpkg versions, but I
would like to remove this redundant functionality in the future.

This commit adds comments to notify users of the planned removal and to
encourage migration to DPKG_DEB_COMPRESSOR_TYPE where possible.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: deb-pkg: remove "version" variable in mkdebian</title>
<updated>2025-03-22T14:50:58Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2025-03-11T19:02:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1c3107ec73921088e55b7ff35861b9303962fd34'/>
<id>urn:sha1:1c3107ec73921088e55b7ff35861b9303962fd34</id>
<content type='text'>
${version} and ${KERNELRELEASE} are the same.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: deb-pkg: fix versioning for -rc releases</title>
<updated>2025-03-22T14:50:58Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2025-03-11T19:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7e752910b8acd1527af34b51851998feb33cc028'/>
<id>urn:sha1:7e752910b8acd1527af34b51851998feb33cc028</id>
<content type='text'>
The version number with -rc should be considered older than the final
release.

For example, 6.14-rc1 should be older than 6.14, but to handle this
correctly (just like Debian kernel), "-rc" must be replace with "~rc".

  $ dpkg --compare-versions 6.14-rc1 lt 6.14
  $ echo $?
  1
  $ dpkg --compare-versions 6.14~rc1 lt 6.14
  $ echo $?
  0

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: deb-pkg: add debarch for ARCH=loongarch64</title>
<updated>2025-03-15T12:19:44Z</updated>
<author>
<name>WangYuli</name>
<email>wangyuli@uniontech.com</email>
</author>
<published>2025-02-24T18:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1195306ee359ced2cb9d7a192e973872571cb93a'/>
<id>urn:sha1:1195306ee359ced2cb9d7a192e973872571cb93a</id>
<content type='text'>
Fix follow warning when 'make ARCH=loongarch64 bindeb-pkg':

  ** ** **  WARNING  ** ** **

  Your architecture doesn't have its equivalent
  Debian userspace architecture defined!
  Falling back to the current host architecture (loong64).
  Please add support for loongarch64 to ./scripts/package/mkdebian ...

Reported-by: Shiwei Liu &lt;liushiwei@anheng.com.cn&gt;
Signed-off-by: WangYuli &lt;wangyuli@uniontech.com&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: install-extmod-build: Fix build when specifying KBUILD_OUTPUT</title>
<updated>2025-03-06T11:32:30Z</updated>
<author>
<name>Inochi Amaoto</name>
<email>inochiama@gmail.com</email>
</author>
<published>2025-03-06T06:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b5e3956535466187657563b754ba0f1da8626c7f'/>
<id>urn:sha1:b5e3956535466187657563b754ba0f1da8626c7f</id>
<content type='text'>
Since commit 5f73e7d0386d ("kbuild: refactor cross-compiling
linux-headers package"), the linux-headers pacman package fails
to build when "O=" is set. The build system complains:

/mnt/chroot/linux/scripts/Makefile.build:41: mnt/chroots/linux-mainline/pacman/linux-upstream/pkg/linux-upstream-headers/usr//lib/modules/6.14.0-rc3-00350-g771dba31fffc/build/scripts/Makefile: No such file or directory

This is because the "srcroot" variable is set to "." and the
"build" variable is set to the absolute path. This makes the
"src" variables point to wrong directory.

Change the "build" variable to a relative path to "." to
fix build.

Fixes: 5f73e7d0386d ("kbuild: refactor cross-compiling linux-headers package")
Signed-off-by: Inochi Amaoto &lt;inochiama@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
</feed>
