Building Linux |
This application note explains how to build a bootable Linux image (uImage). A bootable Linux image can be booted to the target via TFTP (refer to Loading Linux images via Ethernet and TFTP) or installed to the on-module Flash for standalone Linux operation (refer to Installing Linux images to Flash). Linux images are built on the cross-development host. Make sure that you activate the cross development environment as described in Installing and Activating Cross Development Environment. In the Emcraft software distribution, Linux images are built from "project" directories. The concept is explained in Section 4.2 of the Linux Cortex-M User's Manual, however, very briefly, a project defines a concrete Linux configuration ready for installation to the target. Each project is defined by the following files:
When you run make from the project directory (for instance, from projects/networking), the build system builds project-specific versions of the Linux kernel and busybox, then creates an initramfs filesystem containing the newly built busybox binary as well as other target files defined by the initramfs filesystem specification file, and finally wraps it all up into a single Linux image (uImage) ready for download to the target. To sum it up, to build a Linux project do the following:
-bash-3.2$ . ./ACTIVATE.sh -bash-3.2$ cd projects/networking -bash-3.2$ make The make will create the project uImage ready for load to the target. |