<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/scripts/package, branch rust-fixes-6.12</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=rust-fixes-6.12</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=rust-fixes-6.12'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2024-09-07T08:24:08Z</updated>
<entry>
<title>kbuild: add debug package to pacman PKGBUILD</title>
<updated>2024-09-07T08:24:08Z</updated>
<author>
<name>Jose Fernandez</name>
<email>jose.fernandez@linux.dev</email>
</author>
<published>2024-08-24T22:07:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=4929f5b95f6b20ae10f2c409fb2ca58253e73706'/>
<id>urn:sha1:4929f5b95f6b20ae10f2c409fb2ca58253e73706</id>
<content type='text'>
Add a new debug package to the PKGBUILD for the pacman-pkg target. The
debug package includes the non-stripped vmlinux file with debug symbols
for kernel debugging and profiling. The file is installed at
/usr/src/debug/${pkgbase}, with a symbolic link at
/usr/lib/modules/$(uname -r)/build/vmlinux. The debug package is built
by default.

Signed-off-by: Jose Fernandez &lt;jose.fernandez@linux.dev&gt;
Reviewed-by: Peter Jung &lt;ptr1337@cachyos.org&gt;
Acked-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: pacman-pkg: do not override objtree</title>
<updated>2024-09-01T11:34:49Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-08-16T14:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=5b000f3cbb38c23992ee95fcd3e983ca66164eff'/>
<id>urn:sha1:5b000f3cbb38c23992ee95fcd3e983ca66164eff</id>
<content type='text'>
objtree is defined and exported by the top-level Makefile. I prefer
not to override it.

There is no need to pass the absolute path of objtree. PKGBUILD can
detect it by itself.

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;
Reviewed-by: Christian Heusel &lt;christian@heusel.eu&gt;
</content>
</entry>
<entry>
<title>kbuild: pacman-pkg: move common commands to a separate function</title>
<updated>2024-09-01T11:34:49Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-08-16T14:18:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b6223c2de6b0cade1e1d37490b304cb5df8d45d9'/>
<id>urn:sha1:b6223c2de6b0cade1e1d37490b304cb5df8d45d9</id>
<content type='text'>
All build and package functions share the following commands:

  export MAKEFLAGS="${KBUILD_MAKEFLAGS}"
  cd "${objtree}"

Factor out the common code.

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;
Reviewed-by: Christian Heusel &lt;christian@heusel.eu&gt;
</content>
</entry>
<entry>
<title>kbuild: control extra pacman packages with PACMAN_EXTRAPACKAGES</title>
<updated>2024-09-01T11:34:49Z</updated>
<author>
<name>Jose Fernandez</name>
<email>jose.fernandez@linux.dev</email>
</author>
<published>2024-08-13T01:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e6b65ee10588a552d04d488ebeac24bba20747a8'/>
<id>urn:sha1:e6b65ee10588a552d04d488ebeac24bba20747a8</id>
<content type='text'>
Introduce the PACMAN_EXTRAPACKAGES variable in PKGBUILD to allow users
to specify which additional packages are built by the pacman-pkg target.

Previously, the api-headers package was always included, and the headers
package was included only if CONFIG_MODULES=y. With this change, both
headers and api-headers packages are included by default. Users can now
control this behavior by setting PACMAN_EXTRAPACKAGES to a
space-separated list of desired extra packages or leaving it empty to
exclude all.

For example, to build only the base package without extras:

make pacman-pkg PACMAN_EXTRAPACKAGES=""

Signed-off-by: Jose Fernandez &lt;jose.fernandez@linux.dev&gt;
Reviewed-by: Peter Jung &lt;ptr1337@cachyos.org&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Reviewed-by: Christian Heusel &lt;christian@heusel.eu&gt;
Tested-by: Christian Heusel &lt;christian@heusel.eu&gt;
Acked-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: cross-compile linux-headers package when possible</title>
<updated>2024-09-01T11:33:33Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-07-27T07:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=f1d87664b82aeeaa1be9ee22dc85a59fd5a60d63'/>
<id>urn:sha1:f1d87664b82aeeaa1be9ee22dc85a59fd5a60d63</id>
<content type='text'>
A long standing issue in the upstream kernel packaging is that the
linux-headers package is not cross-compiled.

