Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[4a107a]: sdcard / lejosfs / home / root / lejos / bin / init Maximize Restore History

Download this file

init    31 lines (27 with data), 1.1 kB

#! /bin/sh
. /etc/default/lejos
sync

var=$(printf 'HostStr=%s SerialStr=%s' $(cat ${LMS2012_SETTINGS}/BrickName) $(cat ${LMS2012_SETTINGS}/BTser))
echo $var > ${LMS2012_SETTINGS}/UsbInfo.dat

insmod ${LEJOS_MODULES}/d_iic.ko `cat ${LMS2012_SETTINGS}/HwId`
insmod ${LEJOS_MODULES}/d_uart.ko `cat ${LMS2012_SETTINGS}/HwId`
insmod ${LEJOS_MODULES}/d_power.ko `cat ${LMS2012_SETTINGS}/HwId`
insmod ${LEJOS_MODULES}/d_pwm.ko `cat ${LMS2012_SETTINGS}/HwId`
insmod ${LEJOS_MODULES}/d_ui.ko `cat ${LMS2012_SETTINGS}/HwId`
insmod ${LEJOS_MODULES}/d_analog.ko `cat ${LMS2012_SETTINGS}/HwId`
#insmod ${LEJOS_MODULES}/d_usbdev.ko `cat ${LMS2012_SETTINGS}/UsbInfo.dat`
insmod ${LEJOS_MODULES}/d_usbhost.ko
insmod ${LEJOS_MODULES}/d_sound.ko `cat ${LMS2012_SETTINGS}/HwId`
insmod ${LEJOS_MODULES}/d_bt.ko `cat ${LMS2012_SETTINGS}/HwId`

chmod 666 /dev/lms_pwm
chmod 666 /dev/lms_motor
chmod 666 /dev/lms_analog
chmod 666 /dev/lms_dcm
chmod 666 /dev/lms_ui
chmod 666 /dev/lms_uart
chmod 666 /dev/lms_power
#chmod 666 /dev/lms_usbdev
chmod 666 /dev/lms_usbhost
chmod 666 /dev/lms_sound
chmod 666 /dev/lms_iic
chmod 666 /dev/lms_bt