shakalaca
9/16/2017 - 5:07 PM

wrapper for mkbootimg

wrapper for mkbootimg

#!/bin/bash
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]; then
  echo "$0 <kernel> <ramdisk> <boot.img>"
  exit
fi

if [ -f "$3" ]; then
  mv "$3" "$3.old"
fi

~/mkbootimg/mkbootimg \
   --cmdline "`cat boot.img-cmdline`" \
   --base "`cat boot.img-base`" \
   --kernel_offset "`cat boot.img-kerneloff`" \
   --pagesize "`cat boot.img-pagesize`" \
   --os_version "`cat boot.img-osversion`" \
   --os_patch_level "`cat boot.img-oslevel`" \
   --ramdisk_offset "`cat boot.img-ramdiskoff`" \
   --kernel "$1" \
   --ramdisk "$2" \
   -o "$3"