[Asus Transformer TF700] sam369:
When I first installed KatKiss 6, I had to unpack and repack kernels in order to try out different combinations of zImage, ramdisk files, and modules. Many people may not want to go through the trouble, but there is an easier way to do that.

So, why do we want to try different combinations of zImage, ramdisk files, and modules? To see if performance is better could be an incentive, but the main reason is that sometimes a different combination of zImage, ramdisk files, and modules may fix things that are not working properly. For example, with cm kernel, GPS can't get good signals in the PAC ROM 5.1.1 I compiled. The problem is solved by using ramdisk of Cyanogenmod, and zImage and modules of Grimlock kernel 5.1.1.

Actually, [MENTION=4878287]_that[/MENTION] mentioned the two ways that can accomplish this back in January, but I went with the more complicated one because I had little knowledge of programming. I finally figured out how to do that the easier way recently. :o

The downside is that you must use a zImage supporting preinit in order to load ramdisk files that are not packed in the kernel. that kernel and Grimlock kernel both support preinit.

If you don't use kexecboot, zImage will always be from the kernel you installed for internal ROM. If it's a ROM2SD installation, the ramdisk files will be from the kernel you choose during ROM2SD installation. The modules are usually copied from internal during ROM2SD installation.

If you want to change zImage, then you have to flash a different kernel to /boot partition. If you want to change ramdisk file for ROM2SD installation, then you need to first delete the boot/ folder on the /system partition of the micro SD card. Then you can flash the kernel containing the ramdisk files between rom2sd1.zip and rom2sd2.zip following the method by [MENTION=4878287]_that[/MENTION]. Alternatively, you can also use the ones in this post. The differences are that the updated scripts from ZOMBi-POP will copy modules from internal /system, instead of using the ones packed by [MENTION=4878287]_that[/MENTION].

If you want to use that kernel with KatKiss 6, you have to load ramdisk files from KatKernel to use with zImage of that kernel. To load different ramdisk files for a ROM installed on internal storage, you need to revise '20detect-microsd' file in internal /system/boot/preinit.d/ , which will copy ramdisk files from internal /system/boot/ramdisk to /. You can download the one I used, which is attached. The following lines are added to the original file.

else
# copy ramdisk files from internal /system/boot/ramdisk to /
$BB cp -a /system/boot/ramdisk/* / || echo "failed to copy ramdisk files from /system/boot/ramdisk"

You certainly need to extract the ramdisk files to internal /system/boot/ramdisk/ . To do that, you can use the attached extract ramdisk to internal system.zip. Just replace the 'boot.blob' inside with the one you'd like to use. Basically, it's the rom2sd2.zip from [MENTION=4878287]_that[/MENTION], but without the scripts doing revision for ROM2SD.

At least for some ROMs, you can see performance gain with F2FS /cache. If you want to try to see if F2FS /cache works better for you. You can convert /cache to F2FS with TWRP 2.8.+. Just go to Wipe->Advanced Wipe, select Cache, and Change file system to F2FS. You also need to revise 'fstab.cardhu' in /system/boot/ramdisk/ for all the ROMs you are running. Just replacing the line for /cache with the following one

/dev/block/mmcblk0p2 /cache f2fs noatime,nosuid,nodev,errors=panic wait,encryptable=footer

Alternatively, you can use attached extract ramdisk to internal system f2fs cache .zip or rom2sd2 f2fs cache.zip when extracting the ramdisk files to internal or ROM2SD /system. The following line is added to 'extract-ramdisk.sh' so that 'fstab.cardhu' will be revised during extraction.

sed -i '/mmcblk0p2/{;s/ext4/f2fs/;s/barrier=.,//;s/nodiratime,//;s/noauto_da_alloc,//;s/nomblk_io_submit,//;}' $f

I am able to use different zImages for internal and external ROMs and choose which one to boot with kexecboot. If someone is interested in how to set that up, please just ask in the comments.