mirror of
https://abf.rosa.ru/djam/kernel-5.15.git
synced 2025-02-23 18:42:55 +00:00
Revisited the patchset, scripts and spec to build kernel 4.0
Most external components have been removed to simplify maintenance. The following ones are kept because they are more important and/or maintained well in upstream: - BFQ - AUFS - ndiswrapper - several bug fixes reiser4 is kept too but disabled by default until its maintainers update it for kernel 4.x.
This commit is contained in:
parent
c7bea583ca
commit
8b9e6f4f94
7 changed files with 62 additions and 148 deletions
6
.abf.yml
6
.abf.yml
|
@ -1,4 +1,4 @@
|
|||
sources:
|
||||
"linux-3.14.tar.xz": fc777520e5976caf0d5513502b8156f73748e379
|
||||
"patch-3.14.39.xz": c018d817a13875baaf414ede33c51912a74b1d52
|
||||
"kernel-patches-and-configs-3.14.39.tar.xz": 311b64c864771d6b7bf119a779309bb3870b15f2
|
||||
"linux-4.0.tar.xz": 6d63cf9a589d951338a3da50c506007c5ba18814
|
||||
"patch-4.0.0.xz": b726cda9193143e0cffd456836adcb65de86543c
|
||||
"kernel-patches-and-configs-4.0.0.tar.xz": 1b98e240a3ca78c7eb7b8e8492cb85afbf0ad11f
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
Hello Mandriva, OpenMandriva, MagOS and Rosa Linux Users,
|
||||
|
||||
linux-userspace-headers contains the headers for the source code of
|
||||
Linux kernel. All source code necessary to compile a new kernel is
|
||||
included in two packages linux-userspace-headers, and kernel-source.
|
||||
You will need to install both linux-userspace-headers (needed for
|
||||
general Linux compilation), and kernel-source in order to compile
|
||||
a new kernel.
|
||||
|
||||
The kernel is the central process of your Linux machine, the mediator
|
||||
between the hardware and your programs. It is responsible for memory
|
||||
allocations, process managing, device access...
|
||||
|
||||
Although modern kernels are very flexible thanks to dynamic modules, you
|
||||
may need to compile your own kernel for various reasons: your found a
|
||||
new module which need a more recent kernel, you need a feature of a new
|
||||
kernel, etc...
|
||||
|
||||
Here is a short sum-up of what you can find in the Kernel-HOWTO. Consult
|
||||
it in case of a problem or if the shortcut here provided does not meet
|
||||
your needs. You should also consult the README of kernel-sources.
|
||||
|
||||
|
||||
|
||||
1. Configure your new kernel
|
||||
|
||||
You should never build a kernel as root, so as a normal user:
|
||||
Copy the source in /usr/src/linux/ to ~/kernel/
|
||||
Change to ~/kernel/ and clean-up previous compilations, by issuing
|
||||
"make mrproper",
|
||||
In console mode, run "make menuconfig",
|
||||
Under X11, run "make xconfig".
|
||||
|
||||
Then configure all sections of your kernel making each feature you need
|
||||
available constantly or as a module. Note that you should compile most
|
||||
features as a module, as it consume less memory, taking into account
|
||||
that some of them cannot be modules as you may need them at boot time,
|
||||
before dynamic modules be loaded...
|
||||
|
||||
|
||||
|
||||
2. Compile it
|
||||
|
||||
Just issue "make" to create a compressed kernel image and the modules you
|
||||
configured.
|
||||
|
||||
|
||||
|
||||
3. install your new kernel
|
||||
|
||||
Now you need root privilegies, so:
|
||||
Issue "su" and enter root password.
|
||||
Issue "make modules_install"
|
||||
|
||||
This will copy your modules and needed files to /lib/modules/
|
||||
|
||||
Issue "make install"
|
||||
|
||||
This will copy your new kernel and system.map to boot dir (/boot/) with
|
||||
correct names including version, and change respective links.
|
||||
|
||||
It finally runs lilo to take into account your new kernel.
|
||||
|
||||
|
||||
|
||||
4. Modify Lilo to allow your booting on old kernel
|
||||
|
||||
* This step is optional, although recommended *
|
||||
See lilo.conf man page.
|
||||
Your are encouraged during this step to create a new section in your
|
||||
lilo.conf file, in order to enable you to boot on your both kernels, the
|
||||
old and the new one.
|
||||
You need to run lilo then to take your changes into account.
|
||||
You may also use linuxconf to do all that with a nice GUI.
|
||||
|
||||
|
||||
|
||||
5. Reboot your machine...
|
||||
|
||||
And pray.
|
||||
Anyway if something goes wrong, you just need to reboot and choose your
|
||||
old kernel with lilo.
|
||||
|
||||
Enjoy!
|
||||
|
||||
|
||||
========================================================================
|
||||
(c) 1999-2006 Mandriva, Camille Bégnis <camille@mandriva.com>
|
||||
(c) 2006 Thomas Backlund <tmb@mandriva.org>
|
||||
(c) 2011 Thomas Backlund <tmb@mageia.org>
|
||||
(c) 2011 Nicolò Costanza <abitrules@yahoo.it>
|
|
@ -1,12 +1,8 @@
|
|||
|
||||
Makefile | 24 ++++++++++++------------
|
||||
scripts/kconfig/Makefile | 19 -------------------
|
||||
2 files changed, 12 insertions(+), 31 deletions(-)
|
||||
|
||||
diff -Nurp linux-3.14.2-1.mga4/Makefile linux-3.14.2-1.mga4.mrproper/Makefile
|
||||
--- linux-3.14.2-1.mga4/Makefile 2014-04-26 18:57:12.134824274 +0300
|
||||
+++ linux-3.14.2-1.mga4.mrproper/Makefile 2014-04-26 18:58:36.410828557 +0300
|
||||
@@ -522,9 +522,7 @@ ifeq ($(KBUILD_EXTMOD),)
|
||||
diff --git a/Makefile b/Makefile
|
||||
index fbd43bf..48c61ca 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -552,9 +552,7 @@ ifeq ($(KBUILD_EXTMOD),)
|
||||
# Carefully list dependencies so we do not try to build scripts twice
|
||||
# in parallel
|
||||
PHONY += scripts
|
||||
|
@ -17,7 +13,7 @@ diff -Nurp linux-3.14.2-1.mga4/Makefile linux-3.14.2-1.mga4.mrproper/Makefile
|
|||
|
||||
# Objects we will link into vmlinux / subdirs we need to visit
|
||||
init-y := init/
|
||||
@@ -884,7 +882,7 @@ prepare0: archprepare FORCE
|
||||
@@ -990,7 +988,7 @@ prepare0: archprepare FORCE
|
||||
$(Q)$(MAKE) $(build)=.
|
||||
|
||||
# All the preparing..
|
||||
|
@ -26,30 +22,30 @@ diff -Nurp linux-3.14.2-1.mga4/Makefile linux-3.14.2-1.mga4.mrproper/Makefile
|
|||
|
||||
# Generate some files
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -1066,13 +1064,15 @@ endif # CONFIG_MODULES
|
||||
@@ -1178,13 +1176,15 @@ endif # CONFIG_MODULES
|
||||
CLEAN_DIRS += $(MODVERDIR)
|
||||
|
||||
# Directories & files removed with 'make mrproper'
|
||||
-MRPROPER_DIRS += include/config usr/include include/generated \
|
||||
- arch/*/include/generated
|
||||
-MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
|
||||
- arch/*/include/generated .tmp_objdiff
|
||||
-MRPROPER_FILES += .config .config.old .version .old_version \
|
||||
- Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
|
||||
- signing_key.priv signing_key.x509 x509.genkey \
|
||||
- extra_certificates signing_key.x509.keyid \
|
||||
- signing_key.x509.signer
|
||||
- signing_key.x509.signer vmlinux-gdb.py
|
||||
+#MRPROPER_DIRS += include/config usr/include include/generated \
|
||||
+# arch/*/include/generated
|
||||
+#MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
|
||||
+# arch/*/include/generated .tmp_objdiff
|
||||
+#MRPROPER_FILES += .config .config.old .version .old_version \
|
||||
+# Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
|
||||
+# signing_key.priv signing_key.x509 x509.genkey \
|
||||
+# extra_certificates signing_key.x509.keyid \
|
||||
+# signing_key.x509.signer
|
||||
+# signing_key.x509.signer vmlinux-gdb.py
|
||||
+MRPROPER_DIRS += ""
|
||||
+MRPROPER_FILES += ""
|
||||
|
||||
# clean - Delete most, but leave enough to build external modules
|
||||
#
|
||||
@@ -1093,7 +1093,7 @@ clean: archclean vmlinuxclean
|
||||
@@ -1205,7 +1205,7 @@ clean: archclean vmlinuxclean
|
||||
#
|
||||
mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
|
||||
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
|
||||
|
@ -58,9 +54,10 @@ diff -Nurp linux-3.14.2-1.mga4/Makefile linux-3.14.2-1.mga4.mrproper/Makefile
|
|||
|
||||
PHONY += $(mrproper-dirs) mrproper archmrproper
|
||||
$(mrproper-dirs):
|
||||
diff -Nurp linux-3.14.2-1.mga4/scripts/kconfig/Makefile linux-3.14.2-1.mga4.mrproper/scripts/kconfig/Makefile
|
||||
--- linux-3.14.2-1.mga4/scripts/kconfig/Makefile 2014-04-26 18:57:12.134824274 +0300
|
||||
+++ linux-3.14.2-1.mga4.mrproper/scripts/kconfig/Makefile 2014-04-26 18:58:36.411828571 +0300
|
||||
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
|
||||
index 9645c07..9d147f9 100644
|
||||
--- a/scripts/kconfig/Makefile
|
||||
+++ b/scripts/kconfig/Makefile
|
||||
@@ -15,26 +15,18 @@ endif
|
||||
unexport CONFIG_
|
||||
|
||||
|
@ -83,12 +80,12 @@ diff -Nurp linux-3.14.2-1.mga4/scripts/kconfig/Makefile linux-3.14.2-1.mga4.mrpr
|
|||
- $< --$@ $(Kconfig)
|
||||
|
||||
silentoldconfig: $(obj)/conf 3rdparty/Makefile
|
||||
- $(Q)mkdir -p include/generated
|
||||
- $(Q)mkdir -p include/config include/generated
|
||||
- $< --$@ $(Kconfig)
|
||||
|
||||
localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf 3rdparty/Makefile
|
||||
$(Q)mkdir -p include/generated
|
||||
@@ -77,32 +69,21 @@ update-po-config: $(obj)/kxgettext $(obj
|
||||
$(Q)mkdir -p include/config include/generated
|
||||
@@ -77,32 +69,21 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
|
||||
PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
|
||||
|
||||
allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf 3rdparty/Makefile
|
||||
|
@ -119,5 +116,5 @@ diff -Nurp linux-3.14.2-1.mga4/scripts/kconfig/Makefile linux-3.14.2-1.mga4.mrpr
|
|||
%_defconfig: $(obj)/conf 3rdparty/Makefile
|
||||
- $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
|
||||
|
||||
# Help text used by make help
|
||||
help:
|
||||
configfiles=$(wildcard $(srctree)/kernel/configs/$(1).config $(srctree)/arch/$(SRCARCH)/configs/$(1).config)
|
||||
|
||||
|
|
42
kernel.spec
42
kernel.spec
|
@ -1,9 +1,9 @@
|
|||
%{?build_selinux}%{?!build_selinux:%bcond_with selinux}
|
||||
|
||||
%define kernelversion 3
|
||||
%define patchlevel 14
|
||||
%define kernelversion 4
|
||||
%define patchlevel 0
|
||||
# sublevel is now used for -stable patches
|
||||
%define sublevel 39
|
||||
%define sublevel 0
|
||||
|
||||
# Package release
|
||||
%define mibrel 69
|
||||
|
@ -29,7 +29,7 @@
|
|||
%define rpmrel %mkrel 0.%{kpatch}.%{mibrel}
|
||||
%endif
|
||||
%else
|
||||
%define rpmrel 4
|
||||
%define rpmrel 1
|
||||
%endif
|
||||
|
||||
# fakerel and fakever never change, they are used to fool
|
||||
|
@ -346,7 +346,6 @@ NoSource: 0
|
|||
# This is for disabling *config, mrproper, prepare, scripts on -devel rpms
|
||||
Source2: disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch
|
||||
|
||||
Source4: README.kernel-sources
|
||||
Source5: kernel.rpmlintrc
|
||||
|
||||
# Cpupower: the service, the config, etc.
|
||||
|
@ -1122,8 +1121,6 @@ cd %src_dir
|
|||
|
||||
%{patches_dir}/scripts/apply_patches
|
||||
%{patches_dir}/scripts/apply_patches-NRJ
|
||||
%{patches_dir}/scripts/apply_patches-geek
|
||||
%{patches_dir}/scripts/apply_patches-latest
|
||||
|
||||
#
|
||||
# Setup Begin
|
||||
|
@ -1257,6 +1254,7 @@ SaveDevel() {
|
|||
mkdir -p $TempDevelRoot
|
||||
for i in $(find . -name 'Makefile*'); do cp -R --parents $i $TempDevelRoot;done
|
||||
for i in $(find . -name 'Kconfig*' -o -name 'Kbuild*'); do cp -R --parents $i $TempDevelRoot;done
|
||||
cp -fR Documentation/DocBook/media/*.b64 $TempDevelRoot/Documentation/DocBook/media/
|
||||
cp -fR include $TempDevelRoot
|
||||
# ln -s ../generated/uapi/linux/version.h $TempDevelRoot/include/linux/version.h
|
||||
cp -fR scripts $TempDevelRoot
|
||||
|
@ -1268,6 +1266,7 @@ SaveDevel() {
|
|||
%ifarch %{ix86} x86_64
|
||||
cp -fR arch/x86/kernel/asm-offsets.{c,s} $TempDevelRoot/arch/x86/kernel/
|
||||
cp -fR arch/x86/kernel/asm-offsets_{32,64}.c $TempDevelRoot/arch/x86/kernel/
|
||||
cp -fR arch/x86/purgatory/* $TempDevelRoot/arch/x86/purgatory/
|
||||
cp -fR arch/x86/syscalls/syscall* $TempDevelRoot/arch/x86/syscalls/
|
||||
cp -fR arch/x86/include $TempDevelRoot/arch/x86/
|
||||
cp -fR arch/x86/tools $TempDevelRoot/arch/x86/
|
||||
|
@ -1305,13 +1304,14 @@ SaveDevel() {
|
|||
%endif
|
||||
|
||||
for i in alpha arc avr32 blackfin c6x cris frv h8300 hexagon ia64 m32r m68k m68knommu metag microblaze \
|
||||
mips mn10300 openrisc parisc powerpc s390 score sh sparc tile unicore32 xtensa; do
|
||||
mips mn10300 nios2 openrisc parisc powerpc s390 score sh sparc tile unicore32 xtensa; do
|
||||
rm -rf $TempDevelRoot/arch/$i
|
||||
done
|
||||
|
||||
%ifnarch %{arm}
|
||||
rm -rf $TempDevelRoot/arch/arm*
|
||||
rm -rf $TempDevelRoot/include/kvm/arm*
|
||||
rm -rf $TempDevelRoot/include/soc
|
||||
%endif
|
||||
%ifnarch %{ix86} x86_64
|
||||
rm -rf $TempDevelRoot/arch/x86
|
||||
|
@ -1378,6 +1378,9 @@ $DevelRoot/include/ras
|
|||
$DevelRoot/include/rdma
|
||||
$DevelRoot/include/rxrpc
|
||||
$DevelRoot/include/scsi
|
||||
%ifarch %{arm}
|
||||
$DevelRoot/include/soc
|
||||
%endif
|
||||
$DevelRoot/include/sound
|
||||
$DevelRoot/include/target
|
||||
$DevelRoot/include/trace
|
||||
|
@ -1403,7 +1406,6 @@ $DevelRoot/Kconfig
|
|||
$DevelRoot/Makefile
|
||||
$DevelRoot/Module.symvers
|
||||
$DevelRoot/arch/Kconfig
|
||||
%doc README.kernel-sources
|
||||
%{_modulesdir}/$KernelVer/build
|
||||
%{_modulesdir}/$KernelVer/source
|
||||
EOF
|
||||
|
@ -1494,7 +1496,6 @@ cat > $kernel_files <<EOF
|
|||
%{_bootdir}/$ker-$KernelVer
|
||||
%{_modulesdir}/$KernelVer/kernel
|
||||
%{_modulesdir}/$KernelVer/modules.*
|
||||
%doc README.kernel-sources
|
||||
EOF
|
||||
|
||||
%if %build_debug
|
||||
|
@ -1718,7 +1719,13 @@ LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{rpmrel}/" Makefile
|
|||
### Linker start3 > Check point to build for omv or rosa ###
|
||||
############################################################
|
||||
%if %{build_perf}
|
||||
%smake -C tools/perf -s HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} all
|
||||
%ifarch x86_64
|
||||
%define perf_is_x64 1
|
||||
%else
|
||||
%define perf_is_x64 0
|
||||
%endif
|
||||
|
||||
%smake -C tools/perf -s IS_X86_64=%{perf_is_x64} HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} all
|
||||
%smake -C tools/perf -s prefix=%{_prefix} man
|
||||
%endif
|
||||
|
||||
|
@ -1747,8 +1754,6 @@ chmod +x tools/power/cpupower/utils/version-gen.sh
|
|||
### install
|
||||
###
|
||||
%install
|
||||
install -m 644 %{SOURCE4} .
|
||||
|
||||
cd %src_dir
|
||||
|
||||
# Directories definition needed for installing
|
||||
|
@ -1770,7 +1775,7 @@ chmod -R a+rX %{target_source}
|
|||
# we remove all the source files that we don't ship
|
||||
# first architecture files
|
||||
for i in alpha arc avr32 blackfin c6x cris frv h8300 hexagon ia64 m32r m68k m68knommu metag microblaze \
|
||||
mips openrisc parisc powerpc s390 score sh sh64 sparc tile unicore32 v850 xtensa mn10300; do
|
||||
mips nios2 openrisc parisc powerpc s390 score sh sh64 sparc tile unicore32 v850 xtensa mn10300; do
|
||||
rm -rf %{target_source}/arch/$i
|
||||
done
|
||||
%ifnarch %{arm}
|
||||
|
@ -1826,10 +1831,10 @@ LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{rpmrel}/" Makefile
|
|||
%if %{build_perf}
|
||||
|
||||
# perf tool binary and supporting scripts/binaries
|
||||
make -C tools/perf -s V=1 DESTDIR=%{buildroot} HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install
|
||||
make -C tools/perf -s V=1 DESTDIR=%{buildroot} IS_X86_64=%{perf_is_x64} HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install
|
||||
|
||||
# perf man pages (note: implicit rpm magic compresses them later)
|
||||
make -C tools/perf -s V=1 DESTDIR=%{buildroot} HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install-man
|
||||
make -C tools/perf -s V=1 DESTDIR=%{buildroot} IS_X86_64=%{perf_is_x64} HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install-man
|
||||
%endif
|
||||
|
||||
############################################################
|
||||
|
@ -1903,6 +1908,7 @@ rm -rf %{buildroot}
|
|||
%{_kerneldir}/include/rdma
|
||||
%{_kerneldir}/include/rxrpc
|
||||
%{_kerneldir}/include/scsi
|
||||
%{_kerneldir}/include/soc
|
||||
%{_kerneldir}/include/sound
|
||||
%{_kerneldir}/include/target
|
||||
%{_kerneldir}/include/trace
|
||||
|
@ -1930,7 +1936,6 @@ rm -rf %{buildroot}
|
|||
%{_kerneldir}/Makefile
|
||||
%{_kerneldir}/README
|
||||
%{_kerneldir}/REPORTING-BUGS
|
||||
%doc README.kernel-sources
|
||||
|
||||
%files -n %{kname}-source-latest
|
||||
%endif
|
||||
|
@ -1943,6 +1948,9 @@ rm -rf %{buildroot}
|
|||
%if %{build_perf}
|
||||
%files -n perf
|
||||
%{_bindir}/perf
|
||||
%ifarch x86_64
|
||||
%{_bindir}/perf-read-vdso32
|
||||
%endif
|
||||
%{_bindir}/trace
|
||||
%dir %{_prefix}/libexec/perf-core
|
||||
%{_libdir}/libperf-gtk.so
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1
|
||||
|
||||
iQEcBAABAgAGBQJTOOUkAAoJEHm+PkMAQRiGRzUH/RTLPnnpw/jo13GAXnAAwesO
|
||||
k8Bb1YnkLLkRoOU5tIatQxUn6uDEtkZMcAA4GbTin58gIzBlfrdDOtrOnWoerKaJ
|
||||
2Gbltrf4B6Y/nQWFPAJR6CQLNc/0cl4Djh8sUQ/wDt2XzpExbIUg2nOmq/Bk8v5t
|
||||
wW9YFAhS0kar3bhTCKk1fyNf4uHxBTzNMnTAumZjMqoKjXo58uxwqwp5SrAOrcJU
|
||||
a1M7rqUo2ZPrKj453LM296naGBInM3/yGQhFBJCmhIPTLg+ekrXDIQREZkPsb8R8
|
||||
NeLSzyHbGqf6x0bhyUi4gunQRcTXMIUI5p6NzsPGnJep95hfrZal5lNnHeZzqeM=
|
||||
=xfKd
|
||||
-----END PGP SIGNATURE-----
|
11
linux-4.0.tar.sign
Normal file
11
linux-4.0.tar.sign
Normal file
|
@ -0,0 +1,11 @@
|
|||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1
|
||||
|
||||
iQEcBAABAgAGBQJVKvRfAAoJEHm+PkMAQRiG9HMH/3uQ7/NkMdfH3TZSnQfWhIu0
|
||||
LDhYv2I6GmQzsab17fr2BsuMifimmsnNbt3Krmvlk0UtWb7tVqAF92kp+7pdh9ak
|
||||
tBo2nKKqDxwmzqxBa16uHoewqG/6ucwD5LnMuP3F28uOdqrTjqlCusM2bMi65VwO
|
||||
+hGE4PMJTc12skLthFc/Xz+OKiPUAU3VdtqAXgHqLHA0cFJqU+x8M+dWAhbH+aD9
|
||||
SgMOhcdc79xhi6fgdbqUOxwdq8fNYPO2vGKkV6oahZxP4RYCYpBgZ23a++BFFU9F
|
||||
d4ik8JK23iQnSY+NXLgoqotNRJkPIjOVJO9AFMcCj+mlYsEWQs/qhNohZdSQeRc=
|
||||
=udj5
|
||||
-----END PGP SIGNATURE-----
|
Loading…
Add table
Reference in a new issue