Hello, it has been a while since I have tried anything for this.
I now have more time and more equipment to actually work on this.
I have taken some time to learn a bit more about the Linux kernel and adding a module to it (still so much more to learn).
@george1421 I used the reference link, excluding the arm specific parts of the Kconfig, and compiled the kernel. I can see that the driver was added during the compiling process because I see this output CC drivers/hpuefi/hpuefi.o
, but I can’t figure out if I did it correctly.
When I pxe boot to Debug Mode I can’t run lsmod
or modprobe
to find if it was installed.
These are the steps I did to compile the kernel. Please let me know if this is correct.
1 . Clone FOS repo from GitHub
2. Run ./build.sh --kernel-only --arch x64
3. When the output “We are ready to build. Would you like to edit the config file [y|n]?
” comes up, I opened another terminal and then did this:
a. Made directory hpuefi
in /path/to/fos/kernelsourcex64/drivers/
b. Copied the hpuefi module files hpuefi.c
& hpuefi.h
to that directory.
c. Made Makefile
in /path/to/fos/kernelsourcex64/drivers/hpuefi
with content:
obj-$(CONFIG_HPUEFI) += hpuefi.o
d. Made Kconfig
in /path/to/fos/kernelsourcex64/drivers/hpuefi
with content:
config HPUEFI
tristate "HP UEFI Kernel Module"
e. Modified /path/to/fos/kernelsourcex64/drivers/Makefile
adding:
obj-$(CONFIG_HPUEFI) += hpuefi/
f. Modified /path/to/fos/kernelsourcex64/drivers/Kconfig
adding before endmenu
:
source "drivers/hpuefi/Kconfig"
g. Modified /path/to/fos/kernelsourcex64/arch/x86/configs/x86_64_defconfig
adding:
CONFIG_HPUEFI=y
4 . Returned to the original terminal with the prompt still open and entered n
.
5. Entered y
for the prompt: HP UEFI Kernel Module (HPUEFI) [N/y/?] (NEW)
6. Pressed Enter
for everything else.
After it finished, I copied the bzImage to my testing FOG server.
I can boot into Debug Mode but don’t know if the module was added successfully.
Sorry for the long read but hope this is enough information to figure out if/what I did wrong.