Desktop Factory Commands

Factory is developed on a common, well-known infrastructure, GNU make and LinuxKernelConfig (kconfig). This approach removes much of the guesswork regarding which components of a build need to be recompiled and when. Timesys Factory also helps to alleviate the burden of package interdependencies, as these are already coded into the system and satisfied on the back end.

In short, the Make utility works as a set of rules and dependencies in a Makefile (or a series of Makefiles) which are followed in order to produce a particular target from sources. The targets for the make command can be either actual files (such as a specific object file or executable for a simple helloworld c program) or a more abstract target that logically describes a set of functionality to be performed. Typically, the Factory make system is designed with the latter, more abstract make targets to facilitate the configuring and building of a BSP/SDK.

The typical make command looks like this:

make <target>

The target can be any number of keywords as specified in the Makefiles contained within Factory. These make targets are listed and explained here, with links to further information regarding individual targets.

Targets to Build BSP/SDK

Make

make

The make command (without an additional make target specified) can be run from the top level of a configured Factory to kick off the Factory build process to generate the BSP/SDK defined by the workorder. This process effectively issues a series of make <target> commands to automatically build and package the prescribed BSP/SDK. The make <target> commands which are utilized to build the BSP/SDK during this process are indicated with the asterisk (*) below - for example, *make showpackages.

It is recommended to run this as make 2>&1 | tee logfile to capture console output, along with any errors in the file logfile to reference during troubleshooting/support efforts.

Targets to Configure

Webui

make webui

Provides a graphical in-web-browser user interface to modify the Factory workorder. This method walks through each stage of the Factory configuration within an easy-to-follow progression and familiar web-like layout. (EXPERIMENTAL)

Menuconfig

make menuconfig

Provides a menu-driven ncurses interface to modify the Factory workorder. This is the primary method of adding or removing applications/packages from your build. It also provides basic search functionality via the '/' key, as well as addition help info for a particular entry or option with the '?' key.

  • Packages need to be selected in order to view/modify options for that particular package
  • indicates a user-selected entry
  • <d> indicates a package dependency-selected entry
  • Be sure to select Save the workorder upon exiting

make xconfig

Provides a graphical Gtk based method of modifying Factory workorder

make gconfig

Provides a graphical Qt based method of modifying Factory workorder

make config - (deprecated)

Provides a non-menu based method of modifying Factory workorder from the command line.

Note: deprecated Recommend use of menuconfig or webui to configure Factory workorder

make oldconfig - (deprecated)

Provides text-based method of updating an older Factory workorder to include workorder tokens available in newer, current Factory.

Note: deprecated Recommend use of menuupdate to update older Factory workorders.

Kernel Configuration

Kernel-menuconfig

make kernel-menuconfig

Provides a menu-driven ncurses interface to modify the Kernel configuration. Common method for modifying Kernel configuration options and provides basic search functionality via the '/' key, as well as addition help info for a particular entry or option with the '?' key.

Informational Targets

Checksystem

* make checksystem

Checks that host system meets the minimum Factory Build System requirements.

Checkupdates

* make checkupdates

Checks for availability of a newer Factory version, and for any updates to your Factory workorder. The Factory workorder update checks the current version, patchset, build-options, etc, for selected packages in your workorder against the Factory defaults and reports the results.

Showpackages

* make showpackages

Provides a summary of the packages selected in the current Factory workorder

Showoutput

* make showoutput

Provides a summary of the build output, including where names of target kernel, bootloader images as well as the root filesystem and SDK installer.

Checktool-*

make checktool-* (oprofile, ltp, mpatrol, gdb)

Check current configuration for compatibility with tool (oprofile, ltp, etc)

Advice

make advice

Verifies current Factory workorder against the advice engine employed on the Timesys Web Factory.

Targets to Fetch

Sources

* make sources

Downloads all sources and patches necessary to build items selected in Factory workorder. By default, these files are downloaded from Timesys' Source Repository

  • Sources are downloaded to the src/dl/ directory (for more info click here)
  • The Kernel configuration file is fetched from target/configs/kernel/<board>/config-<kernel_version> within Factory
  • If applicable, the device tree source file is fetched from target/configs/kernel/<board>/dts-<kernel_version> within Factory

Targets to Update

Menuupdate

make menuupdate

Provides a menu-driven ncurses interface to view and choose which updates to accept.

make update - (deprecated)

Provides similar information to checkupdates, but additionally prompts you for action on whether or not to accept the update via text-based questions on the command line.

Note: deprecated Recommend use of menuupdate to step through and selectively choose which updates to accept.

make update-noprompt

Provides Factory workorder functionality similar to that of make update, but without the need for user interaction — default values are accepted for any new options.

Targets to Build

Packages

* make packages

