From: Scott Weaver <scweaver@xxxxxxxxxx>
kernel.spec: automotiveonly: do not create automotive variant
When building automotive only, to generate kernel-automotive packages, it
doesn't make sense to create the automotive variant of automotive
(kernel-automotive-automotive).
Signed-off-by: Scott Weaver <scweaver@xxxxxxxxxx>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -590,10 +590,12 @@ rh-configs: dist-rhel-configs
automotive-configs-pre:
@cp $(REDHAT)/configs/priority.$(FLAVOR) $(REDHAT)/configs/priority.$(FLAVOR).bak
@sed -i '/^#\|^ORDER\|^\(x86_64\|aarch64\)-automotive/!d' $(REDHAT)/configs/priority.$(FLAVOR)
+ @sed -i 's/^\([^=]*\)-automotive/1円/' $(REDHAT)/configs/priority.$(FLAVOR)
automotive-configs-post:
@mv $(REDHAT)/configs/priority.$(FLAVOR).bak $(REDHAT)/configs/priority.$(FLAVOR)
dist-automotive-configs: ##build build only the automotive configs
+dist-automotive-configs: SPECPACKAGE_NAME := kernel-automotive
dist-automotive-configs: FLAVOR = rhel
dist-automotive-configs: automotive-configs-pre .WAIT dist-configs .WAIT automotive-configs-post
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -1082,11 +1082,18 @@ Source487: %{name}-riscv64-rt-debug-fedora.config
%endif
%if %{include_automotive}
+%if %{with_automotiveonly}
+Source488: %{name}-aarch64-rhel.config
+Source489: %{name}-aarch64-debug-rhel.config
+Source490: %{name}-x86_64-rhel.config
+Source491: %{name}-x86_64-debug-rhel.config
+%else
Source488: %{name}-aarch64-automotive-rhel.config
Source489: %{name}-aarch64-automotive-debug-rhel.config
Source490: %{name}-x86_64-automotive-rhel.config
Source491: %{name}-x86_64-automotive-debug-rhel.config
%endif
+%endif
# Sources for kernel-tools
@@ -1761,8 +1768,13 @@ on kernel bugs, as some of these options impact performance noticably.
%if %{with_debug} && %{with_automotive}
%define variant_summary The Linux Automotive kernel compiled with extra debugging enabled
+%if %{with_automotiveonly}
+%kernel_variant_package debug
+%description debug-core
+%else
%kernel_variant_package automotive-debug
%description automotive-debug-core
+%endif
The kernel package contains the Linux kernel (vmlinuz), the core of any
Linux operating system. The kernel handles the basic functions
of the operating system: memory allocation, process allocation, device
@@ -1775,8 +1787,13 @@ on kernel bugs, as some of these options impact performance noticably.
%if %{with_automotive_base}
%define variant_summary The Linux kernel compiled with PREEMPT_RT enabled
+%if %{with_automotiveonly}
+%kernel_variant_package
+%description core
+%else
%kernel_variant_package automotive
%description automotive-core
+%endif
This package includes a version of the Linux kernel compiled with the
PREEMPT_RT real-time preemption support, targeted for Automotive platforms
%endif
@@ -3014,8 +3031,12 @@ BuildKernel %make_target %kernel_image %{_use_vdso} rt-64k-debug
%endif
%if %{with_automotive}
+%if %{with_automotiveonly}
+BuildKernel %make_target %kernel_image %{_use_vdso} debug
+%else
BuildKernel %make_target %kernel_image %{_use_vdso} automotive-debug
%endif
+%endif
%if %{with_arm64_16k}
BuildKernel %make_target %kernel_image %{_use_vdso} 16k-debug
@@ -3051,8 +3072,12 @@ BuildKernel %make_target %kernel_image %{_use_vdso} rt-64k
%endif
%if %{with_automotive_base}
+%if %{with_automotiveonly}
+BuildKernel %make_target %kernel_image %{_use_vdso}
+%else
BuildKernel %make_target %kernel_image %{_use_vdso} automotive
%endif
+%endif
%if %{with_up_base}
BuildKernel %make_target %kernel_image %{_use_vdso}
@@ -3879,9 +3904,14 @@ fi\
%endif
%if %{with_automotive_base}
+%if %{with_automotiveonly}
+%kernel_variant_preun
+%kernel_variant_post
+%else
%kernel_variant_preun -v automotive
%kernel_variant_post -v automotive -r kernel
%endif
+%endif
%if %{with_realtime} && %{with_debug}
%kernel_variant_preun -v rt-debug
@@ -3901,9 +3931,14 @@ fi\
%endif
%if %{with_automotive} && %{with_debug}
+%if %{with_automotiveonly}
+%kernel_variant_preun -v debug
+%kernel_variant_post -v debug
+%else
%kernel_variant_preun -v automotive-debug
%kernel_variant_post -v automotive-debug
%endif
+%endif
###
### file lists
@@ -4222,10 +4257,18 @@ fi\
%if %{with_realtime}
%kernel_variant_files %{_use_vdso} %{with_debug} rt-debug
%endif
+%if %{with_automotiveonly}
+%kernel_variant_files %{_use_vdso} %{with_automotive_base}
+%else
%kernel_variant_files %{_use_vdso} %{with_automotive_base} automotive
+%endif
%if %{with_automotive}
+%if %{with_automotiveonly}
+%kernel_variant_files %{_use_vdso} %{with_debug} debug
+%else
%kernel_variant_files %{_use_vdso} %{with_debug} automotive-debug
%endif
+%endif
%if %{with_debug_meta}
%files debug
%files debug-core
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3870
--
_______________________________________________
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
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue