|
发表于 2023-1-18 09:18:32
|
显示全部楼层
转发:我好像解决部分猫盘刷群晖后掉IP的问题了
; Q* [. c$ f! a' G, s, P R# h6 m" H
aquila995
- Q0 _; Z" k6 C- J' q$ b
, m# Q. }# J5 q! [$ G于 2020-06-24 16:37:11 发布
8 |* G( u' x* ]9 [1 O" v( d2 x4 \& S
13215
U6 @8 h. b: w2 |' a& }: j; Z, I* { 收藏 13
* m; ?2 |" m; i# U7 a分类专栏: 群晖4 s% }+ G/ o6 c+ A- j) |
版权( |# F$ J+ o" j6 Y3 m
8 r p& S4 V; b6 \. T9 ]2 A5 K群晖
( V# l' j- u) f, b1 H' h+ G专栏收录该内容
1 u+ t( S @7 t1 D' y, B9 P1 篇文章0 订阅& Q: O1 Y1 b4 u9 `( j! d/ [
订阅专栏' S1 Q- L# n; Q9 D% b! N" d
我好像解决部分猫盘刷群晖后掉IP的问题了% ~' z$ r( z" w8 h* T
8 |" O! e+ X$ |1 Y- j+ I2 F: [
我好像解决部分猫盘刷群晖后掉IP的问题了
* t: K/ j5 @' Q 2 h. w6 k7 r6 n( j
先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。
. z- {& d- @) M8 T9 i然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。+ D! P' o2 S: K) ` [
1 P$ ~2 d6 t# m. X- S+ f: Y# p" ^- J跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。
5 O2 Q3 Y- U. T6 K3 K( a4 @9 v& C
- R$ h+ u3 v' t4 J: G6 L7 V* h然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。/ Z& V# V& W+ B) H4 T- u
) x5 V; J* X& M( w先看了下有什么可用的命令:5 y2 o- j$ j P: m6 q
; Q7 P) y( t: R& IMarvell>> help) G, _) C* S- ^ g) O$ R; b
? - alias for 'help'
, e# }: H/ v8 P7 mbase - print or set address offset
$ N3 X% \/ G* \& |bdinfo - print Board Info structure
' G9 Y7 `$ j/ [+ pblkcache- block cache diagnostics and control2 p' u- Q! z6 w0 }0 O1 Q
boot - boot default, i.e., run 'bootcmd'
$ u2 w3 w1 w1 M! v3 L, Z3 cbootd - boot default, i.e., run 'bootcmd'8 Z4 M G% [/ T) \
bootefi - Boots an EFI payload from memory
& H8 ?) n, A* K& b [! a, wbootelf - Boot from an ELF image in memory- h( S9 R/ ~ a9 a& q
booti - boot arm64 Linux Image image from memory
6 B# S- t5 A8 H% Rbootm - boot application image from memory
4 V6 N; t" [8 p4 A# h7 d============================================================
2 X4 z6 v. N* I$ d0 [bootp - boot image via network using BOOTP/TFTP protocol3 W+ _( |( G: M. A6 `: |
============================================================" L: J4 j" k- Z9 o v
bootvx - Boot vxWorks from an ELF image
% f0 i# h. _1 Q+ M d3 [bubt - Burn a u-boot image to flash0 E: g6 d$ z* m2 Y5 \
cmp - memory compare
; r: K5 z- G) H/ M) fconinfo - print console devices and information
+ z- c$ V# W+ k; _% P9 [cp - memory copy N, G! a f1 y
crc32 - checksum calculation6 {5 f9 f; i! v, G
dcache - enable or disable data cache
- S! m& H$ f+ X) |-------------------------------------------------------------
" O# u _1 p. _# [dhcp - boot image via network using DHCP/TFTP protocol. c, ` i1 F9 b, t1 D/ v1 k
-------------------------------------------------------------! l+ h$ `6 d* I8 n& ?4 o
dm - Driver model low level access# [. u) _2 I0 p; R
echo - echo args to console9 I( C" h) H+ ~
editenv - edit environment variable& F0 L# D+ P- X' f$ C
env - environment handling commands
& Y; j/ P. q, e- G; C) kexit - exit script
/ ]5 A2 ? X) M1 f* K6 yext2load- load binary file from a Ext2 filesystem
5 @- C# _) }- Q$ yext2ls - list files in a directory (default /)3 C; E E) m9 u8 f; H
ext4load- load binary file from a Ext4 filesystem
/ r9 v% Q% `5 lext4ls - list files in a directory (default /)
/ `, I6 ?9 Y3 }7 K, kext4size- determine a file's size, |0 O* Y S5 \ q6 M* J
ext4write- create a file in the root directory
1 F4 d6 A' L7 a* h% F* F8 l qfalse - do nothing, unsuccessfully
7 }! ]3 t' H' f/ f9 Y) q" K4 @ @fatinfo - print information about filesystem1 C8 ~7 }/ L7 d9 |0 h+ g/ @6 {2 c: p
fatload - load binary file from a dos filesystem# g6 b+ U& e; e# S
fatls - list files in a directory (default /)( w8 V0 n: r- G# K; b$ U4 y
fatsize - determine a file's size
; p/ E, t6 H0 s! Zfdt - flattened device tree utility commands
/ t# s/ F& T- }/ T# I7 dfstype - Look up a filesystem type
6 [( _1 P5 C% u7 M [- Ygo - start application at address 'addr'1 U. k3 g0 w# ~+ a9 P
gpio - query and control gpio pins4 F" u* o: m! ^' L6 X: M$ b4 O4 d
help - print command description/usage
* K+ q' r1 |; c z# _$ ri2c - I2C sub-system
( O( u2 `' Z7 N- D6 A dicache - enable or disable instruction cache+ f# k J. | \
iminfo - print header information for application image
3 p( U- B% b) G& u p0 s r; [6 |ir - ir - Reading and changing internal register values., d# Z& y4 e- B
( ]& i; L9 { p* S. V* O, F! i D
2 E& q) Q2 v3 i7 ]2 Uitest - return true/false on integer compare
4 M; Z; Y) s+ g) H/ ^7 wload - load binary file from a filesystem
5 F- Y% e4 a% D- Yloadb - load binary file over serial line (kermit mode)
, `# S1 t" _+ d8 e; M& S. Z4 d7 Eloads - load S-Record file over serial line
6 D& p; `4 f5 y: o( Z. }) ~+ ?loadx - load binary file over serial line (xmodem mode)
6 ^1 C9 w1 o& [- u3 Qloady - load binary file over serial line (ymodem mode)
3 i0 H% {& ]5 T u" r0 g3 cloop - infinite loop on address range
3 }* I$ B: x% U- |3 T+ T, D$ zls - list files in a directory (default /)9 z4 v/ l% Y' ^, ^- F/ n% ]9 \- X
lzmadec - lzma uncompress a memory region
( V4 R/ }5 g) l! [1 P2 U* Dmd - memory display" x) q7 @7 {& ], u0 Y+ |7 ?
mdio - MDIO utility commands( y) E3 M1 b J1 ^+ O0 t6 |5 F r* s
mii - MII utility commands+ E i7 u+ [, T% ]5 |6 x; ?
mm - memory modify (auto-incrementing address)
5 j5 L0 Z+ w/ M' ]mmc - MMC sub system
0 |/ t+ }& x1 L* K4 O( zmmcinfo - display MMC info# e& F& J* Z. P* m: R5 H& V- f9 N
mw - memory write (fill)6 {- r) G/ ` y2 e* M
nfs - boot image via network using NFS protocol, }- t5 y7 V) S8 \
nm - memory modify (constant address)- c2 t$ w: M( `
part - disk partition related commands* G; N/ m/ g- V, R
ping - send ICMP ECHO_REQUEST to network host
B G9 x5 b1 fprintenv- print environment variables# q5 e) J! p- Z! m" R0 B" w' c
pxe - commands to get and boot from pxe files
! e& @) T% }8 @. I) B, oregulator- uclass operations. Q/ o+ Y/ [% B( L. K
reset - Perform RESET of the CPU$ ?0 N0 G$ t' }7 u) ` ]1 Z
run - run commands in an environment variable
2 F/ H* V& x* s8 `save - save file to a filesystem1 ~! L0 ]* l5 E3 H; D( b8 n, e" d
saveenv - save environment variables to persistent storage1 i3 F# @& o) j$ M: U* v% a8 {
scsi - SCSI sub-system
0 H2 \2 b% k" ]& O/ r& S1 ~; x" Zscsiboot- boot from SCSI device
, d! x, A a! q7 csetenv - set environment variables
. k7 J* A. g Q1 c( L( E6 w* c# ksf - SPI flash sub-system! x* E& x# I; ]# g! {) `* n9 X) G: x
showvar - print local hushshell variables, Q& I l. W8 f$ D8 q
size - determine a file's size/ P5 o0 b' f% @1 j. r7 W( H. ^- {) n
sleep - delay execution for some time. q% L0 ^# D; s3 g
source - run script from memory
( w& h4 o* W. x" i# ]9 L, Zsspi - SPI utility command
' J) {( N& r ^% v+ Z0 \( A8 r% tsysboot - command to get and boot from syslinux files
/ |$ C0 r( x' ~* ~: ]0 jtest - minimal test like /bin/sh
4 ]! g* L7 J+ m0 e5 w6 p" mtftpboot- boot image via network using TFTP protocol
2 w: y3 C/ K0 M0 i* L3 Ctime - run commands and summarize execution time+ Q8 c x8 [ x
true - do nothing, successfully
6 F* B0 y) R4 h6 q. Husb - USB sub-system( e M4 f2 \+ f$ u9 @* G
usbboot - boot from USB device* o8 y5 n: G: T: F1 u" k
version - print monitor, compiler and linker version" [( |3 }- ~- g/ G, O+ I
8 i$ w3 E4 B" f l6 n4 _发现了gpio
: J& m4 C$ l' n: r1 } * @ U) @9 r9 R
arvell>> gpio
! T; e" i, A" t ^gpio - query and control gpio pins# ?+ m' c C- j
% A+ I. k+ Q [( f% M; N; q8 S% P0 I
1 P/ C r* o8 U$ p3 q3 H6 p& [ ^
Usage:
' t) K% ~2 A# T8 Sgpio <input|set|clear|toggle> <pin>
5 }" L! J) \3 y$ {7 i. M6 G - input/set/clear/toggle the specified pin( o6 S; A" Z/ L; v: F5 ~- @
gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
8 @: C1 W0 i* n. w4 ]
% n5 t0 d& e8 _+ z; \' T7 H 7 }$ J0 g; Y, \
Marvell>> gpio status
: m2 h; T9 z1 B: b! R/ KBank GPIO2:8 c; D9 A r& i. i+ X
GPIO20: output: 1 [x] sata_pwr. Y5 N4 a; r+ f7 Q9 j3 }) |
GPIO221: output: 1 [x] phy_reset/ M7 A& V$ E' d! j# c
. ?5 w( {9 j% g( P" Q. t
可见的io脚+ \. N1 ?7 D( T! e; d
. J; e1 L6 _; i! f' |. t- g
Marvell>> gpio status -a& e2 m3 M1 @1 R4 W# v
Bank GPIO1:
( S# p; f) ?" N& Q' X* ]2 QGPIO10: input: 0 [ ], i5 Q' j) m$ } i2 r6 t' q
GPIO11: input: 0 [ ]0 P7 e! O9 Q0 k
GPIO12: input: 1 [ ]
c. |5 S7 v7 f; b! fGPIO13: input: 1 [ ]
# V! _2 y9 k' SGPIO14: input: 1 [ ]% m. [ ^! v# l% W% X2 O
GPIO15: input: 1 [ ]
i ]1 v5 e, ?) b4 R3 ?GPIO16: input: 0 [ ]
- I# S% D7 d9 n T4 @; W+ f5 n& nGPIO17: input: 0 [ ]
# I# ^$ f1 D' S" C; k5 a9 eGPIO18: input: 0 [ ]
+ h% @% f" V j2 B( \/ I! eGPIO19: input: 0 [ ]
6 [# C- b7 N8 P% u; `* lGPIO110: input: 1 [ ]/ m( }# D5 E/ D( j9 n: h
GPIO111: input: 0 [ ]
2 [3 q! v0 ^2 p( ^0 a) ]5 d& jGPIO112: input: 0 [ ]
/ [: p$ \9 n- E2 s9 l" L0 oGPIO113: input: 0 [ ]- ?" p! ]9 f0 I, }
GPIO114: input: 0 [ ]
0 V8 \: f' j+ b4 N# m$ ~GPIO115: input: 1 [ ]
0 _% S" }. K5 ]( |' x" zGPIO116: input: 1 [ ]
4 v- Z3 f0 G/ P" V$ E* tGPIO117: input: 1 [ ]
/ [3 @; c7 Z* o! N7 Y7 D3 n) CGPIO118: input: 1 [ ]- r. H& x: h& X' T G$ l: f0 q
GPIO119: input: 1 [ ]
6 u8 p5 L$ a1 `GPIO120: input: 0 [ ]
8 }1 t, a3 Z0 z& S/ g! Z7 eGPIO121: input: 0 [ ]# W9 \- B' v8 U8 W. W3 c
GPIO122: input: 0 [ ]! e+ ~+ I+ A( Z, u( f$ z
GPIO123: input: 0 [ ]
8 ]8 g1 [- V! e) WGPIO124: input: 0 [ ]; S+ B2 V7 }* o9 U, J' i, n
GPIO125: input: 0 [ ]# m2 C: K6 m7 L$ Y
GPIO126: input: 0 [ ]4 B) Q, `2 A6 U |6 J
GPIO127: input: 0 [ ]2 Y! R% G! x* c L4 J
GPIO128: input: 0 [ ]# }& B" F5 G- o# H8 O5 }" {" e/ Z
GPIO129: input: 0 [ ]: \3 d9 L5 {3 C T7 I3 s0 u% ?: ?
GPIO130: input: 0 [ ]/ i: k: _" E$ F, i: r
GPIO131: input: 0 [ ]+ n" y( h% l/ P9 l) _) e
GPIO132: input: 0 [ ]. U$ p- ^; {0 @: B
GPIO133: input: 0 [ ]7 r2 s4 r: p ]- _5 e
GPIO134: input: 0 [ ]
- t( T4 U' K. [5 P/ {- K9 ]GPIO135: input: 0 [ ]
# j: Q: P- O; L! w/ E1 F2 `
9 T r2 c9 f6 |! t2 D. Y
" K' i# q# A- G2 b2 Z+ OBank GPIO2:/ A( F8 P* D- B) q" i+ R1 ^' V0 E
GPIO20: output: 1 [x] sata_pwr' T5 A& ~" s6 g. L
GPIO21: input: 0 [ ]
5 o9 v2 F, c9 N* u4 K# _! IGPIO22: input: 1 [ ]
7 r& Y+ Q; f bGPIO23: input: 1 [ ] ]4 j2 H6 Z, O
GPIO24: input: 1 [ ]' A, h0 I6 ~) G7 k+ ~' U
GPIO25: input: 1 [ ]
6 N9 M, R1 H l) g0 o% dGPIO26: input: 0 [ ]
" _: Z# F: w. XGPIO27: input: 1 [ ]0 X4 R8 a# [" b: g, N$ _# b) i
GPIO28: input: 1 [ ]# f% j/ Z) h$ j+ O7 J8 G
GPIO29: input: 1 [ ]
! N* }- I3 G1 [0 a1 OGPIO210: input: 1 [ ]
* s0 L6 L& a2 [3 a& u5 m8 R7 |GPIO211: input: 1 [ ]
5 l) F" |9 a; n% dGPIO212: input: 0 [ ]
5 s4 P8 C7 P3 p/ KGPIO213: input: 0 [ ]% k! {0 x. X0 \ O( e
GPIO214: input: 1 [ ]
0 V8 q+ a2 p) }' o4 Y OGPIO215: input: 1 [ ]+ t' ~1 z8 T. g- Q! H. c2 w- w
GPIO216: input: 1 [ ]" k, Q5 o B+ I K
GPIO217: input: 1 [ ]0 I b5 `& g1 h- b3 N! ^
GPIO218: input: 1 [ ]5 L1 v n8 b/ J8 k& t+ K
GPIO219: input: 1 [ ]1 R& y. h6 R9 H7 W+ T6 @4 M
GPIO220: input: 0 [ ]9 g) [! L. n0 K. \- P
GPIO221: output: 1 [x] phy_reset
" n* S+ u2 @: [- S; U# ?& |GPIO222: input: 1 [ ]
/ {% x, K6 M% @8 i$ }% c( A+ e, D* vGPIO223: input: 1 [ ]
( S- I5 ^% H( nGPIO224: input: 1 [ ]: G$ B+ P) f g/ C/ g' ]) r( Y
GPIO225: input: 1 [ ]; k d+ ~! v9 W. d, A6 w2 e
GPIO226: input: 1 [ ]4 }1 n3 c& c+ j B
GPIO227: input: 0 [ ]6 ?& m& X0 q! ` e) s
GPIO228: input: 0 [ ]
; _+ |% O% p$ MGPIO229: input: 0 [ ]! i. y- d* z6 u3 P0 C- K
4 }3 x! u/ R5 f; A
别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。
3 M* J) }4 y% ?' u7 u, X
& G& y+ u5 S: b$ _Marvell>> gpio/ a: d g! U5 j! T. @
gpio - query and control gpio pins/ W( x K" Y1 [( L Z) G
4 `# b9 m4 z! Q4 f% M$ ?
# ?8 d4 _, o' l+ S
Usage:, g/ ?8 A7 ^0 [- M8 X. y
gpio <input|set|clear|toggle> <pin>" j3 c0 q# d H" P
- input/set/clear/toggle the specified pin
; F( ~( a8 I' m0 ~: Q! d1 Cgpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
' P3 T( H& _# G U7 Q6 ]
& F, ~( S8 u* V. J+ ]set是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)
7 N% d1 l" y3 e5 U
3 \, V% ~5 B! m, N然后看到env有地方是参数设置,类似dos的环境变量吧7 M# b( z. s' N8 y5 R4 ], X# x
% ^6 E: c+ q2 F6 H% k+ J- [9 Z$ J. B
Marvell>> env print# Z) S/ D% I8 z/ X. V; i
arch=arm
- L0 c0 I! S7 ]2 q" C' Tbaudrate=115200
9 c; u7 S ^0 _1 e' V9 X1 Rboard=mvebu_armada-37xx c* R/ W) { S. K
board_name=mvebu_armada-37xx
9 f, Y9 U8 y. q8 ~. xboot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
: z! U) O+ @: v# Hboot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};# \# H6 g, r" ?/ p c7 k6 Z
boot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
* N3 `" r( q# U4 f h' J: ~8 l e, f5 Nboot_targets=usb mmc0p1 mmc0p2 sata
5 X8 y7 s, _ E' J5 P/ s; zboot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
2 |% W& ]: y. Pbootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi
; C* o4 L5 D8 g6 Qbootcmd_button=for target in ${boot_targets};do run boot_${target}; done;
6 \5 z4 J; K$ P6 lbootcmd_normal=run bootcmd_syno;
, W0 I; H1 y2 ]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;
2 {+ [: i5 q& @; {. w) g4 Wbootdelay=1
1 h1 u% S, Q/ g8 u1 s% Q" Xbootdev=scsi 0:1
# W2 M, D7 X$ `console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
) s% K4 c( u! J; Wcpu=armv8
$ o1 C1 B7 P( p' u/ F1 E: Tethact=neta@30000
) G3 y5 F# {* F; V! Tethaddr=00:11:32:11:22:00
+ i7 ?% [3 ~4 p% o. r8 K' }+ T4 Yethprime=eth0
9 a$ G) K6 |+ S8 g9 S" O* pfdt_addr=0x6000000
: d7 z1 x( V" q+ d' t2 M, u5 I. d( C: Bfdt_high=0xffffffffffffffff l" r) X( N' s: N" w
fdtcontroladdr=1f6437d0
+ E; S* u2 x8 |3 x3 j+ L3 @gatewayip=192.168.1.254
( Z2 ?5 @! u' G: M% ^hostname=catdrive
y; ~4 y* p7 s7 Zimage_name=/vmlinuz
: `# T }- |4 t3 e! E& n- L) E, ainitrd_addr=0x1100000
d1 P- R, |9 d! M- \initrd_size=0x2000000
: c- [0 N9 U( e2 S% S/ G zipaddr=192.168.1.119
% t( `/ [, N7 x' N) W; lkernel_addr=0x7000000! q3 E4 x7 w, F ?! X
loadaddr=0x8000000" j# l- h g/ j# j8 }$ ]
netdev=eth03 U( Q4 g) Q8 r1 u: u- }! _9 O# c. {
netmask=255.255.255.0* b1 a: G" _) ~5 H7 d
rootpath=/srv/nfs/# m1 j5 |: ]3 K
scriptaddr=0x6d00000
2 u6 z$ s* s% Z" Eserverip=192.168.1.2547 L) d& B0 A7 O) I# u+ O2 ^
soc=mvebu
8 N' \5 d6 J6 z/ s2 r p' [stderr=serial@12000% D. O' ^( E. [5 b
stdin=serial@12000$ u8 j) C: c2 t5 ~5 J. x; w
stdout=serial@120001 I( X% M5 H6 s7 F1 i
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
( k- ^. D& U! m) r. T: Kvendor=Marvell
# L; r: A! R% `' z/ ~" K
! G! b. E Z6 d # V# W& z( S8 O8 E# {6 @/ ^% N
Environment size: 2001/8188 bytes) o- ~& |& c" ]' p" J/ b& C3 E
Marvell>>( N. N4 o3 S8 \! g
% B. @) h, |! M% s7 L
看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.0 ?- C+ O' a% I5 T% J
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;- x7 ]* d; E4 z( s
" j# V! w3 ~7 \
这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了
& W; l3 _ m: r# d! ubootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒
) w) Y6 z/ X' F7 J6 G3 Y3 { - e" Q7 L% n2 w! T! @9 b# ?
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;9 }) w: _- M% t1 x t# P
( S, d6 C2 w _& Y3 ]2 n; |注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。
5 k5 V: l& {& S' _6 i, y) h9 D! F思路是:
$ k0 i1 g+ g8 K* Q, Q+ L* b% u; Z启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
; U, q* h& F* S; S. s
0 e% v+ v; c% O7 S这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启
: ]; R: |0 z# |3 n- f6 q
; c: a1 d! n) u& k+ R) y: L控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启
2 S( Z$ A$ V$ e1 t# x#!/bin/bash) B" O4 c F* P" Z1 Z
dt=`date '+%d/%m/%Y %H:%M:%S'`- @! C" H: L" N/ B. X& p" d k. w
echo "$dt"( ~& R7 g+ y" \ G. o7 |" `
sleep 604 Y0 v+ p# ~( k5 e/ x
num=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
; o" t# J! x! ~% p0 g& ~echo $num
4 S# I2 W( P2 k3 u# ` Kecho $?
! f! ]$ ~; m: H/ m6 n: `0 s* ^if [ $? -eq 0 -a $num -eq 0 ]; then
1 {" Z: S7 Q$ J* z8 m- y7 O echo "$dt ok" >> /result.txt% j+ K& A( z8 I! c( l
else4 I8 }5 {1 t0 m
echo "$dt noip loss $num reboot" >> /result.txt
# x- z* w) _4 o2 y reboot
2 L1 h1 {7 n) `fi
8 ^& I: s0 ~: e4 e& W: l, R $ U H$ c& K# c0 }7 i$ U; g+ E
第五行,ping后边的IP自己改,我用了一个外网的IP。$ x+ L: i/ x5 y/ w
6 m6 H: L" O& B& Z总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。
8 T, |/ A4 q" O4 ` D( e+ ~) d 9 c8 N4 I# Q5 N9 d, `# R
我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。
1 |" B( d- A& z9 R/ J( u8 N
/ }) H- p0 W1 X9 C3 H! }9 p- i* T还是上边60秒的地方,再加一条
- x; q+ L! ~9 V) f 7 C5 _; y0 m, h( f* B5 T
- G. _3 u% Z0 W% H! k5 P' h
2cset -y -f 0 0x45 0x00 0x55
?) ~) C1 G. |$ H$ A" _# bi2cset -y -f 0 0x45 0x01 0x01
5 I" Y' i. D) O) }$ C6 ai2cset -y -f 0 0x45 0x30 0x07
4 F9 [- C" z. K" j8 ?# b4 X+ g5 Si2cset -y -f 0 0x45 0x31 0x72- r" T" g$ J, n
i2cset -y -f 0 0x45 0x32 0x722 U! Z; e3 ^4 o/ Y8 @2 g) f. ~6 e
i2cset -y -f 0 0x45 0x33 0x72
' i; Y1 [$ e$ ?+ S! e c#调节三个灯灯每周期上升沿和最高亮度时间/ F7 S- l E8 H. a% E- C
#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44+ B2 n+ \- f% r7 R
i2cset -y -f 0 0x45 0x37 0x44" ^5 }! o8 v3 @* G) T
i2cset -y -f 0 0x45 0x3a 0x55+ l- ^( x4 ~2 S
i2cset -y -f 0 0x45 0x3d 0x66
0 ?4 u! k& X `. H3 x#调节三个灯每周期下降沿时间和关机时间$ |3 E; k6 W% c
i2cset -y -f 0 0x45 0x38 0x44
/ K. ]+ W2 R: ]9 X. u4 q) }i2cset -y -f 0 0x45 0x3b 0x55
8 K' {7 {& {8 Bi2cset -y -f 0 0x45 0x3e 0x66
( [" F- m7 C$ |0 i1 i1 J. a$ Qi2cset -y -f 0 0x45 0x39 0x40
% g% F) Y+ k0 d" o5 [i2cset -y -f 0 0x45 0x3c 0x40
& U( a5 h6 U. W5 L) ? l% zi2cset -y -f 0 0x45 0x3f 0x40
6 l% R) J1 k) \! f. }# 0-255,更亮
* n) G+ Z( W5 ui2cset -y -f 0 0x45 0x34 128
) f4 [+ S$ P% k. qi2cset -y -f 0 0x45 0x35 128
% ?# _; f/ C8 u6 q, Z7 |: U) yi2cset -y -f 0 0x45 0x36 128
6 J/ w. n: e* Z: M. p0 ?
9 W, h. z/ V( W' i) A然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯& w( R) n( V- x
7 |8 X+ U3 g5 U0 P V) h
. v7 T5 u. ]' Y' P5 M4 I5 F7 I1 m1 w我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。
2 Q) J$ j' ^1 d" N4 ^ V, `7 j 8 r+ X' p! d5 j
希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。6 G7 i5 m- [/ O7 I% X
|
|