Mix cherry with brown sugar, pepper and ginger. Leave on for 1 hour. Cut the onion into cubes, chop the chili, fry gently in butter, add sugar, stirring caramelize. Add cherries and pour vinegar. Cook over low heat, stirring often, for about an hour. Season with salt and pour into sterile jars and roll.