I have not been able to find out whether it is possible to have a .ino file on the Yun SD card and have the Yun upload that to the Arduino without any connection to a PC.
What I have in mind is to have a few different SD Cards for different purposes. Plug card A into the Yun and it boots and becomes one type of device. Plug card B into it and it becomes a different device because it has uploaded a different .ino file to the Arduino side.
That adds the Arduino bootloader to the .hex file. You can skip that step if you plan on no longer using the USB port to upload sketches, but I don’t know that I would be comfortable doing that myself. You do want to make sure that you only do this once, otherwise you will get multiple copies of the bootloader appended to the sketch if you run this step every time you boot.
Then, the .hex file can be programmed into the '32U4 processor using: