./boot/minix/.temp/mod10_vm minix-sys
./boot/minix/.temp/mod11_pfs minix-sys
./boot/minix/.temp/mod12_init minix-sys
+./etc/rc.capes minix-sys
+./etc/rc.capes/BB-BONE-WTHR-01 minix-sys
./etc/system.conf.d/lan8710a minix-sys
./multiboot/mod07_log minix-sys
./multiboot/mod08_tty minix-sys
fi; \
${INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} ${sdir}${files} ${tdir};
.endfor
+.if ${MACHINE_ARCH} == "earm"
+ ${_MKMSG_INSTALL} ${DESTDIR}/etc/rc.capes
+ ${INSTALL_DIR} ${DESTDIR}/etc/rc.capes
+ ${INSTALL_FILE} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} ${NETBSDSRCDIR}/etc/rc.capes/* ${DESTDIR}/etc/rc.capes
+.endif # Minix/earm specific
.for subdir in . defaults mtree
${MAKEDIRTARGET} ${subdir} configinstall
.endfor
--- /dev/null
+#!/bin/sh
+#
+# Start-up script for the BeagleBone Weather cape.
+
+# TSL2550 Ambient Light Sensor
+test -e /dev/tsl2550b3s39 || (cd /dev && MAKEDEV tsl2550b3s39)
+/bin/service up /usr/sbin/tsl2550 -dev /dev/tsl2550b3s39 \
+ -label tsl2550.3.39 -args 'bus=3 address=0x39' && echo -n " tsl2550"
+
+# SHT21 Temperature and Humidity Sensor
+test -e /dev/sht21b3s40 || (cd /dev && MAKEDEV sht21b3s40)
+/bin/service up /usr/sbin/sht21 -dev /dev/sht21b3s40 \
+ -label sht21.3.40 -args 'bus=3 address=0x40' && echo -n " sht21"
+
+# BMP085 Temperature and Pressure Sensor
+test -e /dev/bmp085b3s77 || (cd /dev && MAKEDEV bmp085b3s77)
+/bin/service up /usr/sbin/bmp085 -dev /dev/bmp085b3s77 \
+ -label bmp085.3.77 -args 'bus=3 address=0x77' && echo -n " bmp085"
+
grep -v '^vlan_'
}
+# Detect expansion boards on the BeagleBone and load the proper drivers.
+capemgr() {
+
+ # Probe each possible cape EEPROM slave address for a BeagleBone cape.
+ for slave_addr in 54 55 56 57
+ do
+
+ # See if there is a readable EEPROM with address ${slave_addr}.
+ eepromread -f /dev/i2c-3 -a 0x${slave_addr} > /dev/null 2>&1
+ RESULT=$?
+ if [ $RESULT -eq 0 ]
+ then
+
+ # Found an alive EEPROM. Try reading the cape name.
+ CAPE=`eepromread -i -f /dev/i2c-3 -a 0x${slave_addr} | \
+ sed -n 's/^PART_NUMBER : \(.*\)$/\1/p' | \
+ sed -e 's/\.*$//g'` # Strip trailing periods.
+
+ # Look for a cape specific RC script.
+ if [ -x /etc/rc.capes/${CAPE} ]
+ then
+
+ # CAT24C256 EEPROM -- all capes have this chip.
+ test -e /dev/eepromb3s${slave_addr} || \
+ (cd /dev && MAKEDEV eepromb3s${slave_addr})
+ up cat24c256 -dev /dev/eepromb3s${slave_addr} \
+ -label cat24c256.3.${slave_addr} \
+ -args "bus=3 address=0x${slave_addr}"
+
+ # Load the drivers for the cape and do any other configuration.
+ . "/etc/rc.capes/${CAPE}"
+
+ else
+
+ echo ""
+ echo "** UNSUPPORTED CAPE: ${CAPE}"
+ echo ""
+
+ fi
+ fi
+ done
+}
+
DAEMONS=/etc/rc.daemons
case $action in
# fb hasn't been ported to AM335X yet.
fi
+ # Detect expansion boards and start drivers.
+ capemgr
+
;;
A335BNLT)
#up fb -dev /dev/fb0 -args edid.0=tda19988.1.3470
# fb hasn't been ported to AM335X yet.
+ # Detect expansion boards and start drivers.
+ capemgr
+
;;
UNKNOWN)