summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorInha Song <ideal.song@samsung.com>2015-03-17 10:58:16 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:50:05 +0900
commit015a56f57dc86ec15c857beba881ca9edce3e200 (patch)
tree095913a0c650697bb6e42d1d54f8530649af3bb7 /packaging
parentf02659e7b3add8ffc1d6f25fbcf1a6f126186dff (diff)
packaging: add spec file to generate odroid-xu3 kernel by GBS
This patch add spec file to generate odroid-xu3 kernel-headers by GBS. Signed-off-by: Inha Song <ideal.song@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/odroid-linux-kernel.spec102
1 files changed, 102 insertions, 0 deletions
diff --git a/packaging/odroid-linux-kernel.spec b/packaging/odroid-linux-kernel.spec
new file mode 100644
index 000000000000..918050c5d247
--- /dev/null
+++ b/packaging/odroid-linux-kernel.spec
@@ -0,0 +1,102 @@
+%define config_name odroidxu3_defconfig
+%define buildarch arm
+%define target_board odroidxu3
+%define variant %{buildarch}-%{target_board}
+
+Name: odroid-linux-kernel
+Summary: The Linux Kernel for ODROID XU3
+Version: 4.0.0
+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
+BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root
+
+%define fullVersion %{version}-%{variant}
+
+BuildRequires: module-init-tools
+BuildRequires: u-boot-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-%{profile} = %{version}-%{release}
+Provides: %{variant}-kernel-uname-r = %{fullVersion}
+
+%description -n %{variant}-linux-kernel
+This package contains the Linux kernel for Tizen (%{profile} 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}
+
+%prep
+%setup -q -n linux-kernel-%{version}
+
+%build
+# 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}
+
+%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/*.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 -exec chmod 755 {} \;
+
+# 8. Create symbolic links
+rm -f %{buildroot}/lib/modules/%{fullVersion}/build
+rm -f %{buildroot}/lib/modules/%{fullVersion}/source
+
+%clean
+rm -rf %{buildroot}
+
+%files -n %{variant}-linux-kernel-modules
+/lib/modules/
+
+%files -n %{variant}-linux-kernel
+%license COPYING
+/boot/zImage
+/boot/*.dtb
+/boot/System.map*
+/boot/config*