how to export a modified kernel header

前端 未结 3 415
栀梦
栀梦 2021-01-14 08:51

I modified some files in the Linux kernel

include/linux/tcp.h
include/net/tcp.h 
net/ipv4/sysctl_net_ipv4.c
net/ipv4/tcp_output.c

Following

相关标签:
3条回答
  • 2021-01-14 09:12

    As you are changing some linux header, do a make first to see whether there are any side effects. The kernel might not compile. This is absolutely necessary.

    I think make is also necessary for the changes to take effect for the kernel headers so that they can be exported to user space.

    Just doing make modules_install will install already built modules, the modules won't be recompiled against the changed headers. Similarly for other install commands.

    0 讨论(0)
  • 2021-01-14 09:17

    A. Copy them to somewhere the code expects to find them, such as a directory you then pass to the compiler via -I, and then make sure that the code actually includes them.

    0 讨论(0)
  • 2021-01-14 09:28

    The right location of INSTALL_HDR_PATH should be /usr instead:

    $ make headers_install INSTALL_HDR_PATH=/usr
    
    0 讨论(0)
提交回复
热议问题