|
本帖最后由 jiuweiljp 于 2024-1-4 01:05 编辑 : w+ E$ e! J$ E/ e2 @$ k
; j/ s/ |( }& Y; A; S
使用条件:
* K. v4 C( g i 1、有usb接口并且能驱动U pan的无视这个方法;
; Y' B! a1 j( A: ~/ _ 2、光猫不能telnet,并没有tftp或者wget、chmod命令也可以不用看;( w% }( P- `8 W8 z3 i
( U* T ]1 v6 P+ m8 v6 `
正文如下% ?8 S0 ^2 z- x, T) w' h% m& r
手上有一个闲置的中兴光猫F657GV9,焊接TTL线后启动信息如下(可无视):2 u) g9 n5 I' B, J
- U-Boot 2013.04 (Sep 11 2021 - 00:00:57)1 z) n3 E6 E7 q
( z' N; H. ?- p0 m) P- CPU : ZX279127S@A9,1000MHZ8 l0 g% u1 s. }3 T
- Board: ZXIC zx279127sevb4 q, M+ ?6 v2 O* r7 v6 J0 B. x; J
- 127s product_vid = 1583 D, }9 X+ _4 V, ^( |3 T- o
- DRAM: 256 MiB
/ V4 W7 ~, d5 D5 b6 T& \ - 127s product_vid = 158
1 X. h( M) t% e% A3 w( L e - ,10000000,50000000
9 k1 H: {0 c( M# }2 _& C" }6 a- n7 f; A - cpuid=279127109 ^" F2 K* [: @
- 127s pinmux: 3f7ffffa 3ffffeff 19ff0555 6be1b
# O: S0 ?- W& b/ w3 i( O - 127s product_vid = 158/ K2 ` a) Z. L* I) m8 u3 U" q
- bootsel=3& _0 X5 W4 S2 M: r O, c+ |
- NAND:
4 p, Q+ ?/ N; ?" b' { - Manu ID: 0x2c, Chip ID: 0x24 (Micron SPI NAND MT29F2G01ABAGDWB 256MiB 3,3V)
2 S+ ]7 I7 O. A1 b9 b6 I - 256 MiB7 ?0 @8 {" _+ h% j; q. I
- <nand_read_skip_bad_,447>!mtdpart=0x1,offset=0x0,mtdpartoffset=0x180000,mtdPartsize=0x80000,length=0x20000
( S6 Z' b0 p8 S% K - In: serial( [! T; f+ e5 u4 U: l, G
- Out: serial6 Q7 }2 y1 ~$ s. ?# z8 ]
- Err: serial
7 J2 |' ~( {5 U- U - clk_pll env is not setted, core clk won't change: B9 _3 p9 u9 i
- Net: enter ref_clk_set.. mode = 0 .
6 S6 E' B; b3 K* _ - enter pll_cfg_fractional, A9 h5 k4 \8 A) Z5 O5 M' M
- ref_clk_set success!, @; T0 R2 e$ o6 I
- gpon serdes init
+ X, H0 ?5 x6 u - addr 0x9400002c before value is 11000013- A; i$ X- i! K: m( G9 o5 D
- addr 0x9400004c after value is 11003ff37 e/ D& U& K+ _3 W; t# Q9 h( W. _
- eth0! G1 H7 Z5 c0 G8 ~/ Y
- sec mode!
: _/ ]) n+ z) |- G8 B4 V; C; L
2 a. _' ~! s' n l# b6 E! l- Hit 1 to upgrade software version
) ~4 J/ G) D& S* B% } - Hit any key to stop autoboot: 0 ' Z+ w* I( \* L$ k
- addr=1200000
9 ?: o- V/ r! L5 o% ^- N - addr=42000006 T* W; c5 [4 m4 t3 V/ d9 L0 D
- select=0x0! S# L; j4 {# I3 N1 x6 p6 S
- search=0x2* p6 Q' M2 K6 y- {7 J& j
- <nand_read_skip_bad_,447>!mtdpart=0x6,offset=0x0,mtdpartoffset=0x200000,mtdPartsize=0x200000,length=0x1000
: n$ \0 {! X; w - tmp=0x00000000, value=0- j8 R! F6 U5 i9 u) ^. u2 f
- select=0x0
' U3 s- t7 ]4 q. o3 |* P - search=0x2
8 L- m1 Q) k9 `) t+ ?6 K7 j - search->result[0].entry=1200240) m c3 e, Z3 q; a$ e
- <nand_read_skip_bad_,447>!mtdpart=0x2,offset=0x0,mtdpartoffset=0x1200000,mtdPartsize=0x3000000,length=0x23e0000
6 X2 ?4 B* J1 |& y8 b8 L - RSA Verify OK, Y: _. d+ S7 ]! e0 T5 W& z
- 8 o3 @* l1 r6 R3 ?+ Y/ x" n5 ?+ ]
- ---mtdparts_init--current_mtd_partnum=0-
. D/ D! V) U( M0 g3 n; j - dev id: type = 2, num = 0, size = 0xffffffff, mtd_id = single part$ k, ?6 e. \6 F1 e
- part : name = rootfs0, size = 0x023c0000, offset = 0x01220000
" [0 i6 m1 m' E - part : name = rootfs1, size = 0x023c0000, offset = 0x04220000
& M4 l3 M; H$ U - 9 s \) Y' W0 M9 V; T: m0 \
- --- jffs2_part_info: partition number 0 for device nand0 (single part)
% f6 X+ K. N1 r( h5 f+ r2 H, f( N! y+ @ - jffs2_part_info:rootfs0,1220000
8 F' `& |3 w* T/ {2 j+ Y* _. Y# C - ### JFFS2 loading '0uImage' to 0x44000000
8 {3 K% }5 h/ j4 h& W8 @: E - Scanning JFFS2 FS: ..................... done.6 y# o% D* e% [% S# J! D0 g
- ### JFFS2 load complete: 4344391 bytes loaded to 0x44000000' M0 \2 x- x0 S1 r. p+ j/ e
- 127s product_vid = 158$ u5 W5 D- [# F, C* ~% T0 T
- <nand_read_skip_bad_,447>!mtdpart=0x0,offset=0x0,mtdpartoffset=0x0,mtdPartsize=0x180000,length=0x100000# U' `9 N" p$ ^; x) x
- lseek=0x42080800
* z& C% _) D: B W4 L7 \ - cmdline=U-Boot V1.0.0P1N1 20210911001937 : T- H3 V7 D$ }
- output gpio:58, value=1, 0
9 k+ ~# v" A5 }3 Y2 n5 _ - output gpio:59, value=1, 0
" N% I, v5 W& b3 x7 y0 R5 t - ## Booting kernel from Legacy Image at 44000000 ...
1 y! k9 o! J) O: u" } - Image Name: Linux Kernel Image
' [- z9 k: R) Q2 p& J - Image Type: ARM Linux Kernel Image (uncompressed)& z, q+ j- ?4 ^; h* S3 G
- Data Size: 4344327 Bytes = 4.1 MiB3 b$ o. o2 I, L+ {
- Load Address: 40008000
$ J( C; S4 k. R: F/ n) m- E - Entry Point: 40008000: A) k% H" _+ f
- Verifying Checksum ... OK4 j: i8 U4 c. p% N) @7 L
- Loading Kernel Image ... OK
! S* `+ K9 \4 @2 g& l, y ~ - OK8 p8 j) \; n: H T U: u* r; |3 @8 L
- ----------------------
2 J% W: s4 O, S - |-->setup versioninfo tag...7 ^4 t: o% d" x
- ) b- f6 `( A9 t; ?
- Starting kernel ...
复制代码 根据启动信息可以得知
7 A% q3 E1 E! \+ e2 Z0 w! U% k/ ocpu(ZX279127S@A9,1000MHZ)后面再吐槽它,内存(DRAM: 256 MiB),闪存用的美光(Micron SPI NAND MT29F2G01ABAGDWB 256MiB 3,3V)其实这个光猫也有USB接口,我测量过没有5V输出,如果想USB好用需要补元件。 T* v% }$ ^7 n4 P8 L& x: [* X
2 Y4 A' I5 e) f Z
使用工具软件打开光猫telnet并登录后查看mtd信息" K1 C- |8 G0 { n b4 \
- / # cat /proc/mtd* S) E3 w( H, h+ n% E/ q
- dev: size erasesize name
% j+ B1 N/ T5 e' Z - mtd0: 10000000 00020000 "whole flash"
) r* _) h. L. @; |+ x# B4 m - mtd1: 00200000 00020000 "u-boot"
) C4 {; E; ~6 G - mtd2: 00200000 00020000 "others"2 G$ S P$ {! O) w7 @
- mtd3: 00200000 00020000 "parameter tags"
5 N1 ~" [8 h9 X$ A5 ]" k# [6 ~ - mtd4: 00200000 00020000 "wlan"
" ?4 @% r, u" } - mtd5: 00800000 00020000 "usercfg"; ~* t1 \; \0 B& Z! l# j2 B. S7 ~, o
- mtd6: 00200000 00020000 "middleware"7 `$ S8 j; g. k
- mtd7: 03000000 00020000 "kernel1"% Y1 N/ v: O/ L% b' E% q
- mtd8: 03000000 00020000 "kernel2"* [7 x# h* | R7 [( R
- mtd9: 01000000 00020000 "framework1": R9 @0 k' _. c% L+ A: a- D
- mtd10: 01000000 00020000 "framework2"
' {: Z4 U6 `4 a1 t" H- ? - mtd11: 01800000 00020000 "preplugin_data"5 \9 y3 j/ u( r; n* ]* {. F
- mtd12: 05600000 00020000 "plugin_data"
' i; X+ T, V9 }/ u; r: W - mtd13: 02fe0000 00020000 "rootfs"
复制代码 可以看见有一个MTD0它就是一个完整的nand flash影像把它拷贝出来就是一个完整且连续的flash备份,有人会说下面不是有MTD1-13,分别拷贝不方便点吗?
4 V6 X% p% N$ w/ S- \4 S- O3 H( N, n1、mtd1-13 加起来是超过256MB的;# W# U, Y( ?% K8 A+ L
2、你不知道它mtd1-13在flash存储地址是不是按1-13这个编号连续分布的;
2 K; S4 y$ G1 F- ?1 j7 D* W
+ e! F N1 q6 w+ D: I8 P我查过启动信息如下:(我没看出来有MTD地址分布信息)
9 `, Y1 [/ D8 }- /opt/cu/apps # ./busybox1 dmesg9 ^1 t0 v L Z3 F; b. U& \
- NET: Registered protocol family 24
1 f+ e' R- H, \0 k; f' Z - p p t p driver version 0.8.5& {$ P& j# r; h$ h$ K2 i9 [
- 127s doesn't have USB3.0,just return -ENODEV
2 {. K% Z! P% v! i- E - **********TOP_CRM_BASE+0x2c=0x11393ff3******" V: s+ _, \8 O( z; w! P+ s
- **********TOP_CRM_BASE+0x2c=0x113f3ff3******8 H; U. W# P3 n0 k" |- I
- dwc2 9000000.usb: 1792 invalid for host_rx_fifo_size. Check HW configuration.
+ t7 C( i4 H3 ~+ J; `, a8 G - dwc2 9000000.usb: 1024 invalid for host_nperio_tx_fifo_size. Check HW configuration.. A: g( u# ^! D, w& N- j
- dwc2 9000000.usb: 1024 invalid for max_packet_count. Check HW configuration." r( F7 G4 P5 f6 u( ^
- dwc2 9000000.usb: DWC OTG Controller
a1 z, F3 s! a- L - dwc2 9000000.usb: new USB bus registered, assigned bus number 1
8 \; |. k" f# a( D8 P; x# } - dwc2 9000000.usb: irq 60, io mem 0x000000002 b+ t# C2 S7 U% e7 D$ c
- usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
8 g/ [6 V& i [. k& a - usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
. h/ w0 A+ F% u" y: G, a1 O! n+ G1 K$ W# { - usb usb1: Product: DWC OTG Controller
' q. w. {7 V" Z+ x" h+ k - usb usb1: Manufacturer: Linux 4.1.25 dwc2_hsotg' m% K; `: j4 r9 Z+ k @
- usb usb1: SerialNumber: 9000000.usb
6 o2 ], ~' r6 O; p, G - hub 1-0:1.0: USB hub found3 n+ [2 Y1 i( \1 k8 }. z/ E
- hub 1-0:1.0: 1 port detected, U# A5 Y2 l9 \ V8 F1 g
- usbcore: registered new interface driver cdc_acm
+ X1 u, z. b+ y2 a/ R7 ~ - cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
5 W4 {- s0 k1 O i5 F - usbcore: registered new interface driver usbserial, B' N4 u' L) e
- usbcore: registered new interface driver usbserial_generic
) |; g6 M' V S" D) O$ Y7 ~! ^3 m - usbserial: USB Serial support registered for generic
6 ^8 s; }) E7 }9 {8 _! Z; F - usbcore: registered new interface driver ch341+ v9 ?, A( p4 `
- usbserial: USB Serial support registered for ch341-uart
& J/ K) T9 k1 \) O/ Q% b6 k. {' @ - usbcore: registered new interface driver cp210x
8 V5 z) t) L3 P; Y4 F - usbserial: USB Serial support registered for cp210x% }2 ?: a" p$ [$ U, e+ n0 K
- usbcore: registered new interface driver pl2303* s# a/ z% q, B: L
- usbserial: USB Serial support registered for pl2303
1 p; ^% V: s0 L6 |# u2 U - mousedev: PS/2 mouse device common for all mice: q: Z3 `5 G/ U0 L1 Z8 g7 C6 [+ }
- I2C probe start!( d0 \* R0 `, z& I
- zx_i2c_probe i2c-1 i2c-1->clk is ccdce7c0 ,clk rate is 100000000% D9 o5 l, r4 n: O
- I2C probe successed!" N9 D* p" s, \7 u7 f6 z+ C- I
- usbcore: registered new interface driver usbhid6 m( Z: ?: Y$ ]) ^8 c
- usbhid: USB HID core driver
: b# i2 }) ?1 M( J1 u% a - zx tempsensor: zx_bsp_tempsensor.regs = 0xf0500034,&(zx_bsp_tempsensor.regs->cfg)= 0xf0500034
( k H) I! ~+ z, J. j - bsp_temp_start,val = 0x2ef v+ \' c+ a7 {" Q- v
- (458):creat proc files for temper sensor!!!
7 I( Q& r5 D! h9 W- R2 ] - (463):temper sensor is running...
- p1 h8 N8 S$ i9 w# C3 F" z - zx tempsensor: work clock 0
& F$ [- _8 [2 G - zx tempsensor: selector0's int num 27 allocated.
- i2 e$ q3 L& N; \+ T3 m) [ - zx tempsensor: selector1's int num 28 allocated.
* T' K/ u0 m6 v# x6 n5 s - zx tempsensor: selector2's int num 29 allocated.
) h2 ]$ m6 R. \' t1 e - Netfilter messages via NETLINK v0.30.+ \: x( V; X4 f {2 I$ s
- nf_conntrack version 0.5.0 (3372 buckets, 60000 max)
- Q+ s6 M! ^& _9 V/ ` S# N - ip_set: protocol 6
1 J9 R, s6 i. R" n5 a4 B( s) Y - gre: GRE over IPv4 demultiplexor driver5 `- f: i* O& K# l# ^$ H' B$ k. b, g! H
- ip_tables: (C) 2000-2006 Netfilter Core Team: y' Z& c; ]- {# B/ ^7 L
- NET: Registered protocol family 10
2 \* U' m# ^/ H, I3 `" E* l0 N. D- n - ip6_tables: (C) 2000-2006 Netfilter Core Team9 ]# y/ b* y2 N1 I4 J3 C. P( C0 V
- sit: IPv6 over IPv4 tunneling driver
& |3 k" y. ^/ [% N2 | - NET: Registered protocol family 17
' A( J5 D- v$ Z4 v - bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.) I, |& K9 C4 R
- Bridge firewalling registered9 H( E% R3 l4 B" b. j# P
- Ebtables v2.0 registered8 O, h" K2 M( W
- l2tp_core: L2TP core driver, V2.0
8 w! K |# B5 V4 ? - l2tp_ppp: PPPoL2TP kernel driver, V2.0# D6 v* j, o: u2 d0 o R& g0 r, B
- 8021q: 802.1Q VLAN Support v1.8
7 M/ @/ W+ A Z; P* F- Q; z. j4 @ - systools version:v0.7.5
; l0 h( `2 d. j. H - zte--oss cpu usage module init/ ~0 |. f0 u/ s5 Z$ Y( l2 R" j. S. J% C
- DPI interface Loaded
$ u8 e! W- f7 W) O# d/ j- P( k - e8_init OK!
1 {( U/ F4 r- A - Registering SWP/SWPB emulation handler( l$ @1 ?, I* V/ k: f$ c, Y( |1 w9 d+ w
- FLowRL module init
$ O9 a( c& P& @1 \/ ` - DevBw module init* D* l2 V4 U9 h! i! S8 {
- jffs2: notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
+ _2 U. @0 a9 }) Z - VFS: Mounted root (jffs2 filesystem) readonly on device 31:13.
1 a4 o8 i( p! W1 F% Y! n. m& S8 r - Freeing unused kernel memory: 212K (c07d3000 - c0808000)8 i5 @+ R @+ K P. w9 o
- This architecture does not have kernel memory protection.8 t0 x6 O* O1 F: V4 s$ P7 p
- jffs2: notice: (532) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
4 P2 s" |, t5 `. C - jffs2: notice: (577) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
( x% V1 H9 [. w7 M9 V! L) ] - jffs2: notice: (585) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.9 G, ?& ^4 @# J5 V. [
- jffs2: notice: (587) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
. ~" f: j# g1 }% m - 11930:23:02 [Klogfile][Error] [(1348)CheckLogConfFile] CheckLogConfFile%CheckRestartCntConfFile. E& z# ?1 O! u1 U& F* [
7 |' M% W; v# J* H, l# W' Q. S- jffs2: notice: (578) check_node_data: wrong data CRC in data node at 0x006d5d7c: read 0x19d3a03, calculated 0x1e78a0ef./ ?. r& v4 L9 L$ ]( {: r, f4 H
- ubi0: attaching mtd12
. H2 @6 l5 h' g+ { A/ J - ubi0: scanning is finished# C2 s' I9 ]4 b% [
- ubi0: attached mtd12 (name "plugin_data", size 86 MiB)3 A6 S; _3 ]: n, S* I& G! p
- ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes6 u, G3 ^6 j! p! [9 r
- ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
8 k- q6 q; P Y$ a& Z3 _ - ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096* N7 \6 V3 ?/ ?6 `, w
- ubi0: good PEBs: 688, bad PEBs: 0, corrupted PEBs: 0. L5 H2 K( Y ~& c. {9 q9 @
- ubi0: user volume: 1, internal volumes: 1, max. volumes count: 1288 e2 m4 [( [2 ~0 i8 Z# ~$ d
- ubi0: max/mean erase counter: 14/9, WL threshold: 4096, image sequence number: 2012089330
8 z3 O$ m1 ^& u3 ?8 G% y& C" Q - ubi0: available PEBs: 0, total reserved PEBs: 688, PEBs reserved for bad PEB handling: 16
+ L) J U6 y$ O7 p2 O# V6 s3 D - ubi0: background thread "ubi_bgt0d" started, PID 601
6 Q2 A/ [: Y( [1 x - UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 6077 V/ }8 ^+ u1 R$ M
- UBIFS (ubi0:0): recovery needed0 J' a k2 R) m: q) y
- UBIFS (ubi0:0): recovery completed+ w: C1 d& W, b' s, v3 V
- UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "plugin_ubifs"
- b4 B" j. F! K. \" T/ g( H - UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes5 d* Y( g3 _/ k
- UBIFS (ubi0:0): FS size: 83423232 bytes (79 MiB, 657 LEBs), journal size 4190208 bytes (3 MiB, 33 LEBs)' a( b1 m) h- _6 u
- UBIFS (ubi0:0): reserved for root: 3940284 bytes (3847 KiB)
% |' T2 Y$ k2 \! _. V: L - UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 156BD46D-0725-43B0-AA2C-8A8DCD1D83F4, small LPT model6 P" Y- k7 W% s+ m$ N( i4 R
- jffs2: notice: (618) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
2 p; E- l4 E! D* z! ^ - lo up7 J& ?' W i+ i
- mux[0]=3f7ffffa
' m; w: |& T: Y. u6 x - mux[1]=3ffffeff
, j9 C2 \: l* f: V6 c - mux[2]=19ff0555
" g& X: y& g) g' | - mux[3]=6be1b0 Z, t* N' G' U4 r. e
- storage_wakeup_proc_create success!& w1 K1 e: ]0 f- T* B7 J0 d
- verinfo=U-Boot V1.0.0P1N1 20210911001937 0x1200000 0x0 0x8f 0x83) ]* W, v- E" M0 q* x+ u
- can find /usr/java/osgi_verosgi_version_info_get error!) ]/ U: ~8 L$ L" n
- data_in=0x0
$ X3 G* _$ V/ K% f. H' I7 v - data_in=0x0
M% a% X: [! O6 V% o) a5 e - >>TagaramodInit the typeindex: 5 }4 ]% }, R5 e# ^( q9 ~# j
- >>TagaramodInit the board_name: F657GV9 ,wan=0x40& l* ]1 m9 K8 f- |' W. o, M
- pon init+ Q: [0 T6 t3 ^7 ^5 A6 A
- ZX_PA_BUF_BASE0=4dea0000
% _/ Y5 |, ]8 q0 t" V - ZX_VA_BUF_BASE0=cdea0000! }2 r5 E5 B3 @( F# u$ `
- ZX_BP_BUFFER_BASE=4dec0000
; w6 v" V/ r \% V u - ZX_DESC_BASE=4ee80000( |7 ]. i' h& r
- ZX_TX_UP_DESC_BASE=4ef40000: [, a; s' e! \' ^+ X; M3 p; c
- ZX_TX_DN_DESC_BASE=4ef500006 {' ~& E5 M! {2 y, i
- ZX_BPPE_SW_BASE=4dea0000
! y+ c; e# T& p T2 E; b+ x - ZX_BP_BUFFER_SW_BASE=4dec0000- L6 Z4 j9 {- _/ R
- ZX_DESC_SW_BASE=4ea00000# I# C- a7 H4 W6 t
- ZX_TX_UP_DESC_SW_BASE=4eac0000- D( P+ }* F) S4 }+ q" \
- ZX_BPPE_BASE_127S=4eae0000
4 ]9 W7 {! O; p# U - ZX_BP_BUFFER_BASE_127S=4eb02000
0 u; Q8 v6 s1 N' m8 O8 i" J - BP_BUFFER_SIZE_127S=b40000; U; p( y+ l' {9 U7 D
- ZX_VA_TX_DN_DESC_BASE=cef50000- P, i$ }# m" I$ y4 Q( J
- BPPE_POOL_SIZE=1c00
2 L% n5 c. |6 H2 f7 K# k; [, w - NORMAL_BP_BUFFER_SIZE=fc0000
' }/ c/ n! a! g - JUMBO_BP_SIZE=2800; S: u; Y( p2 R8 W
- JUMBO_BPPE_POOL_SIZE=0) i) D7 t l# B% v E1 Z# a
- BP_BUFFER_SIZE=fc0000
" z# l5 W4 M. F H ` - lan_up=0, lan_up_port=0
7 {" X: u$ g2 F: ?! }- v - the pon mode is 40
# d3 f b4 k6 \4 R; C - lan_up=0, lan_up_port=0
4 }3 E7 y0 Y z5 ~. F9 t - g_pon_irq=36,d1000000,f0400000,f0500000,f0600000,d0e00000
& A& r, J* c# R% I - get npp irq succeed,g_npp_irq:38) V3 U: a$ a/ }7 x
- get tm irq succeed,g_tm_irq:41 tm_base:0xf4340000
/ G: x8 q' E& Z9 D - get pp irq succeed,g_pp_irq:37
: }: r: G2 D# z M# G - get idm irq succeed,g_idm_irq:39& K V' S* q9 f# ^" o7 n# D; c
- enter ref_clk_set.. mode = 0 .3 a" s$ Q9 n) M: g) F5 @" |# w( m
- enter pll_cfg_fractional
1 m5 n& C+ n, V! `' b$ B - ref_clk_set success!
3 D& O/ \3 i8 f5 _+ G3 z s [ - serdes band cpu_temper:32 coarse:0x29
; F9 v# X; Z/ [ - band calc fin
; Q, c: Q: ?& o/ D" A6 i - pon tm init# @" n$ J" f d6 I7 e) l
- enter pon_tm_bppe_pool_init
# P& u2 V+ k! ]" O4 I2 z7 |3 P - bppe_va_addr = 0xceae0000. h: s- @3 _" Z! m) G
- jumbo_bppe_va_addr = 0xceaf0000- l) ] N! K% e. J" T# u
- BMU_JUMBO_BPPE_SW_PTR =0x0 (JUMBO_BPPE_SW_POOL_SIZE)<<16=0x0 : @3 ~* M. Y. a+ O; Z& y
- netif_napi_add() called with weight 512 on device pon
2 H2 b5 @- p# Q7 P - DMA_UP_DESC_CNT = 0x0% J% K- J2 D8 N; o4 M X" a+ f6 ?" C
- pon_tm net init ok,272/176
1 j/ n U# t1 F/ U - pon_pp init* c8 Z |, _. T f- @1 N( ]
- pon_npp init, c' i9 W: S- R4 X
- idm_status_proc success!
% Z L* c3 }0 N& p5 C& S9 p - idm_desc_init d0c35000/4c980000
" u h8 _' Q. H! | J - request idm irq succeed
) e- N M3 i" d - idm net init ok( \7 z3 Z5 u# X# d
- switch_phy_int_check 0
- S3 h. u7 s% G2 r6 p6 S - mac 0 link down
/ v* H2 `, j7 Z7 g6 Q - switch_phy_int_check 1 ! r2 ?# o! V$ \9 L3 m
- mac 1 link down* D5 l; m, x5 C8 `& [
- switch_phy_int_check 2
7 B9 w6 {! @; ^3 m1 f. S - mac 2 link down( u# @# P6 H9 D( ]& {
- switch_phy_int_check 3 # X( {. H% Y) P7 H5 [/ K( N
- mac 3 link down+ w# @8 f$ l* F6 Y
- register fpga driver success, major=222- v8 W9 V& r( o7 O. P) b3 _
- register peripheral success, major = 106( q p1 E: A/ u& d; ^
- = TM Module SYS FS Init ended successfully =/ u& @' K2 V( p4 _! T# S
- tm_initModule begin...; r# k! ~! v: X4 Z: b
- enter tm_sdk_init
( F* q5 p3 ?; o& j& n C/ S - api lock init!!
5 {9 I8 ] e- t, B: ?* f/ G - tm_initModule end...
0 Q% Q1 H. P! M/ J - hw_power_optx_get_fordg:txdisable=0
& f- J2 y2 C; @$ z' s) c - Kmodule ZX279511.ko insmod successfully !
5 E& C. d1 \1 V3 d d - bob is not GN25L95: 40
' m/ }) z7 v0 @' N0 H0 j2 n - pon up+ R$ V0 J1 Z6 {
- ethdriver_init....3 C* B# K: j; u' a
- g_mii_dev_name[0] sw
3 b( b& x1 K F - g_mii_dev_name[1] pon . A" }( u% K& l v5 S7 p. R
- sw up" |: C7 t- c4 V7 H4 v+ X
- zteGpmac_devReg begin...) ?9 ?- W: B I0 _1 G$ q. b7 H
- zteGpmac_devReg end...
. a. l2 E# D+ |6 n4 B& \ - enter zteGponCpuTypeAddrSet
0 |5 D) ~9 z. o - *
! u& s: K' p) ~% M( e1 j - asicGlbDb[97], 0x46,0x31007,0x07 [& @( T9 n. o3 a6 f% X" @
- zteGpmac_initModule begin...
! Y, q8 o# s8 f1 b* E0 Q$ K4 o - === GponMac Supported MaxTcont: 16 MaxPLI: 800B ===! i4 a: T( m/ N& B8 D
- htb debug 1 =====> inCnt =0,outCnt=0
1 C- T0 q2 T4 }8 C - ##huoqf zteGponAsicStarttimeChkResultInit write cfg=10
/ M- `, _% h1 \% X; J1 ?' n - ##huoqf zteGponAsicStarttimeChkResultInit read cfg=10
% e% o- F; i. o" `+ H8 v; z - = PON Module Operate ended successfully =
* ?. X3 R, M) U$ C1 q2 _8 ^! I - DEbug: GPON PIN_MUX_REG2:(0x19ff0555)
" f% H% S/ l1 H, r$ R) K - DEbug: GPON GPIO_PDD_REG:(0xfac)
4 C) G ^" o' S8 A3 P: ^& I - DEbug: GPON GPIO_POSEDGE_REG:(0x4). e; z" @5 } M: W
- DEbug: GPON PIN_MUX_REG3:(0x2be1b)
/ w3 m7 M3 V( \1 d1 r - create zteGpon_rei_task ok!
7 x' B$ e( R# w# z9 B - = GMAC Module SYS FS Init ended successfully =
3 U$ V+ M8 U7 n0 e9 |; x - zteGpmac_initModule end...
; B! J7 {: \1 x# o: U) G( k - gpon_Init ok
$ S! S" u0 ]6 v! }8 N - gpondrv g_OnuType is 2
: J+ t5 [) v% u) S4 u$ @) P* C! v8 S$ a - 11930:23:06 [KMONITOR][Warn] [monitor.c(607)MontorSendMsg] netlink_unicast failedmsgid = 0xa5c2, ptr = bf26dd20, len = 4
* c7 H- }0 H( s! I' Q+ V - omci up- {& s8 o9 J2 l" Q* ] P
- Init switch module, O& `# J% y5 y; g
- unicnt 4, wancnt 1, wifi cnt 0, all ports 5, portmask 0x0000002f
7 b+ E* a, K! f' U$ L - Onu type is 1,Wan type is 4& l E7 j) y5 N& w2 q: \& S Z$ N
- switch config GPON HGU mode!* }' b. ], ]1 b/ S
- protocol fail, error deal 66: ~' F: Y5 x/ N- `, m) I
- [TM][dpa_set_protocol_type_i_act] failed5 _" ]5 e. n: G
- protocol fail, error deal 65
+ N$ [+ [ p. U- X - [TM][dpa_set_protocol_type_i_act] failed
( R6 S9 P, N& }. r% [" [ - -------chip_tm_init end-----
" M6 R( r ?9 ~ u8 f2 V3 k, A, Q - [SW][sw_init_switch] l2_fast init
q7 ~8 e7 M- k; ]4 T - [SW]set cpu queue rate limit to 8000pps
- d6 s$ h9 y0 Q% J0 x; Z' k) k. S - tm_port_egress_traffic_sharp_set p_port:5 p_ena:1 p_band_width:2048% b/ q1 v) b# W
- 2 }9 h f0 _0 N1 e
- Capacity=256000tm_port_egress_traffic_sharp_set p_port:6 p_ena:1 p_band_width:2048) k w6 ?/ U$ L* `' z! a$ ~
8 ^, e- q0 o; p- B9 Z+ S% I- Capacity=256000[SW][sw_init_switch] reg hff; K# b2 ]% B; ~# K4 W5 Y8 ~
- [SW][sw_init_switch] reg get statistics
* {5 g" l8 D v, q - Init switch module Success
4 e( E/ W' Y) s* K - bsp_i2c_probe 0x50 success!% j% c. Q# L6 E2 T/ e0 O5 q# k4 r7 _
- vendor name = ZTE_PX20+_G
- ~1 i3 L& e1 {$ k2 O4 N - optical PN(0x60) =
! C# {9 K# q# \3 G, \ - optical PN(0x28) = ZX279511
' z6 x- h6 ^) W! i* j - tdm: exports duplicate symbol tdm_ch_close (owned by kernel)$ }' \8 _. a6 t9 A+ c2 B6 s. W! y
- udpwatchd inited!5 [, \4 H6 e, L% F
- kudp inited!2 x7 y8 q5 e7 m f3 B/ B
- Init codec v2.3(2019-05-17)!
% _ S- K2 D) Z+ y - idm0 up/ q7 i* ?. r+ x" n
- idm1 up$ |- ]$ e/ L# c w
- redirusb_init,no usb dev!2 S0 ~4 A$ S: t% i2 Y
- random: dbus-uuidgen urandom read with 47 bits of entropy available/ V, U- G& e' M# ]' R
- gpondrvCfgXGRegInfoAdapter not support now!
, ^6 Q; c% n+ q+ F# [ - === GponMac Supported MaxTcont: 8 MaxPLI: 1536B ===4 I2 A& F% f2 U- i/ N
- htb debug 1 =====> inCnt =0,outCnt=0: f0 `) Y9 p4 `5 Y% y* S
- IPv6: ADDRCONF(NETDEV_UP): br0: link is not ready
, [8 t$ r A% [ R" ? - br0 up
4 k; {& T5 u5 G' \( {3 T - ethdrv_dev_ioctl ,brdev_set.port_id 0 ,brdev_set.name eth0 ,brdev_set.flag 0 2 P8 Q% N/ B3 ~' r+ c- w
- eth0 up9 n4 Q' E0 i+ X# ]( y1 Y# N
- ethdrv_dev_ioctl ,brdev_set.port_id 1 ,brdev_set.name eth1 ,brdev_set.flag 0
5 c" ]+ x4 X1 a - eth1 up, {+ s: P$ H; e3 z
- ethdrv_dev_ioctl ,brdev_set.port_id 2 ,brdev_set.name eth2 ,brdev_set.flag 0 ( ~( s+ l- J: i' E# D% ?/ y9 Y# j
- eth2 up
) E- L$ d+ u$ I" @. f6 D - ethdrv_dev_ioctl ,brdev_set.port_id 3 ,brdev_set.name eth3 ,brdev_set.flag 0 ) }5 [" |$ c# s. N% ~5 Y7 E
- eth3 up
5 L- |# \ j! l$ ]$ o# { - tm_port_egress_traffic_sharp_set p_port:3 p_ena:0 p_band_width:0
, p. v/ Z$ Z) S# H ?% p# J9 v
u+ ?: m- ]' E& _' O- Capacity=200000tm_port_egress_traffic_sharp_set p_port:2 p_ena:0 p_band_width:0
5 \; i9 T. f5 d( k& w% X2 w6 r - - o4 Z9 @# n2 ]1 N
- Capacity=200000tm_port_egress_traffic_sharp_set p_port:1 p_ena:0 p_band_width:0
+ b1 A g9 r" T! {6 g( k1 [$ h
+ ^1 [( C1 B( i) |2 h/ l8 i- Capacity=200000tm_port_egress_traffic_sharp_set p_port:0 p_ena:0 p_band_width:0" N; d! Q d8 ? y* v1 P( x
- ' J8 m4 G3 l& x
- Capacity=200000
# U9 G6 a* L" b# o - switch_phy_int_check 1 e& P' T3 O' q
- pon0 up
0 r- B9 X6 x) l! { L& o( ~ - set_netdev_type dev (pon0) type (300) vendor name = ZTE_PX20+_G ( z. c# N' }. e. y1 o
- optical PN(0x60) =
" W% z" ]2 ~: s) \ - optical PN(0x28) = ZX279511
@* t2 F7 J4 P! V u1 ]3 A/ U" o - device eth0 entered promiscuous mode7 J- q: Q2 ?$ u+ |/ b" Q2 }# l0 Q
- set_netdev_type dev (eth0) type (800) " `5 `/ w4 T- W$ k: G
- device eth1 entered promiscuous mode
& V/ [# S* U. x, j - set_netdev_type dev (eth1) type (800) , @$ w+ H& N- {# s
- device eth2 entered promiscuous mode; J" I$ g5 T( q/ R& \( X9 W2 D
- br0: port 3(eth2) entered forwarding state
8 F+ \; m- A" Y/ H. Q W* ~ - br0: port 3(eth2) entered forwarding state! [5 h: J* m: t9 E- [
- IPv6: ADDRCONF(NETDEV_CHANGE): br0: link becomes ready
% ^4 d5 r6 x$ V. u) i; W# f9 e - set_netdev_type dev (eth2) type (800)
+ R/ u2 `' q4 [0 o# g: Z - device eth3 entered promiscuous mode+ W. G* ^ n: v
- set_netdev_type dev (eth3) type (800) set_netdev_type dev (pon0) type (300) set_netdev_type dev (pon0) type (300) set_netdev_type dev (pon0) type (300)
p' B& ?- T' B! g - ch:0 pcm mode:G711A_U
/ Y; l6 K1 G% P0 _- ?6 A1 n - Siliconlab chip id error! 0x0 M7 {2 M; ]1 |* `; K
- cmd [ck 1389 1] not found
6 G" h- E8 u8 h% i# R1 _ - ====EVENT_O7_STATE_SAVE OFF====
* o# w1 x3 W/ U% c - cmd [ck 1392 1] not found1 o7 D+ a: K" A
- cmd [ck 1387 1] not found# ~3 K5 }$ Z( K8 ^" t0 t" O& _+ j
- random: nonblocking pool is initialized1 U4 a8 `2 }/ Q( }2 [% Y1 v. x: Q" Z
- device br0 entered promiscuous mode' m" q6 ^/ F' r( J. C
- tm_port_egress_traffic_sharp_set p_port:5 p_ena:0 p_band_width:0
/ A, ^; H. p0 A% e) z
6 {/ G+ b* R0 N" o' u+ {- Capacity=200000tm_port_egress_traffic_sharp_set p_port:6 p_ena:0 p_band_width:0
8 @) K' C j$ H - 0 a: y' b% l0 b, X& S
- Capacity=200000' k' x! k0 u) ]* n$ q( j2 |
- overlayfs: missing 'workdir'
复制代码
4 j; J0 F4 O8 o8 N2 _但是将这个mtd0自接考出来是不容易的,因为它的内存也就256MB,临时分区也容不下这个falsh影像
) N, r1 j: @+ ~0 {- /opt/cu/apps # df! I' W+ y; f; ?* W1 F% s9 Y+ f: l7 N
- Filesystem 1024-blocks Used Available Use% Mounted on
7 e4 ^+ O$ Y( S/ p - /dev/root 49024 37824 11200 77% /" |$ ]6 y: u. n% R6 V/ \! |
- /dev/mtdblock3 2048 404 1644 20% /tagparam. v1 g/ B/ d$ X. b2 I* A4 ~
- cgroup_root 108016 0 108016 0% /sys/fs/cgroup
8 I, O- c( R( X/ R! E - none 21604 0 21604 0% /run
7 E& |6 [2 n3 a: s( d0 S2 m - none 5120 0 5120 0% /run/lock: G# b* b$ P% ^3 L1 q$ P
- none 108016 0 108016 0% /run/shm. b+ b- k; D% d. p* k
- tmpfs 20480 448 20032 2% /var7 y4 u2 r# V9 _ }4 A4 U* m' ]
- tmpfs 81920 2800 79120 3% /upgtempfile
6 C0 w% n# @" z; [ M - tmpfs 2048 0 2048 0% /mnt
# k+ B( s2 B4 I+ P. W2 L7 x - tmpfs 15360 4 15356 0% /tmp
. A( ]5 Y/ x% \ - /dev/mtdblock5 8192 640 7552 8% /userconfig
: f* w5 D+ H% m - /dev/mtdblock6 2048 384 1664 19% /usr/local/ct7 F7 T7 r+ C# y
- /dev/mtdblock11 24576 6232 18344 25% /usr/tmp
5 v) k: S0 M# ], p R5 n - /dev/loop0 5376 5376 0 100% /usr/pre_plugin
" ^0 a& A5 m; f. q" l r' Q7 b; I% a - ubi0_0 74660 2864 67948 4% /opt/cu/apps/ ? ]3 f f0 d2 g
- /dev/mtdblock4 2048 436 1612 21% /wlan& U: T1 z$ b& x$ s! \+ H
- overlay 74660 2864 67948 4% /CuInform1 P* R/ W: ]; e
- tmpfs 5240 24 5216 0% /CuInform/tmp
w5 E/ j6 `! F6 L; q; p! ~+ a% Q% u - overlay 74660 2864 67948 4% /usr/sbin
) N) s& O* a* y/ C* T - /dev/mtdblock9 4352 4352 0 100% /opt/cu/framework
复制代码 可以看见也就/upgtempfile 文件夹可用,大小为80MB,远远不能满足需求。
$ { w) `/ Z+ {) N+ a* ?6 ?: P |6 o6 B2 D% u; N. _
以上都是分析,下面是操作步骤:$ I* k7 b; X. {
方法一:采用压缩方法在拷贝flash的时候边拷贝边压缩,然后将压缩后的文件传给电脑:
; h Y1 @( ?3 k- ]2 I- p: Q- dd if=/dev/mtd0 | gzip > /upgtempfile/mtd0.gz
复制代码 我使用上述方法临时目录还是无法容纳,只有用更强的压缩方式,linux中有一个.xz文件它使用LZMA的压缩方式,LZMA压缩比相比较zip高不少,但在busybox中的命令xz只能解压这种文件,无法压缩。只能从网上下载完整代码自己编译一个。 `" b: f$ ]9 p2 m" P% _* J
- /opt/cu/apps # ./xz-v5 -H$ x5 p, M; \) N) l, x& x1 v; f5 e/ _# L# e
- Usage: ./xz-v5 [OPTION]... [FILE]...% C6 ^! o( o- ^
- Compress or decompress FILEs in the .xz format.
) F; ], \7 x- J6 G+ e7 R - ' z$ P2 ?' ^: K _; Y! q" E
- Mandatory arguments to long options are mandatory for short options too.' {- H6 g; @6 W0 J
/ h& Z, X3 E& u& \" V& V; p- Operation mode:
( q! ?$ k2 D! Q- K* t/ d. S - -z, --compress force compression
: |. ?7 Z# G1 G8 {2 d4 ^ - -d, --decompress force decompression
0 U* m4 f& ]3 w2 _* S( R - -t, --test test compressed file integrity7 H% W" M$ ]7 |) Z; S3 Q4 Y3 `
- -l, --list list information about .xz files6 U R8 ?5 c& u+ a! X
+ l6 Q1 o6 v d! U X- Operation modifiers:
) k5 n5 p' \ e" S# G" r - -k, --keep keep (don't delete) input files
) ~1 [+ b# X6 [6 u& f0 P - -f, --force force overwrite of output file and (de)compress links
# s; O6 m9 H1 i - -c, --stdout write to standard output and don't delete input files- V2 B% a- q m8 O3 ]; |
- --single-stream decompress only the first stream, and silently3 w, c3 r# h2 j- f8 t2 a/ ?
- ignore possible remaining input data, ]& ]0 Y, C5 D1 x! P; I9 l
- --no-sparse do not create sparse files when decompressing
6 n/ D, M! \0 d% K& q# `- u - -S, --suffix=.SUF use the suffix `.SUF' on compressed files
: {6 W% Q2 F+ I0 E( c - --files[=FILE] read filenames to process from FILE; if FILE is
5 w9 ?. f6 x3 P$ n- c7 h4 y - omitted, filenames are read from the standard input;# c9 \7 q! J* L' ~* d/ r
- filenames must be terminated with the newline character+ C! }' \5 H+ [4 _! E3 x
- --files0[=FILE] like --files but use the null character as terminator
, T, v) w: D+ }/ Z Y& I2 G - # E& u P+ Q6 T# d/ d
- Basic file format and compression options:
1 \. ~* a9 l) E - -F, --format=FMT file format to encode or decode; possible values are
* x4 F/ P" |; D3 @0 X. f - `auto' (default), `xz', `lzma', and `raw'* [( K4 O, x6 z2 n5 E. @- Q* R! a4 W
- -C, --check=CHECK integrity check type: `none' (use with caution),0 b& ]" o% O! J
- `crc32', `crc64' (default), or `sha256'+ b5 w8 Y. H) i* v) [
- --ignore-check don't verify the integrity check when decompressing6 ^: B+ m/ z9 s" P. ~- P
- -0 ... -9 compression preset; default is 6; take compressor *and*8 G$ N& d6 _9 M1 _5 P1 y5 j! j0 R0 Q
- decompressor memory usage into account before using 7-9!* a: Q; K5 h1 d- E: g* {" M5 l9 ?
- -e, --extreme try to improve compression ratio by using more CPU time;* X. ?8 P! v3 q2 Y
- does not affect decompressor memory requirements8 R: e1 j" V3 ^, u
- -T, --threads=NUM use at most NUM threads; the default is 1; set to 0
`% @, }# |, B- y1 E) E$ M - to use as many threads as there are processor cores/ M5 S' O: O0 I8 X5 b t, j& B0 m
- --block-size=SIZE4 X3 V: W; o- {; A
- start a new .xz block after every SIZE bytes of input;" `0 @' g! m, o0 z2 L4 R1 F- [ F
- use this to set the block size for threaded compression) L1 P8 r$ X, I8 i
- --block-list=SIZES$ p! |4 s5 k) p6 Q
- start a new .xz block after the given comma-separated
: h+ U# L- }. K& U' C8 i - intervals of uncompressed data& ~( V6 @2 b3 P$ I6 y
- --flush-timeout=TIMEOUT' m) G. O% J8 G5 J' ?5 O. L
- when compressing, if more than TIMEOUT milliseconds has
g! s: f( u+ ~2 s" v - passed since the previous flush and reading more input; Y& r8 k" R4 n' @) i
- would block, all pending data is flushed out( V8 m+ L1 f, [0 _" k
- --memlimit-compress=LIMIT H( V% N! O& S# ~9 O" r3 B! X' r
- --memlimit-decompress=LIMIT: G4 k# g9 ~/ {
- -M, --memlimit=LIMIT( f1 L ^0 h2 w3 w
- set memory usage limit for compression, decompression,7 k. d {) [4 h, s7 n9 s
- or both; LIMIT is in bytes, % of RAM, or 0 for defaults
% j3 p$ N$ o( Q1 w - --no-adjust if compression settings exceed the memory usage limit,
% a* Z1 S, y2 |0 n+ h! p2 r$ x; I - give an error instead of adjusting the settings downwards: i- W7 t2 `9 F1 {2 a
& D7 G2 }. L# @% W1 d- Custom filter chain for compression (alternative for using presets):
- F1 z3 }) e* v' X9 N: w; z - --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or" H% ^! q, @+ R3 O) k3 @% g
- --lzma2[=OPTS] more of the following options (valid values; default):
% { I. S" y2 K# H' R - preset=PRE reset options to a preset (0-9[e])
+ x' @/ `3 n. p* [. { - dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)" U9 a6 M6 n5 E+ {, u
- lc=NUM number of literal context bits (0-4; 3)' t6 s/ d- k# f" W
- lp=NUM number of literal position bits (0-4; 0)0 C% ?. o! O7 o% H3 X" w) p, T
- pb=NUM number of position bits (0-4; 2)
5 c8 m. _8 `0 [ - mode=MODE compression mode (fast, normal; normal) j$ d, q* G7 V" C3 B7 X# G
- nice=NUM nice length of a match (2-273; 64)0 S: E" i: c# Q- }
- mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)5 R) K( @) G; x# `8 q" u7 p4 z' Q) C! z
- depth=NUM maximum search depth; 0=automatic (default)
, c; M1 t8 o% R' W
- _! r7 v3 D+ r" W- --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)
9 I8 n: k6 e- {. V# K( O; J: o - --powerpc[=OPTS] PowerPC BCJ filter (big endian only)
& D: s( [& k' J, c/ ^ S$ Y: R# k - --ia64[=OPTS] IA-64 (Itanium) BCJ filter
6 b d6 ~% f, w9 x6 | - --arm[=OPTS] ARM BCJ filter (little endian only)9 O) Y6 j, E. B% `4 z- J5 Q* Q
- --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)
2 P0 ?# y5 r9 z+ Y2 r8 m. M - --sparc[=OPTS] SPARC BCJ filter
/ a& _: I$ Q; E; ~$ b9 k* s" W - Valid OPTS for all BCJ filters:
# i8 K2 ^% Z/ F4 c& P( D - start=NUM start offset for conversions (default=0)! n+ z9 i) G2 ^, x
- v" S* O1 v- m& g: ^! H- --delta[=OPTS] Delta filter; valid OPTS (valid values; default):
; a- z0 ]( F: {& i. j. M. C `# G - dist=NUM distance between bytes being subtracted3 N# \3 c* J2 G; I; ]2 q
- from each other (1-256; 1)( }; T& ]! s3 D% d# T9 b5 w/ ?
9 s/ M+ C6 `% m- L- Other options:
. G& H& b |% b+ c# k& S0 u" s- }: x - # R3 S- O3 G/ X
- -q, --quiet suppress warnings; specify twice to suppress errors too
3 [6 A4 {1 u% b$ W' ? - -v, --verbose be verbose; specify twice for even more verbose
% g; F: ~8 z% w9 a) Q q - -Q, --no-warn make warnings not affect the exit status
+ s+ k; S d5 F- q& k/ J, }. m4 ` - --robot use machine-parsable messages (useful for scripts)' h& F2 `6 H! R* a ~% [
! _6 w6 Y# r& c% g4 G- --info-memory display the total amount of RAM and the currently active
5 K* N- D9 g5 K1 {6 |3 P, Q1 ]4 A - memory usage limits, and exit, s- @2 z. t6 s/ u. o* w
- -h, --help display the short help (lists only the basic options)
3 T# k1 o% e7 R - -H, --long-help display this long help and exit4 X( v! f; Q, a% m4 F
- -V, --version display the version number and exit
2 J( a4 {, K/ l4 m0 A& H: b
3 l1 O; F' t7 |, D& C$ Y4 ?- With no FILE, or when FILE is -, read standard input.2 {. S" q& M3 K, d4 X) Y0 H+ Q* D
- $ K/ Z" i3 [$ Q3 y Q9 E# E* C
- Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).4 i5 z; h$ M5 R( |, J. Z1 w
- XZ Utils home page: <https://tukaani.org/xz/>
复制代码 到这个地方我走了一段弯路,这里要吐槽这个中兴的这个 ARM cpu (ZX279127S@A9,1000MHZ)TNN的看名字用的是A9并且查看cpu信息用的是ARMv7 指令集,编译好的文件在板子上就是不能跑,查了不短的时间才发现这个cpu要用ARMv5 指令集方式编译才能跑起来,典型的挂羊头卖狗肉。- v- z; ?' O7 S, ]8 T- f
- /opt/cu/apps # cat /proc/cpuinfo
; g$ b! h# X3 a2 F% }$ b( |: L - processor : 0
# S8 _2 K$ d6 k0 O6 k: a - model name : ARMv7 Processor rev 1 (v7l)+ V; A) g* k7 {3 ~
- BogoMIPS : 1987.379 r! V& a6 r6 O8 Y3 ?4 c( X
- Features : half fastmult edsp tls
8 e6 M, U, E, s" M: \! Q6 e! p - CPU implementer : 0x41
1 I$ ]& g' n, J4 O( G+ [! c - CPU architecture: 7
n# b$ i! I) m2 {( s' H - CPU variant : 0x4' ]% G0 c7 G/ D4 q- D
- CPU part : 0xc09/ t" _ g- q3 c
- CPU revision : 1
* [" j! W* Y# l) o - 0 L6 R3 ]# o, }1 {
- Hardware : ZTE ZX27912X (Device Tree)" N1 Z* m2 g. S
- Revision : 0000
# l g0 m: V. ]- S& z' [6 W+ T* U - Serial : 0000000000000000
复制代码
5 Y, I; _) u) l+ m后面就简单了, 压缩后的文件为76.1 MB (79,894,956 字节)
& I; ?6 b: O; x- /opt/cu/apps/busybox1 dd if=/dev/mtd0 |/opt/cu/apps/xz-v5 -M32MB>/upgtempfile/mtd0.xz (边拷贝边压缩,用-M32MB参数是因为LZMA压缩特别占用内存,如果不限制使用内存,光猫在拷贝过程后期可能因为内存溢出而重启,我这款就重启了2次,后来加了参数就ok了)
复制代码 这个busybox1 文件也是我传到光猫的,光猫内置busybox文件很简化(有tftp及chmod ),但没有包含dd命令* M2 |! r9 E- O& V, ?
7 l% q+ h8 Z: |' W/ n; l8 E
方法二:& ]' Z* Z* {& F' P2 H
在以上过程中我还参考网上信息Linux 下的dd命令使用详解以及dd if=/dev/zero of=的含义发现有另外一种方式使用netcat(简称nc)传数据,这是个非常有名的工具在busybox中集成了它的简化版,busybox windows版本也可以在 https://frippery.org/files/busybox/ 下载到7 _- q' q/ r3 A& D* Z- ~; d
3 c2 z" D/ u" V. a9 `* r" Y
1、先在windows中执行命令:(接收数据端); T# s/ t3 Y4 w2 G( D+ X
- busybox nc -l -p 12345 >mtd0
复制代码 2、在光猫中执行命令:(传输数据端)6 L6 `, h& ]; j1 e3 _
- /opt/cu/apps/busybox1 dd if=/dev/mtd0 | /opt/cu/apps/busybox1 nc 192.168.1.2 12345
复制代码 我这里每秒能传300-400KB的数据,整个传输过程大约需要13分钟。, C& u4 y& d6 ]/ U" n/ p
( B% ?( i5 |- A6 Y
0 }/ g+ \. ~ O* E% U
最后留下文件:
/ h7 b, q# b; E: U- U: _busybox for windows
5 L1 }8 @$ ]- H( H
0 x8 B1 n& x: ^8 k! u! S/ k! v9 a# X) M7 Z L; n
& a1 t+ ]6 b/ r' G- I) g2 Z
busybox for Arm 使用静态编译,文件较大,但无需另外的库支撑,直接使用! o+ Z. M5 [# q5 {4 ]6 K" N2 v# z1 m
! D# K9 ] D$ v7 |
" b# {) I6 |. a/ e
9 J: G; s# A% u1 J/ ^" I0 pxz for Arm 使用静态编译,文件较大,但无需另外的库支撑,直接使用
; z( G& j+ i9 r+ e' L. f( p! F* R2 Y1 [9 H. V7 }
" V! l5 m) U( Q Y
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|