Heat 1 tbsp of the oil in a heavy, wide flameproof casserole dish and brown the skin side of the pork pieces for about 5 mins. You’ll need to do this in batches, setting the pork aside each time. Meanwhile, make the spice paste. Put the ginger, garlic, chillies and oil into a food processor and pulse until finely chopped.
Heat another 1 tbsp oil in the dish, add the onions and spring onions, and fry for 10 mins until soft. Turn the heat to low, add the spice paste and gently fry for 2-3 mins until fragrant.
Nestle the pork pieces in the onions and pour in enough cold water to just cover. Stir in the sugar, soy sauces, vinegar, stock and 1 tsp salt, and bring to the boil. Cover with a lid and simmer on a low heat for 1 hr 30 mins. Add the tofu and Thai basil, and continue to cook for another 30 mins, by which time the pork will be very tender. Season to taste, then serve.