Difference between revisions of "Debian udev"
From NAS-Central Buffalo - The Linkstation Wiki
m |
m (corrected initial kuro_boot state (ttyS1 instead of AVR00), and clarified kuro_boot code) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 10: | Line 10: | ||
* /etc/init.d/halt : | * /etc/init.d/halt : | ||
replace | replace | ||
− | echo -n "EEEE" > /dev/ | + | echo -n "EEEE" > /dev/ttyS1 |
with | with | ||
if [ -e /dev/AVR00 ]; then | if [ -e /dev/AVR00 ]; then | ||
Line 20: | Line 20: | ||
* /etc/init.d/reboot : | * /etc/init.d/reboot : | ||
replace | replace | ||
− | echo -n " | + | echo -n "CCCC" > /dev/ttyS1 |
with | with | ||
if [ -e /dev/AVR00 ]; then | if [ -e /dev/AVR00 ]; then | ||
− | echo -n " | + | echo -n "CCCC" > /dev/AVR00 |
else | else | ||
− | echo -n " | + | echo -n "CCCC" > /dev/ttyS1 |
fi | fi | ||
* /etc/init.d/kuro_boot : | * /etc/init.d/kuro_boot : | ||
replace | replace | ||
− | echo -n " | + | echo -n "AVR port init : " |
− | stty -F /dev/ | + | stty -F /dev/ttyS1 10:1:9f0d:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 |
echo -n "AVR init string send" | echo -n "AVR init string send" | ||
− | echo -n "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK" > /dev/ | + | echo -n "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK" > /dev/ttyS1 |
with | with | ||
Line 39: | Line 39: | ||
echo -n "AVR00 port init : " | echo -n "AVR00 port init : " | ||
stty -F /dev/AVR00 10:1:9f0d:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 | stty -F /dev/AVR00 10:1:9f0d:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 | ||
− | echo -n " | + | echo -n "AVR00 init string send" |
echo -n "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK" > /dev/AVR00 | echo -n "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK" > /dev/AVR00 | ||
else | else | ||
echo -n "ttyS1 port init : " | echo -n "ttyS1 port init : " | ||
stty -F /dev/ttyS1 10:1:9f0d:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 | stty -F /dev/ttyS1 10:1:9f0d:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 | ||
− | echo -n " | + | echo -n "ttyS1 init string send" |
echo -n "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK" > /dev/ttyS1 | echo -n "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK" > /dev/ttyS1 | ||
fi | fi | ||
* /etc/init.d/kuroevtd (If you're not willing to install [[debian_avr_evtd|avr_evtd]] instead of kuroevtd) | * /etc/init.d/kuroevtd (If you're not willing to install [[debian_avr_evtd|avr_evtd]] instead of kuroevtd) | ||
− | replace both entries (in start | + | replace both entries (in start & restart) of |
+ | start-stop-daemon --start --quiet --exec /usr/sbin/kuroevtd /dev/AVR00 | ||
+ | with | ||
+ | if [ -e /dev/AVR00 ]; then | ||
+ | start-stop-daemon --start --quiet --exec /usr/sbin/kuroevtd /dev/AVR00 | ||
+ | else | ||
+ | start-stop-daemon --start --quiet --exec /usr/sbin/kuroevtd /dev/ttyS1 | ||
+ | fi | ||
+ | |||
+ | == Conclusion == | ||
+ | Now you can make a | ||
+ | apt-get install udev | ||
+ | and the kurobox will no more shutdown few minutes after startup ! | ||
+ | |||
+ | --[[User:Sylver|Sylver]] 10:03, 14 June 2006 (CDT) | ||
+ | |||
+ | [[Category: Debian]] |
Latest revision as of 00:54, 10 March 2008
Why is there a problem while installing udev ?
Installing udev on the kurobox debian will lead to a problem with AVR device initialisation (and if you do not initialise the AVR device, the kurobox will shut down few minutes after power up) !
The problem is that the AVR device can be accessed using /dev/AVR00, but udev will not create this device ! You have to use /dev/ttyS1 instead ! The problem is that when you're not running udev, /dev/ttyS1 does not point to the AVR device !
How to solve the problem
To solve this, you have to update the following files :
- /etc/init.d/halt :
replace
echo -n "EEEE" > /dev/ttyS1
with
if [ -e /dev/AVR00 ]; then echo -n "EEEE" > /dev/AVR00 else echo -n "EEEE" > /dev/ttyS1 fi
- /etc/init.d/reboot :
replace
echo -n "CCCC" > /dev/ttyS1
with
if [ -e /dev/AVR00 ]; then echo -n "CCCC" > /dev/AVR00 else echo -n "CCCC" > /dev/ttyS1 fi
- /etc/init.d/kuro_boot :
replace
echo -n "AVR port init : " stty -F /dev/ttyS1 10:1:9f0d:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 echo -n "AVR init string send" echo -n "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK" > /dev/ttyS1
with
if [ -e /dev/AVR00 ]; then echo -n "AVR00 port init : " stty -F /dev/AVR00 10:1:9f0d:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 echo -n "AVR00 init string send" echo -n "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK" > /dev/AVR00 else echo -n "ttyS1 port init : " stty -F /dev/ttyS1 10:1:9f0d:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 echo -n "ttyS1 init string send" echo -n "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK" > /dev/ttyS1 fi
- /etc/init.d/kuroevtd (If you're not willing to install avr_evtd instead of kuroevtd)
replace both entries (in start & restart) of
start-stop-daemon --start --quiet --exec /usr/sbin/kuroevtd /dev/AVR00
with
if [ -e /dev/AVR00 ]; then start-stop-daemon --start --quiet --exec /usr/sbin/kuroevtd /dev/AVR00 else start-stop-daemon --start --quiet --exec /usr/sbin/kuroevtd /dev/ttyS1 fi
Conclusion
Now you can make a
apt-get install udev
and the kurobox will no more shutdown few minutes after startup !
--Sylver 10:03, 14 June 2006 (CDT)