For example, you can cross-build Debian packages for arm64 by running
the following command:

  $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bindeb-pkg

However, the generated linux-headers-*_arm64.deb is useless because the
host programs in it were built for your build machine architecture
(likely x86), not arm64.

The Debian kernel maintains its own Makefiles to cross-compile host
tools without relying on Kbuild. [1]

Instead of adding such full custom Makefiles, this commit adds a small
piece of code to cross-compile host programs located under the scripts/
directory.

A straightforward solution is to pass HOSTCC=${CROSS_COMPILE}gcc, but it
would also cross-compile scripts/basic/fixdep, which needs to be native
to process the if_changed_dep macro. (This approach may work under some
circumstances; you can execute foreign architecture programs with the
help of binfmt_misc because Debian systems enable CONFIG_BINFMT_MISC,
but it would require installing QEMU and libc for that architecture.)

A trick is to use the external module build (KBUILD_EXTMOD=), which
does not rebuild scripts/basic/fixdep. ${CC} needs to be able to link
userspace programs (CONFIG_CC_CAN_LINK=y).

There are known limitations:

 - GCC plugins

   It would possible to rebuild GCC plugins for the target architecture
   by passing HOSTCXX=${CROSS_COMPILE}g++ with necessary packages
   installed, but gcc on the installed system emits
   "cc1: error: incompatible gcc/plugin versions".

 - objtool and resolve_btfids

   These are built by the tools build system. They are not covered by
   the current solution. The resulting linux-headers package is broken
   if CONFIG_OBJTOOL or CONFIG_DEBUG_INFO_BTF is enabled.

I only tested this with Debian, but it should work for other package
systems as well.

[1]: https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.9.9-1/debian/rules.real#L586

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;
</content>
</entry>
<entry>
<title>kbuild: slim down package for building external modules</title>
<updated>2024-09-01T11:33:33Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-07-27T07:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=aaed5c7739be81ebdd6008aedc8befd98c88e67a'/>
<id>urn:sha1:aaed5c7739be81ebdd6008aedc8befd98c88e67a</id>
<content type='text'>
Exclude directories and files unnecessary for building external modules:

 - include/config/  (except include/config/{auto.conf,kernel.release})
 - scripts/atomic/
 - scripts/dtc/
 - scripts/kconfig/
 - scripts/mod/mk_elfconfig
 - scripts/package/
 - scripts/unifdef
 - .config
 - *.o
 - .*.cmd

