"dry measure of one-quarter bushel," late 13c., pekke, of unknown origin; perhaps connected with Old French pek, picot (13c.), also of unknown origin (Barnhart says these were borrowed from English). Chiefly of oats for horses; original sense may be "allowance" rather than a fixed measure, thus perhaps from peck (v.). Originally not a precise measure and later sometimes used colloquially as "a great deal" (a peck of troubles, etc.).
"act of pecking," 1610s, from peck (v.). It is attested earlier in thieves' slang (1560s) with a sense of "food, grub," from peck (v.) in the sense of "to eat" (1540s).