|
|
发表于 2023-1-18 09:18:32
|
显示全部楼层
转发:我好像解决部分猫盘刷群晖后掉IP的问题了% [$ @; c _8 d4 s, U6 C
7 \: M. y2 b* M7 ^, l9 Y% Oaquila9951 K# F8 X$ d9 A9 a9 c1 |; v
1 G Z3 A, F7 J6 r- Z% W
于 2020-06-24 16:37:11 发布
% `' O$ W6 p( F6 g! y7 L. F+ t% `
13215/ g5 z2 R* N; ^3 C
收藏 135 h( w4 g6 Q$ n7 H$ a' j- U% L
分类专栏: 群晖3 w: }' O# T) ^; P
版权- W7 @$ r4 d+ K& Y6 X
& f" D9 o( ?" w8 u% f/ l
群晖, W0 c* J6 q- v9 F& h6 H* J2 N
专栏收录该内容
% ?" g9 |" K* J! r. V& Z J( U# J6 Q% B5 f1 篇文章0 订阅" z v' _7 u: j7 i
订阅专栏
+ J6 \* }9 G4 B. K6 j. [3 P我好像解决部分猫盘刷群晖后掉IP的问题了
; l+ }$ \! H1 S
/ m+ H. m, \: g; [) y4 P- ?我好像解决部分猫盘刷群晖后掉IP的问题了) I' w6 h$ k3 Y$ B# l
0 [1 O( w2 M; H' Y
先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。
8 H8 b' V+ o, h8 x然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。
/ v1 v) ]( n8 m/ Y: S 3 @- X' b# F( A( c/ g
跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。- n" ] r, R* r4 H$ `
/ \3 Y4 S5 Q& X4 N. e+ O
然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。# F7 o! | w5 o& F* O
8 T2 w0 W& H' q% `8 f; c2 e. G7 j7 i, I
先看了下有什么可用的命令:
( r! n: E4 r4 Y' ^' A
5 _* T" q( z) @- m7 ZMarvell>> help
( a, Q% v7 d; i$ e0 {9 C6 f? - alias for 'help'
# @. V& ]9 _( j4 Fbase - print or set address offset
' x8 b; L& z: R- ~* Mbdinfo - print Board Info structure
, ~" y y' d P/ C2 _blkcache- block cache diagnostics and control
% ~ w, o r6 n: ]4 [boot - boot default, i.e., run 'bootcmd'+ N+ B: W. {/ X
bootd - boot default, i.e., run 'bootcmd'
" b2 Z$ c4 F: z1 b! j2 Q* bbootefi - Boots an EFI payload from memory
) r E1 h f9 R, U" n0 I1 J9 sbootelf - Boot from an ELF image in memory
& K$ \% n$ m; V6 U& H& o3 bbooti - boot arm64 Linux Image image from memory
; _9 v4 W0 z; s! ]: K) t0 O. ~bootm - boot application image from memory- Q- [: t, w+ u" u3 k
============================================================
" Q9 t$ f; H* m6 z% ~1 ` Jbootp - boot image via network using BOOTP/TFTP protocol
# H' a$ I) W4 [5 @' i============================================================
! p! b8 i3 T0 l; ^$ z1 g4 ]bootvx - Boot vxWorks from an ELF image
3 A8 s8 J( Y; ~bubt - Burn a u-boot image to flash9 U0 x" C3 _6 J& _
cmp - memory compare- p& ]8 w5 H4 ^
coninfo - print console devices and information
6 u6 P! v5 K9 i+ Ucp - memory copy3 g# f' S& W; d* T2 ]
crc32 - checksum calculation4 S, O& j' p! @ a' R% y2 u
dcache - enable or disable data cache
. F! _9 e2 n; d1 m-------------------------------------------------------------( P; D" ]) R, u: b4 [* ?4 A
dhcp - boot image via network using DHCP/TFTP protocol
2 S9 o5 O; h! F( N1 u! r/ L% J-------------------------------------------------------------7 { e4 f& _, W8 q# k" }2 P
dm - Driver model low level access
/ o. o3 T8 p; ?0 Y& e. F! becho - echo args to console7 Q9 d- z2 }1 E- E7 p
editenv - edit environment variable+ u2 M# w, K0 u. u8 [7 o" V! }- ~5 @- R |
env - environment handling commands8 `& _, s3 _6 w: Q
exit - exit script
' N6 y# p0 W3 {; Qext2load- load binary file from a Ext2 filesystem. ?. a8 M I0 c( h( u( T: \
ext2ls - list files in a directory (default /)
! G6 z) ~! _# X7 p9 W: j# gext4load- load binary file from a Ext4 filesystem% j# k. F" U, h6 C/ y- E
ext4ls - list files in a directory (default /)( ] ]$ S! ]" n& ^% L y+ r
ext4size- determine a file's size* n7 R C/ |! n! b) Z V
ext4write- create a file in the root directory
6 K1 V- t- y! o% I6 n, [false - do nothing, unsuccessfully% M3 e3 ]6 v# X! H6 i0 v
fatinfo - print information about filesystem$ h: I+ c) ~' V) J8 ^) p
fatload - load binary file from a dos filesystem
4 \$ W' M' M( _, x# @& wfatls - list files in a directory (default /)* S: {/ F9 Q2 ~2 H5 g T+ v6 f6 T
fatsize - determine a file's size/ T G& k, p) G8 E) j* q7 x/ J5 Y
fdt - flattened device tree utility commands
3 e; e/ f; e1 k |, e( n$ zfstype - Look up a filesystem type
5 A. O/ x! b6 a! r% N% d# Xgo - start application at address 'addr'7 c7 w: o- i. v
gpio - query and control gpio pins) d4 h. n# K/ x9 }9 K; s b, m3 R
help - print command description/usage
) H7 n5 _8 J- r0 mi2c - I2C sub-system
% f: N, Q$ y9 ]3 }) M. Hicache - enable or disable instruction cache7 p2 p t4 d; m- B
iminfo - print header information for application image! j. w; r* X. _4 O
ir - ir - Reading and changing internal register values.+ W- L$ K* y: R. B+ ?( L8 _
! B1 z- `5 p9 E+ C; A
, k: Y5 y% e+ k- r( a; [2 V. I/ ~itest - return true/false on integer compare; A1 U! m/ _# \4 `* q8 \0 c5 R2 Z- }
load - load binary file from a filesystem
& C3 ^4 ]9 x; Z/ e' zloadb - load binary file over serial line (kermit mode)8 w( y5 A: ?% n* \4 c% V
loads - load S-Record file over serial line& c9 B o. a8 O" C6 R
loadx - load binary file over serial line (xmodem mode)
8 m& R! _+ S6 j; Lloady - load binary file over serial line (ymodem mode)% x9 H2 n! ~( K5 I/ s
loop - infinite loop on address range
: o0 P9 z- v8 B3 J8 J; uls - list files in a directory (default /)
' D+ P) M& X! g, Y3 llzmadec - lzma uncompress a memory region
7 L k7 q. Q) J# ^+ E* Cmd - memory display* z e2 W; A5 `" b
mdio - MDIO utility commands
& q/ h0 e8 e8 X3 V- G0 vmii - MII utility commands5 y% B- J& _1 o% M0 X; ?0 B) l
mm - memory modify (auto-incrementing address)2 C4 v0 Q1 t0 I ^4 e0 }3 Y6 D
mmc - MMC sub system
+ e! Z8 e- Z) C3 C0 M0 lmmcinfo - display MMC info
! e3 r1 ?* P$ k/ ?* jmw - memory write (fill)! g# ~; k/ ], U" l7 x& i) m
nfs - boot image via network using NFS protocol
) e$ I3 }, s7 U/ g7 m1 Z& O( Tnm - memory modify (constant address) }$ \8 q# k& d. f9 y- K% ?
part - disk partition related commands `4 @; [5 X1 ?, u9 P% [1 N3 [5 R, R
ping - send ICMP ECHO_REQUEST to network host
' s3 R l; A, f3 `# Uprintenv- print environment variables4 |% f3 y- h& U7 S& @( E# i
pxe - commands to get and boot from pxe files
3 [& c3 E7 \# j0 D7 o, D( ]2 uregulator- uclass operations4 S% N- y6 B1 |/ A" t' T
reset - Perform RESET of the CPU
, _! h# ^7 v* y/ d0 vrun - run commands in an environment variable
; f( c: m0 X( o! E" u1 M) V9 {. ~save - save file to a filesystem+ }* G t7 i2 q2 O: s" j
saveenv - save environment variables to persistent storage9 w4 K) ~/ ^0 U0 G/ C: [
scsi - SCSI sub-system
/ T$ r* B6 K- rscsiboot- boot from SCSI device: I: M. z" c# D: ~
setenv - set environment variables' o/ p' N8 P0 @
sf - SPI flash sub-system
. |4 _& n/ l( ~+ K8 Hshowvar - print local hushshell variables
0 ]5 N4 r7 Z' z! gsize - determine a file's size% p0 D' j4 y- I/ @) _) |
sleep - delay execution for some time
) o) I( j \& J+ V6 t% b; hsource - run script from memory1 m# \' G- `: R2 O
sspi - SPI utility command
) |% W- \0 j: f% K6 M) L* lsysboot - command to get and boot from syslinux files ]# z% r6 c! P S/ Q: Q
test - minimal test like /bin/sh
: {* `; b) y5 W4 Utftpboot- boot image via network using TFTP protocol* |2 x X7 d. Q; Z: T5 G A2 a
time - run commands and summarize execution time
k0 Y3 p6 M* x( b8 r4 Btrue - do nothing, successfully6 a1 t' t. E; L0 U% U
usb - USB sub-system& X2 |( P/ o/ J) V4 B
usbboot - boot from USB device: o" S c8 `; @
version - print monitor, compiler and linker version% C: K9 x1 b n* q1 N
/ O* l+ g# h `* e' g- l! K
发现了gpio! A. V9 S o0 ~4 V: ~8 h. t
, O. c6 K/ h+ p8 P% varvell>> gpio% o3 W; I# e! I( }% f m
gpio - query and control gpio pins* V: N/ n5 D1 |1 y0 H( Y, |! b
0 p8 f! I' P+ n/ U% B) l# d
3 s* N4 V9 F9 h5 GUsage:# I( L4 F& m5 q: B( o/ s% K
gpio <input|set|clear|toggle> <pin>2 `3 K0 H- u4 p8 A- R: z
- input/set/clear/toggle the specified pin# W3 E& p' T. X+ T4 p
gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
2 B, O* m6 K% O3 N4 a" @( J% G) F + c6 z9 J1 O2 q2 D9 S9 {
' |- P9 M, F+ l4 P( n5 `9 |Marvell>> gpio status
1 ?5 Z# C- ^( T) c9 O, F& P- BBank GPIO2:* C% `) n& n2 o/ T! h. {( C
GPIO20: output: 1 [x] sata_pwr
7 T( }* N. ]3 j- wGPIO221: output: 1 [x] phy_reset& t. m1 l7 ?6 I8 K
) a9 [- o" h" L/ l* {( j可见的io脚3 b; n+ l5 ^. N- }' d2 {/ G- U
% i4 l# u7 x: G0 f! R- ?
Marvell>> gpio status -a' G2 w9 E7 q; t- c2 o: b8 @ e, P
Bank GPIO1:
7 w" L1 [! Y2 e6 F) J& wGPIO10: input: 0 [ ]" D4 _5 [1 j6 g- |7 P
GPIO11: input: 0 [ ]; Z2 X9 a" `2 k9 \* r0 U
GPIO12: input: 1 [ ]; J; H4 C4 h7 y8 w. U0 p" S! y
GPIO13: input: 1 [ ]. _$ B+ [- D5 Z
GPIO14: input: 1 [ ]2 H% Z2 n }- N; j6 d1 T
GPIO15: input: 1 [ ]4 i" M5 V* C6 F! p
GPIO16: input: 0 [ ]
1 Q7 B) ]: r L2 d4 _GPIO17: input: 0 [ ]! c! e( Y# }* Q. g
GPIO18: input: 0 [ ]
# T2 F. s3 k/ E% `0 e$ w2 Y, ZGPIO19: input: 0 [ ]
) V5 ~3 y2 x X8 U; p1 \5 _GPIO110: input: 1 [ ]
5 B' k2 G& {9 K- s: kGPIO111: input: 0 [ ]
' h: T0 t' ]2 yGPIO112: input: 0 [ ]
: \$ J" W/ z2 l" B: F/ X1 Z" MGPIO113: input: 0 [ ]0 a A0 e+ T8 I* V
GPIO114: input: 0 [ ]. J5 A/ F) s# }& @% n; ?
GPIO115: input: 1 [ ]
, G& f5 U3 l \ W [1 y7 e( B# gGPIO116: input: 1 [ ]
7 c& `7 M. y" g4 W( J" n KGPIO117: input: 1 [ ]# |7 S6 r) R; B8 t
GPIO118: input: 1 [ ]( d: K# X# f( M- m
GPIO119: input: 1 [ ]# w2 H* i6 e8 C5 z) x. W- U
GPIO120: input: 0 [ ], {! S, s. y4 f' F
GPIO121: input: 0 [ ]% i: t) B5 Z" |
GPIO122: input: 0 [ ]. F- p9 ^1 X- H- l B/ P
GPIO123: input: 0 [ ]
; y! c8 v8 {8 Z: m2 O% F) RGPIO124: input: 0 [ ]
* o! j5 Y& |/ k3 f& I. A4 sGPIO125: input: 0 [ ]
0 f% a# _7 ~) X4 p* tGPIO126: input: 0 [ ]
; `0 m6 T7 J, y/ H' J* |7 S: ^GPIO127: input: 0 [ ]8 `# m# f* W$ [4 N* O$ j8 Y. R2 W1 R
GPIO128: input: 0 [ ]
0 Z$ I" ]% H9 @, f8 g) I d1 nGPIO129: input: 0 [ ]5 P& E: S6 c! o
GPIO130: input: 0 [ ] m" p) v, X1 e8 C
GPIO131: input: 0 [ ]8 ~7 H) u2 [* ?# ] Z" c
GPIO132: input: 0 [ ]" k( n" R8 f1 c: ^
GPIO133: input: 0 [ ]# c# e' L5 d+ ]$ ?
GPIO134: input: 0 [ ]$ A9 m& }" W0 d' o; q# a
GPIO135: input: 0 [ ]. m; A$ ?. P# b" G# W: `5 b
5 Q, [. J5 w" n$ X y4 w
2 _- i: C: V! Q; j2 m: I& W8 x3 LBank GPIO2:5 T# B6 B+ [" ~% F @. ~& W: t9 ?2 {
GPIO20: output: 1 [x] sata_pwr& j5 W9 _4 s' |% W6 \' U
GPIO21: input: 0 [ ]
- A% Y. p W4 r; {& ]GPIO22: input: 1 [ ]
7 A7 ]9 Q! @" P2 `! ^; e5 _GPIO23: input: 1 [ ] K5 Y( A$ u1 w' x
GPIO24: input: 1 [ ]( a; j4 I. A. p. G+ D9 e6 Y% p
GPIO25: input: 1 [ ]) t1 o, R7 y4 t5 n; }
GPIO26: input: 0 [ ]
, o' M- G4 G" n+ W! ]* h% UGPIO27: input: 1 [ ]
0 A6 F4 W; K3 Y0 \* PGPIO28: input: 1 [ ]
- ]- ~6 W% ?. e; W8 TGPIO29: input: 1 [ ]& l; \# ~8 O2 g$ O% D" g
GPIO210: input: 1 [ ]* G& L2 N6 w) M0 P) {1 x
GPIO211: input: 1 [ ]# ~# k- _. n7 v+ w- E( W
GPIO212: input: 0 [ ]+ {" b, x3 f6 B: n0 g
GPIO213: input: 0 [ ]
+ X! R* v: v2 B# h% v! @" CGPIO214: input: 1 [ ]/ u/ z* i+ h# C+ V5 N( {9 G8 g
GPIO215: input: 1 [ ]
; w( b7 P& v+ J9 nGPIO216: input: 1 [ ]! Y6 G) A* F* v/ Y0 n* W6 A
GPIO217: input: 1 [ ]
$ P' q/ o( B: g9 E1 DGPIO218: input: 1 [ ]
# M2 }5 r0 }$ @1 }& {+ w' Z( @3 B& {GPIO219: input: 1 [ ]- g' r: _" f* m6 b8 D# |
GPIO220: input: 0 [ ]
2 N: f, m2 B# L7 d7 @) GGPIO221: output: 1 [x] phy_reset
# ~$ v0 Y4 |, Z# K9 s! `: z: OGPIO222: input: 1 [ ]
+ E5 V- Y) ~, E1 c4 Z3 [GPIO223: input: 1 [ ]
# y4 e3 ?% v& T5 J A5 i8 LGPIO224: input: 1 [ ]
u2 @. B5 v D j& @GPIO225: input: 1 [ ]
, G M* ^ x- h7 e+ f1 }GPIO226: input: 1 [ ]9 T3 G- ?, E3 i' D! F8 x
GPIO227: input: 0 [ ]9 m3 v. e' t( U3 b+ |
GPIO228: input: 0 [ ]
& q4 f# z! i1 s5 i. }GPIO229: input: 0 [ ]
' J- y' E, U! g 5 a9 Z3 s7 j1 q: k8 S6 h2 ]' _
别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。1 ~' [: s' S t9 j3 `
2 _9 c; k8 f+ `1 q
Marvell>> gpio6 p( s3 J6 P; O
gpio - query and control gpio pins
5 k/ S' f8 j# e2 X0 \% e; e
" ?- u) h8 g5 K A & _3 J( j2 P1 H: | K
Usage:
) A4 k4 B0 x) S' i, b% @gpio <input|set|clear|toggle> <pin>
% I# T# o5 @1 p- J2 E - input/set/clear/toggle the specified pin
7 x5 x, w8 }+ @3 r4 Z6 j# m, T8 Kgpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
8 D9 w8 G t8 X, Z$ H' Z
# }7 y& P7 j9 S5 kset是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)1 x; @. U# s8 r; P, K
. K; @& l0 c5 T6 u/ y然后看到env有地方是参数设置,类似dos的环境变量吧
+ o8 P `& |0 \ 2 {6 \, V1 a7 L6 m2 s% `
Marvell>> env print$ t( ~3 Q+ M) g8 c$ s
arch=arm P. J2 E E5 `; s/ B. X6 d: {
baudrate=115200
5 \) d3 g2 w6 S$ w* l# U- gboard=mvebu_armada-37xx
6 U9 h1 k' Z. T3 E3 o+ zboard_name=mvebu_armada-37xx
5 L0 v- N9 P* X/ f2 sboot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};1 S( Y2 V! T- H
boot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};" m3 S2 Q" n+ q& ]1 X b( q" M
boot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
( M% T6 |6 Q$ lboot_targets=usb mmc0p1 mmc0p2 sata
( k; q/ r9 O' z1 Iboot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
7 o5 \% _! U& Obootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi8 H# s- v( t) H4 G
bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;
; C6 I- K8 ]4 w) N, _3 s$ vbootcmd_normal=run bootcmd_syno;5 P& {; T& Q( J6 ^4 D& s& f g
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;
9 s2 j- U. g7 k$ e! nbootdelay=1' c# P0 U& e0 W5 l6 ]; |
bootdev=scsi 0:1
. M. t9 \9 G: }* U, zconsole=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000% N h( T2 e$ v8 E9 l
cpu=armv8: j" Y& n% Y& K0 I6 L
ethact=neta@30000% s% b! E+ q3 N& S0 w# {+ d5 d0 h* w
ethaddr=00:11:32:11:22:00
2 @6 p7 o* x `7 x% F/ c" Wethprime=eth0- L" C s; L3 u* s* ?* T% c
fdt_addr=0x6000000. r: Z2 K: j2 j) N
fdt_high=0xffffffffffffffff/ K( }4 W! ?( ?5 I3 E4 A9 Z# Y
fdtcontroladdr=1f6437d0
- v5 s3 T: Q, f; t$ l( m3 _gatewayip=192.168.1.254
; p9 _4 C4 }& l( |0 V/ a- s+ bhostname=catdrive$ U5 k3 |0 z2 ^. F
image_name=/vmlinuz( Q9 [! U8 T( e# a7 B
initrd_addr=0x1100000% G' n+ |' p# P& `/ s( x. u
initrd_size=0x2000000
' Q5 w8 q) l! D5 G) E/ Gipaddr=192.168.1.119+ f9 F; J& Z1 [6 H5 R8 Z
kernel_addr=0x70000002 O/ R" H4 g( s' T% t
loadaddr=0x8000000
2 [& f) {5 L; O& Fnetdev=eth08 s3 S. o4 ^1 L, D0 u
netmask=255.255.255.0
9 z$ p, N) m" I0 brootpath=/srv/nfs/: L/ b( j. G( K, a# W
scriptaddr=0x6d00000
3 o+ {1 h0 t9 m( S5 oserverip=192.168.1.254) d8 x3 J; s K8 S& p+ m
soc=mvebu) |. H3 m$ h* M! E( z) @& H6 D6 z
stderr=serial@12000
2 q! W8 {( m6 \" a9 @stdin=serial@12000
* b4 o( y/ d3 J- F E! Sstdout=serial@12000) j7 |# N+ n) |
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
- Z; q7 ?5 o, Q* v3 jvendor=Marvell; I; o- [+ r& ^
) r9 Q2 O3 D* `
, M V- r. |, |' w6 Q9 @
Environment size: 2001/8188 bytes) t, x6 F1 H3 s+ c
Marvell>>+ |1 h9 F0 R% a5 S! _0 n
# ~) K4 O- U _$ \6 h1 i看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.9 K& |3 l- O' q u1 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;) {3 ]+ r# f9 |& l& q9 ^5 F
1 I- G$ ~ K |5 Z& G, J6 \( C
这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了
( F) Y q$ v' S- X5 fbootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒8 V4 K6 s0 t# e0 d0 A9 Q! j3 L3 M
" W. {' F. @; V! o0 w+ D& I
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;
7 @* g* A1 h: ~0 K$ R 8 D& d' f' [# \4 M j% Z. P
注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。
1 D" o! {9 K/ t$ n# z' X思路是:9 W% j0 R% j% W. W2 ?; J3 Q
启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
2 S! t' O) ^1 Z5 I0 p/ y/ b
C0 i Q9 O. O) f- ]! ^; s7 j这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启
i8 f" V x, w+ M b6 Y$ s . e, ~6 @+ |4 v' z$ L
控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启7 N# p4 \0 T0 E O
#!/bin/bash
5 Y" a/ w0 \5 t, L. A" Pdt=`date '+%d/%m/%Y %H:%M:%S'`3 q2 e5 u5 m3 q4 b4 _
echo "$dt"
# y$ t3 R d7 g! h9 B2 v# Osleep 609 R% i+ K* ]! O% Z# ^
num=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`3 i. ]2 a: K% t1 i* }
echo $num
- E) n! t- P4 W1 ?echo $?. E- ?# \: a2 e. [( E
if [ $? -eq 0 -a $num -eq 0 ]; then: J. E5 {0 V9 V/ d Z6 |
echo "$dt ok" >> /result.txt
* L' e' V n, ^. relse
! A- U. \, R" o echo "$dt noip loss $num reboot" >> /result.txt6 b5 x- x$ n6 {1 }* E( u& c; w' f
reboot1 a8 ~3 x: `$ N- u) O. X, H) j0 G. D
fi
! S) ]% P k; U1 y" |5 t
$ Z, \- z' ], K$ O+ n: F& a7 f4 n第五行,ping后边的IP自己改,我用了一个外网的IP。, d3 B$ B+ r5 t7 l4 O6 Q
: P! W) W& z3 H f% Q0 q
总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。
" ]) ]! P! w8 @* B! ^3 h+ _ 2 G7 b/ O j2 n* P
我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。; x: [5 g3 f' ^& v/ w$ H; i/ ?0 w
: N. @5 X6 y; q Y `. Q还是上边60秒的地方,再加一条7 W9 U9 d" y( r8 i8 O; y% Z
; J: Q9 f7 D5 d- p$ m, J- r: w+ d
, W7 K* b8 E+ x1 l8 {% F8 c! ~* G4 D5 B
2cset -y -f 0 0x45 0x00 0x558 q; S% I! s0 H! m/ O
i2cset -y -f 0 0x45 0x01 0x01& M7 o3 |; V% ?
i2cset -y -f 0 0x45 0x30 0x07* @0 h, z0 b% B0 v
i2cset -y -f 0 0x45 0x31 0x72
1 P+ m0 g! _) y; s) j6 @i2cset -y -f 0 0x45 0x32 0x72# ?" z7 `0 c! e4 l) l
i2cset -y -f 0 0x45 0x33 0x72$ J! w( ] V& [6 S
#调节三个灯灯每周期上升沿和最高亮度时间& F- ] C2 j6 q/ j
#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x447 G' J/ h/ G/ q5 t" k) c4 f1 f
i2cset -y -f 0 0x45 0x37 0x441 ]8 Z7 D; j) G8 E0 J! \. _
i2cset -y -f 0 0x45 0x3a 0x55
4 c! n0 a Y; n/ F% @; Y: Si2cset -y -f 0 0x45 0x3d 0x66
, Z- S( B7 ]. o0 j# {#调节三个灯每周期下降沿时间和关机时间
- ^ b6 w5 W% {! ~( O! |, R! si2cset -y -f 0 0x45 0x38 0x44 H* k2 o: {# P; E5 D
i2cset -y -f 0 0x45 0x3b 0x55
D+ ~* t4 }8 M0 Li2cset -y -f 0 0x45 0x3e 0x66
5 G$ s) b5 Q3 L7 r! I! Ei2cset -y -f 0 0x45 0x39 0x40) r' U+ ]" b" m9 o n8 m& C
i2cset -y -f 0 0x45 0x3c 0x40
# e6 ^- _% z# w0 T, f) vi2cset -y -f 0 0x45 0x3f 0x40) p' u, x/ E& l
# 0-255,更亮
) _+ A+ L+ S8 x* M5 c5 oi2cset -y -f 0 0x45 0x34 128, Z7 g8 ?/ c6 c- E) K2 b
i2cset -y -f 0 0x45 0x35 128
2 I( y2 Y' T" A+ Ji2cset -y -f 0 0x45 0x36 128
9 R! h* ^: a7 U' B' T : D( X# x/ B. B' l
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯7 s7 a7 V0 p8 g4 d$ ^/ @2 K- ^
8 |7 n6 ^ v s1 F2 s1 \
! z" {, S/ K4 ?6 A1 P我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。
{3 F. Z7 g9 l6 L
4 e3 x' ]) {3 _+ n2 M$ n% J* j) ]希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。
( X2 s; H6 }& b( r% z& W3 F |
|