Search
Open Build Service
>
Projects
>
Tizen
:
Unified
:
ref:20210113.1
>
odroid-linux-kernel
> _service:gbs:odroid-linux-kernel.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:gbs:odroid-linux-kernel.spec of Package odroid-linux-kernel
# Ignore double dash in version for rpmbuild %define _wrong_version_format_terminate_build 0 %define config_name tizen_odroid_defconfig %define buildarch arm %define target_board odroidxu3 %define variant %{buildarch}-%{target_board} Name: odroid-linux-kernel VCS: platform/kernel/linux-exynos#82be6ca5275c6fc3d2f30a67c5e5c56d6e372557 Summary: The Linux Kernel for ODROID XU3 Version: 4.14.99 Release: 0 License: GPL-2.0 ExclusiveArch: %{arm} Group: System/Kernel Vendor: The Linux Community URL: http://www.kernel.org Source0: linux-kernel-%{version}.tar.xz # Patches auto-generated by git-buildpackage: Patch0: 383e9b6-to-0d67e5e.diff.gz Patch1: 0002-ath10k-avoid-possible-string-overflow.patch Patch2: 0003-tracing-Silence-GCC-9-array-bounds-warning.patch Patch3: 0004-arm64-Silence-gcc-warnings-about-arch-ABI-drift.patch Patch4: 0005-arm64-Don-t-unconditionally-add-Wno-psabi-to-KBUILD_.patch Patch5: 0006-proc-coredump-add-CoreDumping-flag-to-proc-pid-statu.patch Patch6: 0007-leds-add-support-for-MAX77843-led-control-driver.patch Patch7: 0008-arm64-dts-exynos5433-tm2-common-add-max77843-rgb-led.patch Patch8: 0009-arm64-configs-tizen_tm2_defconfig-Enable-max77843-le.patch BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root %define fullVersion %{version}-%{variant} BuildRequires: module-init-tools BuildRequires: bc %description The Linux Kernel, the operating system core itself %package -n %{variant}-linux-kernel Summary: Tizen kernel for %{target_board} Group: System/Kernel Provides: %{variant}-odroid-kernel-profile_common = %{version}-%{release} Provides: %{variant}-odroid-kernel-profile_mobile = %{version}-%{release} Provides: %{variant}-odroid-kernel-profile_tv = %{version}-%{release} Provides: %{variant}-odroid-kernel-profile_ivi = %{version}-%{release} Provides: %{variant}-kernel-uname-r = %{fullVersion} Provides: linux-kernel = %{version}-%{release} %description -n %{variant}-linux-kernel This package contains the Linux kernel for Tizen (common/mobile/tv/ivi profile, arch %{buildarch}, target board %{target_board}) %package -n %{variant}-linux-kernel-modules Summary: Kernel modules for %{target_board} Group: System/Kernel Provides: %{variant}-kernel-modules = %{fullVersion} Provides: %{variant}-kernel-modules-uname-r = %{fullVersion} %description -n %{variant}-linux-kernel-modules Kernel-modules includes the loadable kernel modules(.ko files) for %{target_board} %package -n %{variant}-linux-kernel-devel License: GPL-2.0 Summary: Linux support kernel map and etc for other packages Group: System/Kernel Provides: %{variant}-kernel-devel = %{fullVersion} Provides: %{variant}-kernel-devel-uname-r = %{fullVersion} %description -n %{variant}-linux-kernel-devel This package provides kernel map and etc information for odroid kernel. %package -n kdbus-tests License: Apache-2.0 Summary: Kdbus tests Group: Base/IPC BuildRequires: libcap-devel rsync %description -n kdbus-tests A single binary that tests kdbus operation. %prep %setup -q -n linux-kernel-%{version} # 383e9b6-to-0d67e5e.diff.gz %patch0 -p1 # 0002-ath10k-avoid-possible-string-overflow.patch %patch1 -p1 # 0003-tracing-Silence-GCC-9-array-bounds-warning.patch %patch2 -p1 # 0004-arm64-Silence-gcc-warnings-about-arch-ABI-drift.patch %patch3 -p1 # 0005-arm64-Don-t-unconditionally-add-Wno-psabi-to-KBUILD_.patch %patch4 -p1 # 0006-proc-coredump-add-CoreDumping-flag-to-proc-pid-statu.patch %patch5 -p1 # 0007-leds-add-support-for-MAX77843-led-control-driver.patch %patch6 -p1 # 0008-arm64-dts-exynos5433-tm2-common-add-max77843-rgb-led.patch %patch7 -p1 # 0009-arm64-configs-tizen_tm2_defconfig-Enable-max77843-le.patch %patch8 -p1 %build %{?asan:/usr/bin/gcc-unforce-options} %{?ubsan:/usr/bin/gcc-unforce-options} # Make sure EXTRAVERSION says what we want it to say sed -i "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}-%{variant}/" Makefile # 1. Compile sources make %{config_name} make %{?_smp_mflags} # 2. Build zImage make zImage %{?_smp_mflags} make dtbs %{?_smp_mflags} # 3. Build modules make modules %{?_smp_mflags} # Additionally, build kdbus tests make -C tools/testing/selftests/kdbus %install QA_SKIP_BUILD_ROOT="DO_NOT_WANT"; export QA_SKIP_BUILD_ROOT # 1. Destynation directories mkdir -p %{buildroot}/boot/ mkdir -p %{buildroot}/lib/modules/%{fullVersion} # 2. Install zImage, System.map, ... install -m 755 arch/arm/boot/zImage %{buildroot}/boot/ install -m 644 arch/arm/boot/dts/*odroid*.dtb %{buildroot}/boot/ install -m 644 System.map %{buildroot}/boot/System.map-%{fullVersion} install -m 644 .config %{buildroot}/boot/config-%{fullVersion} # 3. Install modules make INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=%{buildroot} modules_install KERNELRELEASE=%{fullVersion} rm -rf %{buildroot}/boot/vmlinux* rm -rf %{buildroot}/System.map* rm -rf %{buildroot}/vmlinux* # 7. Update file permisions find %{buildroot}/lib/modules/ -name "*.ko" -type f -print0 | xargs -0 chmod 755 # 8. Create symbolic links rm -f %{buildroot}/lib/modules/%{fullVersion}/build rm -f %{buildroot}/lib/modules/%{fullVersion}/source # install kdbus tests %define _test_runner_dir /usr/lib/dbus-tests/runner mkdir -p %{buildroot}%{_test_runner_dir} make -C tools/testing/selftests/kdbus INSTALL_PATH=%{buildroot}%{_test_runner_dir} TEST_PROGS=kdbus-test install make -C tools/testing/selftests/kdbus clean # 9-1. remove unnecessary files to prepare for devel package rm -f tools/mkimage* find %{_builddir}/linux-kernel-%{version} -name "*\.HEX" -type f -delete find %{_builddir}/linux-kernel-%{version} -name "vdso.so.raw" -type f -delete find %{_builddir}/linux-kernel-%{version} -name ".tmp_vmlinux*" -delete find %{_builddir}/linux-kernel-%{version} -name ".gitignore" -delete find %{_builddir}/linux-kernel-%{version} -name "\.*dtb*tmp" -delete find %{_builddir}/linux-kernel-%{version} -name "\.*dtb" -delete find %{_builddir}/linux-kernel-%{version} -name "*\.*tmp" -delete find %{_builddir}/linux-kernel-%{version} -name "vmlinux" -delete find %{_builddir}/linux-kernel-%{version} -name "zImage" -delete find %{_builddir}/linux-kernel-%{version} -name "*.cmd" -delete find %{_builddir}/linux-kernel-%{version} -name "*\.ko" -delete find %{_builddir}/linux-kernel-%{version} -name "*\.o" -delete find %{_builddir}/linux-kernel-%{version} -name "*\.S" -delete find %{_builddir}/linux-kernel-%{version} -name "*\.c" -not -path "%{_builddir}/linux-kernel-%{version}/scripts/*" -delete # 9-2. copy devel package mkdir -p %{buildroot}/boot/kernel/devel cp -r %{_builddir}/linux-kernel-%{version} %{buildroot}/boot/kernel/devel/kernel-devel-%{variant} %clean rm -rf %{buildroot} %files -n %{variant}-linux-kernel-modules /lib/modules/* %files -n %{variant}-linux-kernel-devel /boot/kernel/devel/* %files -n %{variant}-linux-kernel %license COPYING /boot/zImage /boot/*.dtb /boot/System.map* /boot/config* %files -n kdbus-tests %defattr(-,root,root) %{_test_runner_dir}/kdbus-test