Intermec ck1 Reference Guide
Appendix A —
µClinux System
CK1 SDK Programmer’s Reference Manual
313
Creating the Image
In the full
µClinux distribution, the image is simply created with the make
command. The command first changes the directory to the kernel
directory, and then starts to build the individual components. The actual
kernel building process uses
directory, and then starts to build the individual components. The actual
kernel building process uses
µClinux kernel’s own building tools. After the
compilation, the process combines the subsystem objects and archive files
using the sections from the architecture specific.ld file and the startup C
asm code, crt0_ram.S, to create a Linux file.
using the sections from the architecture specific.ld file and the startup C
asm code, crt0_ram.S, to create a Linux file.
The compiler script lists the symbols from the Linux file with the specified
patterns and sorts the output to the System.map, which can be used in the
debugging phase to show where each function is located in memory.
patterns and sorts the output to the System.map, which can be used in the
debugging phase to show where each function is located in memory.
The Linux file is then translated into a binary file, linux.bin, which holds
the binary code of the kernel.
the binary code of the kernel.
arm-elf-objcopy -O binary /.../uClinux-dist/linux-2.4.x/linux \
/.../uClinux-dist/images/linux.bin
/.../uClinux-dist/images/linux.bin
The ROM file system is generated based on the settings located in the
vendor file. The file includes the configuration files and the vendor-specific
settings for applications, kernel and building. The make file of the vendor
folder includes instructions on how to build the actual image for that
processor/vendor. The makefile includes tags for which different images
are constructed the structure of the source tree with ROMFS_DIRS and
tags for building the actual file system and images.
vendor file. The file includes the configuration files and the vendor-specific
settings for applications, kernel and building. The make file of the vendor
folder includes instructions on how to build the actual image for that
processor/vendor. The makefile includes tags for which different images
are constructed the structure of the source tree with ROMFS_DIRS and
tags for building the actual file system and images.
ROMFSIMG = $(IMAGEDIR)/romfs.img
IMAGE = $(IMAGEDIR)/image.bin
ELFIMAGE = $(IMAGEDIR)/image.elf
IMAGE = $(IMAGEDIR)/image.bin
ELFIMAGE = $(IMAGEDIR)/image.elf
At the end of the compilation process, the vendor makefile first generates
the actual tree including the devices and the binaries from chosen
applications to the top of the development tree. From this folder the
process generates the ROM file system image for the system.
the actual tree including the devices and the binaries from chosen
applications to the top of the development tree. From this folder the
process generates the ROM file system image for the system.
genromfs -v -V "ROMdisk" -f /.../uClinux-dist/images/romfs.img -d \
/opt/uClinux- dist/romfs
/opt/uClinux- dist/romfs
This ROM file-system binary is then concatenated with linux.bin in order
to create the complete binary that can be loaded as is to the target device.
to create the complete binary that can be loaded as is to the target device.
cat /.../uClinux-dist/images/linux.bin /.../uClinux-dist/images/romfs.img >
/.../uClinux-dist/images/image.bin
/.../uClinux-dist/tools/cksum -b -o 2 /.../uClinux-dist/images/image.bin
>>/.../uClinux-dist/images/image.bin
/.../uClinux-dist/images/image.bin
/.../uClinux-dist/tools/cksum -b -o 2 /.../uClinux-dist/images/image.bin
>>/.../uClinux-dist/images/image.bin
The image is then placed in the image folder, which eventually also
contains the file system image and other files that are created in the
process.
contains the file system image and other files that are created in the
process.