How to setup a RS-232 Cape for BeagleBone Black
Using the version 3.8 or higher of the Linux Kernel, you can set a Device Tree Overlay. 

By this method, at runtime, you can incorporate the system device drivers.

Personally, I implemented the necessary hardware to operate with a RS-485 interface and Modbus protocol. This basically is the hardware for Bus transceiver and its associated components. When I wanted to start the operation, I could see that the ttyO4 port was not enabled.
I found the solution here, where the code is presented to compile an Overlay to enable the port ttyO4. Once implemented this, everything worked properly.

Attention

In Beaglebone board I used, the operating system installed was Ubuntu. When compiling the file with the Overlay, compilation tool threw an error concerning did not recognize the option "@". This is solved, and here's how to apply the patch for the Overlay compiler. Therefore, I recommend the Overlay compiler what you obtain source code instead of using a repository.