找回密码
 立即注册
楼主: xsp1989

[原创] 完美解决猫盘群晖掉IP问题

 火... [复制链接]

0

主题

14

回帖

158

积分

初级渣柚V2

积分
158
发表于 2023-1-14 21:57:46 | 显示全部楼层
学习一下

2

主题

5

回帖

51

积分

初级渣柚V2

积分
51
QQ
发表于 2023-1-17 15:37:30 | 显示全部楼层
感谢分享。

0

主题

2

回帖

11

积分

初级渣柚V1

积分
11
QQ
发表于 2023-1-17 21:24:14 | 显示全部楼层
看看怎么解决

1

主题

3

回帖

46

积分

初级渣柚V1

积分
46
发表于 2023-1-17 21:58:38 | 显示全部楼层
谢谢谢谢谢谢谢谢谢

0

主题

7

回帖

21

积分

初级渣柚V1

积分
21
QQ
发表于 2023-1-18 09:18:32 | 显示全部楼层
转发:我好像解决部分猫盘刷群晖后掉IP的问题了( J8 B) L2 c6 ^- J
2 e  d+ j% i5 u& `& q
aquila995
( S4 p- ~8 R7 F$ h$ j! ~3 p
9 [# q7 E2 H" v# e& a7 d$ ?于 2020-06-24 16:37:11 发布
  P! Y( b8 h8 j3 Y. ^) _1 `4 j
