Created
September 16, 2017 17:07
-
-
Save shakalaca/5e4a1e23f473940b4c2738e85bdd1f99 to your computer and use it in GitHub Desktop.
wrapper for mkbootimg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment