Add oil (if needed) into the same pan. Add cardamom pods, cloves, cinnamon stick, cumin seeds and fennel seeds. Sauté, stirring occasionally, for about 2 minutes or until fragrant. Add onions, garlic cloves and ginger. Sauté, stirring occasionally, for 2-3 minutes or until slightly browned. Leave to cool. Transfer onion mixture to a food processor. Process to a smooth paste. Set aside.