/ H( R3 R7 F' v& i, Q13215$ u# R4 o. }* n* K. q
收藏 13
8 ?( l( Y# h4 c! i分类专栏: 群晖
6 r" l1 ~" l4 U1 H3 A5 w; I% ^" P版权, R5 O9 Q* ~" K( t

. i4 g" `+ Q+ x9 B. d4 C群晖
8 A2 ~! ]4 [2 v# o7 J' m! Z专栏收录该内容
- V  K0 H6 F- T' S  t$ w4 }1 篇文章0 订阅' ^' S' c( j- H: U
订阅专栏) }& V8 l1 _6 O
我好像解决部分猫盘刷群晖后掉IP的问题了
" V- L' N: C1 K/ z
5 S/ M0 z' K2 I- C" c' \5 `我好像解决部分猫盘刷群晖后掉IP的问题了
2 }% K& T( t$ I! @" D
* E6 }. }/ L' v2 Q' l先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。/ W. X& u# J# ?& j* x
然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。
9 c. t7 C& ?! L+ j" p: i$ g : }1 Q2 k5 S# m0 W* ~* ?
跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。& ?# l" y0 f& k* L

# z7 F9 r) b6 L% K然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。+ S$ k! @2 M% p  S5 G

1 \, \" U  e5 k  |  ?# ^9 r! h先看了下有什么可用的命令:
4 P& u/ O/ B1 X( l3 n . f' e/ W$ s& _
Marvell>> help
0 g8 @& W% }! G: j2 p0 x?       - alias for 'help', [; T2 O# u# B% s. T# e
base    - print or set address offset
# a6 e( J5 X' i% g2 l" X; q: zbdinfo  - print Board Info structure6 j- D5 \9 o: z
blkcache- block cache diagnostics and control
; D7 M7 [4 E$ Y4 Qboot    - boot default, i.e., run 'bootcmd'3 H: _8 z' B& s- q6 z
bootd   - boot default, i.e., run 'bootcmd'
9 G, `+ W( Y* x/ M- K# J- zbootefi - Boots an EFI payload from memory
# I8 r( R8 v! q' @: C- m5 m' p6 t6 z2 obootelf - Boot from an ELF image in memory
3 s; A5 R2 |% C: T& @booti   - boot arm64 Linux Image image from memory
) b$ x: d7 W4 xbootm   - boot application image from memory
; C. U2 {! j$ Q# X8 s. D. Q============================================================/ l; R+ h, m" x+ P% f1 |- r+ B
bootp   - boot image via network using BOOTP/TFTP protocol- T9 g& W9 d# c5 [% e' s6 |1 e0 ?
============================================================
4 H! O- C) _$ ]3 Ubootvx  - Boot vxWorks from an ELF image0 T0 P- Z, s  H6 M" u! `" V9 p
bubt    - Burn a u-boot image to flash9 Z; }! f7 p% V5 r4 Q* @
cmp     - memory compare
+ L; P/ C  r* B- Rconinfo - print console devices and information' z/ m9 F, X' S, ]2 C7 l
cp      - memory copy& N; i9 Y" }5 ?( u
crc32   - checksum calculation
6 q7 P9 ?% q8 n# Z) I. l4 ^dcache  - enable or disable data cache& d! b* u# ~0 z) s0 K/ [! q( ^% S. i
-------------------------------------------------------------
! o. _, o4 L1 r: J9 r, ldhcp    - boot image via network using DHCP/TFTP protocol
% J9 L$ k8 a* v  [4 `# r2 \2 q( Y-------------------------------------------------------------# t; d/ N3 x& t3 P. O
dm      - Driver model low level access) H* ^0 A5 y$ I* z" ]
echo    - echo args to console1 k# ]0 u. h2 w9 C+ y
editenv - edit environment variable
4 L  ]# L  t+ A  z! Uenv     - environment handling commands$ h9 N" G6 f7 U
exit    - exit script
+ S/ l0 D! ?& U- V" @2 aext2load- load binary file from a Ext2 filesystem
7 E& v! U! H5 W. h3 N( bext2ls  - list files in a directory (default /)7 D% \, w- O* P& N
ext4load- load binary file from a Ext4 filesystem/ K# _( W3 \  |) J- @! G7 P0 _# J
ext4ls  - list files in a directory (default /)/ M& n# y. v" a3 _& `
ext4size- determine a file's size4 q" W0 r7 A4 v5 f5 f. a& j
ext4write- create a file in the root directory
9 }2 Y4 J: p& v# a1 H1 mfalse   - do nothing, unsuccessfully% K3 I/ v" |4 i, }! M7 f
fatinfo - print information about filesystem
" X! y1 y. o; efatload - load binary file from a dos filesystem, J5 C5 v9 A- F% S  h" ~: Q
fatls   - list files in a directory (default /)
9 t7 ]6 K" e# p- w) g) c* Bfatsize - determine a file's size& w7 T% }" a: {+ k3 a+ D
fdt     - flattened device tree utility commands
9 b9 ?: ^  C; u# \* jfstype  - Look up a filesystem type# i8 i& t+ r& k
go      - start application at address 'addr'
$ A! F# Y# @8 L  \6 M2 jgpio    - query and control gpio pins
8 b% a2 L1 T* P8 C* P( w: d/ phelp    - print command description/usage
+ Q. Q4 @# b& z# p* p" Qi2c     - I2C sub-system! x+ \  I+ a& R3 j. B. U, E" q
icache  - enable or disable instruction cache, |: K) @; p' H& a
iminfo  - print header information for application image- H3 s: _) d" |( ~7 q
ir      - ir    - Reading and changing internal register values.0 |+ {* M; C7 ~! ~6 H! Q9 d
: c/ z' i3 F* ], `" J* r2 Q
2 W1 _4 X1 J" R5 i, Q
itest   - return true/false on integer compare3 o2 P+ j- R- {! o" \9 U" O1 r
load    - load binary file from a filesystem
* W' i: Z0 e' {( I+ ]& `! l1 Nloadb   - load binary file over serial line (kermit mode)% f/ {- a; |2 N) ^
loads   - load S-Record file over serial line3 d) N( V: @) c3 v2 Y
loadx   - load binary file over serial line (xmodem mode)2 T5 j: h5 e% z! i' N( u( u. e( q
loady   - load binary file over serial line (ymodem mode)0 V$ C  \7 g3 c  U' P. d
loop    - infinite loop on address range
" F6 O+ i) Z( n% K0 J7 B4 Kls      - list files in a directory (default /)1 s$ [* H' i3 K& Q7 J2 V: `
lzmadec - lzma uncompress a memory region# a, z: K# C6 b9 u6 |
md      - memory display$ X) a/ p( G" n% Q1 L7 m' e
mdio    - MDIO utility commands, }  x0 @; ]0 t3 L8 G' e% s) @
mii     - MII utility commands
2 c8 ]' \7 Q: V1 p7 K. Rmm      - memory modify (auto-incrementing address)
7 {7 i6 J+ [* ~- P$ smmc     - MMC sub system, a# K* x6 x" E' N# ?; |7 q# H% j
mmcinfo - display MMC info
' T) s+ [7 x# Y& Q) [# tmw      - memory write (fill)
1 S3 ?, V( a8 o8 ^# R7 H, bnfs     - boot image via network using NFS protocol
  k3 U5 h* n  X( R/ k5 Fnm      - memory modify (constant address)& f8 d+ m6 g! N0 }) L" h1 [. A
part    - disk partition related commands
" }5 t* D3 {' U: L: Sping    - send ICMP ECHO_REQUEST to network host; c0 y3 m1 ?1 @, l
printenv- print environment variables* z) r! t9 ?/ b/ V3 R- P
pxe     - commands to get and boot from pxe files% V+ x% W. k. O, B; `- a
regulator- uclass operations
1 o, O& ?! Y; D0 ?- j8 x) ?! xreset   - Perform RESET of the CPU
# Z1 Y" i6 i  D; G% P" t5 M* Jrun     - run commands in an environment variable
0 P8 h: }1 h8 @2 u' T- j8 O. xsave    - save file to a filesystem
( ]: O6 _6 {+ y# i# qsaveenv - save environment variables to persistent storage
& Z  i6 K! p8 U) Uscsi    - SCSI sub-system
/ k+ M4 t; \- }6 P/ S' R; Y# Cscsiboot- boot from SCSI device
5 H7 R) F0 h) t. x+ _% j- }  qsetenv  - set environment variables, h2 y  ?- J# m4 z7 z2 p9 H! \, Y1 v
sf      - SPI flash sub-system% B9 l9 l* a! g
showvar - print local hushshell variables
% i. {2 u, e+ Osize    - determine a file's size
9 _) V, d0 ~" t  i7 D# Hsleep   - delay execution for some time2 m; M% v: ^( K6 b0 {, m6 r
source  - run script from memory" m: {& j" ^; j- M/ ?( c. m2 [( u
sspi    - SPI utility command" d: q% _- {3 Z, k  D- V! a
sysboot - command to get and boot from syslinux files/ Q0 N; w/ N8 e5 J1 i" z; g
test    - minimal test like /bin/sh
! m1 o6 z5 o& D. B+ m, f- v/ I/ Utftpboot- boot image via network using TFTP protocol! m2 ^* _, n4 O/ [& Z( I
time    - run commands and summarize execution time' D- t* u- A( \6 H5 d% a
true    - do nothing, successfully  g# _, p. b' G0 g& K' q% G
usb     - USB sub-system
/ c! C: W& }# h9 N( m: K6 xusbboot - boot from USB device
+ F" ?" G  l) [) U2 A$ u2 L2 xversion - print monitor, compiler and linker version5 O. a. M/ G9 a2 k
2 n0 Z8 w$ g, s8 p8 r2 y( {+ l
发现了gpio( I, \0 {2 t9 g( }! s
' B4 K* [( ]" E4 f5 z# `; Q
arvell>> gpio. L& q) C" }- T
gpio - query and control gpio pins* c; l/ V+ D0 M" n& o

  G2 G, l  S; P# ?  F8 S( u
