Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1828517
  • 博文数量: 286
  • 博客积分: 3713
  • 博客等级: 少校
  • 技术积分: 2275
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-11 09:47
个人简介

http://blog.chinaunix.net/uid/16979052.html

文章分类

全部博文(286)

文章存档

2018年(1)

2017年(16)

2016年(9)

2015年(17)

2014年(15)

2013年(112)

2012年(116)

分类: LINUX

2013-05-15 11:32:02

johnyin@yin-zh:~/u-boot_pepe2k_20130514$telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
 === IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
 ------------------------------------------


BusyBox v1.19.4 (2013-03-14 11:28:31 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (12.09, r36088)
 -----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@OpenWrt:/tmp$wget
Connecting to 192.168.102.2:8000 (192.168.102.2:8000)
factory-to-ddwrt.bin 100% |*************************************************************************|  3840k  0:00:00 ETA
root@OpenWrt:/tmp$md5sum factory-to-ddwrt.bin
803eca903d0a39c6ac65728fbd0ccf74  factory-to-ddwrt.bin
root@OpenWrt:/tmp$cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 000e9cac 00010000 "kernel"
mtd2: 002e6354 00010000 "rootfs"
mtd3: 00070000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"
root@OpenWrt:/tmp$sysupgrade -b /tmp/ap2.tar.bz
Saving config files...
root@OpenWrt:/tmp$scp ap2.tar.bz root@192.168.102.2:/home/johnyin/johnyin/android/wr703n/u-boot_pepe2k_20130514

Host '192.168.102.2' is not in the trusted hosts file.
(fingerprint md5 c2:83:34:c6:e5:7c:ae:9e:40:20:2c:7f:27:61:56:0f)
Do you want to continue connecting? (y/n) y
root@192.168.102.2's password:
ap2.tar.bz                                                                              100% 5088     5.0KB/s   00:00    
root@OpenWrt:/tmp$ll /etc/rc.d/
lrwxrwxrwx    1 root     root          18 May  9  2013 K50dropbear -> ../init.d/dropbear
lrwxrwxrwx    1 root     root          17 May  9  2013 K90network -> ../init.d/network
lrwxrwxrwx    1 root     root          14 May  9  2013 K98boot -> ../init.d/boot
lrwxrwxrwx    1 root     root          16 May  9  2013 K99umount -> ../init.d/umount
lrwxrwxrwx    1 root     root          19 May  9  2013 S05defconfig -> ../init.d/defconfig
lrwxrwxrwx    1 root     root          14 May  9  2013 S10boot -> ../init.d/boot
lrwxrwxrwx    1 root     root          14 May  9  2013 S11ubus -> ../init.d/ubus
lrwxrwxrwx    1 root     root          15 Jan  1 00:04 S20fstab -> ../init.d/fstab
lrwxrwxrwx    1 root     root          17 May  9  2013 S20network -> ../init.d/network
lrwxrwxrwx    1 root     root          13 May  9  2013 S39usb -> ../init.d/usb
lrwxrwxrwx    1 root     root          18 May  9  2013 S50dropbear -> ../init.d/dropbear
lrwxrwxrwx    1 root     root          16 May  9  2013 S50telnet -> ../init.d/telnet
lrwxrwxrwx    1 root     root          14 May  9  2013 S95done -> ../init.d/done
lrwxrwxrwx    1 root     root          13 May  9  2013 S96led -> ../init.d/led
lrwxrwxrwx    1 root     root          18 May  9  2013 S97watchdog -> ../init.d/watchdog
lrwxrwxrwx    1 root     root          16 May  9  2013 S99sysctl -> ../init.d/sysctl
root@OpenWrt:/tmp$cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 000e9cac 00010000 "kernel"
mtd2: 002e6354 00010000 "rootfs"
mtd3: 00070000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"
root@OpenWrt:/tmp$mtd write factory-to-ddwrt.bin firmware
Unlocking firmware ...

Writing from factory-to-ddwrt.bin to firmware ...     
root@OpenWrt:/tmp$reboot














johnyin@yin-zh:~/johnyin/android/wr703n/u-boot_pepe2k_20130514$telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.

DD-WRT v24-sp2 std (c) 2013 NewMedia-NET GmbH
Release: 03/25/13 (SVN revision: 21061)

DD-WRT login: root
Password:
==========================================================
 
 ____  ___    __        ______ _____         ____  _  _
 | _ \| _ \   \ \      / /  _ \_   _| __   _|___ \| || |
 || | || ||____\ \ /\ / /| |_) || |   \ \ / / __) | || |_
 ||_| ||_||_____\ V  V / |  _ < | |    \ V / / __/|__   _|
 |___/|___/      \_/\_/  |_| \_\|_|     \_/ |_____|  |_|
 
                       DD-WRT v24-sp2
                  
 
