Skip to content
  • David Johnson's avatar
    Add a Linux kernel module for ipod. · 9436dfb0
    David Johnson authored
    Rather than have to patch the kernel's network stack at build time
    to catch ipod ICMP packets in the normal processing path, make it
    a loadable module that dynamically registers a netfilter hook to
    check ICMP packets for ipod info.  This way, we don't require
    custom-built kernels anymore to get ipod support.
    
    The only drawback to making it a module is that we now have to
    call emergency_restart() instead of machine_restart().  For x86
    kernels, this basically means that we don't do *any* niceties on
    shutdown.  For instance, even machine_restart() shuts down lapics
    and the iommu and deals with processors.  We can't call
    machine_restart because it's not exported as a symbol that modules
    can be linked with at load time.  kernel_restart() does way too
    much stuff that could block the reboot if things are in a bad state.
    
    Frankly, after looking at the difference between machine_restart
    and emergency_restart for the x86, we don't care.
    
    To build this module, all you should have to do, say, on Fedora, is
    
      $ yum install kernel-devel kernel-headers
      $ cd <moduledir>
      $ make && sudo make install
        (as long as you're running the kernel you're building for)
    9436dfb0