Installation of s4-3b1-pc7300
Apply a patch to make the library be built as shared instead of static,
build the kernel module unconditionally, and makes the module use
up-to-date interfaces and expected operations dictated by the kernel,
GCC, and glibc:
patch -Np1 -i ../s4-3b1-pc7300-efe55b-build_fixes-7.1-1.patch
Under some conditions, PWD may not evaluate, leading to
the kernel module being unable to be installed. Change it to use
CURDIR instead:
sed -i 's/PWD/CURDIR/g' sysv/Makefile.daveb
Compile the kernel module:
cd sysv &&
make -f Makefile.daveb running
Tip
Be sure to compile this kernel module booted into your LFS system, or if
in a chroot, have the same kernel version you built for the target as on
the host. Otherwise, directories that are assumed to exist will not be
found and the build process will fail.
Now install the kernel module as the root user:
make -f Makefile.daveb run_install
Important
When you update the kernel, you will also need to reinstall this
kernel module.
This is because there is glue when kernel modules are built. This glue
doesn't matter too much with first party modules (modules in the kernel
source tree) as the modules are updated at the same time the kernel is.
At that point, there is new glue holding them together. However, when
it comes to third party modules, they aren't updated when the kernel
updates, so this glue the third party modules had on the kernel breaks.
This leads to broken kernel modules. This also applies if you stay on
the same kernel version but change some options, this can also break
the glue.
Be sure that when you reinstall the driver, make sure you are using
the new kernel and have the kernel source you built from. Otherwise
the driver will fail to install.
Now install the s4-3b1-pc7300 userland tools
by running the following commands:
cd .. &&
make CC="cc -std=gnu17"
Now, as the root user:
install -vDm755 s4date s4disk s4dump s4export s4fs s4fsck \
s4import s4merge s4mkfs s4test s4vol \
-t /usr/bin/ &&
install -vDm644 s4d.h s4fixed.h -t /usr/include/ &&
install -vDm755 libs4.so -t /usr/lib/ &&
ln -svf libs4.so /usr/lib/libs4.so.0 &&
ln -svf libs4.so.0 /usr/lib/libs4.so.0.0