==========================================================


BusyBox v1.21.0 (2013-03-25 09:31:26 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@DD-WRT:~# cd /tmp
root@DD-WRT:/tmp# wget
Connecting to 192.168.1.2:8000 (192.168.1.2:8000)
uboot_for_wr703n.bin 100% |*************************************************************************| 65536   0:00:00 ETA
root@DD-WRT:/tmp# md5sum uboot_for_wr703n.bin
5139ce4182fd46b3422dcd707239bcdf  uboot_for_wr703n.bin
root@DD-WRT:/tmp# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "RedBoot"
mtd1: 003c0000 00010000 "linux"
mtd2: 002c0000 00010000 "rootfs"
mtd3: 00010000 00010000 "ddwrt"
mtd4: 00010000 00010000 "nvram"
mtd5: 00010000 00010000 "board_config"
mtd6: 00400000 00010000 "fullflash"
mtd7: 00020000 00010000 "fullboot"
root@DD-WRT:/tmp# ls -l
-rw-r--r--    1 root     root          1035 Jan  1 00:00 ath0_hostap.conf
drwx------    2 root     root             0 Jan  1 00:00 chilli
drwx------    2 root     root             0 Jan  1 00:00 cron.d
-rw-r--r--    1 root     root           239 Jan  1 00:00 dnsmasq.conf
-rw-r--r--    1 root     root             0 Jan  1 00:00 dnsmasq.leases
drwx------    2 root     root             0 Jan  1 00:00 etc
-rw-r--r--    1 root     root            39 Jan  1 00:00 hosts
-rw-r--r--    1 root     root           181 Jan  1 00:00 igmpproxy.conf
-rw-r--r--    1 root     root            86 Jan  1 00:00 loginprompt
drwx------    2 root     root             0 Jan  1 00:00 nvram
drwxr-xr-x    3 root     root             0 Jan  1 00:00 oet
-rw-r--r--    1 root     root            23 Jan  1 00:00 resolv.conf
-rw-r--r--    1 root     root             0 Jan  1 00:00 resolv.dnsmasq
drwx------    3 root     root             0 Jan  1 00:00 root
-rw-r--r--    1 root     root         65536 Jan  1 00:01 uboot_for_wr703n.bin
drwxr-xr-x    8 root     root             0 Jan  1 00:00 var
drwx------    2 root     root             0 Jan  1 00:00 www
root@DD-WRT:/tmp# dd if=/dev/mtd0 of=/tmp/redboot bs=1 count=65536
65536+0 records in
65536+0 records out
root@DD-WRT:/tmp# md5sum redboot
dc9be252052b077bea130839fdc2a3d8  redboot
root@DD-WRT:/tmp# mtd write uboot_for_wr703n.bin RedBoot
Unlocking RedBoot ...
Writing from uboot_for_wr703n.bin to RedBoot ...  [w]
root@DD-WRT:/tmp# dd if=/dev/mtd0 of=/tmp/redboot1 bs=1 count=65536
65536+0 records in
65536+0 records out
root@DD-WRT:/tmp# md5sum redboot1
20293b06b3f2dc5405f073bc3bc2e6ed  redboot1
root@DD-WRT:/tmp# sync
root@DD-WRT:/tmp# mtd write uboot_for_wr703n.bin RedBoot
Unlocking RedBoot ...
Writing from uboot_for_wr703n.bin to RedBoot ...  [w]
root@DD-WRT:/tmp# sync
root@DD-WRT:/tmp# dd if=/dev/mtd0 of=/tmp/redboot1 bs=1 count=65536
65536+0 records in
65536+0 records out
root@DD-WRT:/tmp# md5sum redboot1
20293b06b3f2dc5405f073bc3bc2e6ed  redboot1
root@DD-WRT:/tmp# reboot
root@DD-WRT:/tmp# Connection closed by foreign host.
johnyin@yin-zh:~/johnyin/android/wr703n/u-boot_pepe2k_20130514$telnet 192.168.1.1
Trying 192.168.1.1...
telnet: Unable to connect to remote host: Connection refused
johnyin@yin-zh:~/johnyin/android/wr703n/u-boot_pepe2k_20130514$ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=14 ttl=64 time=0.521 ms
64 bytes from 192.168.1.1: icmp_req=15 ttl=64 time=0.248 ms
^C
--- 192.168.1.1 ping statistics ---
15 packets transmitted, 2 received, 86% packet loss, time 14057ms
rtt min/avg/max/mdev = 0.248/0.384/0.521/0.137 ms
johnyin@yin-zh:~/johnyin/android/wr703n/u-boot_pepe2k_20130514$telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.

DD-WRT v24-sp2 std (c) 2013 NewMedia-NET GmbH
Release: 03/25/13 (SVN revision: 21061)

DD-WRT login: root
Password:
==========================================================
 
 ____  ___    __        ______ _____         ____  _  _
 | _ \| _ \   \ \      / /  _ \_   _| __   _|___ \| || |
 || | || ||____\ \ /\ / /| |_) || |   \ \ / / __) | || |_
 ||_| ||_||_____\ V  V / |  _ < | |    \ V / / __/|__   _|
 |___/|___/      \_/\_/  |_| \_\|_|     \_/ |_____|  |_|
 
                       DD-WRT v24-sp2
                  
 
