[Nexus 6  Original Android Development] nathanchance:
It should apply to any kernel that is in the anykernel format (using the existing ramdisk instead of including its own) I believe.

---------- Post added at 08:44 PM ---------- Previous post was at 08:37 PM ----------

I agree lol, I have had people bootlooping and having force quits ALL over the place today. Making a generic guide is nearly impossible for me because Franco includes a full ramdisk, which means SuperSU needs to be flashed after installation to get the patched kernel.

Looks like it started in SuperSU 2.61. From his updater-binary in that zip (the comment is present in every future zip as well):

# The kernel patcher creates a backup of the kernel it patches, for future
# restoration. It cannot re-patch a patched kernel, it will restore the
# previous kernel first.

Not sure why that is, I am attempting to read his comments and understand everything. I believe this is the patching part:

if ($PATCHBOOTIMAGE); then
ui_print " "
ui_print "******************"
ui_print "Boot image patcher"
ui_print "******************"

ui_print "- Finding boot image"
# expand the detection if we find more, instead of reading from fstab, because unroot
# from the SuperSU APK doesn't have the fstab to read from
if [ -z "$BOOTIMAGE" ]; then
for PARTITION in kernel KERNEL boot BOOT lnx LNX; do
BOOTIMAGE=$(readlink /dev/block/by-name/$PARTITION || readlink /dev/block/platform/*/by-name/$PARTITION || readlink /dev/block/platform/*/*/by-name/$PARTITION)
if [ ! -z "$BOOTIMAGE" ]; then break; fi
done
fi

CONTINUE=true
if [ -z "$BOOTIMAGE" ]; then
ui_print "--- Boot image: not found, aborting"
CONTINUE=false
else
ui_print "--- Boot image: $BOOTIMAGE"
fi

if [ -z "$STOCKBOOTIMAGE" ]; then
STOCKBOOTIMAGE=$BOOTIMAGE
fi

rm -rf /sutmp
mkdir /sutmp

if ($CONTINUE); then
ui_print "- Extracting ramdisk"
LD_LIBRARY_PATH=$SYSTEMLIB /su/bin/sukernel --bootimg-extract-ramdisk $BOOTIMAGE /sutmp/ramdisk.packed
if [ $? -ne 0 ]; then
ui_print "--- Failure, aborting"
CONTINUE=false
fi
fi

if ($CONTINUE); then
ui_print "- Decompressing ramdisk"
LD_LIBRARY_PATH=$SYSTEMLIB /su/bin/sukernel --ungzip /sutmp/ramdisk.packed /sutmp/ramdisk
if [ $? -ne 0 ]; then
ui_print "--- Failure, aborting"
CONTINUE=false
else
rm /sutmp/ramdisk.packed
fi
fi

if ($CONTINUE); then
ui_print "- Checking patch status"
LD_LIBRARY_PATH=$SYSTEMLIB /su/bin/sukernel --patch-test /sutmp/ramdisk
if [ $? -ne 0 ]; then
ui_print "--- Already patched, attempting to find stock backup"

if ($CONTINUE); then
LD_LIBRARY_PATH=$SYSTEMLIB /su/bin/sukernel --restore /sutmp/ramdisk /sutmp/stock_boot.img
if [ $? -ne 0 ]; then
ui_print "--- Restore failed, aborting"
CONTINUE=false
else
ui_print "--- Backup restored"
STOCKBOOTIMAGE=/sutmp/stock_boot.img
fi
fi

if ($CONTINUE); then
ui_print "- Extracting ramdisk"
LD_LIBRARY_PATH=$SYSTEMLIB /su/bin/sukernel --bootimg-extract-ramdisk /sutmp/stock_boot.img /sutmp/ramdisk.packed
if [ $? -ne 0 ]; then
ui_print "--- Failure, aborting"
CONTINUE=false
fi
fi

if ($CONTINUE); then
ui_print "- Decompressing ramdisk"
LD_LIBRARY_PATH=$SYSTEMLIB /su/bin/sukernel --ungzip /sutmp/ramdisk.packed /sutmp/ramdisk
if [ $? -ne 0 ]; then
ui_print "--- Failure, aborting"
CONTINUE=false
else
rm /sutmp/ramdisk.packed
fi
fi

if ($CONTINUE); then
ui_print "- Checking patch status"
LD_LIBRARY_PATH=$SYSTEMLIB /su/bin/sukernel --patch-test /sutmp/ramdisk
if [ $? -ne 0 ]; then
ui_print "--- Already patched, aborting"
CONTINUE=false
fi
fi
else
ui_print "- Creating backup"
rm /data/stock_boot_*.img
rm /cache/stock_boot_*.img
LD_LIBRARY_PATH=$SYSTEMLIB /su/bin/sukernel --backup $BOOTIMAGE
if [ $? -ne 0 ]; then
ui_print "--- Backup failed"
fi
fi
fi