--- wikisrc/ports/evbarm/beaglebone.mdwn 2015/11/02 10:39:07 1.13 +++ wikisrc/ports/evbarm/beaglebone.mdwn 2015/11/02 10:43:47 1.14 @@ -6,7 +6,9 @@ This page attempts to document and coord (BeagleBone [image](http://www.flickr.com/photos/sparkfun/8267577194/) by SparkFun Electronics used under CC-By-2.0 license) -# What works +[[!toc levels=2]] + +# Supported hardware - Boots multi-user on [[!template id=man name="ld" section="4"]] @ [[!template id=man name="sdmmc" section="4"]] root and [[!template id=man name="com" section="4"]] console. - Ethernet ([[!template id=man name="cpsw" section="4" arch="evbarm"]]) - SD/MMC controller (SD card and eMMC) @@ -17,13 +19,38 @@ This page attempts to document and coord - Random number generator [[!template id=man name="trng" section="4"]] - GPIO (-current since Nov 1, 2015) -# What needs work +# TODO - SPI - eMMC 8-bit mode - Framebuffer/graphics with LCD or DVI/HDMI capes - Touchscreens on LCD capes - USB (device) +# BeagleBone Black User LEDs + +The four blue user LEDs on the BeagleBone Black are wired to GPIO1_21 through GPIO1_24. To control the LEDs from userland, set **gpio=YES** in rc.conf and add this to */etc/gpio.conf*: + +[[!template id=programlisting text=""" +gpio1 21 set out USR0 +gpio1 22 set out USR1 +gpio1 23 set out USR2 +gpio1 24 set out USR3 +"""]] + +After rebooting, the LED states can be controlled with [[!template id=man name="gpioctl" section="8"]]. + +[[!template id=programlisting text=""" +# turn the USR0 light on +gpioctl gpio1 USR0 on + +# turn the USR0 light off +gpioctl gpio1 USR0 off + +# toggle the USR0 light state +gpioctl gpio1 USR0 toggle +"""]] + + # Sample dmesg [[!template id=filecontent name="dmesg" text=""" NetBSD 7.99.9 (BEAGLEBONE) #2: Tue Apr 14 20:24:09 ADT 2015 @@ -92,40 +119,3 @@ root on ld1a dumps on ld1b root file system type: ffs kern.module.path=/stand/evbarm/7.99.9/modules """]] - - - - Growing the root file-system - - During the partitioning process, do not delete or format the - first MSDOS (FAT) partition, as this is what your firmware by default boots from - (unless you have prepared a boot partition on other media). - - For accident-free operation of resize_ffs, the filesystem it is supposed to grow needs to be either not mounted or at least not mounted for writing. - To do that for a root filesystem, reboot to single user, and at the prompt to enter the pathname of shell, press - return for the default (/bin/sh). - - At the # prompt, type - - "disklabel -i ld0" and press return. - - At the partition> prompt type "A" and press return. - - Adjust disklabel sector from 4194304 to 62333952 [n]? - Type "y" and press return. - - partition> prompt type "a" and press return. - - Filesystem type prompt, press return to use the current value (4.2BSD). - Start offset prompt, press return to use the current value. - Partition size prompt, type "$" and press return to grow the - partition to use all available free space. - - partition> prompt type "W" to save the changes to the disklabel. - - Confirm this choice by typing "y" at the Label disk prompt. - Type "Q" and press return to quit disklabel. - - At the # prompt (shell), type - - fsck -fy /dev/rld0a - resize_ffs -y /dev/rld0a - - This may take a few minutes, be patient! - - fsck -fy /dev/rld0a - mount_msdos /dev/ld0e /boot - reboot - - When the system comes back up, the root file-system will have been expanded to - fill the SD card.