Page History
...
Gather all the patches from lustre tree into a single file
Code Block $ cd ~ $ rm -f ~/lustre-kernel-x86_64-lustre.patch $ cd ~/lustre-release/lustre/kernel_patches/series $ for patch in $(<"3.10-rhel7.series"); do \ patch_file="$HOME/lustre-release/lustre/kernel_patches/patches/${patch}"; \ cat "${patch_file}" >> "$HOME/lustre-kernel-x86_64-lustre.patch"; \ done $
Copy the lustre kernel patch into RPM build tree
Code Block # cp ~/lustre-kernel-x86_64-lustre.patch ~/kernel/rpmbuild/SOURCES/patch-3.10.0-lustre.patch
Edit the kernel spec file by vi ~/kernel/rpmbuild/SPECSPECS/kernel.spec
Find the line with 'find $RPM_BUILD_ROOT/lib/modules/$KernelVer' and insert following two lines below it
cp -a fs/ext3/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/fs/ext3
cp -a fs/ext4/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/fs/ext4
Find the line with '# empty final patch to facilitate testing of kernel patches' and insert following two lines below it
# adds Lustre patches
Patch99995: patch-%{version}-lustre.patch
Find the line with 'ApplyOptionalPatch linux-kernel-test.patch' and insert following two lines below it
# lustre patch
ApplyOptionalPatch patch-%{version}-lustre.patch
Find the line with '%define listnewconfig_fail 1' and change 1 to 0
Save and close the spec file.
Overwrite the kernel
config
file with~/lustre-release/lustre/kernel_patches/kernel_configs/kernel-3.10.0-3.10-rhel7-x86_64.config
Code Block echo '# x86_64' > ~/kernel/rpmbuild/SOURCES/kernel-3.10.0-x86_64.config cat ~/lustre-release/lustre/kernel_patches/kernel_configs/kernel-3.10.0-3.10-rhel7-x86_64.config >> ~/kernel/rpmbuild/SOURCES/kernel-3.10.0-x86_64.config
...