AnyKernel 2.0: more new features
- add support for up to 5 device.name properties for variants - add support for custom dtb swapping (falls back to included if none found in zip root) - fix ramdisk extraction when there is none in the zip (ie. nothing to be added)
This commit is contained in:
1 parent
7ffb3bb1aa
commit
bcfd2e0ff2
3 files changed
+12
-6
No files matched your search
@@ -11,7 +11,9 @@ ifelse(file_getprop("/tmp/anykernel/anykernel.sh", "do.devicecheck") == 1,
|
||||
ui_print(" ");
|
||||
assert(getprop("ro.product.device") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name1") || getprop("ro.build.product") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name1") ||
|
||||
getprop("ro.product.device") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name2") || getprop("ro.build.product") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name2") ||
|
||||
getprop("ro.product.device") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name3") || getprop("ro.build.product") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name3"));
|
||||
getprop("ro.product.device") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name3") || getprop("ro.build.product") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name3") ||
|
||||
getprop("ro.product.device") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name4") || getprop("ro.build.product") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name4") ||
|
||||
getprop("ro.product.device") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name5") || getprop("ro.build.product") == file_getprop("/tmp/anykernel/anykernel.sh", "device.name5"));
|
||||
)
|
||||
);
|
||||
ifelse(file_getprop("/tmp/anykernel/anykernel.sh", "do.initd") == 1,
|
||||
|
||||
@@ -19,7 +19,7 @@ device.name2=toro
|
||||
device.name3=toroplus
|
||||
block=/dev/block/platform/omap/omap_hsmmc.0/by-name/boot;
|
||||
|
||||
do.devicecheck=1 specified requires at least device.name1 to be present. This should match ro.product.device or ro.build.product for your device.
|
||||
do.devicecheck=1 specified requires at least device.name1 to be present. This should match ro.product.device or ro.build.product for your device. There is support for up to 5 device.name# properties.
|
||||
|
||||
do.initd=1 will create the init.d directory in /system/etc/init.d/ and apply 755 permissions.
|
||||
|
||||
@@ -50,7 +50,7 @@ You may also use ui_print "<text>" to write messages back to the recovery during
|
||||
|
||||
// Instructions
|
||||
|
||||
1- Place zImage in the root
|
||||
1- Place zImage in the root (dtb should also go here for devices that require a custom one)
|
||||
2- Place any required ramdisk files in /ramdisk
|
||||
3- Place any required patch files (generally partial files which go with commands) in /patch
|
||||
4- Modify the anykernel.sh to add your kernel's name, boot partition location, permissions for included ramdisk files, and use methods for any required ramdisk modifications
|
||||
|
||||
+7
-3
@@ -11,6 +11,8 @@ do.cleanup=1
|
||||
device.name1=maguro
|
||||
device.name2=toro
|
||||
device.name3=toroplus
|
||||
device.name4=
|
||||
device.name5=
|
||||
|
||||
# shell variables
|
||||
block=/dev/block/platform/omap/omap_hsmmc.0/by-name/boot;
|
||||
@@ -25,9 +27,9 @@ bin=/tmp/anykernel/tools;
|
||||
split_img=/tmp/anykernel/split_img;
|
||||
patch=/tmp/anykernel/patch;
|
||||
|
||||
cd $ramdisk;
|
||||
chmod -R 755 $bin;
|
||||
mkdir -p $split_img;
|
||||
mkdir -p $ramdisk $split_img;
|
||||
cd $ramdisk;
|
||||
|
||||
OUTFD=`ps | grep -v "grep" | grep -oE "update(.*)" | cut -d" " -f3`;
|
||||
ui_print() { echo "ui_print $1" >&$OUTFD; echo "ui_print" >&$OUTFD; }
|
||||
@@ -59,7 +61,9 @@ write_boot() {
|
||||
secondoff=`cat *-secondoff`;
|
||||
secondoff="--second_offset $secondoff";
|
||||
fi;
|
||||
if [ -f *-dtb ]; then
|
||||
if [ -f /tmp/anykernel/dtb ]; then
|
||||
dtb="--dt /tmp/anykernel/dtb";
|
||||
elif [ -f *-dtb ]; then
|
||||
dtb=`ls *-dtb`;
|
||||
dtb="--dt $split_img/$dtb";
|
||||
fi;
|
||||
|
||||
Reference in new issue
Block a user