follow me

AR9331な小さなオモチャにシリアルを生やす

先日紹介したAR9331な小さなオモチャ(zsun111)にシリアルを生やしました。
線を3本伸ばしただけです。
これでu-bootにアクセスし放題です。


シリアルのパターンは存在するものの、パターンサイズが小さいので細い線を用意してください。
あとは使い慣れたこてで頑張りましょう。
配列はこんな感じになっています。

写真上側から、GND、VCC、RX、TXになります。
面倒なのでVCCは付けずに3本にしています。VCCは無いからといって困らないので。
シリアル生やす作業自体は5分かからない簡単作業なので、みなさんもどうですか?


写真下側に存在するパターンは、Ethernetらしいのだが、RJ45ジャックを付けるのも面倒なので、シリアル転送でコーヒー飲みながら頑張るとしましょう。
u-bootのイメージを送るにはRJ45があった方が便利だが、パターンの小ささがすこし辛い。
とりあえずOpenWrtを起動してみますかねぇ。


恒例の純正ファームの起動ログは貼っておきます。
U-Boot 1.1.4 (May 16 2014 - 17:24:30)

AP121 (ar9331) U-boot

DRAM:  32 0
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 140k for U-Boot at: 81fdc000
Reserving 192k for malloc() at: 81fac000
Reserving 44 Bytes for Board Info at: 81fabfd4
Reserving 36 Bytes for Global Data at: 81fabfb0
Reserving 128k for boot params() at: 81f8bfb0
Stack Pointer at: 81f8bf98
Now running in RAM - U-Boot at: 81fdc000
Flash Manuf Id 0xef, DeviceId0 0x60, DeviceId1 0x18
flash size 16777216, sector count = 256
Flash: 16 0
16 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
Fetching MAC Address from 0x81ff4138
Fetching MAC Address from 0x81ff4138
: cfg1 0x5 cfg2 0x7114
eth0: 00:03:7f:11:56:48
eth0 up
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:11:56:49
athrs26_reg_init_lan
ATHRS26: resetting s26
ATHRS26: s26 reset done
eth1 up
eth0, eth1
Hit any key to stop autoboot:  1  0 
## Booting image at 9feb0000 ...
   Image Name:   Linux Kernel Image
   Created:      2014-12-27   2:50:53 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1071603 Bytes = 1 0
1 MB
   Load Address: 80002000
   Entry Point:  802398a0
   Verifying Checksum at 0x9feb0040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 802398a0) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

