|
|
转发:我好像解决部分猫盘刷群晖后掉IP的问题了% _ l- U8 p6 C6 j& x
5 K$ A% l# s9 \) R1 x
aquila995
# \. h; ?0 ^ V# `
& f. A7 X2 U @6 y# x# ?0 h于 2020-06-24 16:37:11 发布- ]* \: b- q6 `
; Q8 L% z% w. d2 `7 k5 ^
13215- I0 ^1 e( @9 F9 b/ n$ h/ o8 x
收藏 13- u: @$ M2 `1 }( d" c1 T5 d; o" \
分类专栏: 群晖; Q) W- w0 A- A9 n) O K0 c
版权) h, R' y! N; M; h! p# H, z! V
+ N1 Z! p+ C2 x5 b/ v9 k
群晖
% U$ c3 X5 x1 T专栏收录该内容
9 b/ O8 i* ]' r0 b1 篇文章0 订阅
! p: u9 f$ d; D$ u4 k: F订阅专栏: _7 S& ?* X+ J
我好像解决部分猫盘刷群晖后掉IP的问题了
D) M u7 R1 T: K; q; O) z# R
+ y H8 E# M7 p# \% S8 h我好像解决部分猫盘刷群晖后掉IP的问题了- Y$ o: {( ~& R+ r
3 y2 K' i' r" f9 g0 k5 h/ c先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。
& Z, U7 q" A: s" P& c* ?0 `6 s然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。1 L! k B# ^* e5 c' {, x
8 F2 l7 H q% }2 C4 X跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。. E* c3 A, Z/ V! }/ M! W/ ~
. @+ E2 k' h2 q1 o
然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。! q f# t: j; E Y2 q
# O8 e; F/ M4 q, f9 t1 d先看了下有什么可用的命令:& Y: L- Y( | o4 Y6 L
) v( m$ n) C8 b$ H: c% }& @2 V
Marvell>> help& \9 p$ F1 s, u8 B( }8 ]
? - alias for 'help'2 w$ }& \4 k3 _/ J6 Q1 @
base - print or set address offset
3 b1 w8 U$ Y; K! ybdinfo - print Board Info structure" b o9 L" ~) O; S
blkcache- block cache diagnostics and control
1 N H1 I7 g, {/ hboot - boot default, i.e., run 'bootcmd'2 l0 H; u- t1 e- I( m0 v( H! J& e
bootd - boot default, i.e., run 'bootcmd'4 ?8 \/ W4 a. r i) C
bootefi - Boots an EFI payload from memory
% D, W& P: p& H8 P, C5 lbootelf - Boot from an ELF image in memory/ Y, u% i6 m6 A5 ?! w- x+ m
booti - boot arm64 Linux Image image from memory
- ?( A- T. j* d. x- `/ Zbootm - boot application image from memory
! H" N& F& V( A `/ t' x( n============================================================
1 X" ?- n: f1 R' Cbootp - boot image via network using BOOTP/TFTP protocol& d2 `2 s, G: r6 U& X/ |* y4 g
============================================================
8 @$ }: U' e8 d& P+ O: Wbootvx - Boot vxWorks from an ELF image
) |& f& f& M0 D$ ]. s+ e- abubt - Burn a u-boot image to flash
8 x g; ~6 @6 C/ Q- ?cmp - memory compare
0 w u# k$ C# H4 z/ p& nconinfo - print console devices and information% R# J( K8 F* c0 @6 V
cp - memory copy
+ T) ^6 W4 L% a4 q- n, Fcrc32 - checksum calculation
3 B: Q* Z3 y. b8 Z$ R& ^. Edcache - enable or disable data cache% i3 y7 `. A o7 ~0 O* }' l0 Y
-------------------------------------------------------------
$ l! E) j- A3 c7 A. P5 mdhcp - boot image via network using DHCP/TFTP protocol( s5 l9 M. R$ ^. }, _9 ^
-------------------------------------------------------------
& n) B1 D0 q. X0 S5 y0 W/ {dm - Driver model low level access
* ?" P, H9 M7 ?1 U2 Recho - echo args to console
$ I* d" @7 q8 @9 s, F4 yeditenv - edit environment variable
" {, H8 Z* q# c' \env - environment handling commands; J5 s5 ?" C2 Q
exit - exit script
+ J# v: n# O9 X- ]) Vext2load- load binary file from a Ext2 filesystem1 {. [' o0 \5 N+ w
ext2ls - list files in a directory (default /)
, y. K& `$ U2 G( F y7 O8 f. oext4load- load binary file from a Ext4 filesystem
. X' x6 S" U. _* V# \% f2 jext4ls - list files in a directory (default /)
) z4 B' ?* m2 b! N' J% rext4size- determine a file's size
b$ @: _4 j3 ?2 W2 oext4write- create a file in the root directory1 z' G6 \1 O2 Z! E& x/ d9 x8 j, I
false - do nothing, unsuccessfully+ ^* w4 l9 N8 d* e3 T2 ]! k* u
fatinfo - print information about filesystem9 F. H3 T" @+ O4 H4 `- ]' A$ [' J
fatload - load binary file from a dos filesystem
5 N' O! u1 @! o0 E* l: r1 R! rfatls - list files in a directory (default /)& T- m5 ]! o$ _% h8 ~0 O ?4 j9 Y
fatsize - determine a file's size# Q6 d$ B1 r7 C$ i( i# d9 e
fdt - flattened device tree utility commands: A' }5 K8 o, A3 O3 x( a
fstype - Look up a filesystem type6 c/ X) n. C: q+ Y
go - start application at address 'addr'
7 f: ^0 M" r. e* ]gpio - query and control gpio pins
4 H r" h& `( d0 c& v6 c; u6 Lhelp - print command description/usage# [+ F) j/ J' _: g+ d
i2c - I2C sub-system
' ]' |9 ]( C' B; b8 x' Uicache - enable or disable instruction cache2 w. z) y5 M2 k$ x
iminfo - print header information for application image
3 i) {1 U2 y$ n7 p9 Hir - ir - Reading and changing internal register values.
2 y- c X3 Q5 c, `% L$ c: j* N; |
; u$ t1 B8 ~# [2 T 6 }6 U2 p* w/ \* w& Q( o
itest - return true/false on integer compare
/ p3 B M/ h F) hload - load binary file from a filesystem
" t! u+ |. e: A( floadb - load binary file over serial line (kermit mode); ~5 o: O0 G, z2 I
loads - load S-Record file over serial line
8 P" H: }2 g' g6 ]loadx - load binary file over serial line (xmodem mode)
h4 ^) p4 Z5 e; Zloady - load binary file over serial line (ymodem mode)
) m" l, i2 H# |7 ]6 Z5 X0 G. Cloop - infinite loop on address range2 Q% i% g4 A1 h& J0 R
ls - list files in a directory (default /) F. Q7 h- |4 d, P
lzmadec - lzma uncompress a memory region5 e/ z- W5 ?9 C/ q+ Q) v! e
md - memory display
" e5 G5 O! b$ z' H( Dmdio - MDIO utility commands
+ e: ]# D5 t! Lmii - MII utility commands) w X5 S9 Q2 F9 L- \
mm - memory modify (auto-incrementing address)
5 C6 x1 h" z8 e4 @2 V! m2 m; \ xmmc - MMC sub system
6 \% V9 m+ T/ s. w& u# \& ^8 Ammcinfo - display MMC info3 @/ v% s$ a& j8 g
mw - memory write (fill)
7 o6 A8 \% i7 Nnfs - boot image via network using NFS protocol
* `& D0 t1 }+ Znm - memory modify (constant address)
3 N S# g2 w; w0 G8 Q* Gpart - disk partition related commands8 V* |$ ?8 h: t
ping - send ICMP ECHO_REQUEST to network host3 ]0 b$ _7 k2 z# l* B
printenv- print environment variables9 y5 ?; p' D8 V! H. d- t' |8 C, B1 }
pxe - commands to get and boot from pxe files/ G3 m4 N7 p% j$ N! R. g3 ?( N% f
regulator- uclass operations" M# u) p, Q5 ~- q1 c8 _/ d8 k* O
reset - Perform RESET of the CPU$ W( `% ?3 L7 A# H) g/ Q
run - run commands in an environment variable
4 ]3 w k$ N! F- Lsave - save file to a filesystem
* a# o6 t: L1 v- y3 i8 Q- C; t* vsaveenv - save environment variables to persistent storage/ V+ G$ U1 s' L& W* i
scsi - SCSI sub-system6 @, z2 ]0 W4 q" c5 }, m; {7 V
scsiboot- boot from SCSI device" H! w: X1 R3 Q& P! k0 G1 [2 Y
setenv - set environment variables4 p% u* \- c% x- A( H4 d. {4 A
sf - SPI flash sub-system* o: P$ G! C4 d' J! u2 t
showvar - print local hushshell variables
% I7 ~+ `- X; asize - determine a file's size$ ]/ {2 H0 B4 w0 G2 X8 g
sleep - delay execution for some time! \" P3 ]1 n- A. b1 O6 \3 W4 ]
source - run script from memory1 B' T% n0 g2 T) v( T
sspi - SPI utility command. G3 D; g- w" R* m$ L" V M
sysboot - command to get and boot from syslinux files
- w) I1 c0 i* I- E% E% g! _! _2 Ktest - minimal test like /bin/sh1 c( d, w5 ]- d
tftpboot- boot image via network using TFTP protocol2 s7 ] G5 c% \, U# R4 d |7 {
time - run commands and summarize execution time
1 ?& G) M& g. m' M9 U1 l0 Itrue - do nothing, successfully! k1 k0 ]! l$ V2 r! T- N; ^+ z! I
usb - USB sub-system
" r/ e/ K2 Q. S1 V' H) Eusbboot - boot from USB device" U$ S9 [3 F5 |' ] r/ ^
version - print monitor, compiler and linker version, K8 u5 ^+ z* Z6 B. H( W" ^+ x) `6 m
7 J) k( i7 M3 V. `8 V' b发现了gpio$ S4 |3 s3 M; N) r
# M& A$ N$ Q7 D1 s
arvell>> gpio
- Z9 w* t' l( b) ]# ]! o* B4 Jgpio - query and control gpio pins$ r7 J9 z: D$ C* f7 g; ?- ?
/ ~* \- e5 O8 l0 @7 @+ _5 M# n4 i0 l 2 a0 Q0 w' l3 N. X5 V5 I
Usage:
- N9 q! m: g( D* o4 `4 egpio <input|set|clear|toggle> <pin>
8 p, u" T& y4 C" _! n" M4 ] - input/set/clear/toggle the specified pin* e- i6 _/ d% {- |$ q5 G; {! z
gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs
7 d4 E3 e" s. F; g0 \2 X 4 Z7 ^+ ]5 J' m4 a
7 p8 T! o8 T# E- r) i9 r8 d
Marvell>> gpio status
7 T: l( Q/ T Q6 d+ y: o. \9 |' zBank GPIO2:" c& S& a4 N6 Y7 g
GPIO20: output: 1 [x] sata_pwr6 s8 q7 } H5 g
GPIO221: output: 1 [x] phy_reset0 i8 Q6 u9 a5 F8 F0 E, W6 {2 J
5 V' D* p, }) ~) E- \ P- v可见的io脚
; G" T$ E, `6 Q# w3 t* \
( s3 I4 T. q2 Z7 SMarvell>> gpio status -a
8 ^8 ~2 q8 r0 ]% V2 y" BBank GPIO1:0 b }1 x# m2 B3 r$ S( h9 A
GPIO10: input: 0 [ ]( f* X8 F. ~$ }
GPIO11: input: 0 [ ]' N2 e6 K7 B* m$ X$ k9 |0 R
GPIO12: input: 1 [ ]8 u- R( v4 P& E& I
GPIO13: input: 1 [ ]
; f$ s0 C$ c) F2 X2 a: hGPIO14: input: 1 [ ]/ j+ e6 e; Q9 f: w, {" k# V; c
GPIO15: input: 1 [ ] X: o1 l: c0 |
GPIO16: input: 0 [ ]8 ]% u, W1 O) K1 D' o1 g
GPIO17: input: 0 [ ]
* |. K) w, N7 ~* k8 Y mGPIO18: input: 0 [ ], E+ h; {1 S5 F+ Y
GPIO19: input: 0 [ ]
* ] C' ]' u- a3 A2 ~1 CGPIO110: input: 1 [ ]6 f% ^& O3 y$ m( g5 r6 k
GPIO111: input: 0 [ ]
! t8 r: | a7 {GPIO112: input: 0 [ ]1 F; A r( G- q3 r
GPIO113: input: 0 [ ]$ P5 W# Y* R- |, @ C
GPIO114: input: 0 [ ]
: f; K4 O% X2 u0 V! |2 @GPIO115: input: 1 [ ]
5 ?8 X0 I2 }% F( `4 D3 GGPIO116: input: 1 [ ]8 R/ J/ B: i ^ S, S
GPIO117: input: 1 [ ]
% U3 a8 N- U! D' O4 t% B9 ^2 ZGPIO118: input: 1 [ ]
y. S0 q: h. {" r& K- F, ~# jGPIO119: input: 1 [ ]) D1 L' z1 G0 Q; y
GPIO120: input: 0 [ ]
0 Y# S! S* T3 f6 M& c7 n& d, i' rGPIO121: input: 0 [ ]
" t0 [$ b7 r& T9 FGPIO122: input: 0 [ ]) }, W; z3 P% C4 V2 V
GPIO123: input: 0 [ ]
6 f T+ Q' C2 b# `3 a# DGPIO124: input: 0 [ ]/ f' L6 k. I5 D, D7 c0 b- @+ o P' o
GPIO125: input: 0 [ ]
( N; l6 M2 J% EGPIO126: input: 0 [ ]! Q0 l7 g% _" z4 h% s: Z8 [. W
GPIO127: input: 0 [ ]1 A% }) a0 h% A& z, H
GPIO128: input: 0 [ ]- K7 k, D! v% P0 C7 T ?
GPIO129: input: 0 [ ]. d2 s J; v" Y0 l
GPIO130: input: 0 [ ]
& a! k) B2 w/ AGPIO131: input: 0 [ ]
3 m6 i0 O& P( w+ e+ i8 cGPIO132: input: 0 [ ]
, ] g, m* [# z$ \9 `6 W) AGPIO133: input: 0 [ ]5 m8 x0 H8 K/ e6 {- D
GPIO134: input: 0 [ ]( x, \, u% z: _8 G, h& v
GPIO135: input: 0 [ ]6 a9 m5 I7 _: ~+ ?+ e
6 k0 t, I; C1 ?" v& i5 x. `: A | 6 C" V& j% D. M6 C) J+ T
Bank GPIO2:8 G% z* T8 q5 ^5 _- u' E2 F
GPIO20: output: 1 [x] sata_pwr
3 b7 y& {/ U) ?8 \# bGPIO21: input: 0 [ ]. i/ c$ M R Y, C
GPIO22: input: 1 [ ]( [7 L w w# Z1 T$ L
GPIO23: input: 1 [ ]
) I! i' L( G0 c: |: KGPIO24: input: 1 [ ]) q) M. q) i/ [. |' x- x
GPIO25: input: 1 [ ]. P0 B8 u) P5 Y- O. L0 Z% q
GPIO26: input: 0 [ ], z6 R& v; e: ~6 {2 k. h, V; x
GPIO27: input: 1 [ ]
! N z; q7 Q. i: m7 P+ i$ n# ~GPIO28: input: 1 [ ]
0 r& E. }$ F1 r" o. bGPIO29: input: 1 [ ]) ]3 `( o, i$ W. s+ m! m
GPIO210: input: 1 [ ]
- E' F+ b0 x$ j% U! O8 Y6 E. @0 EGPIO211: input: 1 [ ]
" a3 [2 P; E1 z' }GPIO212: input: 0 [ ]& @& I B( D+ q; \$ S7 Q
GPIO213: input: 0 [ ]+ l/ X2 A: I1 F2 k2 W
GPIO214: input: 1 [ ]& c8 ]( F7 o2 P5 b) ?' q
GPIO215: input: 1 [ ]
- R; e. p8 |1 f4 c0 g% p% \GPIO216: input: 1 [ ]$ Y& j' B$ |3 F
GPIO217: input: 1 [ ]) n" v. o# h/ Z+ z4 ]. q& S# ~
GPIO218: input: 1 [ ]
& C7 l+ d" _- P/ U* W1 TGPIO219: input: 1 [ ]) N) y7 f! K* N
GPIO220: input: 0 [ ]
$ x: W6 m% w5 f) EGPIO221: output: 1 [x] phy_reset
( ^( `; l# L7 C8 r: AGPIO222: input: 1 [ ]3 a/ |1 t0 _* C4 w6 P! d
GPIO223: input: 1 [ ]( W$ d8 x2 W9 p# N$ |
GPIO224: input: 1 [ ]
4 ]" }2 t5 \6 s: RGPIO225: input: 1 [ ]
% W9 R* K: X4 g/ w) yGPIO226: input: 1 [ ]
$ F4 j: |7 ~3 [# l- t @! jGPIO227: input: 0 [ ]: }( M, N! F- R0 p, @
GPIO228: input: 0 [ ]
' P% O' ~: ^+ E8 L# KGPIO229: input: 0 [ ]
' N, K6 V& J! t: f0 F
% _( Y$ Y, Z% u& {$ v别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。; n' ?* T+ c/ N" T9 s$ I% \0 ^
: A4 ?7 i+ X0 d+ k! I ^: d' x& n4 l/ }Marvell>> gpio
' s* k- x7 k# c. v7 i; x! g' Wgpio - query and control gpio pins
* [: |' J0 K* J- U0 v: U2 R $ z7 G4 i+ r: G
7 _* C% E% i: I
Usage:. |7 |$ k: U- K& U( L
gpio <input|set|clear|toggle> <pin>5 }7 N$ f2 P5 b
- input/set/clear/toggle the specified pin' a. ^" K0 E: o4 i
gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs; }! h5 A2 g/ ~& I3 a& v
6 n% `# A8 E* n U) q
set是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)1 [ [- x7 p! U5 m
% D8 m3 J, {3 ?: [7 q) `0 _7 Y
然后看到env有地方是参数设置,类似dos的环境变量吧
5 ?/ B* X6 s1 b+ A, c 3 \/ O. B5 e, |1 z0 X* Q& x" c; P
Marvell>> env print9 D; J+ M' M" P( @
arch=arm/ w5 f+ h7 H1 ]& O/ ]" |1 w
baudrate=115200
1 I; J. m" t {( g) n' pboard=mvebu_armada-37xx* |7 \) H/ F- ?6 s5 L5 Z! x
board_name=mvebu_armada-37xx9 p% _6 I% N- a1 [7 u, W, U, l
boot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
4 n% I) l3 z% `$ h( y/ H: uboot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
. H, J6 P. u+ M8 uboot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};( c2 L+ |4 S/ O& P
boot_targets=usb mmc0p1 mmc0p2 sata
1 o2 g% v: @0 ]1 J, V8 y, pboot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};* D% }. O" I& ^1 z/ N
bootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi/ K0 B/ g5 M, E J5 {/ x( ?
bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;
& k2 X" [$ _- |/ _! nbootcmd_normal=run bootcmd_syno;
2 v3 n! R5 _; H3 i. k7 z( A% xbootcmd_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;! V4 m O* Z/ s
bootdelay=1
+ I* y' \1 c; r( I5 Gbootdev=scsi 0:11 K% r5 c/ V& J2 `# D
console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
, y5 ~5 G% M% A3 M$ Fcpu=armv8. r8 x( |6 T/ d. u5 z9 J% Y- O- J: j; a
ethact=neta@30000
. `9 ]% B @6 c R; q# p# }8 y' Pethaddr=00:11:32:11:22:00
/ P% h+ Z) y6 s7 E. c% Tethprime=eth0
& C0 C7 D ^# Kfdt_addr=0x6000000! S# h4 M' m, T3 s
fdt_high=0xffffffffffffffff
; p5 \# m0 V! U# B8 {5 Y$ g: {fdtcontroladdr=1f6437d0
- L" [4 q h q! p5 d; u: xgatewayip=192.168.1.2544 Z; E$ O$ [5 M4 `6 _9 t$ U) `$ T
hostname=catdrive5 U1 `7 h' v4 a) E7 s4 q
image_name=/vmlinuz1 T# |# d( V" e6 Z. L
initrd_addr=0x11000006 }1 C! _/ o' W' W7 o; d2 R* k
initrd_size=0x2000000
( p% k5 Q( Z& r% ?ipaddr=192.168.1.119
5 Q1 z6 U' u3 j. z# hkernel_addr=0x7000000
% o, Q) V5 d- d8 T7 t5 V2 T3 A3 G; Y; Aloadaddr=0x8000000, C2 Z( m% ^8 v( J% i$ @0 X
netdev=eth09 f4 M8 s; D$ d4 |3 w
netmask=255.255.255.0
1 G1 p! H" j+ j, r7 Nrootpath=/srv/nfs/
8 P5 m0 Z+ c% y5 {. E: {scriptaddr=0x6d00000
+ F9 a' B8 T- s x U; W# ?serverip=192.168.1.254
4 n4 n9 _7 \9 D! L9 r3 Fsoc=mvebu* d8 y f# s/ G7 V
stderr=serial@12000
C* r3 J3 `8 \9 tstdin=serial@12000) s( e! r) i) C/ p+ Z. m, l4 |& M
stdout=serial@120009 y" `2 f5 ^; J/ k
syno_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
6 H- p/ v& u, Lvendor=Marvell3 r7 v% ~( n" D% B
' K6 s2 t |' S% n4 t. T
# k3 s0 L: J8 I8 ?0 p5 D* f
Environment size: 2001/8188 bytes
/ B/ ~# `$ [4 j l1 CMarvell>>
& n. R) y0 J7 Q
2 O2 `$ F3 {$ C$ W9 }* h- t7 w% P$ P# d看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.2 n% E. |: T5 ` v) e+ _6 J; c
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;: H; I# u v3 t( J. f7 z* \
7 p/ T0 {) c8 W9 \3 c0 M
这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了7 c( @' B& N+ P3 y6 G
bootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒
! G z) [7 J; Q* o) w) R' k
* ~8 d5 y F+ z- @& n2 ]* \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;- P: J" K# N: O
0 l) G+ m4 C3 q& _( v
注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。2 I5 c! B, \$ L3 u' J7 s
思路是:5 G5 \) F2 o M
启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。( M9 x4 A+ s' w
8 S7 o, m2 `$ {+ a这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启
8 v0 @6 {* }. o * t, D5 l% l- @/ Q; Q F3 w H
控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启
3 x) J( n e* g2 |, m#!/bin/bash) x4 \1 p( ?* r! F
dt=`date '+%d/%m/%Y %H:%M:%S'`
6 P- }' }, ]+ C G" ]echo "$dt"
: j6 z: z) G/ @7 F! W4 f& M- U$ A5 Hsleep 60
, l* X( S, O9 s/ W' mnum=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`* e. z& l3 h/ F/ I; [6 Q
echo $num
8 K3 }& j' J! v' ]' Jecho $?9 M, X' X6 o* M8 @* Q6 t
if [ $? -eq 0 -a $num -eq 0 ]; then
+ U9 ]! p) M/ K3 w; Y echo "$dt ok" >> /result.txt
9 P( L' ~9 r; k& _else
w1 O) ~+ ]7 W; P echo "$dt noip loss $num reboot" >> /result.txt
: n5 F* o! s7 h1 V& p reboot1 t& ~1 R' e( O; K
fi# }+ N H& f5 ~
5 I: `: I3 [" V7 w第五行,ping后边的IP自己改,我用了一个外网的IP。
! w( s3 A7 P. i# q
. d; Y! F2 B0 N- i; e4 H' o( Q! @ s9 K总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。1 \( v0 s. B! j' O( l
9 j/ s- V! }# W/ o我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。
7 C8 B, W* _6 t- v9 | , W6 d; K9 E5 ]1 r: P0 J# y
还是上边60秒的地方,再加一条
; z, ^8 U3 r |' `9 q
2 i: d3 E0 @8 [* A) B + i+ @9 x: h( ]+ o, K
2cset -y -f 0 0x45 0x00 0x55
; d l7 C1 G/ {! ~ k3 c5 O5 `: C7 R+ Di2cset -y -f 0 0x45 0x01 0x01! A* C2 s) `5 X6 G" s; ?6 V
i2cset -y -f 0 0x45 0x30 0x07
$ f) i& M ^5 v( W di2cset -y -f 0 0x45 0x31 0x72
5 ^4 Y8 x4 x, gi2cset -y -f 0 0x45 0x32 0x72
4 s( m- y# }& T' x1 }8 Vi2cset -y -f 0 0x45 0x33 0x72
/ ~9 N# c/ K2 J/ t# m5 I" v#调节三个灯灯每周期上升沿和最高亮度时间
5 x, B, f5 G+ F; W1 h5 j#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44; M0 J- L3 b% K3 G
i2cset -y -f 0 0x45 0x37 0x44+ }" D9 w8 \ C: i+ O) s- k
i2cset -y -f 0 0x45 0x3a 0x55
: j( Y; i7 L. v6 bi2cset -y -f 0 0x45 0x3d 0x66
7 P2 D, C/ H' V) J#调节三个灯每周期下降沿时间和关机时间5 Z9 m$ E; P% A' h; F x
i2cset -y -f 0 0x45 0x38 0x443 n; ^1 c* _7 V6 k0 C3 J
i2cset -y -f 0 0x45 0x3b 0x55% e" B8 ^+ Q! N8 ~5 h
i2cset -y -f 0 0x45 0x3e 0x664 a: p. k! I% o" m w6 Z: |+ {
i2cset -y -f 0 0x45 0x39 0x40$ E7 j" i2 x4 Y" N2 f
i2cset -y -f 0 0x45 0x3c 0x40
( {: q" X7 t* w! N5 |( ?i2cset -y -f 0 0x45 0x3f 0x404 E9 H3 g$ i+ b/ M6 N
# 0-255,更亮
' k! r9 ?8 i" w, g7 l' A5 ki2cset -y -f 0 0x45 0x34 128
/ S5 u) b# r7 i {. D* pi2cset -y -f 0 0x45 0x35 1289 w& I. d& r" N, M6 m }5 U$ p1 q
i2cset -y -f 0 0x45 0x36 128( Q! Q5 W0 J" l4 m. v
5 k2 `* D+ B( U2 T. v. c
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯
0 U" W( g/ ]* s( b$ g$ @4 K 2 K9 v6 C2 {6 l4 O" @ K# l
6 O! h' \3 n5 i3 [+ _/ @我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。4 a4 Q6 R6 {/ ?3 V: H0 H9 I* F
9 y9 n0 Q: e8 o希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。( |' C0 l1 K. V; k
|
|