I'm new to Linux Kernel programming, and am pretty stuck with (what I think is) the last step in building my bootable image.
For some background, we are trying to upload a complete OS image onto the hardened PPC440 processor inside a Virtex 5 FPGA via JTAG. We are moving from a deprecated OS to a Xilinx custom Linux kernel with ongoing support. The required file for this upload is a single ELF containing the entire operating system and its applications, which (we believe) consists of a bootloader, kernel, device tree, and ramdisk image.
We have had some success with the build using ELDK, which does produce the correct file and runs on the processor; however, support for ELDK is limited, and it includes old libraries (libc
2.6, for example) and aging utilities. It would be better for maintainability to build in a more up-to-date toolchain and programs.
Skipping a few steps, we are able to build what we think are the core components of the ELF. We have u-boot for our bootloader, a kernel zImage
, the compiled device tree blob, and a ramdisk image with all our necessary libraries.
What I am struggling to understand is how to wrap these up into one file. u-boot contains a utility mkimage
that allows you to concatenate the latter three items and load them with one command from the u-boot prompt, but clearly it's possible to concatenate all four, since ELDK does produce a single file with (we believe) all of those pieces inside.
Does anyone know what I'm missing here? Is this concatenation step simple, or we off track?
Thanks!
objcopy
which you can use to copy files into section of an ELF. If you can edit the question with links to any documentation about why this has to be an ELF file and what its structure is supposed to be, that would help.