[elrepo] building jfs module

Alan Bartlett ajb at elrepo.org
Tue Aug 1 11:58:17 EDT 2017


On 1 August 2017 at 11:15, lejeczek via elrepo <elrepo at lists.elrepo.org> wrote:
> hi there
>
> I'm hoping to build jfs.ko and I use:
> https://wiki.centos.org/HowTos/BuildingKernelModules as the howto.
> However, it fails and I wonder if some experts could say it because
> kernel-lt is different and above howto will not work or maybe jfs.ko cannot
> be build for some reason?

The principle of module building will be the same be it for a CentOS
distributed kernel or a kernel-{lt|ml} from the ELRepo Project.

> I see:
> $ make prepare
> scripts/kconfig/conf  --silentoldconfig Kconfig
> make[1]: *** No rule to make target
> `arch/x86/entry/syscalls/syscall_32.tbl', needed by
> `arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h'. Stop.
> make: *** [archheaders] Error 2
>
> $ make M=fs/jfs
> make[1]: *** No rule to make target `fs/jfs/super.o', needed by
> `fs/jfs/jfs.o'.  Stop.
> make: *** [_module_fs/jfs] Error 2

The above errors are telling me that you have not fulfilled all the
requirements before attempting those steps.

As you have not indicated the OS version (is it EL6 or EL7 ?) and, if
EL6, the relevant architecture (32- or 64-bit?), I will offer some
guidance using 64-bit EL7 and the
kernel-lt--3.10.107-1.el6.elrepo.x86_64 package as an example.

(1) Download the kernel-lt-3.10.107-1.el6.elrepo.nosrc.rpm package and
install it into your local ~/rpmbuild/ tree.

(2) Go to the ~/rpmbuild/SOURCES/ directory and download into it, from
kernel.org, the linux-3.10.107.tar.xz tarball.

(3) Go to the ~/rpmbuild/SPECS/ directory and execute the rpmbuild -bp
*.spec command line.

(4) Go to the ~/rpmbuild/BUILD/ker*/lin*/ directory and copy the
64-bit configuration file to a .config file.

(5) Execute make oldconfig

(6) Execute make menuconfig and enable the jfs module

(7) Execute make prepare

(8) Execute make modules_prepare

(9) Execute make M=fs/jfs

(10) Execute strip --strip-debug fs/jfs/jfs.ko

I have just performed the above ten steps. Upon executing  a find
fs/jfs -type f -name \*\.ko command line it returns fs/jfs/jfs.ko

Hopefully the above notes will assist you in building your own jfs module.

Alan.


More information about the elrepo mailing list