Have you built and installed a Linux kernel before? There are instructions for building and installing a kernel suitable for Debian here: https://github.com/gemian/gemini-keyboard-a...rnelCompilation. Building for Android is slightly different, requiring the aeon6797_6m_n_defconfig config file instead, plus some extra Android-specific parameters sent to mkbootimg. The keyboard mapping under my test kernel is not entirely correct (ESC is neither ESC nor Power, for example). Planet Computers did not compile in support for /proc/configs.gz in their stock Android kernel so I don't know what's missing (yet). But I don't want to get to too far off topic in this camera thread.
Linux kernel: yes, I even contributed code. But how to put the kernel onto an Android device is a mistery to me.
Use this as a guide to set up the development environment and compile the kernel (I cross-compiled):
https://github.com/gemian/gemini-keyboard-a...rnelCompilationBut those instructions are for building the Debian Linux kernel. For Android, use aeon6797_6m_n_defconfig for the kernel config (replacing aeon6797_6m_n_halium_defconfig in the instructions).
Building the bootable image requires different steps than the gemian instructions. Do not follow those instructions for obtaining ramdisk.cpio.gz. Instead, you will need to unpack an existing boot image (from Planet's firmware) and repack it with your newly compiled kernel. Here is an example using the 12062018 firmware and Planet's rooted boot image. It is assumed you have already retrieved mkbootimg.
mkdir android_root_boot
mkbootimg/unpackbootimg -i /root_boot.img -o android_root_boot
That unpacks the stock boot image providing you with a ramdisk (similar to initrd on x86) and a kernel, plus necessary offsets and other parameters.
Next, build the new boot image. You will reuse the ramdisk, but replace the kernel:
./mkbootimg/mkbootimg --kernel /arch/arm64/boot/Image.gz-dtb \
--ramdisk android_root_boot/root_boot.img-ramdisk.gz \
--base 0x40078000 \
--second_offset 0x00e88000 \
--cmdline "bootopt=64S3,32N2,64N2 buildvariant=user" \
--kernel_offset 0x00008000 \
--ramdisk_offset 0x04f88000 \
--tags_offset 0x03f88000 \
--pagesize 2048 \
--board 1528859406 \
--hash sha1 \
--os_version 7.1.1 \
--os_patch_level 2017-11 \
-o root_test.img
Now you should have a new root boot image called root_test.img with your built kernel. Copy it into your firmware directory. The final step is to modify an existing scatter file, replacing root_boot.img (stock) with root_test.img (yours). Run the flash tool, load the scatter file, deselect all but the partition associated with root_test.img, and download. Hopefully you'll then be able to boot Android with your own kernel... and play with the rear camera driver.