For recent Alpine versions please use the mkimage.sh script in the scripts dir in root of the aports tree.