-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathe624
31 lines (29 loc) · 1.06 KB
/
e624
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/expect
#spawn killall minicom
#spawn sleep 1
spawn minicom
#interact
send "\n"
#expect "#"
#send "reboot\n"
#expect "autoboot: 2"
#send "\002"
expect "ar7240>"
send "setenv bootargs console=ttyS0,115200 root=31:03 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:256k(u-boot)ro,64k(u-boot-env),64k(board),6656k(rootfs0),1m(uImage0),6656k(rootfs1),1m(uImage1),448k(config),64k(exception),64k(log),64k(ART),7680k@384k(FMW0),7680k@8064k(FMW1)\n"
expect "ar7240>"
send "setenv serverip 10.0.1.223\n"
expect "ar7240>"
send "setenv ipaddr 10.0.1.103\n"
expect "ar7240>"
send "set bootcmd bootm 0x9f6e0000\n"
expect "ar7240>"
send "save\n"
expect "ar7240>"
send "tftp 0x80060000 vmlinux.lzma.uImage && erase 0x9f6e0000 +0x100000 && cp.b 0x80060000 0x9f6e0000 \${filesize}\n"
expect "ar7240>"
send "tftp 0x80060000 config-db12x && erase 0x9ff60000 +0x070000 && cp.b 0x80060000 0x9ff60000 \${filesize}\n"
expect "ar7240>"
send "tftp 0x80060000 db12x-squashfs && erase 0x9f060000 +0x680000 && cp.b 0x80060000 0x9f060000 \${filesize}\n"
expect "ar7240>"
send "boot\n"
interact