source ${SCRIPTPATH}/hvk-common.sh
DEPLOYDIR=rootfs
-ARCHIVE=kernel.tar.xz
print_usage()
{
}
function rootfs_archive() {
+ if [ -f "include/config/kernel.release" ]; then
+ archive="linux-$(cat include/config/kernel.release).tar.xz"
+ fi
+
+ if [ "${archive}" = "" ]; then
+ echo "${PROG_NAME}: Unable to determine kernel release"
+ exit 1
+ fi
+
pushd ${deploydir}
- tar cf - * | xz > ../${ARCHIVE}
+ tar cf - * | xz > ../${archive}
popd
}
rootfs_install
rootfs_archive
- scp ${ARCHIVE} root@${EVK_IP}:/tmp
- ssh root@${EVK_IP} "cd / && tar -xf /tmp/${ARCHIVE}"
+ scp ${archive} root@${EVK_IP}:/tmp
+ ssh root@${EVK_IP} "cd / && tar -xf /tmp/${archive}"
# Determine if using extlinux on target:
ssh -q root@${EVK_IP} [[ -f /boot/extlinux/extlinux.conf ]] && EXTLINUX=1 || EXTLINUX=0;