|
|
发表于 2023-1-18 09:18:32
|
显示全部楼层
转发:我好像解决部分猫盘刷群晖后掉IP的问题了
9 ]9 m( _" \. L8 k0 u9 `
8 J* d: e& r" M* Paquila995
6 q/ U# u( _; \, `- c* t5 T! B& d% R5 e$ @" h
于 2020-06-24 16:37:11 发布! b, Q) \" Q# E7 m' s: A+ L: ?
7 G# \' k# @' ~, }% p( I
13215
5 i. y" Q; s1 O7 g, | 收藏 13
7 z' r: P+ I; k1 A分类专栏: 群晖
+ x; P. y* M$ x- P! _0 V. e( d版权 i* R4 f& G% U0 P/ j
" _8 d' t# R7 ~+ m# j: `! }0 H群晖
9 V! d* k% ?8 O! l$ t B8 x专栏收录该内容
8 A5 _0 |- r* U; U5 p! \" n: n1 篇文章0 订阅
( R& h, j7 S% W订阅专栏
* A$ _4 A e x& P( G6 Q我好像解决部分猫盘刷群晖后掉IP的问题了; l' v- R; T/ e# m9 k; ~5 u. I
: V! U/ y# H7 m0 \. L& B
我好像解决部分猫盘刷群晖后掉IP的问题了
1 z0 A8 M: e" v/ c8 K+ j O# C' N6 t* Z7 J. [
先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。
/ E* D) y4 B0 p+ V" Y5 E然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。
3 n5 }2 f4 [+ O0 U3 @6 K 5 M; c( z/ o# I; }* T7 d [
跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。9 b# y! X8 j- f% @% U' x9 ` C
8 f" C$ W7 M8 P& {; J P& s% f
然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。8 D7 N) z s9 @# P4 F: c2 ]
/ C& q3 v1 o6 ^) i I
先看了下有什么可用的命令:
) b- z9 c; v( V" N; M 4 R2 Y/ z2 a I& N- t* {+ e
Marvell>> help
, {8 ]9 o" {" N5 O? - alias for 'help'
3 }/ D- o, n$ Y9 Zbase - print or set address offset7 F3 d' y& o/ n5 v9 |, n
bdinfo - print Board Info structure% p0 r7 C q4 C
blkcache- block cache diagnostics and control
& t$ ?) l( u. g. n# o9 o8 l5 P3 Iboot - boot default, i.e., run 'bootcmd'2 V8 a4 O8 |' r
bootd - boot default, i.e., run 'bootcmd'
; Q! x* X: l- w1 m& M+ p- Ubootefi - Boots an EFI payload from memory
2 S& D$ s9 w* I. cbootelf - Boot from an ELF image in memory
2 j- B' W, Q" Fbooti - boot arm64 Linux Image image from memory
1 e- e3 Y- ?2 ~# E D' Ybootm - boot application image from memory
% a6 [& E: |* F9 G% k( ]3 E* Z============================================================! F8 [4 V( d. h
bootp - boot image via network using BOOTP/TFTP protocol$ z; |! G0 m% e4 `* q
============================================================# q& f3 U. @1 J9 q3 x% x
bootvx - Boot vxWorks from an ELF image
' X j3 d' N' M4 w& J$ ~bubt - Burn a u-boot image to flash$ k: T* x H! z' x H8 |* Y; {
cmp - memory compare% Y' H+ a1 f& Z; W$ o Q
coninfo - print console devices and information) }( W# a+ M; ?' K6 c# ]
cp - memory copy$ P5 l# }( n" q5 O; f/ w
crc32 - checksum calculation
: ~, O+ f/ S* E" _, ^! K3 v' @dcache - enable or disable data cache
3 ~6 a8 `) @, t9 g! U: j------------------------------------------------------------- Z7 _4 u5 ~9 p
dhcp - boot image via network using DHCP/TFTP protocol
6 K9 H' r9 l5 y3 N-------------------------------------------------------------8 P1 F& [' c4 i' `; x& R% G
dm - Driver model low level access" y$ ]% l3 Q- p1 y1 h4 Q
echo - echo args to console+ H" ^' E; H6 r+ ~; i
editenv - edit environment variable
! o$ U5 u. |* i$ M E1 G# `. k+ \& denv - environment handling commands
, F( y6 [9 I4 Q2 c9 g9 i! _exit - exit script
5 C2 G5 H: z/ \$ c" `) fext2load- load binary file from a Ext2 filesystem
3 b5 R' a' l4 s9 y& K: X7 Gext2ls - list files in a directory (default /)
, } \$ [( x- n5 {$ z0 l. |7 lext4load- load binary file from a Ext4 filesystem
5 C9 D, ]3 ^2 }0 O l2 [ext4ls - list files in a directory (default /)/ q0 d3 d8 c# n" G9 P6 L
ext4size- determine a file's size
; [" ]* [) w# ^! t% P3 ~4 Uext4write- create a file in the root directory
' g, k% p8 t \ I1 l- Cfalse - do nothing, unsuccessfully- m" d9 y W" T% q) d
fatinfo - print information about filesystem6 y7 Q& v" z- d4 K. z
fatload - load binary file from a dos filesystem
W( A4 V. J% P K' yfatls - list files in a directory (default /)+ j& U- V' g% V' m6 r1 z
fatsize - determine a file's size
' b" y; y9 E( ?6 e0 Q9 S2 Efdt - flattened device tree utility commands
, B- N, S6 q. Y) A1 R4 \$ ufstype - Look up a filesystem type! W: \7 p+ l/ ` q: d2 o
go - start application at address 'addr', f- }2 @8 k# q7 D$ K) p- O4 R: A
gpio - query and control gpio pins
+ q, r& l: {; R5 z9 Dhelp - print command description/usage( J$ [$ y* u2 B1 h7 S5 `/ p
i2c - I2C sub-system
7 N; G3 W5 u) H# I& Q4 Cicache - enable or disable instruction cache8 E" l( A6 T" o z5 g# f* K
iminfo - print header information for application image3 w) Z2 P( ?; |) T$ q1 Q- G3 z1 p
ir - ir - Reading and changing internal register values.
% ^1 I; t0 T5 s/ X# {; ] & V6 T6 m1 b$ Y, G
6 [" _& l; i, [4 N& c/ pitest - return true/false on integer compare1 t2 C6 O: k/ R T! f
load - load binary file from a filesystem) i* J% h4 U7 E% i; h% o' j8 G& A
loadb - load binary file over serial line (kermit mode)
* c7 i b; F. n# b9 G: A% ?' o9 t" Nloads - load S-Record file over serial line5 K" k3 [9 z: z) a4 ^- V' Q
loadx - load binary file over serial line (xmodem mode)
$ l, r% d+ V: t8 u& Aloady - load binary file over serial line (ymodem mode)1 y/ }* c Y' t( Y V
loop - infinite loop on address range! d$ Q% m3 A. h5 g
ls - list files in a directory (default /)' [3 k& [, Y: ?
lzmadec - lzma uncompress a memory region, H. i' e+ s8 `
md - memory display
) b% {- }* e/ Z; j& \mdio - MDIO utility commands
1 s7 m9 J: w) W0 r: Q- g8 L9 amii - MII utility commands
% Y; e# N! `% y) L% umm - memory modify (auto-incrementing address)
; `! H$ s6 T& [2 J& c+ jmmc - MMC sub system
7 m2 Q' W9 W) d! T0 q7 \; Immcinfo - display MMC info
4 o* h) Q5 U, E& smw - memory write (fill)
6 ~1 ^# J# {0 onfs - boot image via network using NFS protocol& ~1 ]$ ~' r3 Q9 C* Z
nm - memory modify (constant address)" N0 I* g, k h1 V1 @3 G/ [% u+ V9 r9 I& k
part - disk partition related commands" @7 s5 ]( z6 Q f
ping - send ICMP ECHO_REQUEST to network host
1 ? _& ?+ k1 r1 S1 M$ H% tprintenv- print environment variables
/ J9 M( [- ], Apxe - commands to get and boot from pxe files
2 s0 B# Y2 J1 ?. H& P1 nregulator- uclass operations. ]6 g$ r. E" N# A8 d( P
reset - Perform RESET of the CPU; y( [6 G- M9 R* [$ n, \6 G
run - run commands in an environment variable$ O2 ?. ?: E4 m
save - save file to a filesystem: n6 Z% B) B5 M1 Y/ D' H$ i* z
saveenv - save environment variables to persistent storage2 ~1 V9 n8 L9 Z4 {9 I. \0 }6 B/ c( L% q
scsi - SCSI sub-system
# |! V" Z- D1 M: R+ U' ?3 d& Kscsiboot- boot from SCSI device/ u" b+ o9 y9 x a4 G
setenv - set environment variables! g0 M/ ?; `% O* T) P
sf - SPI flash sub-system
" y. F* s* }& j8 |/ B. R, lshowvar - print local hushshell variables0 T5 C( ~1 H4 k7 e
size - determine a file's size
, L8 L* E" u% M1 Ysleep - delay execution for some time+ [* u. r/ r G: q* m: m1 G; F
source - run script from memory
; j) o5 m. w/ Isspi - SPI utility command
+ b3 e6 M; ~/ W9 l3 j" {sysboot - command to get and boot from syslinux files9 [, x- Y6 o2 n3 M6 n! Q
test - minimal test like /bin/sh
! c+ J& P+ b6 F2 J9 [tftpboot- boot image via network using TFTP protocol; E+ P2 \( S9 u, r- z
time - run commands and summarize execution time2 X2 ?9 W% S( M: l$ }5 W' l
true - do nothing, successfully9 R" W7 U7 E* z- c
usb - USB sub-system
9 w! I# P0 a5 S% @6 X3 [usbboot - boot from USB device& z* y1 W. V' G1 |, Q
version - print monitor, compiler and linker version# L- U5 i4 g) i; ]& m$ e
( F7 Z7 ?+ U( V2 ~发现了gpio
3 k0 v8 L. \! E' M: J) c: a
$ B7 d/ }: N: e* l3 S! A' {2 Z. q* tarvell>> gpio
4 `/ n q1 o1 `+ t1 z- S; xgpio - query and control gpio pins* ^) |; `/ O9 d; ?, r5 y
. L9 B% r7 E' b/ Q+ Q# v
. c: i) s) ?1 t% RUsage:, e2 R4 U1 X! o0 _# H$ Z( V
gpio <input|set|clear|toggle> <pin>0 {& W. S2 |& N* p9 k* s0 ]
- input/set/clear/toggle the specified pin
' Z8 H: h& L# J5 A; Qgpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs4 h9 {4 z9 j$ s) L( @ i
+ h4 t5 ~0 k% Y5 g! v' @1 F
2 T" K$ u# m$ Q& X, I- r6 QMarvell>> gpio status
" ?4 G2 \7 W; R3 B/ T' l' @Bank GPIO2:8 J" t; ~. f; w0 b' @
GPIO20: output: 1 [x] sata_pwr% I- {. w# A- D# ~2 m
GPIO221: output: 1 [x] phy_reset, |( _# T+ m: \, i( z) K
# m8 G0 H3 {1 l) F可见的io脚( Q* ^4 d" D B+ V, {6 M
& W3 m' `( Y3 ^3 K0 x* ~/ IMarvell>> gpio status -a6 P2 f3 d' l8 ~- X8 Q
Bank GPIO1:
" U/ S4 q( V5 ^1 ] _+ `GPIO10: input: 0 [ ]' j A5 W. D8 D9 x8 f; _, k0 A
GPIO11: input: 0 [ ]% v0 N( j) x) M3 w' j) ]
GPIO12: input: 1 [ ]
4 F B0 r5 @7 S, j9 dGPIO13: input: 1 [ ]5 c4 \* n) J. Q) `8 @4 r) I
GPIO14: input: 1 [ ]1 X4 h- Z, L6 {
GPIO15: input: 1 [ ]
8 x! D# W. B* r4 e* b$ aGPIO16: input: 0 [ ]
0 n' T# _5 Z B1 y7 P5 QGPIO17: input: 0 [ ]
2 ?6 ]& X' w6 L+ ?$ A" BGPIO18: input: 0 [ ]
9 t U5 E: w& D' V" Z% {, eGPIO19: input: 0 [ ]. `" l B3 b+ u9 z+ H. f" C6 i+ \% Z7 F
GPIO110: input: 1 [ ]4 [$ q/ _+ ]+ {- t! v! }
GPIO111: input: 0 [ ]
7 C/ p* k0 B" ]4 ^$ e/ R* I7 @GPIO112: input: 0 [ ]
; w- x8 m+ G* ?4 C* jGPIO113: input: 0 [ ]
6 v/ U; b5 t, g4 y5 r* k9 V. yGPIO114: input: 0 [ ]1 K8 I+ {; W2 J2 Z2 l: Y
GPIO115: input: 1 [ ]
6 @( X/ w1 r6 qGPIO116: input: 1 [ ]% M" P2 }. l, a6 D. l
GPIO117: input: 1 [ ]0 z( u9 I/ ?' U1 ^7 R; H
GPIO118: input: 1 [ ]. j7 X; p, F& n! M% j. H. ?
GPIO119: input: 1 [ ]
5 L+ }3 H3 M- M- B; [$ sGPIO120: input: 0 [ ]1 x0 K* T3 }) M) W0 A
GPIO121: input: 0 [ ]
* x2 n( ]# d! `+ A5 Y* t5 BGPIO122: input: 0 [ ]
5 M5 s6 E+ i3 BGPIO123: input: 0 [ ]; d% G- P: h& l7 O9 Y3 J1 [8 q {
GPIO124: input: 0 [ ]
2 ^# n1 ^" d& B; j# d' F, _8 X- mGPIO125: input: 0 [ ]0 O( H7 G: y0 u. b9 V& P. ` Q |
GPIO126: input: 0 [ ]6 ?8 h) Z6 Q% y" ?% I
GPIO127: input: 0 [ ]
- {% n4 r: J# g# F: N0 Q7 U0 eGPIO128: input: 0 [ ]( l# B' q7 P. r; Y r! [9 W
GPIO129: input: 0 [ ]# X: m/ b7 R5 i ~% M' I- W+ D
GPIO130: input: 0 [ ]
. O" {( ?2 z3 s0 }+ kGPIO131: input: 0 [ ]
/ ?9 L, g7 o" m3 Y# Y+ R" ?GPIO132: input: 0 [ ]# g; b t* `" x: P- j) h$ G# X
GPIO133: input: 0 [ ]- y$ C+ o6 S+ x3 U6 U8 W. R+ @
GPIO134: input: 0 [ ]
; R- V% ^+ b& [& D: S2 e' }/ aGPIO135: input: 0 [ ] q8 |0 b7 n+ ~' A+ ^$ k5 w" d: b% ~
% @. U' m% {3 q6 x+ t; t
: P" E/ V9 v* Z; b
Bank GPIO2:
- ]$ L0 C* ?1 Z5 L1 H6 h OGPIO20: output: 1 [x] sata_pwr
+ S2 n% Q/ d6 y$ Q2 IGPIO21: input: 0 [ ]
5 P4 S/ E0 A7 ?/ XGPIO22: input: 1 [ ]
# O; H. j: ^% CGPIO23: input: 1 [ ]9 j# h$ N6 U) B4 d j% D
GPIO24: input: 1 [ ] n4 i4 Y7 q0 d+ a; q
GPIO25: input: 1 [ ]
$ O8 Q9 d' i/ |GPIO26: input: 0 [ ]
: K1 x' e4 X4 p1 b. p- W$ l! W [GPIO27: input: 1 [ ]
" O4 f4 _" E( ?. FGPIO28: input: 1 [ ]
) Q: h, I% K( p L6 a$ RGPIO29: input: 1 [ ]
/ A. z' A1 u( e+ N" xGPIO210: input: 1 [ ]5 q7 o/ _) d5 H; i1 [
GPIO211: input: 1 [ ]
- ]" Z8 F7 {2 m- I8 K4 L% xGPIO212: input: 0 [ ]0 n3 Q; {! ?1 G7 G9 E) C) F
GPIO213: input: 0 [ ]
: L, u) W4 D0 g) |GPIO214: input: 1 [ ]. u) d/ B. L! x+ M) r
GPIO215: input: 1 [ ]
& P( e+ v5 z2 P1 s z. M2 _GPIO216: input: 1 [ ]
% t8 J3 t8 e }/ a( z- fGPIO217: input: 1 [ ]
7 j- D: t8 L1 G* K6 G1 kGPIO218: input: 1 [ ]4 }- V/ k7 c' _- o& @
GPIO219: input: 1 [ ]
, I& Q) q" p; V7 M! {& {% U4 ?: JGPIO220: input: 0 [ ]
|6 K+ R! x; ? jGPIO221: output: 1 [x] phy_reset* @3 Z) s* G& G; s1 k' V# ^
GPIO222: input: 1 [ ]
8 S' g- T% z, a8 G1 oGPIO223: input: 1 [ ]; @, G ^7 D8 E9 w8 E- R
GPIO224: input: 1 [ ]
7 t1 r* C _7 f. G) i# d6 lGPIO225: input: 1 [ ]
' Q2 b0 H6 E: l$ P. z& UGPIO226: input: 1 [ ]- @! J3 o- G# b0 M9 l8 t
GPIO227: input: 0 [ ]5 M4 S7 F( ~, A! w; \5 A
GPIO228: input: 0 [ ]% m$ b) L w. `: }. o
GPIO229: input: 0 [ ]6 I- b) T$ `# ]: E" o0 U( B; I
3 D" ~* _! j6 ?别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。
1 j. B6 F7 O' K, Z
4 } l4 X( X8 _( e0 [$ rMarvell>> gpio+ B! [& N) e# f" U5 ]
gpio - query and control gpio pins
% L0 T" L: M) z8 S; I
% t+ ~3 @! u+ u) ?+ q1 b # v' a- S: L3 _! U
Usage:8 P9 I$ @, I8 n
gpio <input|set|clear|toggle> <pin>" [+ e# [2 V: ?- |5 R! s# _; s
- input/set/clear/toggle the specified pin
& X2 Q% O3 f" s5 Vgpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
! r: I& D# j" J$ G! S! F( F% y. N
* Z+ V1 a9 O. n3 M+ Nset是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)
! @- U4 l! i3 J9 c; @0 D# A ) k) _4 ?1 |" \3 T! C" P" A2 G8 h
然后看到env有地方是参数设置,类似dos的环境变量吧% u6 \9 e6 m4 V# U% D
( V' k. t5 v2 d$ Z; ?+ ~# s. ?Marvell>> env print, I$ {/ W) `; p+ U' P% g) l
arch=arm! F! G: P) Y6 X% B3 b# m/ t. r
baudrate=115200
, r8 r( f c1 ^board=mvebu_armada-37xx/ e% N$ ~* g$ h, u
board_name=mvebu_armada-37xx F, M& y/ A3 C0 }5 p. a
boot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};$ m4 n: o+ R" \
boot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
- s4 U8 W: I0 ^9 K1 w: v1 Jboot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
. W0 h4 Q- ~7 e8 K: Oboot_targets=usb mmc0p1 mmc0p2 sata
# f+ h3 p, ^ ?boot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};1 c' n+ M7 ~# i7 \7 F: b
bootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi
( L* t X8 {9 I& Q' [bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;
( v" I! X' ^* i& I3 Wbootcmd_normal=run bootcmd_syno;, C& ^0 v4 O+ 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;
# l* t" D6 x- Y& {- g+ fbootdelay=10 _( `2 r" I* c
bootdev=scsi 0:1
5 ~" a/ p" q/ g6 jconsole=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
- W P5 W& e5 E) G* |# c9 ~5 Pcpu=armv8+ \8 }7 @! N C4 d& a e
ethact=neta@30000( K9 A0 Y4 n7 @2 w& S9 W, y
ethaddr=00:11:32:11:22:00
( a2 ^% y9 e8 }! t3 {: c( b* i" X& Pethprime=eth0
* U3 ^* p) V4 Z: @1 k& @! I( Vfdt_addr=0x6000000
+ ?' _" P1 G! Dfdt_high=0xffffffffffffffff$ t) m+ i2 N+ F# n3 N# q
fdtcontroladdr=1f6437d0% \) W( A% d. F) g' P1 I
gatewayip=192.168.1.254+ Y. Y/ D- t& R2 C4 r
hostname=catdrive
( x2 R r5 G# H; oimage_name=/vmlinuz
* b5 c g, A( t1 n! ?initrd_addr=0x11000003 l$ M3 Z0 W& \* X+ L% o+ }5 {
initrd_size=0x20000008 x+ M; k! C$ r0 _
ipaddr=192.168.1.119
' M- x% d- h' Qkernel_addr=0x70000004 u3 H3 g. `6 ?8 O% T: w! F l
loadaddr=0x8000000# g3 H* J7 ]$ I/ ~
netdev=eth0
* {* c$ ?6 d0 m4 P) y7 v' Hnetmask=255.255.255.0( W- `4 F: k3 d& W- V
rootpath=/srv/nfs/) ~& }% l% K3 I/ B" `
scriptaddr=0x6d00000& q8 o4 E+ s6 _
serverip=192.168.1.254
/ h! x" Z; q% k% f' c4 p4 qsoc=mvebu
/ n7 l2 e& ?2 T5 P9 T6 Xstderr=serial@12000: B% G0 Z8 o0 `- ~2 W
stdin=serial@12000" g- G$ V; l8 l/ ~) P# F
stdout=serial@12000
; B% V$ |7 B+ q. L5 J7 P# d' l" v/ gsyno_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
% e, M; Q( y8 ?9 N2 h# B1 Z$ Wvendor=Marvell3 X+ `% |' D7 D" z. B& |) w
; n g8 i/ c: R
, ?; N4 z6 s2 A& I9 xEnvironment size: 2001/8188 bytes# N0 ~( e4 `8 K* I8 l w; f K: O
Marvell>>
6 b6 w- ~' H# f* j- i) ~5 q
9 G$ b. U+ N6 [+ O. ~- m- }看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.0 Y, g7 l9 g! m; J$ o
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;
' W4 l/ b! `( ] t9 d
8 @# t+ X! D% V2 ~+ ^' G. Z这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了( c! T* W) I" @
bootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒0 X2 t, ^) ?* f: _+ S+ i" r
' G' v9 x' P: [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;* Y% _$ Z1 u- d& z
% ?1 F& l5 N* Q
注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。4 r. w _: d. y
思路是:
/ X. W" g# }) V; S" F4 x启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
U6 g+ t- X( q& D
7 l# _: u% t# K4 f% S这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启
/ v4 a# H* \! ?) d
/ o) v# ]6 F# p, B. c控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启
4 [3 u* |# _: h( E1 X#!/bin/bash( k7 A* H7 ~8 \/ N
dt=`date '+%d/%m/%Y %H:%M:%S'`8 k- t+ i* H/ T, r4 |+ n% I; {1 d+ V
echo "$dt"6 z9 }" _, s3 ~# q A" ]. `8 b
sleep 60& [* t8 }7 L2 V5 y& W
num=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
, S& w& { }! t( K0 A% h' [echo $num+ Z. v0 n5 x' X# i# d+ p( l% B
echo $?
! r) F& V9 y; _$ A5 N$ Aif [ $? -eq 0 -a $num -eq 0 ]; then: O D. B, c( U7 ^! E
echo "$dt ok" >> /result.txt- ? u# Y: Z, w6 b* d
else$ B. q8 f% E7 h. p
echo "$dt noip loss $num reboot" >> /result.txt; s2 P; y. R! ~
reboot
1 J; j0 Q+ J) S: j0 zfi/ G5 K% J- E* G) y. B+ d- J
0 h" u6 k! \ Y+ v; A) a4 K
第五行,ping后边的IP自己改,我用了一个外网的IP。% b. `4 ^* U. ~6 w2 W* W
( Q$ g/ j9 w( ?* u) z
总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。
. R. y" L* P. t
7 B! o S5 o+ k, v! X& H9 I- ^& L e我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。2 t1 l; g( G$ B& r: i' ]
, c% l7 A5 @" X7 M$ {
还是上边60秒的地方,再加一条
3 T6 R# b5 X; X& p9 K ( h, Q+ d! F" @" M- Z
; o! c# l: y c2cset -y -f 0 0x45 0x00 0x55
* [7 l0 I# F) Qi2cset -y -f 0 0x45 0x01 0x01
2 W- g- j+ A. Mi2cset -y -f 0 0x45 0x30 0x07) c! P8 w3 V) M5 v8 {1 P
i2cset -y -f 0 0x45 0x31 0x72. G" p7 T$ v3 h
i2cset -y -f 0 0x45 0x32 0x72& H6 o1 y* y8 j0 ^, E. E- R. h0 f
i2cset -y -f 0 0x45 0x33 0x723 L7 c0 n8 b. p% S
#调节三个灯灯每周期上升沿和最高亮度时间
! i- y6 y- @( s#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44
% D: a$ F9 S/ a* ~, Xi2cset -y -f 0 0x45 0x37 0x44
, T. O9 [) N7 X9 wi2cset -y -f 0 0x45 0x3a 0x55
) S5 t, m' y7 C7 {- w! [i2cset -y -f 0 0x45 0x3d 0x66
" l! G+ X7 M. y#调节三个灯每周期下降沿时间和关机时间2 @; ~$ F. X8 W" m
i2cset -y -f 0 0x45 0x38 0x44
( f2 V: J& l, t3 v+ Yi2cset -y -f 0 0x45 0x3b 0x55' i! J' j9 ]( c2 @8 I8 i
i2cset -y -f 0 0x45 0x3e 0x66
~8 |8 d$ w. k U) U8 l) i* bi2cset -y -f 0 0x45 0x39 0x40
w/ F( u; K7 E/ e" F" S" ]6 L6 ~i2cset -y -f 0 0x45 0x3c 0x40- e9 ~0 l X3 i: K0 l
i2cset -y -f 0 0x45 0x3f 0x40
! l2 ]2 D( c5 \: M" j: Q# 0-255,更亮1 a# j+ J! X* ^" Q) a
i2cset -y -f 0 0x45 0x34 128
& e( G; |9 Y) E) yi2cset -y -f 0 0x45 0x35 128
3 ?4 v- p C4 {- y' mi2cset -y -f 0 0x45 0x36 128( I/ x3 e6 o5 P+ v3 J3 B# E! ^
- y+ n% i: I% {7 b7 m
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯; m$ t5 }: L. N( S0 } y' e
/ [8 P7 m: |- A2 }+ U; |; x# b, F 6 U; T$ J$ N J* Y( W
我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。
9 @8 `' e2 { \# { ) Q D$ u1 j5 e8 j/ B/ j' e5 b1 n2 ~
希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。
" `# T; Q- Z7 Y! F5 V' e M |
|