|
|
发表于 2023-1-18 09:18:32
|
显示全部楼层
转发:我好像解决部分猫盘刷群晖后掉IP的问题了
5 D V+ Y6 w% s; R8 n5 k4 f' Y
' u2 N) l8 X" @: R% ? jaquila9955 J! {' F( ^! @- l1 a
2 W! z `) E( P+ j# ~4 N于 2020-06-24 16:37:11 发布
; O1 m# J# U4 r/ `5 N* U, ?
% j2 I+ D" z" _! E13215& i Y' P F" z/ ^
收藏 13) I9 S) F8 i4 J
分类专栏: 群晖
5 s; H. h' J; ~; K/ e版权3 }. v5 a; x$ B* h% D' w" ^
/ B/ e: C1 _! v4 i群晖: m: \; {! J$ o0 k; [/ C
专栏收录该内容
$ C" M1 }4 S8 }8 g' ?2 @1 篇文章0 订阅: x) g% i% a6 k
订阅专栏
9 j; k# j0 R. s: F我好像解决部分猫盘刷群晖后掉IP的问题了3 }) D& K) ?* L4 b
0 ? Y1 H5 e! @) {& H4 ~ l6 N( w0 t
我好像解决部分猫盘刷群晖后掉IP的问题了
, ], X" v8 L3 u+ y, r9 Y
& k% r: _" A2 b7 ^/ P8 F3 v% x4 i先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。$ H$ N- E2 ] t. i' g3 p
然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。
6 s7 t" T, ~- H% \7 M5 Z$ `
: K7 f9 ]6 O U跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。 q4 V5 _3 X& y: F. j j* P
1 u# }$ {0 X( K' l然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。2 r+ I8 o6 f0 L6 G" l+ g/ h
: c1 @! d( X9 _6 c: F0 b4 o: i- t/ m5 m) S先看了下有什么可用的命令:1 Q6 i. g3 [9 p' v6 X9 [ T3 K
3 m/ ^4 U- Y: D! @$ A+ Q @
Marvell>> help
/ N: d; [# u2 x& S+ Z# y: g* N? - alias for 'help'
2 f b9 l( u0 ~base - print or set address offset
1 l! `0 u$ N* R9 N1 C2 r7 tbdinfo - print Board Info structure
: Y- Y, A7 z- Cblkcache- block cache diagnostics and control3 L: V. L, v6 c4 V: D
boot - boot default, i.e., run 'bootcmd'& x& r. W! R0 |5 D, y/ y
bootd - boot default, i.e., run 'bootcmd'$ V8 x+ x0 ~; e6 o a3 `' U) |
bootefi - Boots an EFI payload from memory3 V* V6 ^; i( y2 X
bootelf - Boot from an ELF image in memory
" G( \3 a* G6 \7 Y. O- Ybooti - boot arm64 Linux Image image from memory* U/ F/ U; I: e/ W
bootm - boot application image from memory
& l: M! {6 y1 R1 g$ h8 m( Q============================================================
3 P4 ]0 O% U8 i' I' r4 i/ ]bootp - boot image via network using BOOTP/TFTP protocol
* D5 Y6 P! h% ~============================================================7 |$ f& y6 u1 s+ S# x- l4 r3 G
bootvx - Boot vxWorks from an ELF image
1 }; U1 c( F. d2 T% ~% P, {/ ~, Gbubt - Burn a u-boot image to flash
; J% x/ `& e% Z# D& i$ pcmp - memory compare- R" e. v% @" X' u
coninfo - print console devices and information9 M6 F9 P3 I& W7 k$ {
cp - memory copy
L8 F& _/ {1 v8 }" A4 scrc32 - checksum calculation5 U+ L9 n" k6 ~1 s9 T
dcache - enable or disable data cache
! ^& e8 m8 r3 f3 Z. K-------------------------------------------------------------. W' x7 b) X& Z2 u3 f5 m% s# I
dhcp - boot image via network using DHCP/TFTP protocol5 V9 N4 I4 b. N' X. M
-------------------------------------------------------------
, m' S7 _ ?. i) y7 H: ndm - Driver model low level access
5 a5 c# m( @3 W; m9 F6 T b& {7 eecho - echo args to console! _0 @ r6 T. u4 \
editenv - edit environment variable) _. E- m9 a+ Q$ H5 \
env - environment handling commands
! r5 ~; x6 V1 r% m1 Jexit - exit script
. y2 J/ z0 d/ C4 Z% a( ^# lext2load- load binary file from a Ext2 filesystem
1 L: j5 t9 E ~. ?9 pext2ls - list files in a directory (default /)
( _( q( n A" g6 ^1 Z: o. d) a2 G) h, Kext4load- load binary file from a Ext4 filesystem
+ ?" z% l) d9 {) eext4ls - list files in a directory (default /)# X2 E- _% g9 p( v0 P T
ext4size- determine a file's size0 q# I7 {1 v$ ^% f/ P( o/ K( ~2 N
ext4write- create a file in the root directory8 Z+ F) C0 d9 c
false - do nothing, unsuccessfully; N) n1 m+ G/ T! k" ~
fatinfo - print information about filesystem* w8 ]) e m) A. V7 \
fatload - load binary file from a dos filesystem
3 \ }6 H- \; ?) J0 G( d) M+ ]fatls - list files in a directory (default /): q/ c0 b) p$ K2 m8 g
fatsize - determine a file's size, x) D; j( _ M7 s7 Y
fdt - flattened device tree utility commands
4 D" @" |6 w2 b9 O/ d! x" b- P+ ifstype - Look up a filesystem type2 J6 X7 Y. w; R
go - start application at address 'addr'6 W8 r* L$ H# p- b' Y
gpio - query and control gpio pins
9 x$ V7 W- d( R& q. E1 u/ O+ Hhelp - print command description/usage
: H4 e8 M1 _& E" h2 {0 W. vi2c - I2C sub-system$ ~. G) D' l# W5 T9 E+ ]
icache - enable or disable instruction cache6 A# c. D" S- @0 a3 e% t, k1 B
iminfo - print header information for application image6 k4 H) I- t7 g3 a# [
ir - ir - Reading and changing internal register values.( n) X1 j7 f$ {4 q
! s9 Z" K. _) Y, H; y* p5 h& Z " ?* P2 T# Q* N6 p
itest - return true/false on integer compare3 |/ e: S& I5 w
load - load binary file from a filesystem
$ g6 E4 J/ Z1 i, w/ `* S L" tloadb - load binary file over serial line (kermit mode)& L$ ?: W) B* J, r' I6 I9 L1 Z- r/ U
loads - load S-Record file over serial line
o- C$ |- X! e* M/ R' xloadx - load binary file over serial line (xmodem mode)* B) K# g X6 v8 k% z3 }
loady - load binary file over serial line (ymodem mode)5 B+ `8 c- }! p6 W
loop - infinite loop on address range
! D. W* q4 C2 g7 q: E. [ls - list files in a directory (default /)6 y: g7 X4 j/ u
lzmadec - lzma uncompress a memory region
/ X; \: m# j* f2 [/ G4 hmd - memory display: [* Q- I, U" [% x& F7 t5 Q
mdio - MDIO utility commands% E" H' w- d4 D2 ^! x4 M4 c2 G
mii - MII utility commands P2 E* d# [( E6 a( u7 q( @3 ~
mm - memory modify (auto-incrementing address)/ ?# V% E8 m8 G7 S. g$ ^' O; U
mmc - MMC sub system( @% v4 n. I* l. R2 I, L- K
mmcinfo - display MMC info) [) f/ t/ N0 d- k. n* T! m9 \
mw - memory write (fill)
% Y2 P5 f3 E3 q2 L2 ]nfs - boot image via network using NFS protocol
" A2 m/ n) i9 h. ]4 k( znm - memory modify (constant address)
. w0 w! c& P& I) qpart - disk partition related commands9 U" V! a5 b$ K' Z. ~( p
ping - send ICMP ECHO_REQUEST to network host# \& F& g, `% T* e" K0 l
printenv- print environment variables
- u: L* K+ p" e( P3 `pxe - commands to get and boot from pxe files
; D) O6 B! ^. u4 x$ Dregulator- uclass operations
4 [9 }, z4 s: L O0 ~6 j. b Greset - Perform RESET of the CPU" X2 G$ ~7 U6 _- }. ~
run - run commands in an environment variable5 L: t7 E! C* B/ K
save - save file to a filesystem8 A/ z: w7 j, X6 e' w
saveenv - save environment variables to persistent storage
" s9 J; |# |7 }- b% u1 ~scsi - SCSI sub-system% f3 [9 u& n1 p" D$ N$ @
scsiboot- boot from SCSI device
& ]8 O3 s5 q+ n' i! asetenv - set environment variables3 S9 o. ]/ T8 T ^/ @1 d9 o
sf - SPI flash sub-system
4 e0 h+ E9 K7 `6 [3 ^* z' F3 K; \showvar - print local hushshell variables! B5 Y3 J8 U5 ]0 W) d
size - determine a file's size
( U2 [( \3 p+ A: _; jsleep - delay execution for some time
0 C! T; `: ?4 r: v n8 v) J9 i9 k! tsource - run script from memory
7 y$ B( ^ Y, i, \/ A) Psspi - SPI utility command
0 {( F! ?& p5 G& j Zsysboot - command to get and boot from syslinux files
' Q1 R/ {- ~5 y0 u4 Z6 F0 R7 H. otest - minimal test like /bin/sh4 p$ N" e0 }1 ]6 T# ^9 c
tftpboot- boot image via network using TFTP protocol+ C+ p$ P+ w5 ~
time - run commands and summarize execution time
9 t. T( r# J: ?. V% w: K/ x" rtrue - do nothing, successfully
2 e. v9 C8 \5 i- `% Susb - USB sub-system* |1 y5 \- c8 ]$ O! d
usbboot - boot from USB device
* J1 i$ Y; K; A: |0 Tversion - print monitor, compiler and linker version
, Q; N9 i- Q4 K
; V# K! ^2 i7 T发现了gpio$ w, F* p4 `3 O+ L n
R% f. ?: @& z" X6 Aarvell>> gpio
& Q7 V: u O8 D/ B1 Bgpio - query and control gpio pins# U; O3 U. `) a
! ]/ {: ~1 A+ R
# q' C2 J1 q- f' I+ mUsage:) U0 g9 S0 W3 k$ G2 }, o$ X
gpio <input|set|clear|toggle> <pin>
. A9 G5 \2 \, j$ L+ I - input/set/clear/toggle the specified pin
. @# T! ?) Q% A+ j' J7 l# o0 igpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs4 e- w( g* M% }* B4 K! O+ b
[8 Z& D9 s. }6 _" }- Y7 y
& b% }4 n* x- j/ aMarvell>> gpio status1 r0 F C8 K+ ]4 Z" B: M6 a
Bank GPIO2:; D% a& ?; i3 F1 V) p. Z6 p! Q6 I
GPIO20: output: 1 [x] sata_pwr- {1 T! H. U' }$ ]4 E( f* U: K
GPIO221: output: 1 [x] phy_reset
1 K/ Q, k8 w ]( D
4 q! l7 `, S* Q! x7 R# c% Z, M可见的io脚9 \( p- E! s. I( O- U8 V
- J- `6 P% c$ EMarvell>> gpio status -a
2 [. |* B5 o3 A$ z) G' tBank GPIO1:0 k/ V0 i+ `1 d" u: y3 U! t
GPIO10: input: 0 [ ]
5 `1 D) v0 B( a; n) TGPIO11: input: 0 [ ]
6 `, C2 b& t* m1 vGPIO12: input: 1 [ ]3 f) k9 B) u5 |0 F- a9 d, Q; [
GPIO13: input: 1 [ ]- p8 X: S) u/ }( _
GPIO14: input: 1 [ ]( c6 U1 q1 @! f# M: g3 {
GPIO15: input: 1 [ ]
- Y& B1 }7 L" n, R6 NGPIO16: input: 0 [ ]
y/ b/ a: V+ p% c! ?: S. H& tGPIO17: input: 0 [ ]
% @- k, D8 k/ P, c( G; xGPIO18: input: 0 [ ]
5 s: G5 Z# U7 a* z' tGPIO19: input: 0 [ ]
0 P5 |4 f' @4 {3 [GPIO110: input: 1 [ ]
5 A. t( [( U: {5 O) x0 uGPIO111: input: 0 [ ]
+ M9 c- k1 S! S" zGPIO112: input: 0 [ ]9 z- q- N' T! j* v2 i3 v8 s. R
GPIO113: input: 0 [ ]
5 ~5 N6 B7 h2 W" h; U$ I8 V" NGPIO114: input: 0 [ ], m' \& o) r! ]4 H- E( e
GPIO115: input: 1 [ ]
/ g" c" @/ N5 O/ q4 C% mGPIO116: input: 1 [ ]5 t% O6 M' G. E; Y" j& i& s
GPIO117: input: 1 [ ]) i% ^% }' ]$ S8 {* k, U: ?
GPIO118: input: 1 [ ]; R1 o( G, @9 }, X
GPIO119: input: 1 [ ]
- j' x9 m2 _ OGPIO120: input: 0 [ ]" F* M- w9 s6 s7 s: I
GPIO121: input: 0 [ ]2 n% q" O1 K) ^& I+ t* S4 k
GPIO122: input: 0 [ ]
9 h, [+ u* v& k" W8 m- L& l- IGPIO123: input: 0 [ ]
% G5 x% l, x' x- O2 zGPIO124: input: 0 [ ]) c3 G) `9 Q' A4 s9 J+ o, r- q
GPIO125: input: 0 [ ]' w3 Y* o: n) z- x
GPIO126: input: 0 [ ]1 B+ \/ \5 }7 A- M: C" d
GPIO127: input: 0 [ ]
, R! j) p$ U8 TGPIO128: input: 0 [ ]4 F7 I$ }0 k9 O: P$ d
GPIO129: input: 0 [ ]9 Q5 O `# @- C( M; f
GPIO130: input: 0 [ ]) @. x6 O# o. ?
GPIO131: input: 0 [ ]! j5 J" E0 L9 u7 y% P, r3 U p
GPIO132: input: 0 [ ]4 N+ T$ u: F% t# ^6 ], F
GPIO133: input: 0 [ ]; [1 T5 ]0 J( E6 |0 H6 b/ W4 a# p
GPIO134: input: 0 [ ]! f2 ]. O5 S9 L/ n6 b2 K
GPIO135: input: 0 [ ]
) t9 b0 O! _; C h# e5 q. Q
. M# M% ~/ L: w: G ) V3 j6 B( y: m2 B* Q$ r5 T
Bank GPIO2:
# r! }0 o5 X! G3 {, y$ `* yGPIO20: output: 1 [x] sata_pwr
% f. c, ?7 n3 \6 gGPIO21: input: 0 [ ]1 i, x& u% r, R* q
GPIO22: input: 1 [ ]- R& ?) l+ K, `1 q8 d! H/ M
GPIO23: input: 1 [ ]
/ [7 I2 A4 P) ^8 UGPIO24: input: 1 [ ]; B8 i9 c1 e# m8 W( y. M
GPIO25: input: 1 [ ]
! c! r. ^* s7 j5 _/ gGPIO26: input: 0 [ ]
8 c0 x7 ]- e# LGPIO27: input: 1 [ ]* W! m% c, p2 h4 H7 g6 g
GPIO28: input: 1 [ ]8 {* ?( t; o6 t( M( E+ ]7 Y
GPIO29: input: 1 [ ]
% L' w' O) D9 I/ b2 I- tGPIO210: input: 1 [ ]
* Z5 e0 q: {2 C8 h$ RGPIO211: input: 1 [ ]' x' k6 X/ F* Y# j s( w
GPIO212: input: 0 [ ]" B) R4 O) M. X, U5 ?$ D
GPIO213: input: 0 [ ]
6 `! d" A: @8 k4 l1 S4 ZGPIO214: input: 1 [ ]9 B) }) O& e* d7 G7 h1 J
GPIO215: input: 1 [ ]
; J8 _: J. W6 u0 N6 DGPIO216: input: 1 [ ]3 y5 w% _, ~9 {: W; h
GPIO217: input: 1 [ ]1 l+ I- x/ ^8 ?2 G Z4 F: j! Z
GPIO218: input: 1 [ ]2 J% G( q( F0 V0 c0 e, i. J+ f. V
GPIO219: input: 1 [ ]
# i" B( Y: M+ L% r9 e2 BGPIO220: input: 0 [ ]
( E! E( x" y( c5 I# S+ ?' ~+ `GPIO221: output: 1 [x] phy_reset
, \' S$ n- S$ K4 S, |GPIO222: input: 1 [ ]/ H3 I( N3 S. O6 S& V- z
GPIO223: input: 1 [ ]
: S# X4 x6 a8 u, ?' l+ T) VGPIO224: input: 1 [ ]
0 Q2 ?5 s6 z2 NGPIO225: input: 1 [ ]2 t! x9 ?3 U; @7 T
GPIO226: input: 1 [ ]# Q! h7 L5 B$ ^( h D, |' }& t0 r. b
GPIO227: input: 0 [ ]7 v- P7 m8 {; ~4 e* p, i1 n
GPIO228: input: 0 [ ]3 Y2 f! i% b) T' Q2 a
GPIO229: input: 0 [ ]
- y" G* Y& D" S. H! j. J & E' X, d, G5 E, H# @% _
别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。
6 O) d! e* N% i2 T5 I 4 i( G0 L$ P q) p( V G; X5 C
Marvell>> gpio
" _" P: I/ o9 _; l0 x, F, pgpio - query and control gpio pins
$ j5 {2 R* c9 W6 o9 n
, ]4 {$ {, l. l1 A
. s Z6 { u! b+ ~1 T. ZUsage:
! \1 d) {& k; E7 I+ O1 r. F ^/ ]gpio <input|set|clear|toggle> <pin>
2 z8 p& F0 ~' i - input/set/clear/toggle the specified pin
$ i; H% T' B4 y5 `gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
/ Q: W' Z4 s6 d* L( t* i
9 a4 M2 h3 }: T5 Y9 ~0 Tset是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)" p" K1 Q5 Q: ]5 f% b6 Y
}) V+ p$ |+ T% }! N* {2 G
然后看到env有地方是参数设置,类似dos的环境变量吧) I3 }( {7 q" R7 Z" e
) |& H$ J4 [$ K, OMarvell>> env print4 i% c e4 Z9 U
arch=arm0 F$ _- d' ~; Q3 k8 P% x
baudrate=115200
4 q \9 V# m& N7 d3 d0 A" ^ B; fboard=mvebu_armada-37xx
: L# C8 m1 ]( {* Y8 |- dboard_name=mvebu_armada-37xx* s0 W0 a# V) f2 {- y4 m* ~- ~
boot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
! z1 q6 |1 V7 u# v& W% ^boot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
, d# O. {) I! ]+ D6 ^3 Z5 R, Wboot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
; K8 s# j, v! l/ i j7 Fboot_targets=usb mmc0p1 mmc0p2 sata
" f8 i- f- t: B: H0 k" F4 Mboot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
3 `. `) ^1 b' `# A2 Mbootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi
- \: a' J% t5 O& J( C' L# ~bootcmd_button=for target in ${boot_targets};do run boot_${target}; done; f1 v* B3 Z0 D5 @" H) r* W: [# U8 S
bootcmd_normal=run bootcmd_syno;4 T9 {" [) U# e# Z
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;
5 H& \ { E a( ]bootdelay=13 s, _! n1 a1 V5 [+ F, g: {; @. |
bootdev=scsi 0:1! f! b- B+ w- b* V' W" }# }( |
console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000# N9 [4 d/ o! A! P& ^5 o% i
cpu=armv83 O6 I. e1 M) E8 Q
ethact=neta@30000( ~# g+ E8 R7 N, K% b: C7 K8 p
ethaddr=00:11:32:11:22:00
0 p% S* P3 W' `ethprime=eth0
9 a- c' |( _ R. Z! X ?* ?fdt_addr=0x6000000- s0 B; x. S) N0 R) e
fdt_high=0xffffffffffffffff
# h' Q) A: K1 y( a% \9 o) r$ w& bfdtcontroladdr=1f6437d0
q2 k/ `5 `5 k9 Cgatewayip=192.168.1.254
# C/ Y/ v3 _, L4 M/ Y1 b& o( { Mhostname=catdrive
' L) M, i/ {8 b" i2 y' w, wimage_name=/vmlinuz) w2 |5 j+ h7 U* w1 \. }& k
initrd_addr=0x1100000
b" y5 k' ?5 b0 s, Einitrd_size=0x2000000 `3 ~ B( y' J; W+ t% H3 c. K) X
ipaddr=192.168.1.119
) B& }# o1 m8 | E* V/ zkernel_addr=0x7000000
) _+ t' ?: I8 l# A, @: ^% @/ V8 ploadaddr=0x80000008 i) \0 U3 e! ]" ^/ u
netdev=eth0
9 {9 H, C0 L8 ?- O onetmask=255.255.255.0
, y; v: \9 ?3 b8 t9 Lrootpath=/srv/nfs/
% @9 j1 {. g+ j7 F0 E" C9 Iscriptaddr=0x6d00000
w: |& J$ l3 Y; y4 r( Tserverip=192.168.1.254
" {" R' Z7 g( [) ~! Q9 v" esoc=mvebu7 Q8 i" q9 S; n0 K5 N
stderr=serial@12000
% t, A' X4 S! {stdin=serial@12000
- w# n! w. b; k* C: vstdout=serial@120001 [9 Q0 ?7 ~ A+ q" E
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
$ G. Z$ s( N8 A+ {- ]vendor=Marvell8 h2 G; i7 o4 H4 m, @ c# b
Y4 @+ D C) z1 i, G
7 N* h, C6 s9 c% P" nEnvironment size: 2001/8188 bytes$ i) P" }( Z$ u6 ]
Marvell>>8 U$ e' t1 f! e; a, q! u( A S
( W# S$ q! ~ v+ ~
看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.4 @. Q7 @3 ^( L6 e' V" u0 ~" S. {
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;) l% |$ m, d) n
* a* V" |2 U) T: e. ]4 a0 |( s" P这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了
7 y/ j6 y+ a/ |: {1 y: [! obootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒
$ R, ^- q K4 d+ m% p7 N
& I2 }0 k; V; c! B6 D/ O5 s! ubootcmd_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;0 O2 J; s- j# l0 I/ }, N# n9 w, [/ [
' k" t! i- @0 g$ Q/ Y
注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。
3 d2 r' e- J% z8 b5 A6 b7 W思路是:
1 F4 o0 e2 \" z* s6 E启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
+ x9 v* g% E0 q& n* f- h# J" l: ^- ^ d; z f* D5 C4 ^' M
这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启
0 S; p7 E' E% k$ l q 2 `2 B: l, t. }) j$ A. F7 V
控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启1 a% Y. l/ @/ H3 _
#!/bin/bash
: Q8 C7 }) p* ~* ]9 n1 v! U1 vdt=`date '+%d/%m/%Y %H:%M:%S'`
7 r0 d5 N) g9 V, ]% P1 I) wecho "$dt"
4 O$ [6 \9 X9 h3 nsleep 60
& L8 w/ T+ T4 u* S& c+ t dnum=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
0 ?2 J& ?" v. W1 j5 L4 D. `echo $num
% Z0 n* |$ c8 K2 @, L4 p- }echo $?
# m- m/ l0 \/ Nif [ $? -eq 0 -a $num -eq 0 ]; then t8 z: z+ U1 F" V
echo "$dt ok" >> /result.txt: F% ^8 x5 i, F, J
else# j' `. F% u5 f" M2 a
echo "$dt noip loss $num reboot" >> /result.txt- ?& ?, g5 {6 V
reboot
9 d# d$ s3 X9 v. ufi! Q4 C/ J6 }9 u1 L
7 ^- Y6 T& |+ [- Q5 p3 D e
第五行,ping后边的IP自己改,我用了一个外网的IP。 Y8 O& [( p/ Q
! P3 G) e) i9 c9 v
总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。
) v, \/ U" f4 G! n5 e8 r1 l ; N; `: r2 H4 l
我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。1 T+ y' Q! E& W) J* r5 Y
, x) t! @4 j+ ~1 b- q
还是上边60秒的地方,再加一条# t6 o, y% Z, y G
: A \. k0 p/ Q: C 8 s% q9 R; _3 F; L8 I) [, }
2cset -y -f 0 0x45 0x00 0x55
, @* U9 r8 f7 W4 E5 h; mi2cset -y -f 0 0x45 0x01 0x01
% `9 c* F- a! _& Q6 o% D" Ii2cset -y -f 0 0x45 0x30 0x07
]3 q; x3 s! m2 u! c% w2 Bi2cset -y -f 0 0x45 0x31 0x72# G& U+ F q8 p# z
i2cset -y -f 0 0x45 0x32 0x72
" b( O- m2 G: u2 d" f# ai2cset -y -f 0 0x45 0x33 0x72& V7 z* p a5 b& |+ E
#调节三个灯灯每周期上升沿和最高亮度时间6 w/ H! ?. b, K2 e5 y/ \
#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44
; ~% V# Y/ J+ D, s/ g H- P2 N& Ei2cset -y -f 0 0x45 0x37 0x44' N9 Q6 j+ _6 `1 y1 m! U$ h
i2cset -y -f 0 0x45 0x3a 0x55
% H2 P1 m2 i7 h+ f* c2 |i2cset -y -f 0 0x45 0x3d 0x66
) `- a5 F: W+ A. y0 G4 T3 b2 b#调节三个灯每周期下降沿时间和关机时间+ G- X X2 J* W& S0 u+ H: [
i2cset -y -f 0 0x45 0x38 0x44
# l" g# b5 X6 G* I5 G" S' ]i2cset -y -f 0 0x45 0x3b 0x555 p% h8 k: d# c6 z
i2cset -y -f 0 0x45 0x3e 0x66
# w* H! \( Q" V& l8 `+ Z1 fi2cset -y -f 0 0x45 0x39 0x40 u' w, Q4 i! Q+ n4 {
i2cset -y -f 0 0x45 0x3c 0x40. n& z6 q4 p( m" P) Z
i2cset -y -f 0 0x45 0x3f 0x40
# m" h7 D a0 g" d% W+ g$ d& N/ }# 0-255,更亮+ r+ {2 p; W) U$ i
i2cset -y -f 0 0x45 0x34 128
1 V9 E" C- _) V+ l' d; w& ^i2cset -y -f 0 0x45 0x35 128! x8 K0 Y3 l4 J* U
i2cset -y -f 0 0x45 0x36 1289 H& G# V* O; i- J
- Y' c4 t7 ^8 n- i5 g' m8 K% @然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯8 u+ K9 o& u, G1 b) n/ g
4 ?3 I8 x, y2 \- L5 s, g. B
6 M1 w( f$ U) |0 l. l6 Y F
我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。9 y/ A) \; @6 u
* d8 F4 e' x/ a1 a) W# v
希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。
+ ]. ~, o2 M- t8 L7 `: d+ @ |
|