Where is the origin of "They died in boots"?

From Gong Zizhen's Ji Hai Miscellaneous Poems.

The whole poem is as follows:

Castle peak is full of loyalty, so why did they still wear boots when they died?

I quit my job and go home, just like a flower falling from a branch, but this is not a heartless thing. It can be turned into the soil of spring and can also play a role in nurturing the next generation.

Brave soldiers died in battle, and green mountains and green waters are not a good place to bury brave people. Why did you transport it back to your hometown for burial?

Extended data:

The Origin of "Margo Wrapped in Body";

From the Biography of Ma Yuan in the Later Han Dynasty, the famous Ma Yuan in the Eastern Han Dynasty once said, "When people die in the border areas, they should bury their ears when they die." In the Qing Dynasty, Gong Zizhen pushed the meaning of his predecessors to a higher level, which led to the famous sentence "Why should I wear boots and be buried everywhere in the green hills" in a past miscellaneous poem.

The origin of "loyal bones are buried everywhere in Qingshan";

Changed from "Castle Peak is fortunate to bury loyal bones, and white iron casts innocent courtiers." This is a couplet carved on the stone pillar of Wang Yue's tomb in West Lake.

The origin of "Why did they die in boots";

From Qing Xu Xilin's "Out of the Great Wall", "Military songs should sing broadswords and swear to destroy Hu Nu's jade pass. Only for the country to break the family and solve the battlefield, why are they still wearing boots when they die! " This allusion comes from the Biography of Ma Yuan in the later Han Dynasty.

References:

Baidu Encyclopedia _ Ji Hai Miscellaneous Poems