|
|
发表于 2023-1-18 09:18:32
|
显示全部楼层
转发:我好像解决部分猫盘刷群晖后掉IP的问题了0 O8 _/ E; v0 x* y
Z5 d5 u- C4 ^
aquila995) x' ~$ E9 Y3 B9 f9 u
0 V& l6 Y/ f" G( @于 2020-06-24 16:37:11 发布9 f' }6 j# U5 L! P) K( D
0 Y7 N B5 N8 l13215% l) E) m1 w7 m8 }4 m1 Z
收藏 139 z7 K0 F5 d$ J+ L2 }( [
分类专栏: 群晖
/ Z5 n1 N5 k5 d! S1 j" v' {: D* d+ C/ S版权
* {! c2 G2 T9 J& o/ G$ z' o4 H8 d5 T6 j& I/ p2 G) f
群晖) C( x' I& v K. Y
专栏收录该内容8 _2 J6 ^7 B( g. |
1 篇文章0 订阅
r4 }2 \* v$ E; J* I/ `订阅专栏
& c5 n% \4 ^/ e3 T" U$ g/ A我好像解决部分猫盘刷群晖后掉IP的问题了' t6 }9 q4 A" @+ T, w
0 c) R9 Q9 d0 Z7 F, q5 X. J我好像解决部分猫盘刷群晖后掉IP的问题了0 h- u" H8 K7 L# ^- P
3 r0 N; I5 l; s$ Y) e5 a- f1 P# ?; l先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。
9 P/ K( _0 @$ g0 c! l9 E然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。
6 U5 }! z' v8 [% ?, B! ^8 q : o+ }& ]0 O s. w) [. @
跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。
; c8 X% }9 ^. z( k
0 G1 v0 f2 K) M7 b+ |( ]然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。* [+ F* n/ q. v
) p2 l5 v9 R1 A- B/ P先看了下有什么可用的命令:- W1 t( b1 B$ }% |* v* ?
- d: T7 ]' s0 P$ r0 aMarvell>> help/ H* o. _" I: ?" {" w; E0 a
? - alias for 'help'
& g% r7 `" h. M5 d' zbase - print or set address offset- C+ z4 g% c2 g1 y, G8 o8 ^/ I) C) j
bdinfo - print Board Info structure
$ H0 i4 o+ l' L3 I5 {( R+ Dblkcache- block cache diagnostics and control/ J: {! I9 u3 y3 x
boot - boot default, i.e., run 'bootcmd'
9 G: E! [; K% \2 i0 v' g$ T- hbootd - boot default, i.e., run 'bootcmd'
1 U* v9 v5 l# u1 |bootefi - Boots an EFI payload from memory
% e: ?, r5 }1 X3 T, B! n5 cbootelf - Boot from an ELF image in memory! @4 X- F8 A2 P( a! t8 v- L
booti - boot arm64 Linux Image image from memory
& e0 v) H, r% k- T1 f6 G1 e: nbootm - boot application image from memory
2 }2 O6 c: q/ s! t% p' c' z; z: K: V============================================================: m1 ]* E- z& A2 @+ L
bootp - boot image via network using BOOTP/TFTP protocol
7 z7 D" h7 ~. C+ c z( p============================================================
7 C; c7 Z9 a8 ]& k: obootvx - Boot vxWorks from an ELF image( ]' }$ A$ [ T0 w$ P9 A& J! U5 S
bubt - Burn a u-boot image to flash; w8 Q& [) N, G3 U/ \
cmp - memory compare+ Y# x6 S* g) ]9 ^9 x+ V d
coninfo - print console devices and information- K! y, h+ }# ^
cp - memory copy
. c: X; J q; Ycrc32 - checksum calculation3 N1 Y6 |2 u, U5 N
dcache - enable or disable data cache
2 w5 Q- v$ i; o5 A0 T-------------------------------------------------------------. _8 `) y* @$ E" p# y9 W7 W7 d2 |
dhcp - boot image via network using DHCP/TFTP protocol
% _$ o( x4 D1 d0 \* L-------------------------------------------------------------6 Y5 [' ^7 e6 C& R; @6 I" `( S1 U
dm - Driver model low level access
6 j1 n, ?( x) d8 \: n+ q$ m- z2 gecho - echo args to console
+ r) Z% v1 a, M5 J3 [editenv - edit environment variable3 C% q% ~" A, H4 M) u) i9 }
env - environment handling commands
$ M0 C; l/ \* `exit - exit script* {1 Q y( l$ V8 X
ext2load- load binary file from a Ext2 filesystem
1 J0 Y- p) \9 xext2ls - list files in a directory (default /)& v. {! b! ?0 r/ Z* t
ext4load- load binary file from a Ext4 filesystem
7 ^. c$ h( U7 A" cext4ls - list files in a directory (default /)
* m+ {+ a' {- r8 b4 b& hext4size- determine a file's size+ ]9 p) v+ S% k7 t0 Q9 j4 g
ext4write- create a file in the root directory
9 i# d1 C9 X, R4 Zfalse - do nothing, unsuccessfully
/ p- z3 ^6 `0 Y- o' n6 bfatinfo - print information about filesystem
9 a6 O! |4 u1 Y) _6 B& B: [$ u: Ffatload - load binary file from a dos filesystem! \6 t9 u9 X9 h- N# ~
fatls - list files in a directory (default /)! R0 q( c- J1 z8 z9 O
fatsize - determine a file's size
1 M8 Y: s. `+ ? @5 P8 o+ s, s6 Sfdt - flattened device tree utility commands
! H# H ?1 M( `" ], I8 @) z* c1 Lfstype - Look up a filesystem type
0 V+ _' m0 \1 ~go - start application at address 'addr'4 Y6 x. v" D: R. \2 j% r
gpio - query and control gpio pins
* M* v# `$ k; L% v% J- ~: whelp - print command description/usage) M; t3 L5 s1 j- W; ~8 e9 Q4 a
i2c - I2C sub-system) r P$ r+ M$ j$ k# e7 u; S0 K
icache - enable or disable instruction cache
( {8 r! P/ I6 |- o0 Yiminfo - print header information for application image
2 U) Z5 {' i) v# nir - ir - Reading and changing internal register values.! Y( G" f9 p+ H: }: S, j4 |. o
8 C* p/ @# ~! ^/ Y' e6 ^
% b+ ^# N1 m$ Z0 o/ Pitest - return true/false on integer compare1 l8 B6 M+ X0 D* z
load - load binary file from a filesystem: R4 o# w# t- }# g6 L7 K
loadb - load binary file over serial line (kermit mode)& T! \5 x6 n. U+ T& i, \, R7 f
loads - load S-Record file over serial line
. ?" n0 Q; f/ Sloadx - load binary file over serial line (xmodem mode)
5 d2 M3 x2 F6 P. N$ A2 g( O, {loady - load binary file over serial line (ymodem mode)+ ?/ |/ Z, ] ~
loop - infinite loop on address range# h2 z' _8 `6 r, E( }6 H! g
ls - list files in a directory (default /)
. B3 `8 @* ~* G2 z" Zlzmadec - lzma uncompress a memory region
: _! k. q! v" n$ }, y& k, nmd - memory display+ ]+ L* c% t* @* F
mdio - MDIO utility commands# K. U$ F5 z c: Y* z; ~3 y
mii - MII utility commands
: _: q @' R. d( W5 H' D. p/ d& cmm - memory modify (auto-incrementing address)
% _' @- B& a6 }; F' s/ {mmc - MMC sub system! T6 o7 C) U) ~; V5 K
mmcinfo - display MMC info
' s% F0 D2 L6 B, u: p$ f& Hmw - memory write (fill)
4 s2 P; w* K% V1 [8 M& Vnfs - boot image via network using NFS protocol
, ?0 G& L5 R; e4 knm - memory modify (constant address)
! f9 x9 S& U( _- N2 H7 _# i i& [part - disk partition related commands# ^% f5 x. | I& l
ping - send ICMP ECHO_REQUEST to network host, l' h/ O6 M" S* u+ Y6 l6 x
printenv- print environment variables3 S3 i, B8 c& P. m% ^ b
pxe - commands to get and boot from pxe files8 ?! M# D4 q6 ~2 z# J
regulator- uclass operations& c* e5 Y3 Y9 m1 r# D
reset - Perform RESET of the CPU
1 ?6 \% A" [3 B: @8 arun - run commands in an environment variable! ~2 v: m/ _7 g
save - save file to a filesystem
L3 O" R% h% H# a+ Usaveenv - save environment variables to persistent storage
5 ^, o" y9 @ `$ ascsi - SCSI sub-system4 D. M* s4 S8 N3 u+ d5 D7 Z
scsiboot- boot from SCSI device6 B) i3 d, d6 a
setenv - set environment variables
$ v( E. ~4 C5 @( `- m% L6 Ksf - SPI flash sub-system
4 v9 v; h6 a0 h4 g8 Pshowvar - print local hushshell variables
* H' m! \9 J* |! H# L3 [size - determine a file's size
# q! r+ F1 `: }; o8 z+ Hsleep - delay execution for some time
! g9 B$ N0 M1 b) Y) I3 `source - run script from memory
# w/ v" F; I" ?5 N0 A* osspi - SPI utility command
4 e- y; C- x( Y. jsysboot - command to get and boot from syslinux files
; @$ a$ k; c' L' t3 btest - minimal test like /bin/sh7 ~3 B, r( D G" N
tftpboot- boot image via network using TFTP protocol
' S& W! j* v: ^+ y+ E( _time - run commands and summarize execution time
* h3 @8 C- ?, p; D( u8 w# h! Ytrue - do nothing, successfully; l# o, `, N+ \9 r, B+ i' d; l( @+ ~
usb - USB sub-system& X/ r; z3 \/ h/ ~' F
usbboot - boot from USB device
7 v. \$ v, P0 v; q" k3 ]7 X4 z9 f T9 `version - print monitor, compiler and linker version9 G0 X% o8 ~" g+ S$ {: @4 c- H+ W
8 [* b( H" H K3 p7 \- u: Z
发现了gpio
4 r4 o# {4 S9 N, c+ y! U0 h4 r4 B: m 1 x" c0 X0 H6 k" q" Z
arvell>> gpio( g/ s( |5 P$ i9 S2 c7 u: L! e) t
gpio - query and control gpio pins
4 a: t; E. W ^0 ~/ ? / K5 _; }2 Q( J
U* r, ^7 L2 t8 d( U/ ~' t4 nUsage:/ a" ]1 Z% }8 Q: I( H8 d [
gpio <input|set|clear|toggle> <pin>
3 x# a* d" P! V- X8 `8 G" X - input/set/clear/toggle the specified pin
- I* x! X D; Q, y4 M6 e2 Ggpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
z1 {# h/ I2 T/ E0 ? / J2 h( g/ A- ]( k/ a
. l( ^4 o. R' a9 Z/ x: @Marvell>> gpio status
! P, u! d) P2 Z) {5 ^. _1 xBank GPIO2:
9 B/ |" l) K& A/ xGPIO20: output: 1 [x] sata_pwr) U' O7 L2 n/ R2 f
GPIO221: output: 1 [x] phy_reset* H$ q+ v8 m$ z3 w4 }8 w
: J" n' a& r5 L9 L" o T可见的io脚
3 q7 J; I9 P$ g& b5 D) B + ?8 W( V0 p, c3 d7 |
Marvell>> gpio status -a
. u: ~9 H* F" ?/ g/ I, B; dBank GPIO1: i3 g! U; x3 I" y
GPIO10: input: 0 [ ]& @3 W7 J, T2 z# k$ O9 p
GPIO11: input: 0 [ ]% s+ U1 L k# L, Z- y, z% a. r
GPIO12: input: 1 [ ]
1 E Q1 i3 H' {+ m9 `5 ?+ H+ F7 bGPIO13: input: 1 [ ]) F. a! `5 m8 N
GPIO14: input: 1 [ ]
/ i9 k' ~% A* v# A) T# S( x( S7 ?GPIO15: input: 1 [ ]
0 l8 W7 \" y# M" `7 k- R# q* N! U4 _GPIO16: input: 0 [ ]: R5 @7 J ?2 f+ A- B, ~
GPIO17: input: 0 [ ]
2 \( w% m% z; u" x3 O. u, r2 H6 Q+ B+ TGPIO18: input: 0 [ ]8 c+ m* g# Z5 k6 Q% ?( L7 |7 E
GPIO19: input: 0 [ ]
( v2 A2 l8 j7 h- k) ]' oGPIO110: input: 1 [ ]
4 {8 B& a# M7 c2 DGPIO111: input: 0 [ ]
0 u( L) I0 W7 _$ ~5 Y# r2 w; y, KGPIO112: input: 0 [ ]
; J2 s8 N8 k/ SGPIO113: input: 0 [ ]* l# l; ?& E3 `* ?6 {( {: f: d/ J
GPIO114: input: 0 [ ]
4 |! Z) v7 Z' b0 d: w3 W0 GGPIO115: input: 1 [ ]1 C6 V3 t7 G2 @' m9 \
GPIO116: input: 1 [ ]# v) g9 a$ p- X$ ~2 J; d5 y
GPIO117: input: 1 [ ]
% `, M5 V* }9 `$ r/ f; DGPIO118: input: 1 [ ]
% _ V9 I, @4 V0 {( wGPIO119: input: 1 [ ]8 N/ J4 P$ {7 k+ y3 e d8 s
GPIO120: input: 0 [ ]# O8 `% k. R# V5 D8 [8 t
GPIO121: input: 0 [ ]) ^0 S/ x: m0 ~3 s
GPIO122: input: 0 [ ]: g4 R. e8 U, A7 h4 ^2 }6 n
GPIO123: input: 0 [ ]" w) j4 w" a# O$ o
GPIO124: input: 0 [ ]3 J! A6 X( V* Z( `1 N! w: o/ P( n
GPIO125: input: 0 [ ]+ V- n$ Y$ k J" K2 k4 H
GPIO126: input: 0 [ ], G0 L* u2 ]" q5 M, u! ?
GPIO127: input: 0 [ ]8 j3 o( |2 }0 \1 }6 M
GPIO128: input: 0 [ ]
5 n \# p4 W# q4 o7 ^GPIO129: input: 0 [ ]
^: l: r T1 H; V- E" W3 HGPIO130: input: 0 [ ]
) H9 n. y+ T2 B% p! l- f$ E) B! o& OGPIO131: input: 0 [ ]
( S1 S' j' _' T$ s' g+ sGPIO132: input: 0 [ ]! r% k D/ s; }7 s; k4 n( M
GPIO133: input: 0 [ ]
- d3 B) @3 V, M+ \% V; rGPIO134: input: 0 [ ]4 H+ E1 k- g& H+ C" Z
GPIO135: input: 0 [ ]: g8 b; ~4 H& R
; Z! ]* {3 K# x9 A5 F+ d
5 N3 K9 L4 K- j& ]' @1 _Bank GPIO2:$ p/ V6 C% {) W; s$ C, s
GPIO20: output: 1 [x] sata_pwr
3 ?6 M( B' b2 LGPIO21: input: 0 [ ]
2 i4 w9 J0 P0 i% `4 u! W+ O! Z5 WGPIO22: input: 1 [ ]3 X3 c y" w3 P4 d" s! R
GPIO23: input: 1 [ ], F+ y* s3 j9 T
GPIO24: input: 1 [ ]0 X' M& [3 A0 }+ r, k
GPIO25: input: 1 [ ]
/ \9 b! P9 E/ D4 A: _. k8 jGPIO26: input: 0 [ ]
, ^* X5 t' t: @- w) _/ ^GPIO27: input: 1 [ ]
; P2 b, m3 M* D: eGPIO28: input: 1 [ ]
8 t3 X8 ~- _0 {2 a) mGPIO29: input: 1 [ ]
3 r2 S. l, J9 pGPIO210: input: 1 [ ]
" }8 a0 F1 w% Q+ ^. u# `GPIO211: input: 1 [ ]' V- L) V- q' J+ k
GPIO212: input: 0 [ ]
! i! _* |7 B% x) |. g, zGPIO213: input: 0 [ ]
# v+ ~, l; L2 W+ p# ~2 vGPIO214: input: 1 [ ]
4 O( j0 p3 @5 PGPIO215: input: 1 [ ]3 `8 I* n' f1 `5 d* d z& H
GPIO216: input: 1 [ ]
8 V' S( h2 q( PGPIO217: input: 1 [ ]
0 ?1 ^' [0 X0 d- wGPIO218: input: 1 [ ]
9 r6 J s/ R l2 f z. D/ c" RGPIO219: input: 1 [ ]+ p. ] o0 p, b( B" s$ Q
GPIO220: input: 0 [ ]* O* g4 d! w+ x8 ]( `
GPIO221: output: 1 [x] phy_reset
) g, B% [# f, g b" m9 [* IGPIO222: input: 1 [ ]2 I" P+ r) {7 ~' ~- a3 S1 {6 [
GPIO223: input: 1 [ ]
& V; \7 f' k; [- Q& {GPIO224: input: 1 [ ]8 q5 y0 A8 D! q+ ?( c6 E0 o8 g
GPIO225: input: 1 [ ]. v' } b- }8 v: w: j( A P
GPIO226: input: 1 [ ]& q+ \; J* m0 r9 V$ G' ]) Z' C
GPIO227: input: 0 [ ]* H( n5 z! }5 d/ h5 z3 i) O2 h
GPIO228: input: 0 [ ]3 Z3 m0 ~. j0 {9 ^# Y
GPIO229: input: 0 [ ]* d) R" v4 ]1 x, P- D9 E
0 G0 ^7 I5 m: C& B- H5 j" N2 V0 M' Z别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。, g( x3 }5 L, {' C: a
1 Y* O& y% j e8 q) C
Marvell>> gpio
+ [/ O0 f7 N2 \/ wgpio - query and control gpio pins
2 o5 `3 h2 ^ o/ T+ W 2 [0 B, E; m T) _: h
$ D& z* H8 Q/ @1 f7 N! z( \; Y
Usage:8 F; X0 t8 `0 a$ s t! n8 P5 }, S
gpio <input|set|clear|toggle> <pin>
3 a. p9 h* a' G- l0 G$ N - input/set/clear/toggle the specified pin
: l! B. E& X V" ? }gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs( |3 }/ @* R& t5 u% Y% V; m. S% [
: r1 t5 S& _$ M# i0 Fset是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)
0 m& O" p2 Q5 P8 ?& @ 7 M5 g# b5 q( A8 n
然后看到env有地方是参数设置,类似dos的环境变量吧( N ?5 i0 h9 z* F' G
, j: d4 {! A. f$ ?% Y6 B! f7 Z( d3 d
Marvell>> env print/ e- k( B! F8 q0 X9 t7 i
arch=arm; d& e+ h3 o0 P
baudrate=115200& g& w" L! J+ h& j1 \1 A$ F
board=mvebu_armada-37xx* e6 U/ R3 U3 ~# m8 o' P
board_name=mvebu_armada-37xx
; Y' Z) m, {* H5 r7 ^boot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
: [! n# G: t9 l! M3 G* |boot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
+ R! j, ~% N: f4 ?$ l) x, Yboot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
* M6 i2 U( @, z$ e3 pboot_targets=usb mmc0p1 mmc0p2 sata
) o7 ^; V, G) M) D5 pboot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
! Y' B2 a" X+ u2 M9 A2 @* @8 Vbootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi& ?' E7 r& w {/ P6 c
bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;) Z( e& X# K) u/ p5 S
bootcmd_normal=run bootcmd_syno;) L# N% ~1 a" X# C
bootcmd_syno=run syno_bootargs;sf probe;sf read $loadaddr 0x0D5000 0x306000;echo "syno: start decompressing kernel... ";lzmadec $loadaddr $kernel_addr;sf read $initrd_addr 0x3DB000 0x410000;sf read $fdt_addr 0xd2000 0x3000;booti $kernel_addr $initrd_addr $fdt_addr;7 R" d$ Z4 q0 U# K
bootdelay=1+ I9 h1 ^! J9 ` |8 e
bootdev=scsi 0:1
, N& R' d0 L$ h" Cconsole=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
- t( ~: G- K, H1 y b' Fcpu=armv8
+ Z6 v/ u. W( c+ { sethact=neta@30000% s( v0 W, I p0 k" U" g
ethaddr=00:11:32:11:22:00
" M8 O5 F: ?1 k- a2 J3 @ethprime=eth06 F( b9 W( x- {: h
fdt_addr=0x6000000* g8 N+ W0 Z6 B; z* V8 f- u
fdt_high=0xffffffffffffffff
7 _; t* N6 o c7 z( J/ afdtcontroladdr=1f6437d0
! i9 t$ m: l1 w& S- L- R2 [gatewayip=192.168.1.2542 N3 n' _: Y1 h9 Q( J, j8 B
hostname=catdrive3 O- g! `/ l$ f# e
image_name=/vmlinuz
. ~. d# i! b5 S, y/ v! Hinitrd_addr=0x1100000
: |2 K) N1 J* ~! a- Vinitrd_size=0x2000000' P/ E2 _' u+ |" p
ipaddr=192.168.1.119( D0 M; i- R0 k: Z; t, D; R
kernel_addr=0x7000000
7 F8 P" w3 U( B# iloadaddr=0x8000000: E8 l- A4 p3 X* p
netdev=eth0
* V% N( Y0 J/ h3 W6 |1 snetmask=255.255.255.0
- U, f; r$ J7 Z' a8 T$ [+ Wrootpath=/srv/nfs/8 _" {- ~3 ~0 |$ A
scriptaddr=0x6d00000
8 Q& R; u8 |$ M( w5 Pserverip=192.168.1.254- _" o: _* B# p/ l
soc=mvebu
$ _' H7 _ u* c8 S; Mstderr=serial@12000
* j5 O! i7 r4 c. cstdin=serial@12000
" B! U& Q* i8 A+ a \stdout=serial@12000: \5 l" R- h: k5 o+ P
syno_bootargs=setenv bootargs console=ttyS0,115200 ip=off root=/dev/sda1 rw swiotlb=2048 syno_hw_version=DS119j syno_fw_version=M.246 syno_hdd_powerup_seq=1 ihd_num=1 netif_num=1 syno_hdd_enable=40 syno_hdd_act_led=10 flash_size=8 vendor=Marvell
, c; T1 l* g- G4 n X% V! H$ Avendor=Marvell0 Q% h0 X" F. ^9 [# r q
. }' w* o" q/ n6 Z 0 @3 H0 D0 u3 R% z3 \* m
Environment size: 2001/8188 bytes
6 c* j0 O" g6 x2 n4 |( P' o$ TMarvell>>" `9 h) V' w. R, C
* C2 e2 H8 l( k4 N看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.
: a8 L& V4 D/ lbootcmd_syno=run syno_bootargs;sf probe;sf read $loadaddr 0x0D5000 0x306000;echo "syno: start decompressing kernel... ";lzmadec $loadaddr $kernel_addr;sf read $initrd_addr 0x3DB000 0x410000;sf read $fdt_addr 0xd2000 0x3000;booti $kernel_addr $initrd_addr $fdt_addr;1 y7 a1 h4 c) S- l3 z
* T1 b/ O: S9 \" I
这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了, h' |: J8 V1 E( ]' z7 U( V& ^
bootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒
+ V! _3 W: s5 q# {% H : }$ f/ a* W# P# J
bootcmd_syno=gpio clear GPIO221;sleep 10;gpio clear GPIO20;sleep 10;gpio set GPIO221;sleep 10;gpio set GPIO20;sleep 10;run syno_bootargs;sf probe;sf read $loadaddr 0x0D5000 0x306000;echo "syno: start decompressing kernel... ";lzmadec $loadaddr $kernel_addr;sf read $initrd_addr 0x3DB000 0x410000;sf read $fdt_addr 0xd2000 0x3000;booti $kernel_addr $initrd_addr $fdt_addr;+ n- F' h% Q1 R
4 V4 L, p" Y1 N! f7 J" i注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。- q+ R7 g. A: @) ~, C- X& |# [8 {
思路是:
! |6 N3 `3 M% p6 i: N启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
0 T2 H* m: i0 b$ J
1 J7 v+ p' ^6 H5 u1 w- j这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启6 \# x% w% K' h7 z: J6 m
: ?( a$ Q& A- c" j, |( ]2 `控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启
6 |0 ]; s; Q4 _) J* v#!/bin/bash
) g& D1 Q& {% Z/ [8 b2 Mdt=`date '+%d/%m/%Y %H:%M:%S'`
* ~ ?" L3 g; ~8 U. Cecho "$dt"
$ l, k7 w2 [/ t0 Msleep 60
7 `5 ]' n& S C, W0 Q2 ?5 Z" g9 i( Unum=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
; P6 E0 J+ b) k' \. P$ S" hecho $num
9 n( S3 O L$ mecho $?
- @) D- \9 H- N! I% _0 m2 m9 ^if [ $? -eq 0 -a $num -eq 0 ]; then
! ]5 b1 u, e0 z echo "$dt ok" >> /result.txt
3 z1 I2 ^' A9 X* D8 }else# x; j4 {- m1 D' I% G% b0 M$ t; J
echo "$dt noip loss $num reboot" >> /result.txt
3 A: O9 B& ], g! T9 n- Y/ A reboot* @1 ]7 F" u3 s; L% G( p
fi5 ?$ a( P! `5 E3 E. S1 r+ k" B
, u$ i& j- _, I
第五行,ping后边的IP自己改,我用了一个外网的IP。
# o O+ M0 z8 z 5 y( m# P, n' K7 c7 ^ c
总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。
" f; V6 S' J+ n
; Z- [0 i) n8 t我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。
7 Z `* D. T8 l! d3 I8 m & R/ E% b1 a9 ?* v8 ^4 J
还是上边60秒的地方,再加一条
+ ?) t' h" N1 R- { f4 M" o+ H
; f9 K, b' R; X6 x/ Z
. T' r8 R1 h1 c6 ^2cset -y -f 0 0x45 0x00 0x55* y% a' {% s8 N! M* e/ Q/ j
i2cset -y -f 0 0x45 0x01 0x01
3 i9 j8 ^) j& p4 ~i2cset -y -f 0 0x45 0x30 0x07
/ O$ |+ ~3 b; f1 ai2cset -y -f 0 0x45 0x31 0x72& ~6 H. K6 _5 q
i2cset -y -f 0 0x45 0x32 0x72" v( ^* Z4 F" r: w( K& x8 T
i2cset -y -f 0 0x45 0x33 0x72
I% v/ z8 c% u4 b; l8 O- N' ]#调节三个灯灯每周期上升沿和最高亮度时间: L# g& a8 e& h6 A7 p
#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44% I- _* g, G* F
i2cset -y -f 0 0x45 0x37 0x44
# y- q! p6 ^$ M' l: v1 Ri2cset -y -f 0 0x45 0x3a 0x556 l7 {) n! I! d8 H" n, q
i2cset -y -f 0 0x45 0x3d 0x66$ s y0 Z1 {! s+ a
#调节三个灯每周期下降沿时间和关机时间, h% g% c( G# _# N" |8 Y" N) ]
i2cset -y -f 0 0x45 0x38 0x442 ^) V! c; ]9 L
i2cset -y -f 0 0x45 0x3b 0x55
' U5 H5 \$ e. ~6 W% U* V* s" ^i2cset -y -f 0 0x45 0x3e 0x66 V5 x; Z4 u5 Z: F
i2cset -y -f 0 0x45 0x39 0x40
# G2 l: H7 j4 Si2cset -y -f 0 0x45 0x3c 0x40 j/ p, @3 ]0 j/ X8 E: y. @
i2cset -y -f 0 0x45 0x3f 0x406 u1 v( S8 `) j( W
# 0-255,更亮
, y. }7 J# w, bi2cset -y -f 0 0x45 0x34 128
/ W/ C! k6 _: N$ w5 O, ^3 ai2cset -y -f 0 0x45 0x35 128" z1 e) ~7 W. h; Y4 r
i2cset -y -f 0 0x45 0x36 128' A, U$ W* m6 S- x* m8 R
5 ]+ s, _4 v2 U% Y4 M, g) n; U
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯
) P8 p! Y1 ~4 l4 Q6 o3 s2 T ( [. t* s( @, O" _
1 `; z* `: K& |3 M1 K+ d [
我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。4 A# |, O" `6 u4 k! H8 a5 c8 b
/ J% y! z, \5 B; z( n希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。0 X" s) x; m# G- [/ `
|
|