# I8 g  z, e# Z4 E. X1 z$ ~* cUsage:, `% Y; `8 `: }, o7 W/ u
gpio <input|set|clear|toggle> <pin>2 m- }2 @. k6 K7 Q8 e& f: s
    - input/set/clear/toggle the specified pin2 a4 ~$ o  a" T1 T; A! K
gpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs. P: I7 z6 b1 T% N- o8 A* g+ @
  `8 O8 u0 Z; x1 [

0 Y$ l2 {* C5 x+ U& T2 V  `Marvell>> gpio status$ e8 T, G8 J1 d# V
Bank GPIO2:( {! n) d9 M( b* V
GPIO20: output: 1 [x] sata_pwr
! V' h& }$ n8 K; gGPIO221: output: 1 [x] phy_reset9 T( {! q0 z0 k
8 p" C+ l' O% v- l! T# `( Z- U3 x1 @
可见的io脚
& f; |4 M. Z$ W  s8 X* q/ ^, F9 `. H 6 @2 I( k  I- o* E7 N6 }
Marvell>> gpio status -a
* H+ n' p* s9 S; b) M' Q" hBank GPIO1:
3 A% X) c; t& t6 lGPIO10: input: 0 [ ]
2 z; ~' J( d  b$ h( X. vGPIO11: input: 0 [ ]
/ r- O  r* V3 N1 CGPIO12: input: 1 [ ]
- h9 e! v. |1 jGPIO13: input: 1 [ ]
  o5 q7 l# t: X( HGPIO14: input: 1 [ ]
) t3 D* _# ~3 X- H5 J5 c' C3 NGPIO15: input: 1 [ ]# _3 ~2 v: E4 ?3 g4 s$ y+ Y
GPIO16: input: 0 [ ]
7 ]5 o1 r) g1 Z/ n8 f# XGPIO17: input: 0 [ ]
9 a4 p/ w& U+ O* z' QGPIO18: input: 0 [ ]. F0 g- M- Q1 q$ o$ U5 L/ m
GPIO19: input: 0 [ ]
- j: p+ e' m4 o) A3 vGPIO110: input: 1 [ ]& v: t0 m. V: G/ ]1 E7 I
GPIO111: input: 0 [ ]
: {: x5 Q9 y9 c' c( m* e' oGPIO112: input: 0 [ ]) [3 o1 z$ k% ^/ P( \% T2 g
GPIO113: input: 0 [ ]
% J0 A9 h( i$ k% |; G8 ^3 IGPIO114: input: 0 [ ]
6 C6 }( Z* s9 I% J/ CGPIO115: input: 1 [ ]0 W% o9 e$ h+ T" J
GPIO116: input: 1 [ ]: R) u+ N9 o8 K
GPIO117: input: 1 [ ]
! M- J( @: P8 {( e7 u( }; }GPIO118: input: 1 [ ]/ q/ {" S* O$ b3 q
GPIO119: input: 1 [ ]
6 S: O1 I5 n& }3 \* x) KGPIO120: input: 0 [ ]
1 ~* W- L9 H. j6 FGPIO121: input: 0 [ ]
( G/ c4 z- ?( {9 _/ iGPIO122: input: 0 [ ]
1 W( J2 {. S/ b7 b2 p2 B0 gGPIO123: input: 0 [ ]
, H2 ^( m( [. G$ \/ `' F2 FGPIO124: input: 0 [ ]
. P, a/ k# H0 d9 E: x, Z( M; ZGPIO125: input: 0 [ ]' p5 w4 V/ a3 c% u" J/ E# S' B
GPIO126: input: 0 [ ]7 E" D' {% \4 T$ i% n. J
GPIO127: input: 0 [ ]
+ [! g/ [+ F5 gGPIO128: input: 0 [ ]
5 C6 b  H( T4 I0 B0 t5 KGPIO129: input: 0 [ ]
0 f3 M% C  |$ b( u/ |' gGPIO130: input: 0 [ ]
! t, c' A0 ?& y& d$ gGPIO131: input: 0 [ ]* f  k2 R5 h2 F' N( m/ X  i; [
GPIO132: input: 0 [ ]! z- N; O! @/ Z9 W3 S) h
GPIO133: input: 0 [ ]& j9 P. [& A# C: x0 h- P
GPIO134: input: 0 [ ]
- ~; A9 O7 q  g, B8 m5 EGPIO135: input: 0 [ ]# V( b, G# K  R* o

- J3 J8 }) D- i4 t- v6 l+ v 4 G% f8 B/ M- t$ A( W& Y
Bank GPIO2:
  P1 i0 S, t5 b  ~2 [GPIO20: output: 1 [x] sata_pwr
' y) b0 K4 J& s' }. HGPIO21: input: 0 [ ], P' P* h: O* U) h8 g
GPIO22: input: 1 [ ]! Z: l8 D0 I. v9 f# A
GPIO23: input: 1 [ ]0 ~$ l; h2 O7 E. ]% N9 W! L
GPIO24: input: 1 [ ]
4 D( n7 j) s& O$ EGPIO25: input: 1 [ ]& v7 s* s% t; \7 Q0 N
GPIO26: input: 0 [ ]  r/ ^3 b. J, }% ?0 ^( E
GPIO27: input: 1 [ ]* D- {1 G! }& d
GPIO28: input: 1 [ ]; h  N' v5 ]2 c
GPIO29: input: 1 [ ]
0 _3 E" S. t5 D* tGPIO210: input: 1 [ ]% p3 i) T- m8 X
GPIO211: input: 1 [ ]
  r$ y) C  V4 i1 o2 t8 A) @+ AGPIO212: input: 0 [ ]% }: U- _- }+ L5 e2 f
GPIO213: input: 0 [ ]
) A  I9 V5 Y" C0 [/ j4 IGPIO214: input: 1 [ ]9 [% h! L+ B! \" a+ O2 P1 m/ Y* K
GPIO215: input: 1 [ ]2 H) a: v8 t* g+ q# l. ~& H
GPIO216: input: 1 [ ]  m5 t4 _9 [& v3 }
GPIO217: input: 1 [ ]2 d' O# T1 M( l% a0 D
GPIO218: input: 1 [ ]
' T7 O# s' |3 XGPIO219: input: 1 [ ]
# e( e- r+ M' H9 N# m# @GPIO220: input: 0 [ ]( M! h+ `: W2 P9 b+ s% ~
GPIO221: output: 1 [x] phy_reset
1 z2 g: Z3 P, ~0 q2 oGPIO222: input: 1 [ ]# }6 S1 G% t# _, l5 ^
GPIO223: input: 1 [ ]
( J5 M4 _4 m5 u" yGPIO224: input: 1 [ ]9 \* A" ^2 u# x% d0 X4 R
GPIO225: input: 1 [ ]/ J% _( }- G7 O/ W5 `
GPIO226: input: 1 [ ]$ h' O+ y5 ]$ U
GPIO227: input: 0 [ ]% l1 x* P# p0 {1 j1 n& b1 l  p  E6 I
GPIO228: input: 0 [ ]  J0 y% d/ T8 y7 R
GPIO229: input: 0 [ ]
0 V' |% ~( Y. @+ U, b
& C3 s5 P' B8 i) `& O别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。
! p: _- @8 p" s4 G9 D
- t; D7 z9 ^8 lMarvell>> gpio
  \, `$ V5 W9 c* U0 Agpio - query and control gpio pins
$ {% [; \- v5 G * f: V0 x: K: b
3 l! f( Q  r. U2 l
Usage:" l5 Q* s# e$ V" v3 C9 o
gpio <input|set|clear|toggle> <pin>
0 [1 ^8 z% ^0 D( w. ^+ `    - input/set/clear/toggle the specified pin
" ^' b  [+ o3 E6 Agpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs
1 F3 b1 V* n. O  }2 n. `
+ v# R" V9 ^5 `7 d/ P$ Tset是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)
& v) \9 b9 H& b' _2 S
$ }6 c7 d( \( [8 ]% Z5 R然后看到env有地方是参数设置,类似dos的环境变量吧& {/ s+ o+ o2 I6 {' {
& e7 u  ~3 U0 i' [
Marvell>> env print) F5 w9 Y1 @6 u- R; D& }0 k
arch=arm& @$ D: p7 f9 \; c* p! A- d# l
baudrate=115200" \" l! F4 }) }8 ?# [
board=mvebu_armada-37xx
% t8 O# Z/ g5 ^! _6 Mboard_name=mvebu_armada-37xx  _# R# o/ Y+ P" n* v; B6 _
boot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};0 l0 U) E! K+ B
boot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};# B1 k$ z1 M8 U8 {5 V7 K4 J
boot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};4 `; t, J0 I" j6 h, I' t
boot_targets=usb mmc0p1 mmc0p2 sata
0 Y, m3 r& a7 Rboot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
- \3 v7 _' S( d5 t. W0 `8 m3 @! ybootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi% H' L4 ]6 c. B) t3 Y
bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;
" g, V& T: {" U4 a7 Y$ @bootcmd_normal=run bootcmd_syno;
* G; w  R. @. B& `3 z2 dbootcmd_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;
# M) l. L, w  W8 o  R6 u6 ]3 Cbootdelay=1( h3 d( I* a6 B4 I) [5 _- ?
bootdev=scsi 0:1
# ?+ E9 y6 Q; N7 N! M8 _% U  Q! {* Pconsole=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000( I" S) t, _1 [+ T5 ?
cpu=armv83 w/ X' u7 }' E
ethact=neta@30000/ A' @+ c- k8 d0 V
ethaddr=00:11:32:11:22:00
( u, x/ i, ^/ Dethprime=eth0. |* J6 i# s1 f: c! m
fdt_addr=0x6000000! S9 b6 X) S: [; G
fdt_high=0xffffffffffffffff
9 ?$ R$ D( m6 P- c0 {1 Mfdtcontroladdr=1f6437d07 j1 W$ E, x/ ?; N9 i1 k6 Q
gatewayip=192.168.1.254
/ P( F: I2 O3 y& B8 Q; khostname=catdrive
# I$ O$ H* b1 ?3 {: w( Cimage_name=/vmlinuz8 |7 J3 l( A0 x2 Z* C% O
initrd_addr=0x1100000
* H6 l' E* y3 B5 v; r& P' p0 ~initrd_size=0x2000000
! A$ p; d4 z% W* Cipaddr=192.168.1.119
8 c- i4 ]# z. H, ckernel_addr=0x7000000# r9 c7 H& _$ l% f
loadaddr=0x8000000: M  \& p6 \& g0 ^0 J
netdev=eth0
5 |4 M, @8 M7 {: _netmask=255.255.255.0
# D8 ]* `, t9 m' S$ qrootpath=/srv/nfs/3 X& y: J) p- Y) `) N3 l
scriptaddr=0x6d00000
; Y% a3 s& M0 O$ ^% Q8 T) p' Eserverip=192.168.1.2544 d+ q% D' `! ]7 g& ?
soc=mvebu, h7 b+ }8 y$ Y
stderr=serial@12000
5 Y& C) v5 ^$ f; Dstdin=serial@12000
7 c# C0 L: X) Z+ ^' D# @stdout=serial@12000
% x5 q$ _1 Z! |9 H8 |/ ^/ Jsyno_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$ M* x1 v# J8 v9 hvendor=Marvell3 q; U7 _/ ]* L: q3 u2 L6 [2 J

8 G% b# q* T6 j9 w7 i8 V 1 ?! v7 p3 W) j2 c
Environment size: 2001/8188 bytes# c4 o4 V: R  M$ E) }: |
Marvell>>9 ]1 P7 p' c8 E# P9 [0 X

* A5 F. Z7 {) }! n4 }1 f看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.
) g! h% ?: M) Q+ hbootcmd_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;* P: v  `8 v8 Z$ D8 S( @1 P- v

- {; H- Y$ V/ B* ]这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了
4 X' p+ }6 {# G1 X; F+ ]bootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒/ o7 F& v3 D! F1 k  U' S! A
# U! W* k  m3 S  c+ U+ t' f0 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;: W" B2 _; J* C0 h' m9 ~

4 l5 K) X& z. e5 @' n& M* }2 Y注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。' v7 L/ _* L/ B7 Y6 U
思路是:. W' M1 c; T* T2 v+ }+ s) z6 H# a
启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
$ a* R' D$ I* N+ R2 [
* ^- M) M6 }. f& a8 }" ]# q6 R& C这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启' p2 N  i* M: w! Y% W( J; Q6 `

