diff --git a/.gitignore b/.gitignore index 4c1b90c..00026ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ overlay/etc/release +MD5SUMS diff --git a/fwupdate-install.sh b/fwupdate-install.sh new file mode 100755 index 0000000..8187822 --- /dev/null +++ b/fwupdate-install.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +mount /dev/sda /mnt || exit 1 + +cp ~matthias/bzImage /mnt/new/ && +cp ~matthias/rootfs.cpio.xz /mnt/new/ && +(cd /mnt/new ; md5sum -c ~matthias/MD5SUMS) || (umount /mnt; exit 2) + +sync + +cd /mnt +mv bzImage bzImage.old +mv rootfs.cpio.xz rootfs.cpio.xz.old + +mv new/bzImage new/rootfs.cpio.xz . && +sync || (mv bzImage.old bzImage; mv rootfs.cpio.xz.old rootfs.cpio.xz; cd / ; umount /mnt; exit 3) + +reboot +exit 0 diff --git a/fwupdate.sh b/fwupdate.sh new file mode 100755 index 0000000..5b96888 --- /dev/null +++ b/fwupdate.sh @@ -0,0 +1,9 @@ +#!/bin/sh +FILES="buildroot/output/images/bzImage buildroot/output/images/rootfs.cpio.xz" + +md5sum $FILES > MD5SUMS && +sed -e s_buildroot/output/images/__ -i MD5SUMS && +scp $FILES MD5SUMS fwupdate-install.sh panda.hadiko.de: && +ssh -t panda.hadiko.de sudo ./fwupdate-install.sh +echo "fwupdate-install.sh exited with " $? +