Re: [OS-BUILD PATCH] Allow building of kernel-tools standalone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 28, 2020 at 03:53:33AM -0000, GitLab Bridge on behalf of dzickusrh wrote:
> From: Don Zickus <dzickus@xxxxxxxxxx>
> 
> For CKI and its cross-compile environment, it can not cross
> compile userspace tools.  Instead we will native compiles them.
> 
> To allow this split, the kernel.spec needs to support only
> building userspace stuff and not the kernel itself.
> 
> However the userspace tools need some vars defined. This
> patch creates a new function and sets up those vars.
> 
> Also very useful for debugging userspace tools and skipping
> the hour long kernel build times (like LTO).
> 
> To use this effectively, one would use
> --without_up
> --without_debug
> --without_zfcpdump
> 
> Original author is Brian Masney <bmasney@xxxxxxxxxx>, which
> I took from his RHEL-8 contribution.
> 
> Cc: Brian Masney <bmasney@xxxxxxxxxx>
> Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx>
> ---
>  redhat/kernel.spec.template | 68 +++++++++++++++++++++++--------------
>  1 file changed, 42 insertions(+), 26 deletions(-)
> 
> diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
> index 7cbfb9c139eb..5354ee7cffdf 100644
> --- a/redhat/kernel.spec.template
> +++ b/redhat/kernel.spec.template
> @@ -79,10 +79,9 @@ Summary: The Linux kernel
>  
>  %define pkg_release %{specrelease}
>  
> -# What parts do we want to build?  We must build at least one kernel.
> -# These are the kernels that are built IF the architecture allows it.
> -# All should default to 1 (enabled) and be flipped to 0 (disabled)
> -# by later arch-specific checks.
> +# What parts do we want to build? These are the kernels that are built IF the
> +# architecture allows it. All should default to 1 (enabled) and be flipped to
> +# 0 (disabled) by later arch-specific checks.
>  
>  # The following build options are enabled by default.
>  # Use either --without <opt> in your rpmbuild command or force values
> @@ -1338,33 +1337,18 @@ cp_vmlinux()
>  
>  %define make %{__make} %{?cross_opts} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}"
>  
> -BuildKernel() {
> -    MakeTarget=$1
> -    KernelImage=$2
> -    Flavour=$4
> -    DoVDSO=$3
> -    Flav=${Flavour:++${Flavour}}
> -    InstallName=${5:-vmlinuz}
> +InitBuildVars() {
> +    # Initialize the kernel .config file and create some variables that are
> +    # needed for the actual build process.
>  
> -    DoModules=1
> -    if [ "$Flavour" = "zfcpdump" ]; then
> -	    DoModules=0
> -    fi
> +    Flavour=$1
> +    Flav=${Flavour:++${Flavour}}
>  
>      # Pick the right config file for the kernel we're building

Just one minor nit pick. This comment needs updated to 'Pick the right
kernel config file' to match the RHEL 8 patch. All of the other parts
look good.

Brian
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux