OED=
Lock
Forms: OE loc, locc, ME–16 locke, ME loke, ME–15 lokk(e, ME, 16 lok, look(e, (17–18 dial. in sense 2 luck, Sc. loake), ME– lock.(Show Less)
Etymology: Old English loc (masculine) = Old Saxon? loc (MS. loci, glossing cesariem; Middle Dutch locke, Dutch lok feminine), Old High German loc (masculine) (Middle High German loc (masculine), plural locke, modern German locke feminine), Old Norse lokk-r (masculine) (Swedish lock, Danish lok) < Old Germanic *lokko-z, *lukko-z < pre-Germanic *lugno-s. Cognate words in Germanic are Old Norse lykkja loop, bend (Norwegian lykke, Danish løkke), modern Icelandic (h)lykkur a bend.
5. In firearms, the piece of mechanism by means of which the charge is exploded. (See also firelock n., flint-lock n., matchlock n.) Phr. lock, stock, and barrel = the entirety of anything; also as adv.phr. (See also stock n.1 28b) [Appears first in the comb. firelock n. Probably the name is due to some resemblance of the mechanism of the original wheel firelock to that of a lock (sense 1). Compare German schloss, used both for the ‘lock’ of a door and the ‘lock’ of a gun.]
1547 Inventory in Meyrick Antient Armour III. 15 One chamber pece blacke..with a fier locke.
1681 N. Grew Musæum Regalis Societatis 366 Under the Breech of the Barrel is one Box for the Powder. A little before the Lock, another for the Bullets; Behind the Cock, a Charger, which carries the Powder to the further end of the Lock.
1725 London Gaz. No. 6390/2, They broke some of the Locks of their Pieces.
1833 J. Holland Treat. Manuf. Metal II. 90 The priming was laid in the hollow at the side of the lock.
1839 F. Marryat Phantom Ship I. iv. 78 I'll put a new flint in my lock.
1842 W. T. Thompson Major Jones' Courtship (1844) 66 All moved, lock, stock, and barrel.
1855 S. A. Hammett Wonderful Adventures Captain Priest xii. 76 He sold off his feathered stock, ‘lock, stock, and barrel’.
1891 R. Kipling Light that Failed v. 80 The whole thing, lock, stock, and barrel, isn't worth one big yellow sea-poppy.
1909 Sat. Evening Post 1 May 5/3 See? He's cagey about going to 'em, but when a good medium gets him in front of her he swallows it all, lock, stock and barrel.
1961 B. Fergusson Watery Maze xii. 292 One of the ministries would take over lock, stock and barrel the administration.
1974 P. Erdman Silver Bears i. 12, I bought us a Swiss bank: lock, stock and barrel.
Flintlock=
a. A gun-lock in which a flint, screwed to the cock, is struck against the hammer and produces sparks which ignite the priming in the flash-pan. Also attrib., as flint-lock gun, flint-lock musket.
1683 J. Turner Pallas Armata 176 It were there~fore good, that for the half of the Muskets (if not for them all) flint-locks were made.
1887 Whitaker's Almanack 541 The old flint-lock musket became famous in the Peninsular War under the name of ‘Brown Bess’.
Firelock=
1. A gun-lock in which sparks were produced (either by friction or percussion) to ignite the priming.The name was at first given to the wheel-lock n.; in the 17th cent. it became transferred to the flint-lock n.
1547 Inventory in Meyrick Antient Armour III. 15 One chamber pece blacke..with a fier locke.
1625 G. Markham Souldiers Accidence 53 Pistolls, Petronells, or Dragons..all these are with fire-lockes, and those fire-lockes (for the most part) Snap-hances.
1639 R. Ward Animadversions of Warre i. 293 The Firelocke is surest to give fire, and not so apt to be out of kilter; besides they will indure Spand 24 houres together without hurting them.
1663 Marquis of Worcester Cent. Names & Scantlings Inventions A perfect Pistol..with Prime, Powder and Fire~lock.
1677 Earl of Orrery Treat. Art of War 31 In the Fire-lock the motion is so sudden, that what makes the Cock fall on the Hammer, strikes the Fire, and opens the Pan at once.