Generate binary packages for all selected software — located in build_[arch]-timesys-linux-[libc]/packages, these tarballs are RFS-ready and can be extracted over an existing RFS to add package functionality, or used to create a new RFS.

Toolchain

* make toolchain

Build and package the cross toolchain — located in build_[arch]-timesys-linux-[libc]/toolchain

RFS

* make rfs

Compile all selections and kernel and create RFS output — build and install kernel/all software selections to the target RFS working directory (build_[arch]-timesys-linux-[libc]/rfs/)

RFS-software

* make rfs-software

Installs all selected software packages to the RFS staging directory (build_[arch]-timesys-linux-[libc]/rfs/)

RFS-images

* make rfs-images

Generate RFS images (Called by RFS) — end result in build_[arch]-timesys-linux-[libc]/images/rfs/ - tarball (by default) to be used with your board's Getting Started Guide

Kernel

* make kernel

Build the kernel image and modules — end result in build_[arch]-timesys-linux-[libc]/images/ and modules installed to build_[arch]-timesys-linux-[libc]/rfs/

Installer

* make installer

Generate the installer for the custom target SDK — named <board>-development-environment.sh by default, and found in the build_[arch]-timesys-linux-[libc]/ directory

make timestorm-register-toolchain

Provides a mechanism to register the built cross-toolchain for selected target board with Timesys' TimeStorm IDE.

Targets to Clean

Clean

make clean

Purge build directories — Removes the entire build_[arch]-timesys-linux-[libc]/ directory, including initial and final cross-toolchains if generated in build_[arch]-timesys-linux-[libc]/

Download-clean

make download-clean

Removes the entire src/dl/ directory

Distclean

make distclean

Purge build directories, source files and .config — Removes the entire build_[arch]-timesys-linux-[libc]/, fetched source files in src/dl/ and also the Factory workorder (.config) — restores Factory to pristine unbuilt/unconfigured state

RFS-distclean

make rfs-distclean

Resets the RFS working directory (removes build_[arch]-timesys-linux-[libc]/rfs/), removes the built RFS images (in build_[arch]-timesys-linux-[libc]/images/rfs/) and sets all packages to re-installed to the target RFS the next time make is run.

Packages-distclean

make packages-distclean

Removes the build_[arch]-timesys-linux-[libc]/packages/ directory, resets the state of selected software to the unpackaged state, and removes the toolchain-final-* tarball. Each of these will be set to rebuild the next time the make command is issued.

Software-distclean

software-distclean

Distclean all selected applications — Remove build_[arch]-timesys-linux-[libc]/ directories and source files in src/dl/ for each Software package selected in the workorder, while maintaining toolchain components and workorder

Reset-toolchain

make reset-toolchain

Resets the build environment to a pristine toolchain, removing the toolchain-final-* tarball and resets build_[arch]-timesys-linux-[libc]/toolchain/ directory to initial toolchain if the toolchian-initial-* tarball is available. Additionally, it removes the build directories for various toolchain-related packages.

Kernel-specific Targets

kernel-fetch

Fetches kernel source files

kernel-unpack

Extracts kernel source files

kernel-patch

Applies kernel patches

kernel-configure

Use Timesys-provided defconfig to generate full kernel .config file for the selected target board

kernel-build-image

Cross-compile kernel source to generate kernel image(s) necessary for the selected target board

kernel-build-modules

Cross-compile kernel modules

kernel_devicetree-fetch

Fetches Timesys-provided device tree source (if applicable)

kernel_devicetree-build

Builds device tree blob for selected target board

kernel_devicetree-rfs-install

Installs device tree binary blob to the board's RFS staging directory (requires regeneration of RFS image to be reflected the Factory output directory)

kernel_devicetree-host-install

Installs device tree binary blob to the Factory output directory for easy access

kernel_devicetree-distclean

Removes the dts files from the src/dl/ directory and sets Factory to re-fetch the dts from the location listed in the workorder

kernel-install-image

Installs Linux kernel image(s) to the Factory output directory for easy access

kernel-rfs-install

Installs Linux kernel image and loadable kernel modules to board's RFS staging directory (requires regeneration of RFS image to be reflected in the Factory output directory)

Package-specific Targets

[application]-clean - Purge the build directory for [application]
[application]-distclean - Purge build and source directories for [application]
[application]-fetch - Fetch source, patches, and files for [application]
[application]-unpack - Unpack [application] into working directory
[application]-patch - Apply patches to working directory for [application]
[application]-configure - Configure [application]
[application]-restage - reset build status to unbuilt for [application]
[application]-reconfigure - reset build status to unconfigured for [application]
[application]-build - Build [application]
[application]-package - Generate binary package for [application]
[application]-rfs-install - Install [application] to RFS working directory
[application]-host-install - Install [application] to Host Toolchain
[application]-show - display [application] information
[application]-select - add [application] to current configuration