|
发表于 2023-1-18 09:18:32
|
显示全部楼层
转发:我好像解决部分猫盘刷群晖后掉IP的问题了
5 K) N5 e. }1 t0 F$ ~+ a
. W; k/ @1 i3 h) m2 J& Oaquila995: y6 t2 t+ Z/ `1 h; J
+ I9 I4 N% `' D+ t* f* o* e+ Y3 s3 Y于 2020-06-24 16:37:11 发布/ Y( k; ^$ c# J7 l% t0 D4 k" ?) w
* A; U7 h8 ?1 N3 ~5 z: t13215
+ y( Z0 |5 j* F% [5 \$ ~, K# x 收藏 13
2 H) A7 ?/ z' r; X分类专栏: 群晖
3 z0 b% h7 q [' h: D版权/ D" j' z6 r2 M5 A
+ O# O, F% C( ?# K7 z7 A6 d2 u群晖( A' M5 R$ e# ~/ K6 W/ m+ u+ z0 B% D
专栏收录该内容9 L/ T, F. V( }; h" A
1 篇文章0 订阅0 w |( ^$ h; K) G, F$ m
订阅专栏
2 Z9 G- T8 m) X) z# ^2 W我好像解决部分猫盘刷群晖后掉IP的问题了
) m; \6 l; z' F$ J& M) H# n6 B - F% C* t6 m8 z ]6 S# Y
我好像解决部分猫盘刷群晖后掉IP的问题了
, A/ ^8 A2 B; z) [. o; V+ t ' t1 ^: r/ c9 e* a h
先说我的情况,xianyu上的,到手发现刷群晖后第一次没挂硬盘时可见ip,关机,上硬盘,再开机就一直见不到ip了,没敢一直重启,心疼硬盘。& C R2 @+ ]- `
然后刷个X3P用了一段时间,还是想用群晖。上了块固态,试了多次后,应该解决掉IP的问题了,现在挂的是500G普通盘,一直正常。' [( W1 L8 p# z Q' d# R! A
& D2 Z0 D4 G: @& a
跳过刷机说重点,每次重刷完群晖都是可以连上的,但重启后就不行了,所以应该不是所谓的虚焊问题,应该是某个设置没有达到,网卡没有工作。6 }7 N9 m. D, O2 Q1 d
4 R7 [' t1 \: A3 j8 \: [然后发现的情况是,如果进到env环境(我也不知道叫什么,反正就是在xshell下一直按回车的环境),网卡是工作的,只是再进到群晖启动时没有工作。
9 S7 n9 d: q3 U- b + x% ~, k% N3 H) V2 o
先看了下有什么可用的命令:' j; } }9 a. p- F
* P2 _0 P5 k6 SMarvell>> help/ Y7 L% r, P1 f% }' Z
? - alias for 'help'
: Y3 { n$ Q* ~" k ?0 r& M% P5 ~, Ybase - print or set address offset u9 B# q/ D0 {* U9 z
bdinfo - print Board Info structure
, |& w/ C5 j$ O1 b( _- r `blkcache- block cache diagnostics and control
/ ?! p( w/ D4 e- L& I# yboot - boot default, i.e., run 'bootcmd'
k' K- C7 g6 x/ E' tbootd - boot default, i.e., run 'bootcmd'
7 n D8 w2 }5 Z0 vbootefi - Boots an EFI payload from memory
: W* l! j- r! F( _/ K+ ]0 G sbootelf - Boot from an ELF image in memory5 i4 m7 x) T9 L9 ` B2 i3 z+ k
booti - boot arm64 Linux Image image from memory
; @1 R6 ]. B3 r: \bootm - boot application image from memory
' j5 s! u9 M; M============================================================
" V4 x( X3 B2 V6 Fbootp - boot image via network using BOOTP/TFTP protocol. _1 N8 ?8 q8 e% Q# C& |
============================================================
$ C8 J) p$ |# L4 bbootvx - Boot vxWorks from an ELF image
' q" h- @, q+ Z) Y9 h5 d9 ^! ?bubt - Burn a u-boot image to flash
/ b$ f% c( m" b; N- F' u k. `5 E4 tcmp - memory compare9 A, ~" E. z! n' V6 c+ j+ Z
coninfo - print console devices and information* g! ^' L# j6 T* D. n5 F
cp - memory copy
( Z* ~0 \: m9 z& Z) ~crc32 - checksum calculation, c; Y. M: W& A* o! ~0 J l# F3 m
dcache - enable or disable data cache
! i( B6 B& p# F6 l-------------------------------------------------------------
2 q/ N6 O7 u1 |& K8 o0 }dhcp - boot image via network using DHCP/TFTP protocol
2 ^# A u1 G1 }-------------------------------------------------------------; A+ p2 p3 r/ z
dm - Driver model low level access
- o/ a3 h( l5 B) Mecho - echo args to console
1 Y) I$ W, w4 Y6 u6 oeditenv - edit environment variable' Y+ P9 e' [( ^) E" f! _
env - environment handling commands
) z$ x# S" h" h1 Nexit - exit script. L6 {* U C+ F
ext2load- load binary file from a Ext2 filesystem
9 n3 `+ [! a- j5 F" ^' Y7 |/ Iext2ls - list files in a directory (default /)
! c0 O5 O2 x5 d' O- C9 ]/ u Dext4load- load binary file from a Ext4 filesystem- Y/ D: J1 S2 ]+ `
ext4ls - list files in a directory (default /)
4 t p* [! u8 ~$ k0 Hext4size- determine a file's size6 g: h3 ^+ F7 S0 C+ G+ ]
ext4write- create a file in the root directory/ R5 ]3 U! k/ u! F
false - do nothing, unsuccessfully
8 G6 V& K/ N$ L7 a7 B" f# M4 z" Kfatinfo - print information about filesystem
2 k/ B8 C' J+ Y+ e) H' g9 \; C" c8 gfatload - load binary file from a dos filesystem0 i4 B4 G' {- r# U
fatls - list files in a directory (default /)0 I& y3 O- y+ S1 @% ?! R! b' D
fatsize - determine a file's size
% ~/ k/ q- v1 D. |1 [6 j, ]fdt - flattened device tree utility commands
; K9 @& H* l6 d8 f: x) e) I7 d: b; nfstype - Look up a filesystem type E- G' A; L8 r* I. @3 ~
go - start application at address 'addr'! s2 P& z5 _! A. v, Q9 T
gpio - query and control gpio pins' U; X. Z% J9 ~* _' N% W" j
help - print command description/usage
% }* O* v# n8 p- ji2c - I2C sub-system. u8 w& X8 J. ^- W/ U+ D+ Y1 I
icache - enable or disable instruction cache
5 j C' y* I/ Y! Q) V! kiminfo - print header information for application image! H _/ m) C( E4 t4 n+ {
ir - ir - Reading and changing internal register values.
4 E- p+ B+ y, |/ w ( W3 Z& r# d1 O) C! S) t! z
- N/ w6 h6 i; j! u* Witest - return true/false on integer compare
8 j7 T5 t0 X, K) b7 Y) A8 q Uload - load binary file from a filesystem! L* f; [# B: M; l: |2 `4 T
loadb - load binary file over serial line (kermit mode)+ y+ X* ]; w( y! s
loads - load S-Record file over serial line& X! r! F+ _0 x3 H0 d) j- M/ R
loadx - load binary file over serial line (xmodem mode): d3 \! l# U4 j- G& y4 s
loady - load binary file over serial line (ymodem mode)( w9 ?! ]- m7 t" c) c
loop - infinite loop on address range
; E( N" _0 q, } k0 ?6 t6 x" [* M: Als - list files in a directory (default /)% i/ ^6 E( z0 F0 Y2 R
lzmadec - lzma uncompress a memory region( u2 c$ p) r2 } g
md - memory display* i( C- J6 B! t9 m4 E4 b
mdio - MDIO utility commands
& j. v: w& |7 _mii - MII utility commands, X1 o+ [* J' m
mm - memory modify (auto-incrementing address)' d$ [0 H- f7 R( m+ g6 C2 S
mmc - MMC sub system- \( q4 m1 K; o7 F% y- c# ]- j' H9 ?
mmcinfo - display MMC info( M6 @8 a! ?" S. l d
mw - memory write (fill)1 ?+ w, Z$ H* h# U8 K
nfs - boot image via network using NFS protocol
4 t$ ?( J- a% G# jnm - memory modify (constant address)
# R6 J7 Y# Q5 L( {; |' spart - disk partition related commands
/ Z6 z3 T9 O: Kping - send ICMP ECHO_REQUEST to network host
( n* Y2 h( B! P K. F* jprintenv- print environment variables+ z2 \. H2 e: z, }: f; F0 _& p
pxe - commands to get and boot from pxe files
+ z' w* r+ \& J Y* Lregulator- uclass operations
8 j; J+ e4 ~' b' |6 L5 nreset - Perform RESET of the CPU5 v6 R& H9 ^0 U9 G6 }. W" U3 U
run - run commands in an environment variable
- ]* W9 K9 O( F1 {& b/ Psave - save file to a filesystem
3 H9 i! z9 p M$ S; i* osaveenv - save environment variables to persistent storage
) y8 |" l1 O+ T' i. |scsi - SCSI sub-system& P, C* {. G( k0 ^
scsiboot- boot from SCSI device5 R9 a% n1 \7 ]/ M x
setenv - set environment variables
6 e9 a5 B& ^0 T4 gsf - SPI flash sub-system5 R: z Q$ @: M q0 A5 o. l+ R+ u
showvar - print local hushshell variables% R8 P, k% f4 M
size - determine a file's size9 O- k5 g: Q5 `( V' l
sleep - delay execution for some time
5 o; H9 P/ k) a5 F* s0 l# v4 i' lsource - run script from memory
4 a+ f! v; n3 Tsspi - SPI utility command
8 F4 _& C1 r' q: ]sysboot - command to get and boot from syslinux files
! f" |# Z& @7 Y6 Ztest - minimal test like /bin/sh" N( o2 O$ D2 M
tftpboot- boot image via network using TFTP protocol
1 V, H2 r+ K) D9 Q6 }. `/ Atime - run commands and summarize execution time! V( \0 H6 I* D" m/ p
true - do nothing, successfully
1 @1 }8 S% }6 b# c4 tusb - USB sub-system, U$ w l% B2 s% y1 g
usbboot - boot from USB device
* s. u/ D9 Z4 W+ a$ gversion - print monitor, compiler and linker version
5 u: M( u2 O" d0 t , k- Q q. T# U9 i. P0 e
发现了gpio U# k5 o6 J2 d8 z/ b, O0 _
5 q2 J6 a; Z2 w6 q3 R( yarvell>> gpio
4 e" t& O: _* J3 T) [gpio - query and control gpio pins
6 X- H: M( Q! Y0 N7 i ; J- i1 [! {+ g. U9 w& r% c
! ]: Y+ H4 r. ~& S3 qUsage:
& J3 s/ X+ `- Q) `/ ~gpio <input|set|clear|toggle> <pin>& S T3 h$ O3 w
- input/set/clear/toggle the specified pin7 E& I) [& ~ V% |/ s( ]" I
gpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs" O; q# T% t1 h% o, b' A7 e
! e5 [+ @& H4 ]. `/ _ 7 I% n4 M4 k: Z: C9 E/ X
Marvell>> gpio status f9 W. w. S2 I8 B! V9 H$ e9 N
Bank GPIO2:& N7 @' o1 b8 j a, s3 ~
GPIO20: output: 1 [x] sata_pwr; o. x) g2 i0 `
GPIO221: output: 1 [x] phy_reset$ q0 D. @/ B6 E; s; G
6 M& F/ c: t8 |: O可见的io脚
q* m3 A: Z1 Z3 [ . E7 g# X! ^0 j, @/ P' X+ t# E
Marvell>> gpio status -a: h) i6 W9 J% A4 t: T5 k/ |# \; b
Bank GPIO1:; a' c/ P: A9 M* @) J
GPIO10: input: 0 [ ]
4 E2 |/ ^! p( U7 f: \GPIO11: input: 0 [ ]1 j% i( M+ x2 ?
GPIO12: input: 1 [ ]
. }4 x& S% R* N& OGPIO13: input: 1 [ ]
! s6 R6 C- D$ ~3 J* i$ G9 yGPIO14: input: 1 [ ]* V) }) _! w# y$ N: P* w( @* h$ ]
GPIO15: input: 1 [ ]
' ]" A0 x3 J# H* i! p$ DGPIO16: input: 0 [ ]
& N- A( s8 P+ q' }8 O& AGPIO17: input: 0 [ ]
. y/ Q0 `) W6 K- p. L" QGPIO18: input: 0 [ ]6 R5 W# v* C/ W; A8 k0 c
GPIO19: input: 0 [ ]: B) }$ I+ k" _* w: U
GPIO110: input: 1 [ ]$ [! B. }( T4 Q
GPIO111: input: 0 [ ]
4 L! Z6 J( b: a8 TGPIO112: input: 0 [ ]
& X) O, M! G& k( v3 AGPIO113: input: 0 [ ]
- i: {+ M3 k. U* g; jGPIO114: input: 0 [ ]' |0 l2 F$ Y# t, v: X$ j
GPIO115: input: 1 [ ]3 A, k. k$ U3 V
GPIO116: input: 1 [ ]
& Q0 {0 l& w4 kGPIO117: input: 1 [ ]
' ?& \. _4 c$ j; t* a) bGPIO118: input: 1 [ ]$ N5 G, X2 V' ]/ x5 T
GPIO119: input: 1 [ ]1 k+ `1 f7 a A0 x
GPIO120: input: 0 [ ]# l, p# N$ T ^) y
GPIO121: input: 0 [ ]/ _+ o/ M5 W4 E, i& D" b, X' I9 {
GPIO122: input: 0 [ ]" b9 ^; U/ V2 B5 b" P
GPIO123: input: 0 [ ]
7 b" F- `. l/ X F! RGPIO124: input: 0 [ ]: x5 Y( L. e: M& X* t. i, X
GPIO125: input: 0 [ ]
% v8 c% k) g* OGPIO126: input: 0 [ ]
" M' p( g$ N# G1 e6 vGPIO127: input: 0 [ ]
2 W5 f k9 q3 v* f2 M9 @$ u7 J) BGPIO128: input: 0 [ ]. s5 V. L, r& ]. y% k+ J2 x- j
GPIO129: input: 0 [ ]$ H2 T. B0 M6 o5 ~! i: i5 m3 N* @
GPIO130: input: 0 [ ]' G3 l( d& [5 m _8 ]3 N2 S @
GPIO131: input: 0 [ ]' h1 W: i! R8 I3 \; l- ]+ \
GPIO132: input: 0 [ ]3 V( A+ j1 k( ]/ f$ i
GPIO133: input: 0 [ ]2 z* ?% ~" y' k! l
GPIO134: input: 0 [ ], j9 F+ O9 B E) J
GPIO135: input: 0 [ ]5 c+ u' g. [7 u- W( {- t
) |* Z- x3 y3 s/ x& b0 j ) Q) ~3 ~" y6 o! b
Bank GPIO2:
, y- m D4 W" i% U4 Y3 uGPIO20: output: 1 [x] sata_pwr: G0 K& |9 g, i, i n v5 Y
GPIO21: input: 0 [ ]1 J! c& O) g% r' `, ^7 i, a
GPIO22: input: 1 [ ]& r( |/ @+ K& R1 D
GPIO23: input: 1 [ ]
% `7 m9 n, U8 y0 b# W8 G* S T8 ` lGPIO24: input: 1 [ ]) `8 s& y# p& J" E, q* J
GPIO25: input: 1 [ ]) P( _7 o/ r2 }6 d; [# A
GPIO26: input: 0 [ ]
% F5 K) b! G3 s& \/ H: sGPIO27: input: 1 [ ]! a! u0 |6 r% @4 l5 U+ l c
GPIO28: input: 1 [ ], N+ `0 m4 L/ \* o. r3 n( u o% Q0 E
GPIO29: input: 1 [ ]
' m. X' }( Q ]- |4 C h( j4 fGPIO210: input: 1 [ ]
% Z+ |4 n. i9 D$ PGPIO211: input: 1 [ ]
" t1 @. K: s, H/ nGPIO212: input: 0 [ ]7 ^0 R# ?/ p. z, f S2 _
GPIO213: input: 0 [ ]. q/ N- a7 W) O U, C3 h* I4 ~
GPIO214: input: 1 [ ]
: C: ? m) i7 DGPIO215: input: 1 [ ]: l% k! [: r; z) W# e7 }
GPIO216: input: 1 [ ]
: j$ e, u, G2 E* X4 v4 ?# LGPIO217: input: 1 [ ]
- u+ h, y5 v3 P1 A" w# oGPIO218: input: 1 [ ]
7 r* G' U; a, c9 eGPIO219: input: 1 [ ]- _8 m; G% d3 Y' g" B4 n! M4 ]
GPIO220: input: 0 [ ]
$ f6 `& p8 \5 w8 kGPIO221: output: 1 [x] phy_reset( w# G v& h- A* v, O7 P
GPIO222: input: 1 [ ]$ W- a8 X6 s# n1 p' g$ }. D
GPIO223: input: 1 [ ]: c& v2 O) t# j* G- r" \
GPIO224: input: 1 [ ]
% R6 B' S; ~/ G B& }GPIO225: input: 1 [ ]; ?! M! r( C5 {8 ~! p' Q
GPIO226: input: 1 [ ]
; j, p: n- y% l2 T9 ^9 jGPIO227: input: 0 [ ]1 T) i0 y' M& ~- N
GPIO228: input: 0 [ ]
; l/ W8 ^- g7 PGPIO229: input: 0 [ ]
# k0 ^+ N( K6 t% z' E0 x
8 f+ X$ h) W2 B9 t别的看不懂,只看到一个是硬盘的供电,一个是phy_reset,不知道干什么的。3 T, |: j4 f4 M/ B; S
! X+ i8 M) M" t& p* `# [$ Y) FMarvell>> gpio6 |& A2 }5 J* f9 Y: A
gpio - query and control gpio pins
- c s c! {( S) ?
0 G7 B: j! }, h# f
) I; x' N! T h1 y- f/ vUsage:
! N4 `$ F8 d% wgpio <input|set|clear|toggle> <pin>, I; V0 I# h6 ]6 J; @% k
- input/set/clear/toggle the specified pin
4 ~1 S4 b8 ]2 n& |% Q: ugpio status [-a] [<bank> | <pin>] - show [all/claimed] GPIOs) o( ~! A* ~. H$ p4 u0 F
) u; y$ O- R. Sset是置1,clear是置0,toggle八成就是翻转(初中级英语,没办法,全靠猜)& O2 z% }, y! b( V. _2 U: b0 J9 v
8 Y) n/ @5 Q& u) M+ G+ Q然后看到env有地方是参数设置,类似dos的环境变量吧; i- {- l7 R7 O. z1 z
: g) P$ }7 a) P$ |5 f
Marvell>> env print
3 q: {* V/ s3 S2 s" p: G* Q1 L: Darch=arm" T9 a' c0 ^2 I% |
baudrate=115200
3 W8 S4 l, L" u5 [( i& N `% C& \3 pboard=mvebu_armada-37xx2 u4 O- V: p' l! m- H
board_name=mvebu_armada-37xx
* |1 G& B+ y: L- Iboot_mmc0p1= setenv bootdev mmc 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
6 C9 c% A1 J1 F. r# e( H. Hboot_mmc0p2= setenv bootdev mmc 0:2; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};. H' Z+ K1 f) D
boot_sata=scsi scan; setenv bootdev scsi 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};% Y, ~* [7 q- f' b. A
boot_targets=usb mmc0p1 mmc0p2 sata$ L/ R1 `9 j# [& M& D
boot_usb=usb start; setenv bootdev usb 0:1; ext4load ${bootdev} ${scriptaddr} /boot/boot.scr && source ${scriptaddr};
: ` |& _- U% E, s8 Pbootcmd=gpio input GPIO23; if test $? = 0 ;then echo "Enter button mode";run bootcmd_button;else echo "Enter nomal Mode";run bootcmd_normal;fi
4 W( O' _4 S5 `bootcmd_button=for target in ${boot_targets};do run boot_${target}; done;4 I6 [- S: E$ A5 I; M; [
bootcmd_normal=run bootcmd_syno;
) O6 V! b6 Y6 jbootcmd_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;
: I. K& S; R, b9 C# M, hbootdelay=1
9 b# e2 J( J$ _# ]8 Bbootdev=scsi 0:14 J6 K Z3 @4 o8 p% o
console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd00120005 Z0 e9 a# d7 t% w. z9 x
cpu=armv8: w3 `6 R3 u ]" \9 k
ethact=neta@30000
; R5 t2 m0 p- Oethaddr=00:11:32:11:22:00" a, t9 m( Y! l: J+ k( B, b. b
ethprime=eth0: }% o( c" U5 J, _. v/ i3 T
fdt_addr=0x60000000 D; J* ^/ o6 {, q
fdt_high=0xffffffffffffffff! r0 @. h9 o, L3 d; L7 E, n
fdtcontroladdr=1f6437d02 _9 m3 @ Q2 c
gatewayip=192.168.1.254/ \/ L9 e5 S4 j, i' k
hostname=catdrive0 l7 H: z9 C; F$ P: n
image_name=/vmlinuz
. U7 W( n" e" O$ ~7 Tinitrd_addr=0x11000008 D+ x- Y7 |& V& n
initrd_size=0x2000000% ~: a1 X. y! \3 J( T# I+ O6 B N
ipaddr=192.168.1.119
) |6 v$ n+ W8 W% J. ]* F+ \$ fkernel_addr=0x70000004 M- C* s; Y$ q
loadaddr=0x8000000) u* j5 Y! f3 F, @8 m
netdev=eth0+ u7 @* k+ ~ R7 {9 [5 l2 a& b
netmask=255.255.255.0! |* Z- Z; k4 t& k
rootpath=/srv/nfs/* }( c& Y* y: A8 E$ t H( Z! W; K6 E
scriptaddr=0x6d000003 l! ^' I4 G, b6 u: F2 z
serverip=192.168.1.2543 d: J" E+ B, S/ o
soc=mvebu
9 G, _8 D6 @1 H0 lstderr=serial@12000
' F6 f' A! i7 ]2 S6 w2 H' @stdin=serial@12000
L+ b$ s4 S3 [stdout=serial@12000
* z! j% @( h' K: t( G# _" 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, N( V* q( ~5 Z0 O
vendor=Marvell+ H7 Z; M% G) K$ f7 b; U( K
( H4 ^% v' d+ Z& A
& ]9 w. I, D* h) c0 y6 MEnvironment size: 2001/8188 bytes1 P, E0 f& N- k, z& I5 Z
Marvell>>
# y$ x! n" \* z$ ~9 S' w! T1 m
+ h5 J: s2 L, E5 i看到有一个GPIO23,试了下,原来是reset按钮检测,没什么用。但它有两个启动项,主要是bootcmd_normal,而这又指向bootcmd_syno.( X1 N0 c; T% q 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;
+ m5 d, q* D' Y2 S4 V 4 K* ]5 q" ~' T$ c# L
这里好像是群晖引导,一条一条的命令,我又不会改linux的启动呀内核呀,只能在这儿动手了1 N% R: W! G$ h7 _% G q1 [
bootdelay=10 ,启动等待时间,1秒,太少,我都来不及按,改成10秒
& i0 l" A7 Y& T7 k% T% J 0 Y7 J% t8 S; R& m! @9 s- v
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;
/ n$ N5 z1 X1 D! l
4 V8 f" j: x' k& C注意我划掉的那部分,是先给硬盘断电,一会儿再通电,在固态硬盘可用,可能因为固态硬盘启动电流小,冲击小,当用普通盘时,有一定几率会死机,所以用普通盘时,我去掉了。, F( d* M; s6 ^# Q* k- s6 L
思路是:1 I+ j+ T. p% k& N3 i& e
启动前先把phy那个=0,等10秒,关硬盘,等10秒,phy那个置1,开硬盘。之后正常启动。
1 L; ^1 C/ ]+ `8 O5 ]6 r
; } K( h* D7 }6 Q& C- M这样有时能得到IP,但还是会有一定几率不行,所以又加上了网上流行的ping 60秒不通时重启( x) l% c/ u! a+ S9 _
: j: R2 D! T- n( ]; N5 r( m w
控制面板,任务计划-新增-触发的任务-用户定义脚本,开机启动,开机60秒得不到ip 重启
( c# Z z! Z, Y, Y/ s#!/bin/bash
& {/ p t, B8 D! c7 edt=`date '+%d/%m/%Y %H:%M:%S'`! o* l0 o0 t' e4 ]( E9 a
echo "$dt"5 {3 B, e: Z% {8 x( }3 M
sleep 60
3 a' K6 J" K6 {& O; k3 ]: N/ Jnum=`ping -c20 114.114.114.114 | tail -2 | head -1 | cut -f 3 -d"," | cut -f 1 -d"%" | cut -f 2 -d" "`
, `- P, m9 ]3 necho $num
d! D# D+ j/ K0 j+ qecho $?6 O+ b8 ]0 F {- ^
if [ $? -eq 0 -a $num -eq 0 ]; then
( x& K5 w9 H7 d+ f echo "$dt ok" >> /result.txt
7 }2 {5 y1 O0 k5 Ielse
9 J, F" e* M Z3 L( k2 @ echo "$dt noip loss $num reboot" >> /result.txt
) D: x' r$ c4 x- x3 B reboot4 d: V0 z0 S% t5 M0 B3 Y# P0 d
fi
. ^' G' k* p- N2 l F' u! F! V) [. g8 ?
第五行,ping后边的IP自己改,我用了一个外网的IP。" k9 v, N4 c3 l6 Q
1 ^3 M# f: I* i- X5 @总是思路就是,第一次刷完群晖会有ip,挂着硬盘,装系统,设置60秒脚本,重启,如果找不到IP,改bootcmd_syno,再重启等着进系统。+ u: Q; O6 Z' p
1 z- V' S# Y0 k$ |0 G2 j+ n0 P8 ?
我反正试了几天,刚上电,等一会儿根本没有IP,60秒后,会重启,这次绝对有IP。但总要用ttl+shell盯着测试太麻烦,所以又加了一个正常启动后闪led灯的脚本,从网上抄的,忘记上谁发的了,侵权见谅。# I+ Y, I3 c2 J% H0 p1 Q
) i$ [7 B2 D7 ~7 u还是上边60秒的地方,再加一条) R1 Z G, C- t) \6 M( \% P; ]; J
8 v' t$ i; T w$ y
* Y5 d& Q3 x5 D( O/ ]: i7 e6 U: c2cset -y -f 0 0x45 0x00 0x55
9 B0 @* H, R; Q" _2 {% g+ Qi2cset -y -f 0 0x45 0x01 0x01( ]+ @6 h3 V y- ?9 f1 W
i2cset -y -f 0 0x45 0x30 0x07
3 T. T5 J q7 s) e$ @) g O3 J: wi2cset -y -f 0 0x45 0x31 0x72
- H6 G+ H" j ^& H4 r0 E- O6 l5 p ~i2cset -y -f 0 0x45 0x32 0x72' k0 a7 T( |5 C- U0 P
i2cset -y -f 0 0x45 0x33 0x727 j$ j! w' e) p& k
#调节三个灯灯每周期上升沿和最高亮度时间
8 E! |1 h3 m F. C#想要白色的话,把三个灯时间改为一样的就可以了,比如全部设为0x44. U4 _7 G, N% ^% i1 h8 {- W& _) B
i2cset -y -f 0 0x45 0x37 0x447 g' _3 ?! b6 B1 ]. X2 G0 J$ C% M
i2cset -y -f 0 0x45 0x3a 0x55- S4 Y$ |8 x( y1 `: f! i0 F
i2cset -y -f 0 0x45 0x3d 0x66
; H! Q- \- f+ @7 B9 @#调节三个灯每周期下降沿时间和关机时间0 n. j2 }2 C7 |7 U7 z8 ]
i2cset -y -f 0 0x45 0x38 0x44
9 B/ t/ u# T# wi2cset -y -f 0 0x45 0x3b 0x553 I. N( u0 Q7 e
i2cset -y -f 0 0x45 0x3e 0x66
, l1 }0 D$ c5 w0 O; f8 Pi2cset -y -f 0 0x45 0x39 0x40
% k& j9 ]0 D( V# K" `i2cset -y -f 0 0x45 0x3c 0x40
5 j2 }' l) G6 k/ Yi2cset -y -f 0 0x45 0x3f 0x40
: x/ q. V; b2 ~: h# 0-255,更亮
- D. V2 G' b; G' K- S# Mi2cset -y -f 0 0x45 0x34 128/ g! h J& t9 F% s: e7 T
i2cset -y -f 0 0x45 0x35 128
# C% F" T, b9 \4 Q9 oi2cset -y -f 0 0x45 0x36 128
5 N% w: H* _, G- T " @7 g- H; ^! R/ G7 j% ]2 b" ^
然后在这条设置里有一个“先行任务”,设置成上边的60秒,也就是60秒那条执行完才执行这条。而60秒那条,没有ip就会重启,有ip就完成了,就会执行亮灯
- ^) r8 o; g3 U- K0 r
, O9 C/ N" o8 I5 h , p& q/ g$ p/ J, m8 J- @. T
我知道很多大神会做内核解决各种问题,我也知道看起来很小的问题,工作量是非常大的,可能要几个月才能解决,所以大神做的东西是不可能轻易免费发出来的,人家也要吃饭,不可能靠爱发电(我也在公司做简单的技术,知道技术无价的道理)。我从99年学电脑开始,绝大部分的东西都是从网上找来学的,所以非常感谢所有把知识发到网上共享的大神们。
) A) G+ X* E# x1 n5 D * h6 e. `7 l6 B8 y J- E
希望大家有条件能测试一下这个方法,如果可行,请发出去让更多的人看到,如果有改进的方法,也请共享出来,因为这个方法换盘好像不方便。
$ v! P; `3 V/ T1 n: q6 }. `) R |
|