On ours, there are 2 x 4 boards sticking out from the wall plus some 1 x 2 diagonal braces from the end of them to the wall. Then a long 2 x 4 on top of that. Here's a pic of one end:
There are 2 of these type of wooden brackets and on the opposite end, it's set on top of a 2 x 4 that is nailed directly to the studs like this: