Merge pull request #515 from kszaq/amlogic-nand-imggz

init: Fix updating from img.gz when kernel resides on block device
This commit is contained in:
Lukas Rusak 2016-07-05 10:36:04 -07:00 committed by GitHub
commit 79dc62da2c
2 changed files with 6 additions and 1 deletions

View File

@ -253,6 +253,7 @@ makeinstall_init() {
cp $PKG_DIR/scripts/functions $INSTALL
cp $PKG_DIR/scripts/init $INSTALL
sed -e "s/@DISTRONAME@/$DISTRONAME/g" \
-e "s/@KERNEL_NAME@/$KERNEL_NAME/g" \
-i $INSTALL/init
chmod 755 $INSTALL/init
}

View File

@ -727,7 +727,11 @@
# don't make temporary files but instead copy
# directly from mountpoint to /flash
UPDATE_DIR=$UPDATE_ROOT/.tmp/mnt
UPDATE_KERNEL=$(basename $IMAGE_KERNEL)
if [ ! -b $IMAGE_KERNEL -o -z "@KERNEL_NAME@" ]; then
UPDATE_KERNEL=$(basename $IMAGE_KERNEL)
else
UPDATE_KERNEL="@KERNEL_NAME@"
fi
fi
sync