The Franks were a group of barbarians who flooded into France in the 5th century AD. Firmly established throughout France by the 8th century, they engaged a series of embarrassing wars with the newly proclaimed state of Septimania, a rebellious kingdom forged from the only French province remaining in the hands of the Visigoths. After this shameful series of defeats, the Franks recovered magnificently, having asserted their influence in failing Visigothic Spain. Having established marcher lords in Spain following the collapse of the Visigoths, the Franks then went on to make France one of the foremost countries in Renaissance Europe.
Growth of the Kingdom
Over the course of the 5th,6th and 7th centuries, the Franks found themselves continually at war with the Visigoths and were met with considerable success. The Visigoths were a nation weakened by internal strife, none of their rulers were particularly competent and their armies were so disorganised that the Frankish armies seldom lost a battle. War against such a large but incapable opponent could only make the Frankish monarch look good; by 511 the Visigoths were out of France (excluding Septimania, which remained Visigothic until 680)- and successfully defeated the many Visigothic invasions right up until the latter part of the 7th century. Then, in 680, the Septimanians rebelled against the Visigoths. Their work in this area half done - the Franks went in for the kill.
Defeat and Humiliation (Perpignan)
680 was not the success the Franks had been hoping for. The battle of Perpignan was the first conflict to mark the end of this illusion. By the time of formation of the Septimanian monarchy at Narbonne in 682, the Franks had accepted, after about half a dozen bloody defeats, that the Septimanian state was not the soft target they thought it would be, and thus would not make an addition to their realm. They had formally pulled out two years earlier, in the August of 680.
Problems in France
Part of the problem the Franks faced in their war against Septimania was a lack of unity. Clovis' system of government was an innovation of his time, but time had changed quite significantly since his day. Reform had to wait for another 80 years, however, after a particularly bad defeat at the hands of their major rivals - again the Septimanians, which caused them to lose Provence to the Occitan mini-state in 750. 18 years after this King Pippin (the Ineffectual) died. He was replaced by his son, Charles I. Charles inherited an unpleasant mishmash of semi-barbarian 'warbands', who's territory stretched from the coast of Brittany to the town of Toulouse. One of his richest provinces, Provence, had been lifted from his father's government. Ruling this would not be an easy task.
The Rule of Charlemagne - Part 1 (Consolidating the Kingdom)
Charles' first task was the reassessment of his nation. The lands directly available to the Frankish crown were minimal; to a major extent Frankish monarchs had to rely on soldiers supplied by the Frankish warlords in Gaul, who at best were temperamental. This was obviously a system that had to be done away with, but that in itself was a harder task than mere administrative action. What it needed was a strong monarchy. It left Charles in a very difficult situation.
Nonetheless, the edict was passed in 770 and, on the whole, was accepted by the warlords without conflict or violence. How was this done? The answer is simply in the new system that Charles imposed on his kingdom: the Feudal system. The reason this worked so well is because it did not curb very much of the autonomy of the nobility, yet it strengthened the connection with the crown. Those Frankish magnates who opposed Charlemagne helped rather than hindered the feudal process; they were quickly crushed and their lands were given to royalist noblemen as a result of their loyalty.