n0xa/M5CZ-Kali-Graft — reverse-engineered prompt
Reverse engineered prompt
Build me a reproducible shell script called graft.sh that creates a flashable Kali Linux arm64 SD card image for the M5 Cardputer Zero.
I want it to start from a normal Kali Raspberry Pi arm64 image, pull or use the stock M5 Cardputer Zero image as a donor, then copy over the device specific kernel, modules, firmware, overlays, and APPLaunch so the built card boots straight into the M5 launcher on the built in LCD. If HDMI is connected, it should still give me a Kali console login and let me start a lightweight desktop. SSH should work with keys after I deploy my public key to the flashed card.
Please make the script staged so I can run checks, fetch donor files, resize and mount images, graft boot files, install packages, add configs, verify the result, open a chroot shell for tinkering, and deploy SSH keys later. Include clear README instructions for first build, rebuilding the launcher, flashing the card, and common overrides.
Want more depth? Deep Reverse