Preheat the oven to 400º F.
In a large bowl, combine 6 tablespoons of oil, 1 teaspoon of salt, and the eggplants and toss to make sure the eggplants are coated with a layer of salt and oil.
Place the eggplants single-layered on a baking sheet and roast for a total of 30 -35 minutes, carefully turning them over halfway. Once golden brown and softened, remove from the oven and set aside.
In a small frying pan, saute the onions with 2 tablespoons olive oil over medium heat for about 15 minutes before adding the garlic. Continue to saute for an additional 2 minutes.
In a large mixing bowl, combine the eggs, the remainder of the salt, pepper, turmeric, cumin, and barberries, and mix using a whisk.
Add the roasted eggplants and the onions to the egg mixture and gently toss.
Reduce the oven temperature to 375º F.
Rub a 9-inch pie dish or similar oven-proof baking dish with butter and pour in the egg and eggplant mixture.
Place in the oven and bake for 20 to 30 minutes. Baking times will vary depending on your baking dish’s size and whether the mixture is spread out in a single layer or stacked.
Once baked, kuku should have risen and turned into a golden brown color.
Remove from the oven and set aside for about 5 minutes. Loosen the edges with a knife and carefully invert the dish onto a platter.
Serve kuku with flatbreads, fresh herbs, and yogurt.