Initial commit
commit
6ed69c9df6
|
@ -0,0 +1,2 @@
|
|||
openwrt-ar71xx-generic-zsun-sdreader-kernel.bin:S:/dev/mtd3
|
||||
openwrt-ar71xx-generic-zsun-sdreader-rootfs-squashfs.bin:S:/dev/mtd2
|
Binary file not shown.
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
cp ./minreboot /tmp
|
||||
chmod +x /tmp/minreboot
|
||||
|
||||
./mtd_write.actual write openwrt-ar71xx-generic-zsun-sdreader-kernel.bin /dev/mtd3
|
||||
./mtd_write.actual write openwrt-ar71xx-generic-zsun-sdreader-rootfs-squashfs.bin /dev/mtd2
|
||||
|
||||
/tmp/minreboot
|
||||
# aaaaand there we go ,_,
|
Binary file not shown.
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "** Building firmware"
|
||||
. ./makefirmware
|
||||
|
||||
UPDATEFILE=${MODEL}-update.tar.gz
|
||||
|
||||
echo -n "** Switching mode..."
|
||||
curl http://10.168.168.1:8080/goform/Setcardworkmode?workmode=0
|
||||
echo
|
||||
|
||||
echo "** Uploading firmware"
|
||||
while ! smbclient \\\\10.168.168.1\\public -U Admin%xxx -c "mkdir .update ; cd .update ; put ${UPDATEFILE}"; do
|
||||
echo -n "!! smbclient failed, retrying ... "
|
||||
sleep 3
|
||||
done
|
||||
|
||||
echo -n "** Now doing system update ... "
|
||||
curl http://10.168.168.1:8080/goform/upFirmWare
|
||||
|
||||
echo '** If command above returned {"status":2} your device should now blink for a while and then reboot'
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=${VERSION:-1.1}
|
||||
MODEL=${MODEL:-SD100}
|
||||
OUTDIR=${OUTDIR:-$(dirname $0)}
|
||||
DATADIR=${DATADIR:-$(dirname $0)/data}
|
||||
|
||||
tar zcvf $OUTDIR/intermediate-v${VERSION}.tar.gz -C $DATADIR .
|
||||
md5sum $OUTDIR/intermediate-v${VERSION}.tar.gz | cut -d ' ' -f 1 > md5
|
||||
tar zcvf $OUTDIR/${MODEL}-update.tar.gz $OUTDIR/intermediate-v${VERSION}.tar.gz md5
|
|
@ -0,0 +1,8 @@
|
|||
#include <unistd.h>
|
||||
#include <linux/reboot.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART, NULL);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue