|
发表于 2023-1-18 09:18:32
|
显示全部楼层
转发:我好像解决部分猫盘刷群晖后掉IP的问题了" ?5 G) d& R/ Y5 S6 \
/ U m3 L" D; X' ?% S
aquila995
U4 I+ b% D# ]) }
! H" K2 p1 Q/ K: h& M于 2020-06-24 16:37:11 发布
2 } h, \8 w) K5 [
5 q/ x; ]6 C/ x" e* w3 S- C8 M# \1 E132156 z' F( Q+ R) Z: ] }% |5 l" n
收藏 13
& l( O3 D) d _, A分类专栏: 群晖
1 _: z/ ]9 K% _# f版权: h& |2 f7 I I- h& c
, m' X @% x4 ~4 E群晖9 v* }: V) r3 P( j; s/ {7 J
专栏收录该内容
' G; l) k4 M g6 f/ v) F- i2 ]1 篇文章0 订阅
* f, |6 D, G4 w! H& a4 S7 x9 U$ D6 K订阅专栏; G/ S- \( R5 t- @/ e# x
我好像解决部分猫盘刷群晖后掉IP的问题了9 h0 D4 k8 s' `; q9 x! q
- k; {/ K0 O8 ]% k" {- T$ x" ^
我好像解决部分猫盘刷群晖后掉IP的问题了
4 |5 V0 M* {: c3 i
1 {+ V; v' @; }! c7 I先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。
; C: U! e) ~! o! R然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。+ n; E- P- H5 z3 k+ Z+ a4 g
6 f; F) Y9 {# P T: N3 L0 o8 E跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。 W$ b+ y4 a m. }- u# T* m, \
6 g L @9 y- w然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。3 }1 r. @3 R: |2 l
$ o% L7 b4 N3 J: w2 {6 ^9 ~先看了下有什么可用的命令:2 A$ i# Y) u3 O: b1 T. V
2 y1 I9 J( ^5 ~
Marvell>> help$ T n( `" X4 a |( h; \
? - alias for 'help'
7 C" j g) M2 i: [% c( `base - print or set address offset
# L7 F5 M. H% b& N- V! Fbdinfo - print Board Info structure
& ~/ m q. N U1 {/ _blkcache- block cache diagnostics and control8 H& H& \. x# W: l
boot - boot default, i.e., run 'bootcmd'
: ~9 t4 q r6 V, L% Z) `bootd - boot default, i.e., run 'bootcmd') | F' z: y( |3 {2 e8 l
bootefi - Boots an EFI payload from memory' w! w8 H' n7 K4 e& q4 x9 s" `
bootelf - Boot from an ELF image in memory
# f* C5 G2 j" p5 y3 ~ \booti - boot arm64 Linux Image image from memory
; l, D8 o2 t5 k5 E R# [$ mbootm - boot application image from memory
2 P2 ?1 f1 W4 S G+ B# i+ o============================================================
I- ?% T Y& K3 ?$ Dbootp - boot image via network using BOOTP/TFTP protocol
0 |4 V0 X: k- b* e2 A4 P============================================================
/ `! V. K- x" Z/ t. Kbootvx - Boot vxWorks from an ELF image
0 h4 ?. g( l( _, w$ M7 F5 Q qbubt - Burn a u-boot image to flash% E- X: u% `' G& ^3 M. J1 Z
cmp - memory compare Y# c7 @! X5 e2 Q. ~
coninfo - print console devices and information8 J5 d; z1 J* K
cp - memory copy
( y9 l1 H8 C% ^ o! n' n; f' w3 ocrc32 - checksum calculation% H. ], Y4 [4 r, w: o# G- k1 G- T
dcache - enable or disable data cache
' u; U9 k" `4 ]2 H; N+ X/ _-------------------------------------------------------------2 h' ?/ L' g# Q7 q$ K" r
dhcp - boot image via network using DHCP/TFTP protocol
, B5 J) C; x) t) W* }5 y-------------------------------------------------------------
5 A7 o) {3 W% S* idm - Driver model low level access
6 p) B! Q9 ?6 M) D% Iecho - echo args to console1 I; E6 s* \' Y* N
editenv - edit environment variable
. c4 Z/ B S# A3 ~: y; o% Lenv - environment handling commands& b% u4 o! w: {; Q4 l, R. @) R
exit - exit script
6 n, M6 D4 m1 A& \' text2load- load binary file from a Ext2 filesystem
! s* z3 v5 v/ t4 I. M2 e ~' yext2ls - list files in a directory (default /). T& v& _6 b% p& l+ j9 x' _
ext4load- load binary file from a Ext4 filesystem: u# m7 `9 p; I2 K, f+ Z9 j, C5 A( F6 z
ext4ls - list files in a directory (default /) x' j- j D3 u8 H# K* L
ext4size- determine a file's size9 h$ r" N, A$ `) ]( z% `% S; v/ X
ext4write- create a file in the root directory
* o8 ^! H; X8 D: a" i( j0 F" Ifalse - do nothing, unsuccessfully
0 ~2 X& T8 |) Pfatinfo - print information about filesystem+ b. U, V: X" V( X
fatload - load binary file from a dos filesystem
- W7 G" L$ } K8 [- X. rfatls - list files in a directory (default /)
1 Z9 B$ d Y0 |& |: M+ v6 Ifatsize - determine a file's size% s; m$ \ O# P7 D* C
fdt - flattened device tree utility commands3 |2 @9 y8 [- y t! L$ d9 R5 l
fstype - Look up a filesystem type6 D: w! u" N/ l% x
go - start application at address 'addr'& H* m4 O) |. Q+ z2 ]; I( K
gpio - query and control gpio pins$ v5 w4 l/ m- J* ~* k
help - print command description/usage: P$ x9 Z( @' @6 J+ [
i2c - I2C sub-system
: k: i0 T6 I, Y6 o: f! r' jicache - enable or disable instruction cache
1 n3 @- A; |' W! aiminfo - print header information for application image- ?5 l" K; u& Z
ir - ir - Reading and changing internal register values.9 a& C: H, B7 H/ }8 W
& ^9 ^5 g" [5 X. o ?5 b- u+ _
0 o0 w) a' f1 m0 Oitest - return true/false on integer compare5 D9 |/ ?8 U; y* N; R
load - load binary file from a filesystem; b, R, o0 Q1 {: {% m
loadb - load binary file over serial line (kermit mode)6 X4 D( y3 H* \
loads - load S-Record file over serial line
- Y! ?+ t, d: i" p1 M0 d. @loadx - load binary file over serial line (xmodem mode)
6 ?, w) d% y1 o3 C3 o a2 nloady - load binary file over serial line (ymodem mode)
$ c w2 q% k, ?; B. U! ^, Yloop - infinite loop on address range
" q v+ m1 j2 q( n+ f& @ls - list files in a directory (default /)
1 `' ?; e0 F% ^; elzmadec - lzma uncompress a memory region# A/ w3 x- ]5 X* d" {5 k2 r/ M
md - memory display9 |! ]1 G) j0 @1 h
mdio - MDIO utility commands
* d$ F2 R" E( C( P( o7 o& Tmii - MII utility commands6 O- ^7 g) P9 F2 x
mm - memory modify (auto-incrementing address)1 A& W, `0 v) Z! ]4 z" l
mmc - MMC sub system0 ?7 H( z* @& ^% z* z' L
mmcinfo - display MMC info/ S/ k+ ]; `! y8 S, J
mw - memory write (fill)
k: H& T6 G X/ W8 T" q2 gnfs - boot image via network using NFS protocol
% G1 f, F) N9 [( Q2 g1 N$ fnm - memory modify (constant address)" f/ d$ Y# y5 v# e% Z
part - disk partition related commands
; E4 l3 s1 t! D& Xping - send ICMP ECHO_REQUEST to network host7 `6 T/ }' u- f7 \
printenv- print environment variables
4 W2 {4 P; M/ ?2 H2 g/ f# ]2 V: T6 Xpxe - commands to get and boot from pxe files" ]4 K$ F( [* }# ^
regulator- uclass operations
8 ?' X$ C8 m8 k6 B% Dreset - Perform RESET of the CPU+ Q U+ v0 D$ n$ R
run - run commands in an environment variable
3 o2 b1 f$ @; m9 f, esave - save file to a filesystem
. c I; J) J& k6 Gsaveenv - save environment variables to persistent storage
- P: j* E* S4 l; ~& `& \scsi - SCSI sub-system
2 ^% H2 d; M. m' o, h( }scsiboot- boot from SCSI device
) `) ~) b& w0 X: v: W) K9 Jsetenv - set environment variables7 r# E- |: Q; M, h
sf - SPI flash sub-system
7 T# j/ L! z0 h z% ~" K Y5 J8 jshowvar - print local hushshell variables4 ?4 D. }4 e8 p2 z
size - determine a file's size
, ]9 O/ g e& C9 m. |' Q( Q# Csleep - delay execution for some time2 E9 ]( P/ M5 \; r& p
source - run script from memory
, w# `. W' G$ Tsspi - SPI utility command
% g9 ]% X& B9 g; O! O8 s* fsysboot - command to get and boot from syslinux files. {# Y3 L8 T7 _+ c% D
test - minimal test like /bin/sh- ^9 \* y3 z9 {4 P
tftpboot- boot image via network using TFTP protocol
' G0 f' u0 K% s4 l5 R* V) i4 Atime - run commands and summarize execution time
: S# r- T+ K( I. m7 |2 [- ytrue - do nothing, successfully
) O- x! f' Z5 F! r* X# q! o/ Dusb - USB sub-system
3 c J$ m) r0 h0 F# b& I8 p2 Iusbboot - boot from USB device
0 U8 {1 Q% U) i2 Dversion - print monitor, compiler and linker version
; m4 W1 ^: f" n: Z9 j. Y
) \# F. @" d7 \发现了gpio& A$ `7 {9 ~2 h8 w6 y* j6 b# j' q
2 T1 V) ^8 v# v3 z5 M) ]) R# l
arvell>> gpio8 Z' @; K; A, h1 p e. O* g# J
gpio - query and control gpio pins
+ L# C& E# ]$ b, @* x
1 {& e( q7 p9 n% `& t8 t2 ` 8 b' R5 Y8 u! e; k, A- W
Usage:
* E1 y. P( j1 g8 A0 _gpio <input|set|clear|toggle> <pin>
; K9 M, B' v# F: Y4 h1 ] - input/set/clear/toggle the specified pin! l7 t5 h7 x6 s7 t( h9 Q! N
gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
- ?- b# K. K3 z, K" w8 Y , \0 Y+ F5 d+ ~8 I }1 F7 y
" O x$ o; i' V& R- ]1 g* S& h
Marvell>> gpio status
* a2 a2 v8 r# c) uBank GPIO2:0 a: m. ^8 U4 G0 A# J
GPIO20: output: 1 [x] sata_pwr" g( M6 Q2 h2 M6 _6 U
GPIO221: output: 1 [x] phy_reset
4 h9 d8 t/ j1 s7 d. ^1 F# B( k
4 \& p/ G" w6 ?' V1 n( j可见的io脚
9 T% N: b' S! u: v
4 V: R: {/ B8 }2 U9 R* `& DMarvell>> gpio status -a
% X( e, n6 z8 D$ k C. L0 W( EBank GPIO1:3 S& T: i% J- w; P# H0 P; X; U- k
GPIO10: input: 0 [ ]; h5 r& H* \8 W6 B/ z; j
GPIO11: input: 0 [ ]
) V0 D* {8 A+ H' Y: P2 h) cGPIO12: input: 1 [ ]' r8 B! z4 I) B7 O* d
GPIO13: input: 1 [ ]9 Z3 m" c5 x) t4 j. B
GPIO14: input: 1 [ ]& e5 s! A3 E5 Q+ }6 X
GPIO15: input: 1 [ ]
* ?! F) ~0 z. OGPIO16: input: 0 [ ]
( ^+ q0 z7 K* \( X0 h. ~6 E6 ~GPIO17: input: 0 [ ]) O4 y8 f5 A* ]$ r N! B
GPIO18: input: 0 [ ]9 I+ B3 H1 ?+ T7 P/ g- V, }& b2 C
GPIO19: input: 0 [ ]
6 m, }4 p# ?: g5 fGPIO110: input: 1 [ ]
/ B1 z! z x/ A/ vGPIO111: input: 0 [ ]! w. {+ C6 ^- z4 z
GPIO112: input: 0 [ ]
+ ?2 ^! b4 l7 `GPIO113: input: 0 [ ]
% L! D/ f) f2 }- G$ wGPIO114: input: 0 [ ]' ?, k+ a5 g1 E- h8 O+ C) Q5 {
GPIO115: input: 1 [ ]% y, ?8 x3 K6 M# q- B
GPIO116: input: 1 [ ]9 |" f" V y0 x# ^8 n Y
GPIO117: input: 1 [ ] H! l+ |( t& B: H
GPIO118: input: 1 [ ]
! _' o5 F% B" k3 }, IGPIO119: input: 1 [ ]
, e( w4 ]5 O, ^/ q2 Y5 ^. ?GPIO120: input: 0 [ ]3 t7 i; ~# A! M, ]
GPIO121: input: 0 [ ]
3 M; o( r7 e/ a E3 yGPIO122: input: 0 [ ]* x5 F( B# s) T* Y( h" H% y0 C
GPIO123: input: 0 [ ]
8 _& P0 I" E$ J: G4 SGPIO124: input: 0 [ ]
/ \& a/ A6 Z+ [1 A, ~3 EGPIO125: input: 0 [ ]6 C, u* G& j$ y7 I+ X" j
GPIO126: input: 0 [ ]2 z8 K/ q$ a; ^. S# D& d/ c
GPIO127: input: 0 [ ]; f2 D8 i4 f% ~; [ B% ~6 @. q
GPIO128: input: 0 [ ]
+ N" I7 I z/ S3 ^: ^GPIO129: input: 0 [ ]1 I9 A3 s8 k" H+ ~( t
GPIO130: input: 0 [ ]
- Z. Z9 x0 @7 P% ]( z6 Q2 BGPIO131: input: 0 [ ]) a) [+ ]2 ~ X
GPIO132: input: 0 [ ]
5 a4 a6 D. e4 K0 g6 IGPIO133: input: 0 [ ] N- S7 z5 e4 b4 X0 \1 p
GPIO134: input: 0 [ ]! V& N4 H H! d, @# }& D
GPIO135: input: 0 [ ]
e9 q* y3 w$ ~! M ' M" K9 ?1 H2 X5 h
8 D- F8 Y& U" |) R2 ^& o3 J8 b
Bank GPIO2:$ s, a9 s* k% C7 I
GPIO20: output: 1 [x] sata_pwr
0 G4 q k& T* H8 Y lGPIO21: input: 0 [ ]* N6 s$ j% q! G1 s9 M) Y
GPIO22: input: 1 [ ]
% O3 ^% q0 s/ p6 h- P L# x( }4 O- m* dGPIO23: input: 1 [ ]: h; \( q, [% }# `4 c2 X
GPIO24: input: 1 [ ]
5 Z1 V3 E; {; c, Q; ^. oGPIO25: input: 1 [ ]
* A4 M" u* E& U6 A" DGPIO26: input: 0 [ ]6 w; T+ t, G! j( k8 s9 e. T4 N; P
GPIO27: input: 1 [ ]
4 }- K* v( V, Q% LGPIO28: input: 1 [ ]
' o# z+ D+ U6 XGPIO29: input: 1 [ ]
+ O5 M* g- B& F$ LGPIO210: input: 1 [ ]0 f( S# R8 l7 h3 b% l* A& q) Q
GPIO211: input: 1 [ ]
, Y( Y/ V, G' P" v g$ U+ c: LGPIO212: input: 0 [ ]
: W7 Q# F, d" j9 z. xGPIO213: input: 0 [ ]
: }- q& S" F: ?) M; ^/ }1 a1 AGPIO214: input: 1 [ ]: a2 j2 [6 n8 \6 q4 q( K) i! x7 e
GPIO215: input: 1 [ ]
; a, l( g& ]! a/ bGPIO216: input: 1 [ ]" [. D8 F% n+ l# {: _
GPIO217: input: 1 [ ]
9 T$ _& N% S" u5 [% DGPIO218: input: 1 [ ]& [* G: v; T$ P3 A `1 F- R
GPIO219: input: 1 [ ]% R: W, w0 h5 S0 Z* x. ?- c
GPIO220: input: 0 [ ]& s' R: ]% o; |1 t# J% D4 u
GPIO221: output: 1 [x] phy_reset4 p4 {+ t) a/ f0 R
GPIO222: input: 1 [ ]
6 Z- s) i' {& |6 k9 e7 r. ]GPIO223: input: 1 [ ]
" M8 Z+ H8 i# JGPIO224: input: 1 [ ]
2 V+ L& j2 a8 MGPIO225: input: 1 [ ]
! X g! m) _, F8 {5 i4 b8 rGPIO226: input: 1 [ ]
' K/ M7 L0 a/ b1 q6 `GPIO227: input: 0 [ ]) u$ I: H* u, k0 \. T; b# o
GPIO228: input: 0 [ ]
+ V5 ~$ n. f# G9 yGPIO229: input: 0 [ ]
8 j. ?: W5 M" \1 w/ ^9 X ; v7 p, G; ~/ ~7 z
别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。. g ^3 W" _2 F+ m: C
; D" _4 y* u4 j0 A1 T& f3 T: `Marvell>> gpio
, c) w K) W0 e8 Z$ V8 n/ ?gpio - query and control gpio pins! W e# T( b$ U, b
% b8 T, L. E! v3 J# d
; e3 z/ w( c! a4 r% YUsage:
3 g3 g: R0 _( f# Dgpio <input|set|clear|toggle> <pin>1 I& A! a2 `3 f% I% ^* E* H
- input/set/clear/toggle the specified pin7 }$ i( y1 c" W6 C5 L' \
gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
( V1 ~# { Q9 G8 \4 B: C 4 t) K3 g% S8 Z' N+ b ]
set是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)' ?2 \1 m- f/ A* P+ D% i- G
) ~; R5 U6 U+ m" d0 p) d
然后看到env有地方是参数设置,类似dos的环境变量吧1 u2 k# f8 V9 U3 R
5 u! d' O/ _9 J1 S9 i: y
Marvell>> env print
8 V0 x3 N8 W0 s$ z" D0 Tarch=arm
; G: o+ h) {( k# P; G# y& cbaudrate=115200# I: b; w3 t3 T5 K1 h' |# `
board=mvebu_armada-37xx
% N5 {3 \/ A, k: H0 Z0 M' Nboard_name=mvebu_armada-37xx' _: u1 y" ~ {% ~( Z9 b3 z
boot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
7 m- K/ ^+ c' M+ gboot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};% f8 o9 S* z8 g5 M
boot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
% v* m& t/ r: V0 x: Tboot_targets=usb mmc0p1 mmc0p2 sata
; U. ^ T5 B+ I( M* B; bboot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
" L/ h; P6 B/ I( Fbootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi# x5 G( E- P q) r" B; z
bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;) ]+ G7 e6 l* F; _$ [4 U
bootcmd_normal=run bootcmd_syno;7 A7 N9 W! `9 F- R4 @0 d6 |
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;! M9 n; C5 R5 s5 E
bootdelay=1
$ Z* g* p$ r& u% s! I" zbootdev=scsi 0:1
- b( n p; P; g2 V: W9 v1 Gconsole=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
# j. ?6 g5 R5 x$ U: tcpu=armv8
6 {+ K: t3 o' I2 N3 S) @& g. wethact=neta@300008 Q) k" g% e! Q4 n4 p
ethaddr=00:11:32:11:22:00
! l% A1 {& I3 ~- c0 sethprime=eth0
8 Z( j( U) f8 W/ T1 [fdt_addr=0x60000007 n% ?# b2 Z4 @( u6 Y0 y; o5 G* u
fdt_high=0xffffffffffffffff
1 p' v! V+ V" N8 rfdtcontroladdr=1f6437d01 ?+ z) k g. w4 T1 c. [" W- e
gatewayip=192.168.1.254* ^+ l/ U& _$ p) p+ q& }" d
hostname=catdrive
5 D/ c1 W* R# \' O: u, Fimage_name=/vmlinuz! q# q7 C: i. D; J8 a5 F
initrd_addr=0x1100000* s5 A) f" M" S: x
initrd_size=0x2000000
, y% X# ]7 X, w, Hipaddr=192.168.1.119, H( A% g B ?) O
kernel_addr=0x7000000* G7 k u- }6 d2 g/ p: [
loadaddr=0x8000000+ I- I9 N3 P# j1 r; R
netdev=eth0
4 {$ A5 S& o* Qnetmask=255.255.255.0
! V7 @6 k( `) E2 V6 {) h- _+ crootpath=/srv/nfs/
; X8 ^( X! P* @% Fscriptaddr=0x6d00000, V6 w/ O0 s: j7 ]4 Q
serverip=192.168.1.254
& ] l7 }# p4 \( @& Q8 S4 V) dsoc=mvebu
9 r+ P1 X# Z- zstderr=serial@12000' A; o; s; O* H2 c
stdin=serial@12000; B: e9 y; s* F1 Y2 `. l+ B) x
stdout=serial@12000
4 [$ l# d/ W3 r" Qsyno_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
2 ~" C" _2 F( o. a, Q+ |8 Bvendor=Marvell/ ^' I2 C0 v0 ?2 N& w- J
9 {8 t: U% ?4 f" U; Q 9 n0 ]+ R" l5 Q- s
Environment size: 2001/8188 bytes, D! T( g. F! j1 b
Marvell>>- c1 o6 D0 i' f# ^% D
3 V3 E: p! a7 q% C# ~9 a( a0 l6 F看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.
! }9 f" v! Z0 G& C4 n( R- G% M) sbootcmd_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;
0 |7 ^4 W' v3 t" z7 H' q) v$ D ' _4 [! E5 J7 Q( D! z
这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了
- n Z+ M) y% i' y3 jbootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒
M$ s, ?/ A4 d ' K8 t- Q, m' G* m0 T* l7 [. P$ W
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;( f, e+ j$ [' R+ z% F% R" r+ Z
- q+ H H2 Q) w注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。
( `1 K! e' ^% w2 m1 g* m) c思路是:
/ h5 s5 ` e( Z( l7 K- W; F4 A! \9 m启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。; t7 N* A0 @3 \% E# y! s7 Q/ ]1 z8 y
8 m0 o: J! x0 b3 S, S4 d6 C这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启
T) I; h# S. D3 e& a* S' K/ r 7 P: W- F" x" X; s; i
控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启
/ b! \3 K0 s( h H) b#!/bin/bash0 O5 S. o: n4 [+ ~8 L1 t
dt=`date '+%d/%m/%Y %H:%M:%S'`9 Y; ?) y; T0 G! `
echo "$dt"7 f8 P% A* q5 b4 s, E" [1 E0 t
sleep 60
. d# x/ E! u% S! g8 Unum=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
6 T+ F6 X+ S6 e$ K# m& L: `( Lecho $num, N; O5 \% ]& E: ]! |! M3 B
echo $?
/ O: J; S- z- Cif [ $? -eq 0 -a $num -eq 0 ]; then8 v: `7 z2 z- V) J9 K4 f0 M* x2 y- {$ ^
echo "$dt ok" >> /result.txt
0 I" {8 ]4 K# s* A/ zelse% J( P h* j6 F- a5 q: f
echo "$dt noip loss $num reboot" >> /result.txt- P9 A. f' {9 a& o
reboot: d. i; Q* ?5 P* v! y
fi
; w$ q+ h6 O, i' K 5 X/ v( Z6 U- \" o4 `( ]) T; r6 S4 |
第五行,ping后边的IP自己改,我用了一个外网的IP。/ T. W8 p0 f3 P# e+ h, J, {
1 F4 H) L0 R' {0 \4 n8 {( B" L总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。
' J$ t0 t; ^; |7 D' f ' l9 Y: h2 H$ K4 o$ X
我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。
: ?) ?. t( m- U3 C, ^( i( ?5 s% O
: k. G3 H8 i* J+ T: T' \- D. u还是上边60秒的地方,再加一条, x5 L5 [5 a* Q8 `
0 [" n& r4 O9 Y% v
: B& U: m0 ?, e9 Y2cset -y -f 0 0x45 0x00 0x55
$ {/ g3 i; i7 J% d+ Pi2cset -y -f 0 0x45 0x01 0x018 W6 s C, y1 \0 _
i2cset -y -f 0 0x45 0x30 0x076 g S* Y. m# h9 u+ F& n' S
i2cset -y -f 0 0x45 0x31 0x72
. e1 j- M. @9 B% ci2cset -y -f 0 0x45 0x32 0x72( l3 O |5 V5 B9 t0 q- s6 v
i2cset -y -f 0 0x45 0x33 0x72" B8 f7 ^, ?% _2 }
#调节三个灯灯每周期上升沿和最高亮度时间
8 K4 B- j3 ^3 p0 k# X#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44
9 |7 g( r- H0 `; ?* V0 k1 ~3 S; ?# p! ]i2cset -y -f 0 0x45 0x37 0x44
/ R9 |/ d I) N3 @- \% gi2cset -y -f 0 0x45 0x3a 0x55
6 h5 G0 H" \, A7 pi2cset -y -f 0 0x45 0x3d 0x669 Z3 U7 z, K& `
#调节三个灯每周期下降沿时间和关机时间
( p* M" m. s. m# ci2cset -y -f 0 0x45 0x38 0x44- G4 t; Q) H K i; c9 c& e& \
i2cset -y -f 0 0x45 0x3b 0x55' [/ B1 O; W2 u' S
i2cset -y -f 0 0x45 0x3e 0x66" _0 m2 I+ B4 R, L& E3 x) ?
i2cset -y -f 0 0x45 0x39 0x40: Q2 N5 ]) y1 m5 o' e% K% e
i2cset -y -f 0 0x45 0x3c 0x406 C+ T# h. A5 n! g
i2cset -y -f 0 0x45 0x3f 0x40
( U2 N' l3 Z* _2 X2 t8 R# 0-255,更亮
N* ^% | H: n" H0 _# ti2cset -y -f 0 0x45 0x34 128
0 m r* R' L* y/ J7 V& ui2cset -y -f 0 0x45 0x35 128& H9 D3 i) g) Y
i2cset -y -f 0 0x45 0x36 128
1 z0 G O9 d/ ]* o, J4 R- Z$ g ; {* Q j% L- C8 S) p
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯
6 \9 M- c2 F& T+ T: v" N9 D
/ N, B5 S+ t$ O g) w
* p; q4 W1 R, K- ?0 H1 K" F1 W& Z2 ~我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。7 R! Q4 N. \) L$ G- V' U
) D$ @* P# ?0 N1 v, K0 f9 G希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。, B/ Y# J- V4 R7 v, W
|
|