深?至上移?科技有限公司
Shenzhen Zsun Cloud Technology Co.,Ltd.
Shenzhen Zhishang Yidong Keji Youxian Gongsi
www.zsuncloud.com
Linux version 2.6.31--LSDK-9.2.0_U11.14 (root@jwyue) (gcc version 4.3.3 (GCC) ) #1 Wed Dec 17 15:53:04 CST 2014
flash_size passed from bootloader = 16
arg 1: console=ttyS0,115200
arg 2: root=31:02
arg 3: rootfstype=jffs2
arg 4: rw
arg 5: init=/sbin/init
arg 6: mtdparts=ar7240-nor0:64k(u-boot),64k(u-boot-env),14912k(rootfs),1216k(uImage),64k(NVRAM),64k(ART)
arg 7: mem=32M
CPU revision is: 00019374 (MIPS 24Kc)
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS0,115200 root=31:02 rootfstype=jffs2 rw init=/sbin/init mtdparts=ar7240-nor0:64k(u-boot),64k(u-boot-env),14912k(rootfs),1216k(uImage),64k(NVRAM),64k(ART) mem=32M 
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 29316k/32768k available (2285k kernel code, 3452k reserved, 652k data, 132k init, 0k highmem)
NR_IRQS:128
plat_time_init: plat time init done
Calibrating delay loop... 266.24 BogoMIPS (lpj=532480)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
===== ar7240_platform_init: 0
bio: create slab  at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
AR7240 GPIOC major 0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
NTFS driver 2.1.29 [Flags: R/W DEBUG].
JFFS2 version 2.2 (NAND) (ZLIB) (RTIME) (c) 2001-2006 Red Hat, Inc.
fuse init (API version 7.12)
msgmni has been set to 57
alg: No test for lzma (lzma-generic)
alg: No test for stdrng (krng)
io scheduler noop registered (default)
gpio: ath-gpio module inited!
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
ttyS0: detected caps 00000000 should be 00000100
serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
console [ttyS0] enabled
brd: module loaded
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
PPPoL2TP kernel driver, V1.0
6 cmdlinepart partitions found on MTD device ar7240-nor0
Creating 6 MTD partitions on "ar7240-nor0":
0x000000000000-0x000000010000 : "u-boot"
0x000000010000-0x000000020000 : "u-boot-env"
0x000000020000-0x000000eb0000 : "rootfs"
0x000000eb0000-0x000000fe0000 : "uImage"
0x000000fe0000-0x000000ff0000 : "NVRAM"
0x000000ff0000-0x000001000000 : "ART"
usbmon: debugfs is not available
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (512 buckets, 2048 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
xt_time: kernel timezone is -0000
ip_tables: (C) 2000-2006 Netfilter Core Team
ClusterIP Version 0.8 loaded successfully
arp_tables: (C) 2002 David S. Miller
TCP cubic registered
NET: Registered protocol family 17
Bridge firewalling registered
Ebtables v2.0 registered
ebt_ulog: out of memory trying to call netlink_kernel_create
802.1Q VLAN Support v1.8 Ben Greear 
All bugs added by David S. Miller 
arch/mips/ar7240/gpio.c (ar7240_simple_config_init) ZS_RESET_GPIO: 12
ar7240wdt_init: Registering WDT success
VFS: Mounted root (jffs2 filesystem) on device 31:2.
Freeing unused kernel memory: 132k freed
init started:  BusyBox v1.01 (2014.12.27-02:50+0000) multi-call binary
init started:  BusyBox v1.01 (2014.12.27-02:50+0000) multi-call binary
Starting pid 154, console /dev/ttyS0: '/etc/rc.d/rcS'
Welcome to
         -------      |            /    /--/        ___      |
	  /           |           /|     \/        _____   --|--|
	 /_____\      |---       --|--   //--/      /        /  |
	  __|__       |           /|\    / \/      /___\    /   |
	 ___|___   ___|____      / | \     /               /   \|
			深?至上移?科技有限公司
			Shenzhen Zsun Cloud Technology Co., LTD.
			www.zsuncloud.com
ATHR_GMAC: Length per segment 1536
ATHR_GMAC: fifo cfg 3 01f00140
ATHR_GMAC: Mac address for unit 0:bfff0000
ATHR_GMAC: 00:03:7f:11:56:48 
ATHR_GMAC: Max segments per packet :   1
ATHR_GMAC: Max tx descriptor count :   40
ATHR_GMAC: Max rx descriptor count :   252
ATHR_GMAC: Mac capability flags    :   4403
ATHR_GMAC: Mac address for unit 1:bfff0006
ATHR_GMAC: 00:03:7f:11:56:49 
ATHR_GMAC: Max segments per packet :   1
ATHR_GMAC: Max tx descriptor count :   40
ATHR_GMAC: Max rx descriptor count :   96
ATHR_GMAC: Mac capability flags    :   4D83
mount: Mounting devpts on /dev/pts failed: Device or resource busy
athr_gmac_ring_alloc Allocated 640 at 0x81d7bc00
athr_gmac_ring_alloc Allocated 4032 at 0x81d45000
Setting Drop CRC Errors, Pause Frames and Length Error frames 
Setting PHY...
athr_gmac_ring_alloc Allocated 640 at 0x81d7b800
athr_gmac_ring_alloc Allocated 1536 at 0x81e08800
ATHRS26: resetting s26
ATHRS26: s26 reset done
Setting Drop CRC Errors, Pause Frames and Length Error frames 
Setting PHY...
device eth0 entered promiscuous mode
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Port Status 1c000004 
ar7240-ehci ar7240-ehci.0: ATH EHCI
ar7240-ehci ar7240-ehci.0: new USB bus registered, assigned bus number 1
ehci_reset Intialize USB CONTROLLER in host mode: 3
ehci_reset Port Status 1c000000 
ar7240-ehci ar7240-ehci.0: irq 3, io mem 0x1b000000
ehci_reset Intialize USB CONTROLLER in host mode: 3
ehci_reset Port Status 1c000000 
ar7240-ehci ar7240-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
info, udhcpd (v0.9.9-pre) started
error, max_leases value (254) not sane, setting to 100 instead
rm: cannot remove `/var/log.*': No such file or directory
**** drop_caches_sysctl_handler: all done timer added ...**** 
asf: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath0      Interface doesn't support scanning.

1
Error for wireless request "Set Frequency" (8B04) :
    SET failed on device ath0 ; No such device.
ath0      no privatStarting pid 403, console /dev/ttyS0: '/sbin/getty'
ath_hal: 0.9.17.1 (AR9380, DEBUG, REGOPS_FUNC, WRITE_EEPROM, 11D)
ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
ath_ahb: 9.2.0_U11.14 (Atheros/multi-bss)
__ath_attach: Set global_scn[0]
ACBKMinfree = 48
ACBEMinfree = 32
ACVIMinfree = 16
ACVOMinfree = 0
CABMinfree = 48
UAPSDMinfree = 0
Bootstrap clock 25MHz
ar9300RadioAttach: Need analog access recipe!!
Restoring Cal data from Flash
Using Cal data from Flash 0xbfff0000
ath_get_caps[5184] rx chainmask mismatch actual 1 sc_chainmak 0
ath_get_caps[5159] tx chainmask mismatch actual 1 sc_chainmak 0
SC Callback Registration for wifi0
wifi0: Atheros 9380: mem=0xb8100000, irq=2
wlan_vap_create : enter. devhandle=0x81fa42c0, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x81fa42c0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
device ath0 entered promiscuous mode
br0: port 2(ath0) entering forwarding state
athr_gmac_ring_free Freeing at 0x81d7b800
athr_gmac_ring_free Freeing at 0x81e08800

 (none) mips #1 Wed Dec 17 15:53:04 CST 2014 (none)
(none) login: athr_gmac_ring_alloc Allocated 640 at 0x81d7b800
athr_gmac_ring_alloc Allocated 1536 at 0x81e08800
Setting Drop CRC Errors, Pause Frames and Length Error frames 
Setting PHY...
ath_paprd_cal PAPRD excessive failure disabling PAPRD now
device ath0 left promiscuous mode
br0: port 2(ath0) entering disabled state
ieee80211_scan_unregister_event_handler: Failed to unregister evhandler=c0368c38 arg=81f8cac0
ieee80211_scan_unregister_event_handler: Failed to unregister evhandler=c0368c38 arg=81f8cac0
ieee80211_scan_unregister_event_handler: Failed to unregister evhandler=c03688f4 arg=81f8cac0
ath_ahb: driver unloaded
Removing athdebug proc file
ath_dev: driver unloaded
ath_rate_atheros: driver unloaded
ath_hal: driver unloaded
ath_hal: 0.9.17.1 (AR9380, DEBUG, REGOPS_FUNC, WRITE_EEPROM, 11D)
ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
ath_ahb: 9.2.0_U11.14 (Atheros/multi-bss)
__ath_attach: Set global_scn[0]
ACBKMinfree = 48
ACBEMinfree = 32
ACVIMinfree = 16
ACVOMinfree = 0
CABMinfree = 48
UAPSDMinfree = 0
Bootstrap clock 25MHz
ar9300RadioAttach: Need analog access recipe!!
Restoring Cal data from Flash
Using Cal data from Flash 0xbfff0000
ath_get_caps[5184] rx chainmask mismatch actual 1 sc_chainmak 0
ath_get_caps[5159] tx chainmask mismatch actual 1 sc_chainmak 0
SC Callback Registration for wifi0
wifi0: Atheros 9380: mem=0xb8100000, irq=2
wlan_vap_create : enter. devhandle=0x81fa42c0, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x81fa42c0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
device ath0 entered promiscuous mode
br0: port 2(ath0) entering forwarding state

 (none) mips #1 Wed Dec 17 15:53:04 CST 2014 (none)
(none) login: root
Password: 
Welcome to
         -------      |            /    /--/        ___      |
	  /           |           /|     \/        _____   --|--|
	 /_____\      |---       --|--   //--/      /        /  |
	  __|__       |           /|\    / \/      /___\    /   |
	 ___|___   ___|____      / | \     /               /   \|
			深?至上移?科技有限公司
			Shenzhen Zsun Cloud Technology Co., LTD.
			www.zsuncloud.com
Jan  1 00:02:29 login[403]: root login  on `ttyS0'



BusyBox v1.01 (2014.12.27-02:50+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # 
AR9331な小さなオモチャにシリアルを生やす | 0 件のコメント | アカウント登録
サイト管理者はコメントに関する責任を負いません。