There are several stipulations to becoming a Hong Kong permanent resident, depending on whether you are a Chinese or non-Chinese citizen. In general, you need to be a Chinese citizen born in Hong Kong or have resided here for 7 years continuously. The Immigration Department has more information here.