1. 16 3月, 2023 2 次提交
  2. 15 3月, 2023 5 次提交
    • M
      kbuild: deb-pkg: use dh_listpackages to know enabled packages · 36862e14
      Masahiro Yamada 提交于
      Use dh_listpackages to get a list of all binary packages.
      
      With this, debian/control lists which binary packages will be produced.
      Previously, ARCH=um listed linux-libc-dev in debian/control, but it
      was not generated because each of mkdebian and builddeb independently
      maintained the if-conditionals.
      
      Another motivation is to allow scripts/package/builddeb to get the
      package name (linux-image-*, etc.) dynamically from debian/control.
      
      This will also allow the BuildProfile to control the generation of
      the binary packages.
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      36862e14
    • M
      kbuild: deb-pkg: split image and debug objects staging out into functions · b611daae
      Masahiro Yamada 提交于
      Prepare for the refactoring in the next commit.
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      b611daae
    • M
      kbuild: deb-pkg: set CROSS_COMPILE only when undefined · f50aa51c
      Masahiro Yamada 提交于
      Commit 3ab18a62 ("kbuild: deb-pkg: improve the usability of source
      package") set needless CROSS_COMPILE.
      
      For example, 'make allnoconfig bindeb-pkg' on a x86_64 system will set
      CROSS_COMPILE=i686-linux-gnu-, where the biarch compiler 'gcc' should
      work for building the i386 kernel.
      
        $ uname -m
        x86_64
        $ make allnoconfig bindeb-pkg >/dev/null
        dpkg-architecture: warning: specified GNU system type i686-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
         dpkg-source --before-build .
         debian/rules binary
        scripts/Kconfig.include:39: C compiler 'i686-linux-gnu-gcc' not found
        make[6]: *** [scripts/kconfig/Makefile:77: olddefconfig] Error 1
        make[5]: *** [Makefile:693: olddefconfig] Error 2
        make[4]: *** [Makefile:358: __build_one_by_one] Error 2
        make[3]: *** [debian/rules:7: build-arch] Error 2
        dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
        make[2]: *** [scripts/Makefile.package:127: bindeb-pkg] Error 2
        make[1]: *** [Makefile:1657: bindeb-pkg] Error 2
        make: *** [Makefile:358: __build_one_by_one] Error 2
      
      Check whether CROSS_COMPILE is defined, instead of whether it is non-empty.
      
      If you invoke debian/rules via Kbuild, CROSS_COMPILE is always defined
      in the top Makefile.
      
      Fixes: 3ab18a62 ("kbuild: deb-pkg: improve the usability of source package")
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      f50aa51c
    • M
      kbuild: deb-pkg: do not take KERNELRELEASE from the source version · 7a531c21
      Masahiro Yamada 提交于
      KERNELRELEASE does not need to match the package version in changelog.
      Rather, it conventially matches what is called 'ABINAME', which is a
      part of the binary package names.
      
      Both are the same by default, but the former might be overridden by
      KDEB_PKGVERSION. In this case, the resulting package would not boot
      because /lib/modules/$(uname -r) does not point the module directory.
      
      Partially revert 3ab18a62 ("kbuild: deb-pkg: improve the usability
      of source package").
      Reported-by: NPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
      Fixes: 3ab18a62 ("kbuild: deb-pkg: improve the usability of source package")
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: NPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
      7a531c21
    • M
      kbuild: deb-pkg: make debian source package working again · 2fd6c455
      Masahiro Yamada 提交于
      Since commit c5bf2efb ("kbuild: deb-pkg: fix binary-arch and clean
      in debian/rules"), the source package generated by 'make deb-pkg' fails
      to build.
      
      I terribly missed the fact that the intdeb-pkg target may regenerate
      include/config/kernel.release due to the following in the top Makefile:
      
        %pkg: include/config/kernel.release FORCE
      
      Restore KERNELRELEASE= option to avoid the kernel.release disagreement
      between build-arch and binary-arch.
      
      Fixes: c5bf2efb ("kbuild: deb-pkg: fix binary-arch and clean in debian/rules")
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      2fd6c455
  3. 26 2月, 2023 8 次提交
  4. 30 1月, 2023 1 次提交
  5. 26 1月, 2023 2 次提交
  6. 11 1月, 2023 1 次提交
  7. 30 12月, 2022 1 次提交
  8. 17 12月, 2022 1 次提交
  9. 23 11月, 2022 1 次提交
  10. 21 11月, 2022 1 次提交
  11. 17 11月, 2022 1 次提交
    • M
      kbuild: Restore .version auto-increment behaviour for Debian packages · 5db8face
      Marc Zyngier 提交于
      Since 2df8220c ("kbuild: build init/built-in.a just once"),
      generating Debian packages using 'make bindeb-pkg' results in
      packages that are stuck to the same .version, leading to unexpected
      behaviours (multiple packages with the same version).
      
      That's because the mkdebian script samples the build version
      before building the kernel, and forces the use of that version
      number for the actual build.
      
      Restore the previous behaviour by calling init/build-version
      instead of reading the .version file. This is likely to result
      in too many .version bumps, but this is what was happening before
      (although the bump was affecting builds made after the current one).
      
      Fixes: 2df8220c ("kbuild: build init/built-in.a just once")
      Signed-off-by: NMarc Zyngier <maz@kernel.org>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      5db8face
  12. 13 10月, 2022 1 次提交
    • Z
      kbuild: Stop including vmlinux.bz2 in the rpm's · fc8c2d8f
      Zack Rusin 提交于
      vmlinux.bz2 was added to the rpm packages in 2009 in the
      fc370ecf ("kbuild: add vmlinux to kernel rpm") but seemingly hasn't
      been used since.
      
      Originally this should have been split up in a seperate debugging
      package because it massively increases the size of the generated rpm's
      e.g. kernel rpm built using binrpm-pkg on Fedora 36 default 5.19.8 kernel
      config and localmodconfig is ~255MB with vmlinux.bz2 and only ~65MB
      without it.
      
      Make the kernel built rpms about 4x smaller by not including the unused
      vmlinux.bz2 in them.
      Signed-off-by: NZack Rusin <zackr@vmware.com>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      fc8c2d8f
  13. 29 9月, 2022 1 次提交
    • J
      kbuild: rpm-pkg: fix breakage when V=1 is used · 2e07005f
      Janis Schoetterl-Glausch 提交于
      Doing make V=1 binrpm-pkg results in:
      
       Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.EgV6qJ
       + umask 022
       + cd .
       + /bin/rm -rf /home/scgl/rpmbuild/BUILDROOT/kernel-6.0.0_rc5+-1.s390x
       + /bin/mkdir -p /home/scgl/rpmbuild/BUILDROOT
       + /bin/mkdir /home/scgl/rpmbuild/BUILDROOT/kernel-6.0.0_rc5+-1.s390x
       + mkdir -p /home/scgl/rpmbuild/BUILDROOT/kernel-6.0.0_rc5+-1.s390x/boot
       + make -f ./Makefile image_name
       + cp test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) arch/s390/boot/bzImage /home/scgl/rpmbuild/BUILDROOT/kernel-6.0.0_rc5+-1.s390x/boot/vmlinuz-6.0.0-rc5+
       cp: invalid option -- 'e'
       Try 'cp --help' for more information.
       error: Bad exit status from /var/tmp/rpm-tmp.EgV6qJ (%install)
      
      Because the make call to get the image name is verbose and prints
      additional information.
      
      Fixes: 993bdde9 ("kbuild: add image_name to no-sync-config-targets")
      Signed-off-by: NJanis Schoetterl-Glausch <scgl@linux.ibm.com>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      2e07005f
  14. 27 7月, 2022 1 次提交
    • M
      kbuild: rpm-pkg: fix build error when _arch is undefined · 3089b2be
      Masahiro Yamada 提交于
      Cross-building (bin)rpm-pkg fails on several architectures.
      
      For example, 'make ARCH=arm binrpm-pkg' fails like follows:
      
        sh ./scripts/package/mkspec prebuilt > ./binkernel.spec
        rpmbuild  --define "_builddir ." --target \
                arm -bb ./binkernel.spec
        Building target platforms: arm
        Building for target arm
        warning: line 19: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers
        Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.0S8t2F
        + umask 022
        + cd .
        + mkdir -p /home/masahiro/rpmbuild/BUILDROOT/kernel-5.19.0_rc6-19.%{_arch}/boot
        + make -f ./Makefile image_name
        + cp arch/arm/boot/zImage /home/masahiro/rpmbuild/BUILDROOT/kernel-5.19.0_rc6-19.%{_arch}/boot/vmlinuz-5.19.0-rc6
        + make -f ./Makefile INSTALL_MOD_PATH=/home/masahiro/rpmbuild/BUILDROOT/kernel-5.19.0_rc6-19.%{_arch} modules_install
        make[3]: *** No rule to make target '/home/masahiro/rpmbuild/BUILDROOT/kernel-5.19.0_rc6-19.arch/arm/crypto/aes-arm-bs.ko{_arch}/lib/modules/5.19.0-rc6/kernel/%', needed by '__modinst'.  Stop.
        make[2]: *** [Makefile:1768: modules_install] Error 2
        error: Bad exit status from /var/tmp/rpm-tmp.0S8t2F (%install)
      
      By default, 'buildroot' contains %{_arch} (see /usr/lib/rpm/macros).
      
      _arch is generally defined in /usr/lib/rpm/platforms/*/macros, where
      the platform sub-directory is specified by --target= option for cross
      builds.
      
      If the given arch does not exist, %{_arch} is not expanded.
      In the example above, --target=arm is passed to rpmbuild, but
      /usr/lib/rpm/platforms/arm-linux/ does not exist.
      
      The '%' character in the path confuses GNU make and rpmbuild.
      
      The same occurs for such architectures as csky, microblaze, nios2, etc.
      
      Define _arch if it has not been defined.
      Reported-by: NJason Self <jason@bluehome.net>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      3089b2be
  15. 22 4月, 2022 1 次提交
  16. 12 10月, 2021 1 次提交
  17. 30 3月, 2021 1 次提交
  18. 02 11月, 2020 1 次提交
  19. 14 10月, 2020 2 次提交
  20. 09 10月, 2020 3 次提交
  21. 24 9月, 2020 1 次提交
  22. 10 8月, 2020 1 次提交
  23. 07 7月, 2020 1 次提交
  24. 11 6月, 2020 1 次提交