|
发表于 2023-1-18 09:18:32
|
显示全部楼层
转发:我好像解决部分猫盘刷群晖后掉IP的问题了
! N# P& V' r5 Y( @5 { R/ k5 K" J: G0 N( d, I' P( A; L k
aquila9953 g% y, K: p n
# ^9 |$ s4 \3 H! O: `1 z( D b
于 2020-06-24 16:37:11 发布
& u$ l. V; ~+ T
# q8 o, K" s+ j. S1 X5 ?5 _6 I13215% p, g8 t0 f5 K% _. H' A# ?
收藏 13: K" b6 q2 S. k, a( D
分类专栏: 群晖4 w! \# i' E# v: ~
版权 n1 X% h9 c5 a& T. a5 A
* {. V1 F3 q" C% O! V
群晖
0 I" ]# K, U/ M) S9 U专栏收录该内容
; T0 H6 @6 `$ p' p2 f1 篇文章0 订阅
# o8 |) O; A9 X: V) ]" L订阅专栏/ d$ I4 _. g" }8 Z! F9 m: n9 H
我好像解决部分猫盘刷群晖后掉IP的问题了" o2 T M2 s+ u) J6 q! B! ~1 b
) U1 J W/ F- {1 y( _2 p N我好像解决部分猫盘刷群晖后掉IP的问题了' w9 p" |. ~3 d; c
1 A- g+ P8 R) M6 L+ F% M0 h1 V
先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。) {) V0 I. G/ L4 w' u; M' w
然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。
0 R) _. u: `! b$ L/ F0 v3 o* i & y9 P$ R8 D O/ x4 n
跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。
5 C P: k5 s3 ^' f . ^& \" f0 d# _/ q6 h
然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。) C, i, O) e. H8 ]9 ~, |1 y
- w9 ?9 g5 `" _
先看了下有什么可用的命令:7 s7 [( X4 ?! k9 z9 b* W
+ \( l: K4 F6 v5 |) ~6 ZMarvell>> help
+ `8 h- c9 d7 v+ d: y: l; K L? - alias for 'help'
# H) R3 Z( U, R2 d3 _% kbase - print or set address offset
( o2 P1 ?6 G+ \9 B, vbdinfo - print Board Info structure( ]" C1 |. ?. w, f% T3 D$ V9 J
blkcache- block cache diagnostics and control
8 b0 Y) A F/ r1 Uboot - boot default, i.e., run 'bootcmd'
# o; F0 d) Q# v3 [bootd - boot default, i.e., run 'bootcmd'7 a+ w. i/ @4 i) B3 K/ B
bootefi - Boots an EFI payload from memory
) U6 T* L6 ^6 Ybootelf - Boot from an ELF image in memory0 t2 e" G# |& ?% A
booti - boot arm64 Linux Image image from memory1 Q' t' \% p9 u4 l& t
bootm - boot application image from memory
! T6 |8 @" Q5 u* I============================================================4 R' V2 u- t& }. A0 X; I0 Q+ O I
bootp - boot image via network using BOOTP/TFTP protocol0 i7 I; X) n, o
============================================================
; W3 B' z! [7 w4 @bootvx - Boot vxWorks from an ELF image
; B6 B6 F6 }6 U/ F+ z7 q# _bubt - Burn a u-boot image to flash' f* E' U$ ?( V+ ]* t- `2 {! O" u! W2 E
cmp - memory compare
3 F+ f( g5 W' _7 v n, `' Y- C" ?7 t2 v9 Xconinfo - print console devices and information
" ^7 B" g* k9 z- Acp - memory copy
: b. O0 K, D7 V$ V# W4 t5 ecrc32 - checksum calculation
" I3 W5 N) S. ydcache - enable or disable data cache. s4 }0 X# `: A* {$ y" j
-------------------------------------------------------------: X) s" x% U" Z. F6 C" h
dhcp - boot image via network using DHCP/TFTP protocol2 k4 }! y6 Q# V1 r1 t4 x5 |* T2 Y
-------------------------------------------------------------% D F: X" I* M/ u
dm - Driver model low level access
! s4 S2 H- t$ y- a! ]echo - echo args to console) E6 Q! Q5 Y" ]; F/ m
editenv - edit environment variable* b2 k L9 x* X$ I, V, J: x
env - environment handling commands
1 Z6 ]. L1 V; @ ?exit - exit script; j {' \4 a$ L6 b; |
ext2load- load binary file from a Ext2 filesystem
2 X! d* L2 g" ^& [) h6 Iext2ls - list files in a directory (default /)& z, j1 N* x$ b; X6 r8 ]
ext4load- load binary file from a Ext4 filesystem' x5 G1 x2 V/ N( P! d& @8 c
ext4ls - list files in a directory (default /)
0 u( K. v4 p0 q$ {ext4size- determine a file's size
5 P! @. V- a" ~! i8 ~0 hext4write- create a file in the root directory
4 P6 l! V* w5 a1 n$ ofalse - do nothing, unsuccessfully; X9 _- Y5 z O# j& M
fatinfo - print information about filesystem
2 C4 C% e, P% y% O% Qfatload - load binary file from a dos filesystem9 f" y- B, l2 A9 k$ j
fatls - list files in a directory (default /)
9 c$ j; A8 F0 g# ? X$ P; D2 tfatsize - determine a file's size3 v0 P9 T- Y5 t4 g" D& E
fdt - flattened device tree utility commands3 O) W% ?* _! m% Z
fstype - Look up a filesystem type1 s# j$ S. u! ?
go - start application at address 'addr'
4 T* }% L* m( H% igpio - query and control gpio pins7 S; t6 k0 I; z3 X E
help - print command description/usage
) W0 A% J, \ @/ {4 S- qi2c - I2C sub-system7 A7 ~/ c7 x; q/ v& c+ p% e
icache - enable or disable instruction cache: R0 Q/ S4 z9 Y; m
iminfo - print header information for application image
8 X+ Y2 Z0 m; b$ xir - ir - Reading and changing internal register values.
5 U0 Y7 Y6 n/ ? 2 L( E) H/ P% H! {2 L
3 Q! ^0 i1 y0 \- {
itest - return true/false on integer compare" G- A8 r5 _& E: p6 Z
load - load binary file from a filesystem
( t2 Z k3 n2 x' rloadb - load binary file over serial line (kermit mode)3 T! c/ C5 c! Q" E) r) ^
loads - load S-Record file over serial line% O7 u" q6 x0 y- J3 h
loadx - load binary file over serial line (xmodem mode)& g- c s4 z* `0 p7 @
loady - load binary file over serial line (ymodem mode)
3 Y6 @( R! ]# Hloop - infinite loop on address range! |) u. Z+ U* M- p0 p
ls - list files in a directory (default /)
: |: _; U8 K8 O( Y+ ]lzmadec - lzma uncompress a memory region
" o/ |. c" R# Q. Omd - memory display8 \& K. }! d. \
mdio - MDIO utility commands
1 P8 X1 a/ R# J) A1 ?4 M8 ]mii - MII utility commands, [# u! R/ e: W' v
mm - memory modify (auto-incrementing address)5 D8 q! z; D# X8 j/ H2 m
mmc - MMC sub system% @7 }3 g: }, b% G& f
mmcinfo - display MMC info( d; j. `! N7 \5 P' ]2 |, b2 ]6 I
mw - memory write (fill)
) a! E: `2 V% R% b4 ~- v) r" u @nfs - boot image via network using NFS protocol
" k( f) n- L' J! [5 Vnm - memory modify (constant address): N- N8 m! x: m* {6 H, d
part - disk partition related commands
: K. [" H3 a' L0 d4 Wping - send ICMP ECHO_REQUEST to network host
# u; A+ A+ S, r8 yprintenv- print environment variables5 S/ O% w/ [0 b/ x! q
pxe - commands to get and boot from pxe files1 _7 ?8 O& |0 d5 C; E( R1 G
regulator- uclass operations
9 v# F Z' @5 i: D( I M. J& ireset - Perform RESET of the CPU. |0 A; s- C$ |5 K V
run - run commands in an environment variable) K4 D* j- U6 F8 M
save - save file to a filesystem3 z; q( b$ }" {6 B; J# ]3 c; F
saveenv - save environment variables to persistent storage; ]1 U5 q" `7 {4 o' x. `# ?7 u
scsi - SCSI sub-system
0 h& O8 L% s; Y& dscsiboot- boot from SCSI device
0 f$ q% P6 |* _; v2 r4 Rsetenv - set environment variables
3 D5 R8 `2 S4 I% _' @# ~sf - SPI flash sub-system
% O5 S9 D1 P9 X6 Rshowvar - print local hushshell variables8 s- \ j. I( ]+ n$ n) b' M1 p+ ]
size - determine a file's size
: E! @5 i% Z! Q, }6 Csleep - delay execution for some time" o& f3 c) X7 M/ e. h) n- M
source - run script from memory
9 ?3 V; W4 ]2 _1 U0 asspi - SPI utility command
7 s& a, t8 g% V. E8 F* J5 J4 A" N0 _: Usysboot - command to get and boot from syslinux files$ N6 r$ E' E) b" r2 o4 |
test - minimal test like /bin/sh
, R/ U- N) F6 O. O; rtftpboot- boot image via network using TFTP protocol
# Q2 M# ~0 W5 j' \# o2 x: p& wtime - run commands and summarize execution time
# o; ~8 |" ?' g3 ^$ `. ]$ Dtrue - do nothing, successfully
: z2 M' B- v; r* n1 X" pusb - USB sub-system
" T+ d6 v8 D$ ^% }# O8 [% o3 rusbboot - boot from USB device
0 R5 A3 c+ e" f Nversion - print monitor, compiler and linker version
5 G8 Y0 t7 b) V* K7 d ]* `
( E! G+ h+ Y8 u7 G, o0 ~' h3 K8 V4 r发现了gpio
9 _; l1 e; }2 y0 W
! H1 P8 g; u1 X) W9 oarvell>> gpio" B% d# C+ v; a$ h) e
gpio - query and control gpio pins
9 o8 v; j/ N7 Y. @ & e, ~2 K* F( @. a* [* q
" T3 K$ A/ }* o+ }. \
Usage: f. W1 b6 R M& c* V
gpio <input|set|clear|toggle> <pin>0 V1 n! {# k, L0 Z$ F1 o
- input/set/clear/toggle the specified pin
! G5 p4 R8 L" p. k! O& Rgpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
) K) s+ A" w8 d
/ Q# @1 H0 }3 l" Q e7 P ( Y: I8 \0 @* r0 G- J
Marvell>> gpio status2 Y' t7 \. N4 c6 G9 m& s/ `* _
Bank GPIO2:9 \8 l# Z* S, T. n
GPIO20: output: 1 [x] sata_pwr
1 ]9 M2 E. S) u" R7 f- D/ AGPIO221: output: 1 [x] phy_reset
7 l( D* P5 p7 M. j7 d8 L" k# d) u # Z( ]* n$ a; R% N5 H$ ^
可见的io脚
4 H2 d5 q! C" N5 M3 A; r5 e P9 u
* d( j- h0 @ m6 I' O) ~* u2 h. |Marvell>> gpio status -a" g* H# _% L5 o8 _0 W
Bank GPIO1:
" T2 b- G# F* O r8 s7 AGPIO10: input: 0 [ ]
; Z5 R, d1 s& S9 n2 K, YGPIO11: input: 0 [ ]9 d' z6 e3 i0 ~3 @! x. L3 g
GPIO12: input: 1 [ ]9 b* {+ `" }3 ~( C- [5 ?
GPIO13: input: 1 [ ]
; ]7 H7 a( ?9 L" [7 n zGPIO14: input: 1 [ ]
8 X* z4 b F* P |# L. mGPIO15: input: 1 [ ]
9 v/ u x8 B' CGPIO16: input: 0 [ ]
`# L9 T; X& WGPIO17: input: 0 [ ]$ x( q8 O7 J: z* q& j
GPIO18: input: 0 [ ]0 `8 f" d6 y; r8 }/ o$ i6 ~
GPIO19: input: 0 [ ]4 {/ u8 u2 c5 i0 c! _5 b/ L
GPIO110: input: 1 [ ]! ^3 t B$ F1 R; }9 G$ V) p8 r
GPIO111: input: 0 [ ]
, j& v" E# T* k/ G, o8 r" vGPIO112: input: 0 [ ] ]8 k. y r* f* K
GPIO113: input: 0 [ ]
7 g# g, {. r. eGPIO114: input: 0 [ ]
: D, q9 ?* c( A9 D. ~5 a/ ]GPIO115: input: 1 [ ]6 A) {+ t' s- L2 q' S) U
GPIO116: input: 1 [ ]3 H- C, w. U, ]3 v) A; g
GPIO117: input: 1 [ ]. a C; N$ A6 Z: B' I* z
GPIO118: input: 1 [ ]
" Y( g" M0 _1 {* |; ]2 nGPIO119: input: 1 [ ]
, m2 T' {0 y8 o6 p6 c$ TGPIO120: input: 0 [ ]" W3 i1 \: W9 U9 u
GPIO121: input: 0 [ ]; f( a: D( n8 J
GPIO122: input: 0 [ ]$ p! x6 @% E+ O# o" _- O7 Z
GPIO123: input: 0 [ ]% I- R' M5 E+ ]
GPIO124: input: 0 [ ]
9 g0 u+ w, r' S& O" TGPIO125: input: 0 [ ]. Z9 Z5 G& E% d4 {7 G. p; O
GPIO126: input: 0 [ ]
# W. A4 t- @3 C# R w( P' w2 mGPIO127: input: 0 [ ]) y1 Q4 C. G5 C; ]3 b- I& [
GPIO128: input: 0 [ ]- C; Z- T9 N8 u. F: @+ W" Q; g, |
GPIO129: input: 0 [ ]
- D& O" y. X4 G7 y& RGPIO130: input: 0 [ ]
! d# s& L/ r3 g' f5 B& s EGPIO131: input: 0 [ ]
# k3 Z7 ^. i; |GPIO132: input: 0 [ ]
; P% I( H. P& m+ K( x& \2 SGPIO133: input: 0 [ ]
2 D' `7 g, C) M( cGPIO134: input: 0 [ ]
3 c( T1 x- S" L. d7 uGPIO135: input: 0 [ ]6 {0 X# X3 S% g* ~- e+ D
1 G6 ^' f+ G6 B: t, s
2 E) G# }0 W9 H& |* R1 U" j. |7 SBank GPIO2:7 k# @3 O4 M# H: {, w; ^ d" @% z
GPIO20: output: 1 [x] sata_pwr7 b0 z% g4 V/ e* D
GPIO21: input: 0 [ ]* Q3 x! l, y' ~/ b' V' G
GPIO22: input: 1 [ ]
, V* J% n! y. ?: g8 Z1 {GPIO23: input: 1 [ ] U8 S5 B Q3 Z) _2 a
GPIO24: input: 1 [ ]
/ k0 ~: m4 V, Q" UGPIO25: input: 1 [ ]8 C- \# m4 u( A; h2 v% J
GPIO26: input: 0 [ ]- d N7 B5 I! K; Z
GPIO27: input: 1 [ ]
3 Z, M8 b/ T9 J; p- @# c% w9 [GPIO28: input: 1 [ ]
( \# L" W8 d) `GPIO29: input: 1 [ ]: B; g0 S5 e- A& Q
GPIO210: input: 1 [ ]
6 _0 ?$ T' E5 p/ Z) `( d; n- K1 i W$ a/ ZGPIO211: input: 1 [ ]- s) R6 L2 v p* b5 B
GPIO212: input: 0 [ ]
+ Y4 c- M1 K& XGPIO213: input: 0 [ ]
! B* U `9 l* e" N, e7 c* B+ [GPIO214: input: 1 [ ]3 [: I8 N* D; _* |3 M
GPIO215: input: 1 [ ]. P; @( ?; F2 J' U+ k
GPIO216: input: 1 [ ]! b6 q9 | Q$ `2 e! B
GPIO217: input: 1 [ ]4 p- C8 {! }4 o# s9 R; l/ n% W
GPIO218: input: 1 [ ]
- ^" l3 t) F5 L( h+ A# J$ RGPIO219: input: 1 [ ]1 L8 T9 {/ v% P K$ e- L
GPIO220: input: 0 [ ]
" A" g/ e R, O8 m4 DGPIO221: output: 1 [x] phy_reset: l2 v( ~4 q6 X {
GPIO222: input: 1 [ ]% Z2 n* ?- P v: V
GPIO223: input: 1 [ ]
$ @1 m2 g; Q5 ?' [! D" n r: nGPIO224: input: 1 [ ]& Q% C# {( f, K9 {% Z
GPIO225: input: 1 [ ]
9 r# m) s5 A- oGPIO226: input: 1 [ ]
5 ^& O! }, m& t% u: s* N4 W; GGPIO227: input: 0 [ ]; k4 L$ h( }( d, t" q* t8 T7 P
GPIO228: input: 0 [ ]
0 ~' o) u9 u+ m T" I7 @GPIO229: input: 0 [ ]
# u9 K" w3 A! _# w: N# m# p$ T
0 x3 u* f$ ^# Y6 k5 A: L! [$ ^& X& q" Q别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。
, j" ^" z7 C4 _6 J" d6 N3 O' q* I & e0 O- q; |+ k6 n2 B! ]
Marvell>> gpio
! N/ d; n% i0 ^5 h# `0 Xgpio - query and control gpio pins4 @& e7 e5 D7 ~
3 Y6 d/ v2 C# a0 T9 N$ D1 q
1 n9 P! \" h6 T: Z# A9 q: e& E
Usage:
( a* g0 k1 V4 Wgpio <input|set|clear|toggle> <pin>
6 o/ ]/ y7 l. ]" z - input/set/clear/toggle the specified pin
" S( E" w* q0 R( \$ Z2 ogpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
" m1 q7 L( q8 x1 e$ m4 n 5 k0 r$ d0 D/ e
set是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)
& e ^; P) q9 r$ }* ?# x$ h( T4 t $ O& G. Q6 ]4 S5 U
然后看到env有地方是参数设置,类似dos的环境变量吧
5 F' X: |; p1 x ' W$ M/ P6 g7 r2 a( ~9 p6 X U
Marvell>> env print1 Q$ E+ x" o/ K3 K
arch=arm# ^" P3 x# b% ?' [. w" I/ J( ~; |/ q5 N6 n
baudrate=115200
I3 t/ ?! J qboard=mvebu_armada-37xx& n t) {# v6 F9 k/ \4 q. T# P6 M8 \
board_name=mvebu_armada-37xx
; R. y8 v' W5 {9 S# Uboot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
$ |3 V2 _& v6 m4 V1 S+ A T$ rboot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};6 [' I. d7 Y5 f8 Z D& ~
boot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
. X! p% ?/ v0 I7 u9 l Bboot_targets=usb mmc0p1 mmc0p2 sata0 r8 g: G- W* H" `3 t4 { ~
boot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
' ^4 r' {8 N. v, s! I7 V% N: ybootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi* }- ~7 X0 `( Q1 R5 q& \
bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;
# z7 U+ C6 B. y4 g" N7 X2 A; w7 q8 Fbootcmd_normal=run bootcmd_syno;
% e# Q8 j; O; ]( w. k6 P$ nbootcmd_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;
! N7 S$ e& ^* l" I" ^$ _bootdelay=1
4 R9 n& k& B8 q* abootdev=scsi 0:1: }2 }- m' ~; G# {1 s3 Y( }
console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd00120006 F# a3 l' D8 l* e7 |
cpu=armv8
+ A) ]) q* N: X( i7 f% k$ z: Eethact=neta@300009 B6 r4 d) E/ g' |4 a5 K! y" G
ethaddr=00:11:32:11:22:00. a* `; g, ?' y4 f9 F4 W" f( A
ethprime=eth0
6 C1 b2 Y- B* I7 ?3 _# Sfdt_addr=0x60000001 Q3 {7 h& n2 f
fdt_high=0xffffffffffffffff
; @" r6 u: L0 b" P: x- _" Ffdtcontroladdr=1f6437d0
' V4 O+ T+ g% n; Q0 o: S8 h9 ]gatewayip=192.168.1.254
) z8 d9 S: @5 {9 Ehostname=catdrive8 G- g# P4 M+ \) D1 R; j+ |
image_name=/vmlinuz8 ?7 F* g) P c" F( x$ i$ Z
initrd_addr=0x1100000! u9 R; j; S, ^% Q1 x
initrd_size=0x2000000( j6 s. k% ^6 z$ U+ X: Y9 w
ipaddr=192.168.1.119
% m: W" P0 q/ rkernel_addr=0x7000000
$ Y) @2 }: o) f! Sloadaddr=0x8000000. Y" r6 A3 l/ c4 s: L9 \
netdev=eth0
' ]# d* y7 L @netmask=255.255.255.0- d$ E G* v; k- h2 Z
rootpath=/srv/nfs/
; \9 }, P* p9 W1 @$ `; g0 T+ H* mscriptaddr=0x6d00000
: |0 m: v: @* k. R8 Gserverip=192.168.1.254
# I/ Q: M& a$ g$ R: J. ~+ r! esoc=mvebu( Y9 O m- c! A+ O E: C- z
stderr=serial@12000
3 C( s& V- P" I' t" H" b9 Kstdin=serial@12000
% ?5 @ m2 z% F/ {' t( Ystdout=serial@12000
! d/ ]% [" h% h5 M1 dsyno_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) M' P( B' D4 H! j. z$ r% x# h
vendor=Marvell
- F' ^0 @# \' i' }5 R1 A
5 |$ P2 X: ^5 Z7 s ( _: @2 q5 q6 y% X5 F
Environment size: 2001/8188 bytes
5 K$ ~7 W0 E) \5 I& OMarvell>>
8 u# }/ G4 P/ s' @9 F
; Z! g! m# A6 G% c1 D% N6 S6 z9 u看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.) @; T- A+ P. L6 x( U* ~7 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;
$ |4 h! U/ f2 x$ l # F/ R; A" z/ _- X7 X/ ?. @
这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了
6 r# q8 _: I2 |( L' ~/ Xbootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒/ i6 y0 K" [" L6 C* Y6 z
7 ?3 A& b$ H& P7 t) M+ ]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;, r" j1 ]& H! T7 V% i
8 N- x; e. Y) H
注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。; W* j$ R0 M7 f3 J) i# ?+ S
思路是:" h# j$ j6 K) ~0 I* H. g
启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。7 }" {7 c$ `; y- B$ A/ J! V
' K" l3 m0 A/ J* Z: O" h) i
这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启! N" A# V6 B1 g5 ^4 g# X
; Z3 x4 k: @2 z q
控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启+ |; A! d. z& p
#!/bin/bash( y u4 G% h9 i R6 f
dt=`date '+%d/%m/%Y %H:%M:%S'`) Y- |8 X# s( V
echo "$dt"
0 u& O* i" T' ?sleep 60
2 p0 N; L1 A3 f/ V: t# ?; wnum=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`0 M9 d! ^4 F# J. e* `0 \: e: _* z& z4 T2 A
echo $num6 t$ k6 w; u! d: U; _' H
echo $?
7 |) v' j3 j/ p [. b% Y( ^. Q- h/ {if [ $? -eq 0 -a $num -eq 0 ]; then
/ a1 ]# y/ v% |1 ~: G' A echo "$dt ok" >> /result.txt
9 ]! s1 G8 r3 l$ o1 qelse
% h2 i, l0 p' W" ^# j echo "$dt noip loss $num reboot" >> /result.txt6 Q6 s1 M- W) A1 R* E1 V
reboot1 E# c4 I( E& Z$ K) q
fi" p/ j$ ` a+ b* ]2 d
+ U' y3 I/ X J5 k* c% }6 F第五行,ping后边的IP自己改,我用了一个外网的IP。, u4 I+ A( s4 l, a- X5 F
! m/ U0 q) w7 D$ E" u
总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。
% G8 |6 X. O& j, E3 Y% A
8 y) @% S6 j1 f4 j. @8 C我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。/ i8 O& y3 l# K$ x
2 G$ t/ {4 a, S, E还是上边60秒的地方,再加一条 l3 j7 A; x2 G3 t
/ l2 l. W2 B: S$ e/ r! m + B! ~0 ]7 m: z2 L9 {
2cset -y -f 0 0x45 0x00 0x556 M9 H9 A# [# b2 l
i2cset -y -f 0 0x45 0x01 0x01, O$ E, p# s- P
i2cset -y -f 0 0x45 0x30 0x07
7 c" P# g5 P9 A' Ki2cset -y -f 0 0x45 0x31 0x72+ y! |; h- n0 [4 @2 F
i2cset -y -f 0 0x45 0x32 0x72
9 E. t% X* j) X: ^) k/ D+ ^" r& M# xi2cset -y -f 0 0x45 0x33 0x72) p1 z: ^6 W2 G; }2 }9 d- L8 e7 E
#调节三个灯灯每周期上升沿和最高亮度时间
# N# b( Z; W9 P/ L1 Q#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44
1 o' r ~1 s7 J1 j; _# wi2cset -y -f 0 0x45 0x37 0x442 r1 q' X$ F6 v( `, `
i2cset -y -f 0 0x45 0x3a 0x555 t5 r) g% c% y
i2cset -y -f 0 0x45 0x3d 0x66
* j- y& l2 i2 x1 }/ h8 Q5 d; ?#调节三个灯每周期下降沿时间和关机时间! s( p, T& ?! N
i2cset -y -f 0 0x45 0x38 0x44
9 q; U; s7 s+ q% R3 U2 Zi2cset -y -f 0 0x45 0x3b 0x554 ?4 V' [# f/ D5 t
i2cset -y -f 0 0x45 0x3e 0x66
4 E, |1 E% `& S7 R3 wi2cset -y -f 0 0x45 0x39 0x40
1 Q+ r, v5 x; M7 t7 oi2cset -y -f 0 0x45 0x3c 0x40
+ r y. [- O% w4 ]4 m0 ^i2cset -y -f 0 0x45 0x3f 0x40
( _4 t' a& v/ Y- Q# 0-255,更亮" h$ A7 C3 _$ O8 i$ [9 j" F: }
i2cset -y -f 0 0x45 0x34 128+ m# o# G* |5 E5 k; O7 w
i2cset -y -f 0 0x45 0x35 128( n8 M- w: b1 V( o( w5 k# I9 o5 t7 r
i2cset -y -f 0 0x45 0x36 128( | m: J" f$ S# Z5 s( l8 J2 d9 k
- W. m* N# v+ q7 ?2 b' L& r
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯
; W( ~1 B/ S; y9 a k: S \
# P# n( S' d, g3 u- U( ~3 c; ]
9 @) } O, v$ m: K6 _ D1 t我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。& T8 b6 f: _1 @$ T. P9 t8 F0 V
7 |/ v4 U5 H7 v$ s
希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。
: y7 u8 @/ }3 j: ?- K |
|