Why register?

  • Download software and technical materials
  • Purchase products at our on-line shop
  • Receive design news to stay up-to-date with Emcraft's new solutions



Building Linux Print


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 dedicated "project" directories. Each project defines the run-time configuration and content for a bootable Linux image ready to run on the target. For each project, there is a specific configuraiton of the Linux kernel, allocation of the STM32F4 pins to concrete IO functions and definition of the root filesystem. By having multiple projects co-exist in the cross development distribution tree, you are able to maintain and build bootable Linux images targetting different embedded designs from corresponding projects directories. Each project is defined by the following files:

  • <project>.kernel.${MCU} - Kernel configuration for the project;
  • <project>.dts.${MCU} - Linux dts file. Defines I/O devices enabled by Linux at run time as well as allocation of the STM32F4 pins to various IO functions;
  • <project>.busybox - busybox configuration for the project;
  • <project>.initrams - Spec file for the project root filesystem (initramfs).

When you run make from the project directory (for instance, from projects/rootfs), 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:

  1. Activate the cross development environment:
  2. -bash-3.2$ . ACTIVATE.sh

  3. Change to the project directory, for instance:
  4. -bash-3.2$ cd projects/rootfs

  5. Run make:
  6. -bash-3.2$ make

    The make will create the project uImage ( rootfs.uImage) ready for load to the target.