Skip to content

Commit 6d74e18

Browse files
committed
AK2: add support for configurations that require mkbootfs in tools
1 parent 3557b29 commit 6d74e18

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

anykernel.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ write_boot() {
8383
dtb=`ls *-dtb`;
8484
dtb="--dt $split_img/$dtb";
8585
fi;
86-
cd $ramdisk;
87-
find . | cpio -H newc -o | gzip > /tmp/anykernel/ramdisk-new.cpio.gz;
86+
if [ -f "$bin/mkbootfs" ]; then
87+
$bin/mkbootfs /tmp/anykernel/ramdisk | gzip > /tmp/anykernel/ramdisk-new.cpio.gz;
88+
else
89+
cd $ramdisk;
90+
find . | cpio -H newc -o | gzip > /tmp/anykernel/ramdisk-new.cpio.gz;
91+
fi;
8892
if [ $? != 0 ]; then
8993
ui_print " "; ui_print "Repacking ramdisk failed. Aborting..."; exit 1;
9094
fi;

0 commit comments

Comments
 (0)