Avoid copying files twice for the following directories:

 - include/generated/
 - arch/*/include/generated/

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;
</content>
</entry>
<entry>
<title>kbuild: rpm-pkg: ghost modules.weakdep file</title>
<updated>2024-07-28T08:07:03Z</updated>
<author>
<name>Jose Ignacio Tornos Martinez</name>
<email>jtornosm@redhat.com</email>
</author>
<published>2024-07-26T09:00:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d01c14074be79e5f5270498f90530a12583fbf7a'/>
<id>urn:sha1:d01c14074be79e5f5270498f90530a12583fbf7a</id>
<content type='text'>
In the same way as for other similar files, mark as ghost the new file
generated by depmod for configured weak dependencies for modules,
modules.weakdep, so that although it is not included in the package,
claim the ownership on it.

Signed-off-by: Jose Ignacio Tornos Martinez &lt;jtornosm@redhat.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: rpm-pkg: Fix C locale setup</title>
<updated>2024-07-24T10:26:44Z</updated>
<author>
<name>Petr Vorel</name>
<email>pvorel@suse.cz</email>
</author>
<published>2024-07-24T08:46:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ba6c664081afd18da86ac49cb22ceb266f89a561'/>
<id>urn:sha1:ba6c664081afd18da86ac49cb22ceb266f89a561</id>
<content type='text'>
semicolon separation in LC_ALL is wrong. Either variable needs to be
exported before as a separate commit or set as part of the commit in the
beginning. Used second variant.

This fixes broken build on user's locale setup which makes 'date' binary
to produce invalid characters in rpm changelog (e.g. cs_CZ.UTF-8 'čec'):

$ make binrpm-pkg
  GEN     rpmbuild/SPECS/kernel.spec
rpmbuild -bb rpmbuild/SPECS/kernel.spec --define='_topdirlinux/rpmbuild' \
    --target x86_64-linux --build-in-place --noprep --define='_smp_mflags \
    %{nil}' $(rpm -q rpm &gt;/dev/null 2&gt;&amp;1 || echo --nodeps)
Building target platforms: x86_64-linux
Building for target x86_64-linux
error: bad date in %changelog: St čec 24 2024 user &lt;user@somehost&gt;
make[2]: *** [scripts/Makefile.package:71: binrpm-pkg] Error 1
make[1]: *** [linux/Makefile:1546: binrpm-pkg] Error 2
make: *** [Makefile:224: __sub-make] Error 2

Fixes: 301c10908e42 ("kbuild: rpm-pkg: introduce a simple changelog section for kernel.spec")
Signed-off-by: Petr Vorel &lt;pvorel@suse.cz&gt;
Reviewed-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kbuild-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild</title>
<updated>2024-07-23T21:32:21Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-07-23T21:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ca83c61cb3db964061ea186654bf8e1879589de3'/>
<id>urn:sha1:ca83c61cb3db964061ea186654bf8e1879589de3</id>
<content type='text'>
Pull Kbuild updates from Masahiro Yamada:

 - Remove tristate choice support from Kconfig

 - Stop using the PROVIDE() directive in the linker script

 - Reduce the number of links for the combination of CONFIG_KALLSYMS and
   CONFIG_DEBUG_INFO_BTF

 - Enable the warning for symbol reference to .exit.* sections by
   default

 - Fix warnings in RPM package builds

 - Improve scripts/make_fit.py to generate a FIT image with separate
   base DTB and overlays

 - Improve choice value calculation in Kconfig

 - Fix conditional prompt behavior in choice in Kconfig

 - Remove support for the uncommon EMAIL environment variable in Debian
   package builds

 - Remove support for the uncommon "name &lt;email&gt;" form for the DEBEMAIL
   environment variable

 - Raise the minimum supported GNU Make version to 4.0

 - Remove stale code for the absolute kallsyms

 - Move header files commonly used for host programs to scripts/include/

 - Introduce the pacman-pkg target to generate a pacman package used in
   Arch Linux

 - Clean up Kconfig

* tag 'kbuild-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (65 commits)
  kbuild: doc: gcc to CC change
  kallsyms: change sym_entry::percpu_absolute to bool type
  kallsyms: unify seq and start_pos fields of struct sym_entry
  kallsyms: add more original symbol type/name in comment lines
  kallsyms: use \t instead of a tab in printf()
  kallsyms: avoid repeated calculation of array size for markers
  kbuild: add script and target to generate pacman package
  modpost: use generic macros for hash table implementation
  kbuild: move some helper headers from scripts/kconfig/ to scripts/include/
  Makefile: add comment to discourage tools/* addition for kernel builds
  kbuild: clean up scripts/remove-stale-files
  kconfig: recursive checks drop file/lineno
  kbuild: rpm-pkg: introduce a simple changelog section for kernel.spec
  kallsyms: get rid of code for absolute kallsyms
  kbuild: Create INSTALL_PATH directory if it does not exist
  kbuild: Abort make on install failures
  kconfig: remove 'e1' and 'e2' macros from expression deduplication
  kconfig: remove SYMBOL_CHOICEVAL flag
  kconfig: add const qualifiers to several function arguments
  kconfig: call expr_eliminate_yn() at least once in expr_eliminate_dups()
  ...
</content>
</entry>
<entry>
<title>kbuild: add script and target to generate pacman package</title>
<updated>2024-07-21T16:24:22Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-07-20T09:18:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c8578539debaedfbb4671e1954be8ebbd1307c6f'/>
<id>urn:sha1:c8578539debaedfbb4671e1954be8ebbd1307c6f</id>
<content type='text'>
pacman is the package manager used by Arch Linux and its derivates.
Creating native packages from the kernel tree has multiple advantages:

* The package triggers the correct hooks for initramfs generation and
  bootloader configuration
* Uninstallation is complete and also invokes the relevant hooks
* New UAPI headers can be installed without any manual bookkeeping

The PKGBUILD file is a modified version of the one used for the
downstream Arch Linux "linux" package.
Extra steps that should not be necessary for a development kernel have
been removed and an UAPI header package has been added.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
</feed>
