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