The term "homeboy" derrives from "homie", and each of those terms have been shortened down overtime as "homes", or sometimes spelled "holmes". The term was started by Mexican-Americans living in the barrios of Los Angeles, most commonly said in East Los Angeles. The term refers to friends/companions living in the same neigborhood as eachother. Which is why "HOME" is started before boy, thus creating "homeboy".
Person 1: Aye whats happening homeboy?
Person 2: nothing just chilling, you?
Person 1: about to go to Rob's house...
Person 2: who that? is he a homeboy?
Person 1: Nah... just some foo i kick it with from Grape Street.
Homeboy like "Homie" is an English language slang term found in Westcoast American urban culture, whose origins etymologists generally trace to Mexican-American Spanglish from the late 19th century, meaning a male friend from back home, close friend, or someone gang affliated.