Search
SailfishOS Open Build Service
>
Projects
>
home:sledge
:
beagle
>
kernel-adaptation-dm3730
> kernel-adaptation-dm3730.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File kernel-adaptation-dm3730.spec of Package kernel-adaptation-dm3730
# # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version 0.25 # Name: kernel-adaptation-dm3730 # >> macros # kernel_version_build is the kernel version with the unique build release and flavour, e.g., 2.6.36.2-4.1-device %define kernel_version_build %{version}-%{release}-%{kernel_target_hw} # kernel_devel_dir for includes/kconfig/makefiles and other devel- files %define kernel_devel_dir %{_prefix}/src/kernels/%{kernel_version_build} # << macros %define builds_uImage 1 %define builds_firmware 0 Summary: Kernel Adaptation %{kernel_target_hw} Version: 3.4.7 Release: 1 Group: Kernel/Linux Kernel License: GPLv2 Source0: kernel-adaptation-dm3730-3.4.7.tar.bz2 Source1: %{name}.config Source100: kernel-adaptation-dm3730.yaml Patch0: 0001-smsc911x-added-fixed-regulators.patch Patch1: 0002-usb-host-excluded-some-mux_inits-for-medistream.patch Patch2: 0003-mach-omap2-added-medistream-board.patch Patch3: 0004-displays-added-panel-for-medistream.patch Patch4: 0005-sound-using-omap3evm-sound-soc-for-medistream.patch Patch5: 0006-musb-selecting-NOP_USB_XCEIV-for-medistream.patch Patch6: 0007-omap_vout-removed-omapvid_init-calls-that-led-to-seg.patch Patch7: 0008-smsc911x-using-MAC-address-from-kernel-commandline.patch Patch8: 0009-hid-input-changes-for-egalax-touchscreen-driver.patch Patch9: 0010-uncompress-setting-UART3-for-early-console-messages.patch Patch10: 0012-board-medistream-added-omap3_camera_init-to-get-ISP-.patch Patch11: 0013-smsc911x-decreased-TX-fifo-size-to-4KB.patch Patch12: 0014-sound-fixed-micbias-register-for-twl4030.patch Patch13: 0015-sound-enabled-microphone-on-omap3evm-soc.patch Patch14: 0016-medistream-setting-dpll2-clock-to-460MHz-for-DSP.patch Patch15: 0017-logo-added-bewatec-logo.patch Patch16: 0018-smsc911x-fixed-buffer-overflow-when-setting-mac-addr.patch Patch17: 0019-mfd-fixed-unnecessary-boot-error-message.patch Patch18: 0020-omap_vout-forcing-video-layer-to-overlay1.patch Patch19: 0021-video-omap2-skipping-clearing-of-framebuffer.patch Patch20: 0022-board-medistream-added-parameter-to-skip-framebuffer.patch Patch21: 0023-fixed-DSP-clock-frequency.patch Patch22: 0024-smsc911x-removed-spinlocks.patch Patch23: 0025-initializing-mpu-rate-in-opp-modes.patch Patch24: 0026-pmon-enabled-userspace-access-to-performance-counter.patch Patch25: 0027-perftool-fixed-compile-bug.patch Patch26: 0028-board-medistream-fixed-USB-phy-reset.patch Patch27: 0029-board-medistream-fixed-usb-hub-reset.patch Patch28: 0030-board-mediastream-added-arm-mach-type.patch Requires(post): kmod >= 9 BuildRequires: pkgconfig(ncurses) BuildRequires: mer-kernel-checks BuildRequires: kmod >= 9 BuildRequires: perl BuildRequires: uboot-mkimage Provides: kernel = %{kernel_version} %description Kernel for %{kernel_target_hw}. %package devel Summary: Devel files for %{kernel_target_hw} kernel Group: Development/System Requires: %{name} = %{version}-%{release} Provides: kernel-devel = %{kernel_version} %description devel Devel for %{kernel_target_hw} kernel %prep %setup -q -n linux-%{version} # 0001-smsc911x-added-fixed-regulators.patch %patch0 -p1 # 0002-usb-host-excluded-some-mux_inits-for-medistream.patch %patch1 -p1 # 0003-mach-omap2-added-medistream-board.patch %patch2 -p1 # 0004-displays-added-panel-for-medistream.patch %patch3 -p1 # 0005-sound-using-omap3evm-sound-soc-for-medistream.patch %patch4 -p1 # 0006-musb-selecting-NOP_USB_XCEIV-for-medistream.patch %patch5 -p1 # 0007-omap_vout-removed-omapvid_init-calls-that-led-to-seg.patch %patch6 -p1 # 0008-smsc911x-using-MAC-address-from-kernel-commandline.patch %patch7 -p1 # 0009-hid-input-changes-for-egalax-touchscreen-driver.patch %patch8 -p1 # 0010-uncompress-setting-UART3-for-early-console-messages.patch %patch9 -p1 # 0012-board-medistream-added-omap3_camera_init-to-get-ISP-.patch %patch10 -p1 # 0013-smsc911x-decreased-TX-fifo-size-to-4KB.patch %patch11 -p1 # 0014-sound-fixed-micbias-register-for-twl4030.patch %patch12 -p1 # 0015-sound-enabled-microphone-on-omap3evm-soc.patch %patch13 -p1 # 0016-medistream-setting-dpll2-clock-to-460MHz-for-DSP.patch %patch14 -p1 # 0017-logo-added-bewatec-logo.patch %patch15 -p1 # 0018-smsc911x-fixed-buffer-overflow-when-setting-mac-addr.patch %patch16 -p1 # 0019-mfd-fixed-unnecessary-boot-error-message.patch %patch17 -p1 # 0020-omap_vout-forcing-video-layer-to-overlay1.patch %patch18 -p1 # 0021-video-omap2-skipping-clearing-of-framebuffer.patch %patch19 -p1 # 0022-board-medistream-added-parameter-to-skip-framebuffer.patch %patch20 -p1 # 0023-fixed-DSP-clock-frequency.patch %patch21 -p1 # 0024-smsc911x-removed-spinlocks.patch %patch22 -p1 # 0025-initializing-mpu-rate-in-opp-modes.patch %patch23 -p1 # 0026-pmon-enabled-userspace-access-to-performance-counter.patch %patch24 -p1 # 0027-perftool-fixed-compile-bug.patch %patch25 -p1 # 0028-board-medistream-fixed-USB-phy-reset.patch %patch26 -p1 # 0029-board-medistream-fixed-usb-hub-reset.patch %patch27 -p1 # 0030-board-mediastream-added-arm-mach-type.patch %patch28 -p1 # >> setup # This should go in the macro section # Determine the kernel arch and what we're building # kernel_arch: arm/mips/x86 (for now) .. the ARCH= for the kernel # %{lua: arch = rpm.expand("%{_arch}") if arch == "arm" or arch == "mips" then rpm.define("kernel_arch " .. arch) else rpm.define("kernel_arch x86") end -- This is the common/code name of the hardware adaptation -- Primarily used in descriptions name = rpm.expand("%{name}") pat = "kernel%-adaptation%-(.+)" start, finish, capture = string.find(name, pat) if start == nil then error("Package name "..name.." doesn't match reqired pattern "..pat) else rpm.define("kernel_target_hw " .. capture) end } cp %{SOURCE1} ./.config # make sure EXTRAVERSION says what we want it to say perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}-%{kernel_target_hw}/" Makefile # Verify this spec is using the latest template version /usr/bin/mer_verify_kernel_spec 1 --fatal-if-old # Verify the config meets the current Mer requirements /usr/bin/mer_verify_kernel_config .config echo The target hw is %{kernel_target_hw} echo The desc is %{summary} # << setup %build # >> build pre # arm/mips: uImage # others : bzImage %if 0%{?builds_uImage} make %{?jobs:-j%jobs} uImage %endif #%if 0%{?builds_vmlinuz} #make %{?jobs:-j%jobs} bzImage #%endif make %{?jobs:-j%jobs} modules # << build pre # >> build post # << build post %install rm -rf %{buildroot} # >> install pre # Modules # Consider : INSTALL_MOD_STRIP # set srctree and objtree here to make %{buildroot}/lib/modules/%{kernel_version_build}/{source,build} make INSTALL_MOD_PATH=%{buildroot} modules_install mkdir -p %{buildroot}/lib/modules/%{kernel_version_build}/ touch %{buildroot}/lib/modules/%{kernel_version_build}/modules.dep # /boot mkdir -p %{buildroot}/boot/ make INSTALL_PATH=%{buildroot}/boot/ install %if 0%{?builds_uImage} install -m 755 arch/%{kernel_arch}/boot/uImage %{buildroot}/boot/ %endif #%if 0%{?builds_vmlinuz} #install -m 755 arch/%{kernel_arch}/boot/bzImage %{buildroot}/boot/vmlinuz-%{kernel_version_build} #%endif install -m 755 .config %{buildroot}/boot/config-%{kernel_version_build} install -m 755 System.map %{buildroot}/boot/ install -m 755 System.map %{buildroot}/boot/System.map-%{kernel_version_build} # And save the headers/makefiles etc for building modules against # # This all looks scary, but the end result is supposed to be: # * all arch relevant include/ files # * all Makefile/Kconfig files # * all script/ files mkdir -p %{buildroot}/%{kernel_devel_dir} # dirs for additional modules per module-init-tools, kbuild/modules.txt # first copy everything cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` %{buildroot}/%{kernel_devel_dir} cp Module.symvers %{buildroot}/%{kernel_devel_dir} cp System.map %{buildroot}/%{kernel_devel_dir} if [ -s Module.markers ]; then cp Module.markers %{buildroot}/%{kernel_devel_dir} fi # then drop all but the needed Makefiles/Kconfig files rm -rf %{buildroot}/%{kernel_devel_dir}/Documentation rm -rf %{buildroot}/%{kernel_devel_dir}/scripts rm -rf %{buildroot}/%{kernel_devel_dir}/include # Copy all scripts cp .config %{buildroot}/%{kernel_devel_dir} cp -a scripts %{buildroot}/%{kernel_devel_dir} if [ -d arch/%{kernel_arch}/scripts ]; then cp -a arch/%{kernel_arch}/scripts %{buildroot}/%{kernel_devel_dir}/arch/%{kernel_arch} fi # FIXME - what's this trying to do ... if *lds expands to multiple files the -f test will fail. if [ -f arch/%{kernel_arch}/*lds ]; then cp -a arch/%{kernel_arch}/*lds %{buildroot}/%{kernel_devel_dir}/arch/%{kernel_arch}/ fi # Clean any .o files from the 'scripts' find %{buildroot}/%{kernel_devel_dir}/scripts/ -name \*.o -print0 | xargs -0 rm -f # arch-specific include files cp -a --parents arch/%{kernel_arch}/include %{buildroot}/%{kernel_devel_dir} # arm has include files under plat- and mach- areas (x86/mips don't) %if "%{?kernel_arch}" == "arm" cp -a --parents arch/%{kernel_arch}/mach-*/include %{buildroot}/%{kernel_devel_dir} cp -a --parents arch/%{kernel_arch}/plat-*/include %{buildroot}/%{kernel_devel_dir} %endif # normal include files mkdir -p %{buildroot}/%{kernel_devel_dir}/include # copy only include/* directories cp -a $(find include -mindepth 1 -maxdepth 1 -type d) %{buildroot}/%{kernel_devel_dir}/include # Make sure the Makefile and version.h have a matching timestamp so that # external modules can be built. Also .conf touch -r %{buildroot}/%{kernel_devel_dir}/Makefile %{buildroot}/%{kernel_devel_dir}/include/linux/version.h touch -r %{buildroot}/%{kernel_devel_dir}/.config %{buildroot}/%{kernel_devel_dir}/include/linux/autoconf.h # Copy .config to include/config/auto.conf so "make prepare" is unnecessary. cp %{buildroot}/%{kernel_devel_dir}/.config %{buildroot}/%{kernel_devel_dir}/include/config/auto.conf # mark modules executable so that strip-to-file can strip them find %{buildroot}/lib/modules/%{kernel_version_build} -name "*.ko" -type f -exec chmod u+x {} \; # << install pre # >> install post # << install post #%post # >> post # do we really need to call depmod in post? Isn't it called when # building kernel already if the depmod binary is available during # build time? #/sbin/depmod -a # << post %files %defattr(-,root,root,-) /lib/modules/%{kernel_version_build}/* /boot/System.map-%{kernel_version_build} /boot/config-%{kernel_version_build} # >> files %exclude /boot/vmlinux-* # do we need this? should it be versioned only for x86 /boot/System.map #%if 0%{?builds_vmlinuz} #/boot/vmlinuz-%{kernel_version_build} #/boot/vmlinuz #%endif %if 0%{?builds_uImage} /boot/uImage %endif #%if 0%{?builds_firmware} #/lib/firmware/* #%endif # << files %files devel %defattr(-,root,root,-) /%{_prefix}/src/kernels/%{kernel_version_build}/* /%{_prefix}/src/kernels/%{kernel_version_build}/.config # >> files devel # << files devel