' N: R0 q* ~& Q/ M  n控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启/ G- h# v1 Y$ D6 `% u
#!/bin/bash
0 m( q; z4 q2 V: c2 k+ y2 o& odt=`date '+%d/%m/%Y %H:%M:%S'`; K$ J) X! k3 V+ ]. W
echo "$dt"3 [3 n8 b8 x% V: S$ y7 X
sleep 60
0 [/ Q9 g$ @. R% Gnum=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
8 |( o( p! M% h+ a7 e1 Recho $num& f) b0 x; h3 P5 p" j
echo $?- n" h" ^0 P+ \2 h2 F  T2 M4 [% m' E
if [ $? -eq 0 -a $num -eq 0 ]; then
0 u! \( Q6 ?# ?4 ^/ L# {! v    echo "$dt ok" >> /result.txt& z) [- f  \. n/ B
else1 Y( R% }5 p  D6 v) A' u
    echo "$dt noip loss $num reboot" >> /result.txt
) W: x5 n5 q& |$ g. w: {    reboot
! i: x& V, l: A5 {! i% t% j' A; @fi
( T7 [% D- ~, e2 Z9 k! l0 y& f 5 h3 C: L* ~4 z$ a; D3 }- z$ D
第五行,ping后边的IP自己改,我用了一个外网的IP。# \4 s! _2 Z' R

/ T- L( b* S/ J4 W总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。8 N; o: r6 ?" ^0 z2 l; x4 [6 R

% T: Y! c2 ~! ]' h- c, T我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。! s( B; ]5 W: C/ m
' t6 v& J+ C9 I" F/ L' V4 }7 O4 v
还是上边60秒的地方,再加一条
+ @* V9 l! X" c' X& X1 }$ W2 ^ & ?8 h) K7 `* A3 X! U; A

: u/ y- L$ c/ M, }2cset -y -f 0 0x45 0x00 0x55
. Z- k. v- w1 Y& q$ Mi2cset -y -f 0 0x45 0x01 0x01
. z# W$ I. @- K6 x/ l0 q! w6 Oi2cset -y -f 0 0x45 0x30 0x07
. w# F" U/ i3 b% K  ^/ `: i6 B! `i2cset -y -f 0 0x45 0x31 0x723 {  A3 B! `- K3 X( h+ ?
i2cset -y -f 0 0x45 0x32 0x72" g9 t9 S3 E: M6 Z
i2cset -y -f 0 0x45 0x33 0x72
4 b7 ?5 V: }/ _0 R#调节三个灯灯每周期上升沿和最高亮度时间( @  _7 ^9 z/ \% q1 c4 @- \
#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44
4 n7 R; H7 n5 K% O0 oi2cset -y -f 0 0x45 0x37 0x44
. k. {1 \/ u6 I; I  {! u5 e' ^i2cset -y -f 0 0x45 0x3a 0x55
: r; y6 C8 o5 Q! m7 @7 fi2cset -y -f 0 0x45 0x3d 0x66
9 V, f% J9 g0 f#调节三个灯每周期下降沿时间和关机时间
5 ?: m' C5 j. M  U% di2cset -y -f 0 0x45 0x38 0x44
3 L5 c2 Q4 m# R$ W" l+ xi2cset -y -f 0 0x45 0x3b 0x55
/ s4 U, _4 M" g2 `* G5 Ji2cset -y -f 0 0x45 0x3e 0x66
! A5 X  g, q3 z# I3 H+ R: ki2cset -y -f 0 0x45 0x39 0x40% n8 d  M0 f# i/ b/ i. ^: }
i2cset -y -f 0 0x45 0x3c 0x40, A* W  w! T8 i4 }
i2cset -y -f 0 0x45 0x3f 0x40
9 u4 ~3 H* R5 B/ C3 m4 B# 0-255,更亮! E( y4 T$ H. x; _5 t+ i+ z- b6 {
i2cset -y -f 0 0x45 0x34 128
# ?! v' k3 a% L/ C4 ai2cset -y -f 0 0x45 0x35 128: p7 i4 c8 B$ U
i2cset -y -f 0 0x45 0x36 128
) k1 e( t* f! y3 ]$ o
; V% y6 v+ y& n5 Q然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯+ E! R* u- T! Z) F4 c6 `

' |7 R% y' f  A8 ~; X# U
( o7 {. N1 C% p' a) w我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。! e5 B* p' ?2 Z: Y
) r4 J; P' Y) ]+ f4 S2 ]! a
希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。1 y  j, G- z: O$ _5 p8 ^

1

主题

4

回帖

256

积分

中级渣柚V1

积分
256
发表于 2023-1-18 14:08:36 | 显示全部楼层
时间问题?

5

主题

34

回帖

302

积分

中级渣柚V1

积分
302
发表于 2023-2-1 16:28:20 | 显示全部楼层
多谢分享!!1 l! U  z1 M) q/ ~

2

主题

15

回帖

282

积分

中级渣柚V1

积分
282
发表于 2023-2-1 18:25:22 来自手机 | 显示全部楼层
看一看学习

3

主题

32

回帖

330

积分

中级渣柚V1

积分
330
发表于 2023-2-1 22:18:59 来自手机 | 显示全部楼层
学习学习
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|矿渣社区 ( 黔ICP备2024020525号-1 )

GMT+8, 2026-1-28 18:10 , Processed in 0.062233 second(s), 3 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表