File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed
Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,13 @@ command -v ./kptools >/dev/null 2>&1 || { >&2 echo "- Command kptools not found!
4242
4343if [ ! -f kernel ]; then
4444echo " - Unpacking boot image"
45- ./kptools unpack " $BOOTIMAGE " > /dev/null 2>&1
46- if [ $? -ne 0 ]; then
47- >&2 echo " - Unpack error: $? "
45+
46+ set -x
47+ ./kptools unpack " $BOOTIMAGE " " $@ "
48+ patch_rc=$?
49+ set +x
50+ if [ $patch_rc -ne 0 ]; then
51+ >&2 echo " - Unpack error: $patch_rc "
4852 exit $?
4953 fi
5054fi
@@ -76,7 +80,7 @@ if [ $patch_rc -ne 0 ]; then
7680fi
7781
7882echo " - Repacking boot image"
79- ./kptools repack " $BOOTIMAGE " > /dev/null 2>&1
83+ ./kptools repack " $BOOTIMAGE "
8084
8185if [ ! $( ./kptools -i kernel.ori -f | grep CONFIG_KALLSYMS_ALL=y) ]; then
8286 echo " - Detected CONFIG_KALLSYMS_ALL is not set!"
Original file line number Diff line number Diff line change @@ -24,10 +24,13 @@ command -v ./kptools >/dev/null 2>&1 || { echo "- Command kptools not found!"; e
2424
2525if [ ! -f kernel ]; then
2626echo " - Unpacking boot image"
27- ./kptools unpack " $BOOTIMAGE " > /dev/null 2>&1
28- if [ $? -ne 0 ]; then
29- >&2 echo " - Unpack error: $? "
30- exit $?
27+
28+ set -x
29+ ./kptools unpack " $BOOTIMAGE " " $@ "
30+ patch_rc=$?
31+ if [ $patch_rc -ne 0 ]; then
32+ >&2 echo " - Unpack error: $patch_rc "
33+ exit $patch_rc
3134 fi
3235fi
3336
@@ -38,13 +41,13 @@ if [ ! $(./kptools -i kernel -l | grep patched=false) ]; then
3841 else
3942 mv kernel kernel.ori
4043 echo " - Unpatching kernel"
41- ./kptools -u --image kernel.ori --out kernel
44+ ./kptools -u --image kernel.ori --out kernel " $@ "
4245 if [ $? -ne 0 ]; then
4346 >&2 echo " - Unpatch error: $? "
4447 exit $?
4548 fi
4649 echo " - Repacking boot image"
47- ./kptools repack " $BOOTIMAGE " > /dev/null 2>&1
50+ ./kptools repack " $BOOTIMAGE "
4851 if [ $? -ne 0 ]; then
4952 >&2 echo " - Repack error: $? "
5053 exit $?
You can’t perform that action at this time.
0 commit comments