==========================================================


BusyBox v1.21.0 (2013-03-25 09:31:26 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@DD-WRT:~# cd /tmp
root@DD-WRT:/tmp# cd /tmp
root@DD-WRT:/tmp# dd if=/dev/mtd0 of=uboot bs=1 count=65536
65536+0 records in
65536+0 records out
root@DD-WRT:/tmp# ll
-sh: ll: not found
root@DD-WRT:/tmp# md5sum uboot
5139ce4182fd46b3422dcd707239bcdf  uboot
root@DD-WRT:/tmp# wget
Connecting to 192.168.1.2:8000 (192.168.1.2:8000)
sysupgrade.bin       100% |*************************************************************************|  3456k  0:00:00 ETA
root@DD-WRT:/tmp# md5sum sysupgrade.bin
629d4fb8526ffac49479db938a25ab94  sysupgrade.bin
root@DD-WRT:/tmp# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "RedBoot"
mtd1: 003c0000 00010000 "linux"
mtd2: 002c0000 00010000 "rootfs"
mtd3: 00010000 00010000 "ddwrt"
mtd4: 00010000 00010000 "nvram"
mtd5: 00010000 00010000 "board_config"
mtd6: 00400000 00010000 "fullflash"
mtd7: 00020000 00010000 "fullboot"
root@DD-WRT:/tmp# mtd write sysupgrade.bin linux
Unlocking linux ...
Writing from sysupgrade.bin to linux ...  [w]
root@DD-WRT:/tmp# reboot






按住reset后,接电闪烁7下(at least 7 secs)后松开,nc那出现
root@yin-zh:/root$nc -ulp 6666 192.168.1.1 6666
U-Boot 1.1.4  (Apr 22 2013)

    uboot> ?
    ?
    ?           - alias for 'help'
    boot        - boot default - run command 'bootcmd'
    bootd       - boot default, i.e., run 'bootcmd'
    bootm       - boot application image from memory
    cp          - memory copy
    erase       - erase FLASH memory
    help        - print embedded help
    httpd       - start www server for firmware recovery
    md          - memory display
    mm          - memory modify (auto-incrementing)
    mtest       - simple RAM test
    mw          - memory write (fill)
    nm          - memory modify (constant address)
    printenv    - print environment variables
    printmac    - print MAC address stored in flash
    printmodel  - print router model stored in flash
    reset       - perform RESET of the CPU
    run         - run commands in an environment variable
    setenv      - set environment variables
    setmac      - save new MAC address in flash
    tftpboot    - boot image via network using TFTP protocol
    version     - print U-Boot version

    uboot> boot
    boot
    Booting image at: 0x9F020000...
    Uncompressing kernel image...
    OK
    Starting kernel...


阅读(7263) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~