diff --git a/tools/ak2-core.sh b/tools/ak2-core.sh index 4e0dd27..cc8972c 100755 --- a/tools/ak2-core.sh +++ b/tools/ak2-core.sh @@ -116,7 +116,7 @@ write_boot() { dtb="--dt $split_img/$dtb"; fi; if [ -f "$bin/mkbootfs" ]; then - $bin/mkbootfs /tmp/anykernel/ramdisk | gzip > /tmp/anykernel/ramdisk-new.cpio.gz; + $bin/mkbootfs $ramdisk | gzip > /tmp/anykernel/ramdisk-new.cpio.gz; else cd $ramdisk; find . | cpio -H newc -o | gzip > /tmp/anykernel/ramdisk-new.cpio.gz; @@ -280,5 +280,17 @@ patch_fstab() { fi; } +# patch_cmdline [] +patch_cmdline() { + cmdfile=`ls $split_img/*-cmdline`; + if [ -z "$(grep "$1" $cmdfile)" ]; then + cmdtmp=`cat $cmdfile`; + echo "$cmdtmp $1" > $cmdfile; + else + match=$(grep -o "$1.*$" $cmdfile | cut -d\ -f1); + sed -i -e "s;${match};${2};" -e 's; ; ;' -e 's;[ \t]*$;;' $cmdfile; + fi; +} + ## end methods