|
|
转发:我好像解决部分猫盘刷群晖后掉IP的问题了. v' F2 Q$ ]/ O5 ~
& p. u2 [$ }) H- [
aquila995
( @1 e U# P6 G* g
; w7 I# w9 x1 T* |0 a于 2020-06-24 16:37:11 发布
3 v- L$ F6 x8 [' ~8 K. I3 ]9 d D3 _! [* p. v5 `. N: x
13215
9 s+ Z- u" Q9 D( F+ C9 j1 \; b; ` 收藏 13% ~: p3 B: z( R1 V$ F+ @) j* d B
分类专栏: 群晖
4 l: h( h7 ]* f6 @/ u版权 } ^, _ y% j) f
# g6 c- W. n9 `2 v) Q2 c p群晖
8 t, R0 _4 V! ~3 r5 n. o专栏收录该内容8 V- c l; P& _- b! c
1 篇文章0 订阅
* }* s$ |' l# x4 L+ P; C订阅专栏
_! ?/ Y" p5 P0 r4 J/ o& f我好像解决部分猫盘刷群晖后掉IP的问题了
/ z7 b: d4 E5 }( X6 B4 P7 M + Q/ R( J4 r* }% e" _) W
我好像解决部分猫盘刷群晖后掉IP的问题了
4 j/ E1 r& J4 a5 I. o5 H( s9 l
5 R, @/ y% {. m4 ?. G0 E先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。$ }* X; I% \! r! Y i2 Q
然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。
% b2 |* g% [, V9 g ) X! [5 ?% w4 c8 P
跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。) b1 c0 @4 s5 |( y" Y
7 f* \# k) o6 H
然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。
6 S h9 `# _+ T$ F' ^
0 D; c7 J4 e% W9 q先看了下有什么可用的命令:
1 r% ?( U4 u* [' q, c
! m% G% a. m9 s# EMarvell>> help
0 z% `0 p; W# I$ G; Z2 M" C- A? - alias for 'help' \$ R2 }& I7 y' S4 n4 W
base - print or set address offset
( Q0 q, z9 h8 I! Ibdinfo - print Board Info structure, m. L3 t( _" Q* m
blkcache- block cache diagnostics and control8 Y) y6 b/ |6 ~" Y3 V b' i* z
boot - boot default, i.e., run 'bootcmd'6 |+ V4 U3 C3 p8 b' m! @7 q
bootd - boot default, i.e., run 'bootcmd'4 Z0 H& h$ a! X' W! L6 k8 j& t
bootefi - Boots an EFI payload from memory
9 J! c6 s/ n: L6 lbootelf - Boot from an ELF image in memory
) e# C; l" w5 P+ Z8 H# I$ }booti - boot arm64 Linux Image image from memory* O0 n( }$ Z7 @1 j3 d* P
bootm - boot application image from memory
# \- R# \5 e* N! O9 G============================================================0 E7 X3 d" j/ X" w0 [+ q9 m5 y
bootp - boot image via network using BOOTP/TFTP protocol
! G: V3 z. @6 R9 s# r4 r============================================================2 a2 j, L& T2 p v! J0 ]5 U7 n
bootvx - Boot vxWorks from an ELF image
# m( @4 j8 c( X+ K; K) Fbubt - Burn a u-boot image to flash8 d) \6 ?: O8 R5 e
cmp - memory compare
! f0 w& _$ a s8 kconinfo - print console devices and information
+ v" R+ Y6 `/ E scp - memory copy
- o& Z' \8 H. }6 F7 f5 t& T! qcrc32 - checksum calculation
0 M' z4 M' Q6 i4 q1 x5 |dcache - enable or disable data cache) N& M9 x. {: U8 G! F }4 l
-------------------------------------------------------------
( @, n! O$ v2 s4 z! j5 bdhcp - boot image via network using DHCP/TFTP protocol
2 w: i3 K$ Y: C+ S9 x' s, k+ z) K-------------------------------------------------------------' A p! z- R2 m' C( t7 z# j- R
dm - Driver model low level access9 C7 o1 p) U. K
echo - echo args to console
6 h# O6 f4 i) B0 c" c6 ^editenv - edit environment variable) b; ^, G( I" @) I8 e9 I) o8 j
env - environment handling commands) ]: t% b# g% o/ m) j2 G
exit - exit script' ^" m8 m! F2 V9 j
ext2load- load binary file from a Ext2 filesystem
. Y! k z# ?# q' E7 Y" a7 Eext2ls - list files in a directory (default /)
6 W" n4 S- H C6 a% Uext4load- load binary file from a Ext4 filesystem( S& |1 s0 f# j0 j
ext4ls - list files in a directory (default /)$ O+ g% M2 h2 E& f& X2 }$ S" n6 L* K4 S3 }
ext4size- determine a file's size
5 N' `4 B# l& f9 ]ext4write- create a file in the root directory
, ~8 Q/ [3 x% O6 u+ jfalse - do nothing, unsuccessfully1 p+ A( W& M7 G
fatinfo - print information about filesystem: |# u3 \4 X- ]) }
fatload - load binary file from a dos filesystem0 U9 S, o U% \+ t; i6 p
fatls - list files in a directory (default /)5 g" T% S- I0 r" F- Y( m
fatsize - determine a file's size
+ T8 J7 m+ i. }/ ?: k, ^' ofdt - flattened device tree utility commands
" d' \2 t2 B) a* u/ p+ V8 m; F) afstype - Look up a filesystem type! X$ Z9 ^8 E9 {5 S: N6 N) a6 \
go - start application at address 'addr'2 Y! X% _# ]# a1 W
gpio - query and control gpio pins
; {/ `& Z4 [4 O: { d* _; d* hhelp - print command description/usage
# l$ _* v2 f- \3 n1 vi2c - I2C sub-system" G/ a8 {8 F U0 S0 i1 p$ }, D
icache - enable or disable instruction cache% I% d. c1 Y) R" E. C9 M' D
iminfo - print header information for application image
8 L G5 c1 I# e; d$ E0 Eir - ir - Reading and changing internal register values.
5 {# ^; y9 w% s0 v- I( c) ` 4 M3 N8 |4 J2 O! T6 r( [/ Z
6 X. }( l8 X1 w* E- V% x& j% x
itest - return true/false on integer compare
5 p" L/ \. r* }- C/ I: aload - load binary file from a filesystem9 Z0 i, C3 `, w. ^( k( r
loadb - load binary file over serial line (kermit mode)
" v; Y( j. B0 F% S1 T3 L7 p+ \loads - load S-Record file over serial line; i6 L' X. T3 D" Z
loadx - load binary file over serial line (xmodem mode)7 s3 ?. w5 p$ Y+ g
loady - load binary file over serial line (ymodem mode)
! \; E4 @8 Y: |) C- B! u2 n) oloop - infinite loop on address range( o, J. i7 K/ i2 d/ m. ]$ N2 n$ t# M( y
ls - list files in a directory (default /)
( ]: Z( }! o1 }# n: x& A" h9 _* J& jlzmadec - lzma uncompress a memory region
+ j6 q+ s! g( m' q8 q6 B6 kmd - memory display! R# _# p! B3 p ~: ^
mdio - MDIO utility commands
) |0 Q( r8 ^0 `7 a+ {$ ymii - MII utility commands5 k9 q+ H m6 W" w s4 \: u
mm - memory modify (auto-incrementing address)
/ R1 H, j' i- z: b/ _mmc - MMC sub system. S( v3 R/ \. M5 p* y% Y, w
mmcinfo - display MMC info9 m% }2 T; p: }& ^- B" e7 b
mw - memory write (fill), C5 {2 v' o$ l, Z5 E3 {
nfs - boot image via network using NFS protocol u! _% b" \% E Q
nm - memory modify (constant address)
7 d5 @3 ], e0 |/ vpart - disk partition related commands
$ y/ |( r0 V* Y6 ]( e2 c. gping - send ICMP ECHO_REQUEST to network host! ?8 w- ^& q9 L: U c' ^) @
printenv- print environment variables i+ U- M8 v& v2 E: s
pxe - commands to get and boot from pxe files
4 b8 }, l) Q( r# kregulator- uclass operations+ M q% W# [' ^: y8 z" L0 \$ N
reset - Perform RESET of the CPU* c" [/ k( T2 K1 j, U
run - run commands in an environment variable
9 f: X! u/ h1 t$ }0 N7 Isave - save file to a filesystem; H- D4 f' K- U3 c
saveenv - save environment variables to persistent storage$ h' T, H* Z4 y
scsi - SCSI sub-system
! \9 _ r* ?6 w: R3 _7 x @( qscsiboot- boot from SCSI device
% c5 \' |4 d% R, _7 c7 ^5 a, qsetenv - set environment variables+ z$ N* N- I4 d6 e" Q' @
sf - SPI flash sub-system
0 O9 f- q3 h' x( S9 pshowvar - print local hushshell variables* f& A/ y, I% c+ x5 Z3 ~2 N
size - determine a file's size
( H/ n4 S9 J( H& m1 \/ w. Hsleep - delay execution for some time
7 _; {! B5 D$ Asource - run script from memory
9 s0 _% e& r* j2 }sspi - SPI utility command m1 y, V# ^3 U' N$ l: b; F
sysboot - command to get and boot from syslinux files
9 P+ Y% P# D, @: Z8 wtest - minimal test like /bin/sh7 x- h% o% A6 B' N* n# Z
tftpboot- boot image via network using TFTP protocol
& [4 H) Q6 M* X6 L% v3 Gtime - run commands and summarize execution time
% e; t8 {) F1 B* f! l: d" Otrue - do nothing, successfully
4 A) {4 I7 V# N4 u( B+ Ousb - USB sub-system% c& M. u9 z% M# u( M" L. X0 C
usbboot - boot from USB device: O, ]* h0 b5 u2 K$ B5 C
version - print monitor, compiler and linker version
: d( y7 a) J4 `. Z: L6 M
% [6 \& C |/ u. T发现了gpio. ^! r6 `6 N- z' O( E5 H
) T0 X& T, D% }, @
arvell>> gpio
( U, J# w Y& Y7 kgpio - query and control gpio pins; w1 g( A5 o* n$ x0 y& x# m
# [( p1 M5 g+ \% `7 x
8 K% q2 q" L4 A9 l
Usage:8 b( [* }5 q. V
gpio <input|set|clear|toggle> <pin>
- F; Q( L$ a, L( J" e4 N - input/set/clear/toggle the specified pin" p, q8 L0 G3 T- b
gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs4 ~3 P* @9 F# u4 k* z/ F; s
& ]& H3 N; o. f- D7 T7 J
( ^9 Z$ s: i- E/ [" a' XMarvell>> gpio status. ]$ g: {/ E+ d+ k1 ?2 [' _, _" v) U" v
Bank GPIO2:( r# o- q1 r- p- ?" ?
GPIO20: output: 1 [x] sata_pwr9 m% F5 c2 s4 v) v. Z: N
GPIO221: output: 1 [x] phy_reset
+ a9 j! o9 j0 P* R Q1 ?: {3 @% _8 n
9 P& w; {, a( @7 y0 ?可见的io脚
" W) W, c; l- u' M6 ^$ S+ m% M1 v % f! c, ~/ r+ @+ H5 @
Marvell>> gpio status -a
$ ?9 ?/ ^$ w. O0 W6 B9 YBank GPIO1:
7 H7 j. ^9 X- QGPIO10: input: 0 [ ]6 l9 e9 _- h: f% b5 J7 o: H
GPIO11: input: 0 [ ]- j4 X) J+ x6 g- ^! |9 @
GPIO12: input: 1 [ ]
1 A, W5 h1 q# d& y% i) B% `GPIO13: input: 1 [ ]
# {% x' u x$ b3 A% qGPIO14: input: 1 [ ]
8 P: _ k7 b3 A; F3 X$ dGPIO15: input: 1 [ ]) V7 X: ]! M( T( K
GPIO16: input: 0 [ ]) M* F2 d4 G2 x3 N
GPIO17: input: 0 [ ]
: C2 H! g [9 ] k1 }4 uGPIO18: input: 0 [ ]
2 p; L/ x7 x* [4 @GPIO19: input: 0 [ ]7 g) Q i. ~; i- [/ k. B0 C+ ]
GPIO110: input: 1 [ ]
) p) l" {9 o3 P+ e: g% A, h9 T4 aGPIO111: input: 0 [ ]
: j, }' {$ [; T: kGPIO112: input: 0 [ ]: H& D7 l1 ?# A+ ~3 r* P2 w
GPIO113: input: 0 [ ]2 x: h' V# J3 M8 z- a/ c
GPIO114: input: 0 [ ]
% d5 x$ }: d2 p% |' wGPIO115: input: 1 [ ]
& U3 C( ^2 D1 S) F' nGPIO116: input: 1 [ ]9 U& R$ h" { `& R% {1 X. V
GPIO117: input: 1 [ ]
( U3 ] C1 U1 t/ {3 K( o( W# {- qGPIO118: input: 1 [ ]) f }3 {7 U0 n
GPIO119: input: 1 [ ]" a& I6 V1 t% Q& j
GPIO120: input: 0 [ ]1 ]8 H. X$ X8 C) w4 y' a; |2 o
GPIO121: input: 0 [ ]. c6 g/ U# V) v8 l/ {) h% |) o- h
GPIO122: input: 0 [ ]/ ^ G' Q) ?2 H# k& E1 J
GPIO123: input: 0 [ ]
5 X2 ]& m6 b! S2 z6 HGPIO124: input: 0 [ ]
" p8 d& X U# B) Z: \* o. O- }/ YGPIO125: input: 0 [ ]* \# x: f4 e7 J. x) x& }. v, G+ @
GPIO126: input: 0 [ ]& k2 q, i; F2 W' ~3 h; p2 l1 M
GPIO127: input: 0 [ ]+ ]* w3 H! G, k0 C8 {
GPIO128: input: 0 [ ]
3 [% |" M8 J; h1 ]9 T. JGPIO129: input: 0 [ ]
2 g- M- Y7 a+ \% z# H1 ]GPIO130: input: 0 [ ]( ?# k, @$ @# z ?% n9 z
GPIO131: input: 0 [ ]% H" h7 p+ o% T. O
GPIO132: input: 0 [ ]
5 [0 I, l2 o2 h% o# D4 h( EGPIO133: input: 0 [ ]
' C) `3 P; S- ^5 [GPIO134: input: 0 [ ]! R% k L+ s8 U2 {9 g
GPIO135: input: 0 [ ]6 V4 z/ h% T' z- t
; l: F+ L! C1 A: i
7 h7 n# x' }; C" l) R( g( tBank GPIO2:
% Z; f9 j: U7 hGPIO20: output: 1 [x] sata_pwr* Z9 Q* U, c* k9 l$ G" h) \
GPIO21: input: 0 [ ]
5 @9 k. T/ \5 `8 ^7 X5 AGPIO22: input: 1 [ ]
6 Y0 L3 U ]- {4 E# M: G0 zGPIO23: input: 1 [ ]6 R1 v' o4 H- Z2 A' g9 _; F7 j
GPIO24: input: 1 [ ]7 ]/ \. S& S. T# Z
GPIO25: input: 1 [ ]' E( Q( F: t" s! ^( J
GPIO26: input: 0 [ ]0 h, s0 J k1 J- r- y2 B+ O$ d
GPIO27: input: 1 [ ]
6 ~1 i' M" b9 t" i( XGPIO28: input: 1 [ ]
3 Y; n1 h" u9 ~/ [) y; w( DGPIO29: input: 1 [ ]2 ]; Q3 \) u8 ~' s
GPIO210: input: 1 [ ]
?7 q3 j' ?8 a7 o- ZGPIO211: input: 1 [ ]
* F' _8 o/ ?$ M. U* jGPIO212: input: 0 [ ]6 z* a9 x# D* ?+ u& |
GPIO213: input: 0 [ ]
) m, A5 p" U4 L. [4 S8 @* n. L! UGPIO214: input: 1 [ ]
/ F' ?; I5 U: m! k2 e4 X& n/ i& `GPIO215: input: 1 [ ]7 ^" L0 C% h- A3 B
GPIO216: input: 1 [ ]3 r+ e" d9 u7 ]. a
GPIO217: input: 1 [ ]
2 \ ^/ k) j" _0 O# _% S0 G6 WGPIO218: input: 1 [ ]" \7 ^7 D g7 R! w% h8 J
GPIO219: input: 1 [ ] O9 A* l9 Y2 r5 p1 m, M
GPIO220: input: 0 [ ]3 B+ s/ _. K& g V# O- ~
GPIO221: output: 1 [x] phy_reset
6 W. u3 ]3 x- B) d% FGPIO222: input: 1 [ ]
; v, h; u0 K7 D" `3 J0 R" oGPIO223: input: 1 [ ]
, z3 S# H/ s- h7 P. n* DGPIO224: input: 1 [ ]1 T- y% b) x1 F, B$ @# x) r
GPIO225: input: 1 [ ]8 x: e5 T7 d0 ^) h7 I
GPIO226: input: 1 [ ]' Z0 c" _; V& O4 T5 K
GPIO227: input: 0 [ ]
" [& @8 Y6 f" e1 U E. h; K% F$ rGPIO228: input: 0 [ ]
2 B5 M6 p' S9 Q* PGPIO229: input: 0 [ ]
* q' `1 T9 {4 h1 J' v $ z z3 U5 |9 s+ U
别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。" a; e! L3 W! B% r8 {5 I
; [$ v2 y! U2 j% a5 ZMarvell>> gpio
. j* p F9 t: \& B, xgpio - query and control gpio pins* u4 A+ Z- w; L6 x
, p& X" A! T3 e% M9 N( {7 d/ Z; Y
4 h7 g9 a$ w2 p, N! s
Usage:
( E) y' y" d1 r% p& Igpio <input|set|clear|toggle> <pin>9 G0 G+ {& |0 C) H5 C" M
- input/set/clear/toggle the specified pin
( N$ b8 i7 L. g t; y) q# C+ M3 qgpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
) ^0 M: o4 Y- U: ^ " P. G5 |; h9 l/ j2 l; K F
set是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)
' d: X( V! C9 q( q& {/ ~
: R( @$ T* G/ [ h然后看到env有地方是参数设置,类似dos的环境变量吧9 A1 b5 P( |* P `
0 h' C. u5 m7 d) A$ L5 \% w3 w6 a
Marvell>> env print. r* k. [+ e9 n- M- E& E
arch=arm
' W$ T H4 J4 F6 ^. k% x1 C3 H8 Xbaudrate=1152006 G* k0 f, Q6 d3 M3 s
board=mvebu_armada-37xx
4 y/ K0 r( `; M$ l9 W. D cboard_name=mvebu_armada-37xx$ `2 Q* O7 E6 q7 P
boot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};& Q: _6 ^5 l5 Z I5 }6 ~/ U, b5 o. q o
boot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
& C5 r- K+ c. W7 q0 v* Sboot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
9 z% H6 V7 d% j. N3 ^- I$ |boot_targets=usb mmc0p1 mmc0p2 sata% M5 |$ j3 n4 B* K9 h! N
boot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};4 j, f7 R! W9 O p
bootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi5 t( D5 [5 Z- z& @
bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;6 L& R0 R1 `9 o/ `* ?, L$ ?# N
bootcmd_normal=run bootcmd_syno;1 W# v& y. [2 ~8 a
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;$ ?0 J# r9 Y2 u$ s, F* J$ y
bootdelay=1
/ n0 V; r8 x. v$ ebootdev=scsi 0:1
* \% j; I/ G) @3 Z( ^, \console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
1 S F+ q1 r [cpu=armv8/ |; f- r. l/ C% D7 J/ @
ethact=neta@30000
3 S* [; @3 Z K4 U. yethaddr=00:11:32:11:22:005 \* @( r7 N* U8 Q6 W7 n
ethprime=eth0
& `. Q1 u. g# x- i, m+ @8 cfdt_addr=0x6000000, t6 }8 z) `7 ^+ n5 A
fdt_high=0xffffffffffffffff
1 {6 A; g' ?" u/ Wfdtcontroladdr=1f6437d0$ f$ l2 ^/ N l4 w/ X/ z
gatewayip=192.168.1.254* m, ~. b5 K* ?6 U, G( B
hostname=catdrive
- O7 F6 m4 h& T0 z9 l7 y3 _: x6 Y5 Cimage_name=/vmlinuz
' g" ]4 V- V/ Z8 i9 f h$ }initrd_addr=0x1100000
* s: h# `! o! V: y( Einitrd_size=0x2000000& h! m6 C7 m2 k- Z2 d9 F
ipaddr=192.168.1.119; q! U& n. w- U( N; M& o
kernel_addr=0x7000000
1 h9 R$ k0 w: q& Sloadaddr=0x8000000: b$ g! G8 f( r; f: q6 ]3 d7 d. \
netdev=eth01 [, K/ o' c4 m) l' n
netmask=255.255.255.0
. N5 `# r* @6 Y- {0 Q7 f0 R! Orootpath=/srv/nfs/; |$ C" S. Q: B" c1 ]1 K& Q- ~6 B
scriptaddr=0x6d000006 T# \1 N; W/ u- z
serverip=192.168.1.2544 t- @. B: ]1 n: J1 [9 U" `
soc=mvebu
* P1 D$ D( C0 wstderr=serial@12000
7 Y$ M- c# I& G+ estdin=serial@12000 M/ }3 c7 N/ S. @0 j9 q/ ^
stdout=serial@12000
" b, [- k/ w" 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=Marvell2 a/ v( q7 M. m7 l9 T( X
vendor=Marvell, H) _0 [) Q& [) P0 F- L# k. j# `
9 p* q2 G" c) q, u5 O b
1 Z% ^ y8 A0 UEnvironment size: 2001/8188 bytes
# n( s& f) O9 [7 ^1 m! f- pMarvell>>. P9 Y) B0 ?- o7 M8 U
1 S2 G# c: V2 B% j- L看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.
+ r. |" R- ~) [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;
7 H R3 b* _& j" K* v+ b9 i! L
( W% p+ |+ y. y& c6 M这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了- d- k. j L1 }* D
bootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒" k+ ^! j$ n* V; q* @% T
0 Z6 G7 c& x4 i: ?# t& C+ Obootcmd_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;
( C+ j* c) A f S ^" i ; I( q6 w6 j: Z% ^6 |& `3 j
注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。
( F/ }3 e& @: C# G$ U思路是:; Q- W/ z3 f. V% M% \
启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
5 N* v5 L2 p( R n: E Y7 t% ^
/ R5 W+ `$ V1 P6 u+ D这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启" X) i7 V; x8 w' j) j
* i- E7 y9 X7 i# [9 N
控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启! G$ Q' z% \& S# Z' z( _
#!/bin/bash
7 G6 m0 \ I* M! d4 L6 r" M1 idt=`date '+%d/%m/%Y %H:%M:%S'`# d' t3 U4 A. T( j
echo "$dt"1 j3 i8 D' Q* m3 y
sleep 60
. W0 I7 d5 J5 `num=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`' P5 _' Q8 d+ L% }0 f* p
echo $num+ `5 V; K( ^ N
echo $?1 z1 H7 Q7 F' o& E
if [ $? -eq 0 -a $num -eq 0 ]; then
# `" Y6 V& n7 }! ^5 ^4 e echo "$dt ok" >> /result.txt
/ \9 n& S' O: e! u( |else5 o# \" L; h' V% W8 C% R) ]! a
echo "$dt noip loss $num reboot" >> /result.txt: p/ x& v6 J; l+ j. V
reboot
6 J) Q& g9 d: Bfi
5 Y9 ]7 `3 m. m; g) B9 U) t7 b 9 f/ p# i2 ]/ ^7 I9 k v# I$ p
第五行,ping后边的IP自己改,我用了一个外网的IP。
. N* ?& K; W2 r6 f8 w; h # [9 @7 V% q& G- K! N# y% v
总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。5 s% ]/ y* q* R1 n3 Q8 p
+ ~0 U. p% s+ B, G; r0 O) Q# W& O# W我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。
7 l8 w1 R* B7 w* p+ W5 d9 M 1 \% F8 D2 [* Y: T
还是上边60秒的地方,再加一条
U! c. f2 l% ] ^* _, V2 y
/ k6 _' T% j/ c$ ^) V
& ~9 c8 n) e$ l) l2cset -y -f 0 0x45 0x00 0x55
2 {& @7 x/ Z, l( Wi2cset -y -f 0 0x45 0x01 0x017 s$ ]0 V T7 @
i2cset -y -f 0 0x45 0x30 0x07
- g# D- W& o6 h9 q* V1 l% pi2cset -y -f 0 0x45 0x31 0x725 l5 W4 r4 m" T' {
i2cset -y -f 0 0x45 0x32 0x72
0 [; C$ R$ I- q0 F; K8 F6 l, K* j4 yi2cset -y -f 0 0x45 0x33 0x72
0 u6 ~! ]5 [: Y6 k#调节三个灯灯每周期上升沿和最高亮度时间 {1 s& b: O1 P5 X4 B( S+ _
#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44
* o1 j5 H. z' Yi2cset -y -f 0 0x45 0x37 0x444 k' l& {6 W6 b A' d8 x
i2cset -y -f 0 0x45 0x3a 0x55
; D; k' E; x5 u8 C) Yi2cset -y -f 0 0x45 0x3d 0x66; d. C" I+ V- L% j
#调节三个灯每周期下降沿时间和关机时间 B: _) J0 T+ }& J' ~) I6 ]
i2cset -y -f 0 0x45 0x38 0x44 M) V2 E p6 |6 G# y* p
i2cset -y -f 0 0x45 0x3b 0x55: A9 M; z& n6 d3 F# _+ H
i2cset -y -f 0 0x45 0x3e 0x66
) A( s' p" [' d/ ki2cset -y -f 0 0x45 0x39 0x405 S/ n+ p/ u! p! G6 G$ \$ @
i2cset -y -f 0 0x45 0x3c 0x407 X* m: L" P) o$ a
i2cset -y -f 0 0x45 0x3f 0x40
3 m! G8 l6 k2 b, z% g& G+ ^7 t# 0-255,更亮
( u' W0 i' L" m& ei2cset -y -f 0 0x45 0x34 128
6 W! |$ {3 w: D0 ~ b8 ^i2cset -y -f 0 0x45 0x35 128
; i, ^7 d* z/ l# t, Xi2cset -y -f 0 0x45 0x36 128
! y1 M2 L; T. P& J q% b! M
& H+ l. Y% r( Z: l3 L- ~4 [6 o3 U然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯
( d2 `0 ]4 x; M( ?
. B5 q% P+ Q2 H5 _7 d
' O; ?& ^: a0 Y7 N7 R我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。2 J/ T: O& y l2 A/ P f
$ F3 t1 z8 P6 c% A: {' o希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。# _4 a" h, S, l+ _2 I7 I) _5 P4 @
|
|