<<

Accelerated Development Kit Linux for the (IoT)

Documentation Revision history 90002329

Revision Date Decription A January Initial release of Digi-branded version of the Accelerated Linux Development 2019 Kit.

Trademarks and copyright Digi, Digi International, and the Digi logo are trademarks or registered trademarks in the United States and other countries worldwide. All other trademarks mentioned in this document are the property of their respective owners. © 2019 Digi International Inc. All rights reserved.

Disclaimers Information in this document is subject to change without notice and does not represent a commitment on the part of Digi International. Digi provides this document “as is,” without warranty of any kind, expressed or implied, including, but not limited to, the implied warranties of fitness or merchantability for a particular purpose. Digi may make improvements and/or changes in this manual or in the product(s) and/or the program(s) described in this manual at any time.

Warranty To view product warranty information, go to the following website: www.digi.com/howtobuy/terms

Customer support Gather support information: Before contacting Digi technical support for help, gather the following information:  Product name and model  Product serial number (s)  Firmware version  /browser (if applicable)  Logs (from time of reported issue)  Trace (if possible)  Description of issue  Steps to reproduce Contact Digi technical support: Digi offers multiple technical support plans and service packages. Contact us at +1 952.912.3444 or visit us at www.digi.com/support.

Accelerated Linux Development Kit 2 Feedback To provide feedback on this document, email your comments to [email protected] Include the document title and part number (Accelerated Linux Development Kit, 90002329 A) in the subject line of your email.

Accelerated Linux Development Kit 3 Introduction to the Accelerated Linux Development Kit Linux for the Internet of Things (IoT)

Digi is a top contributor to the Linux kernel and has developed an open source kit for distribution— Linux for the Internet of Things. The real power and beauty of working from this source tree is the relative simplicity of building firmware for simple lightweight devices. The following content includes an introduction, instructions, and general notes.

About the development kit source package 5

Accelerated Linux Development Kit 4 Introduction to the Accelerated Linux Development KitLinux for the Internet About the development kit source of Things (IoT) package About the development kit source package This source package is an all-in-one build framework for generating a complete . It has been developed with embedded devices in mind, but it can also be used for normal devices (like a PC for example). It is ideal for building small, lightweight systems. The framework is targeted at building Linux-based firmware for small embedded systems. It is capable of building for non-MMU and MMU targets of Linux. It supports a wide variety of hardware, many CPUs, and many target boards. It is easy to extend the build for new vendors or boards and to add new applications. The make generates appropriate binary images for the specified target hardware. The final generated files are placed under the images directory. The exact files vary from target to target. Typically, you end up with something like an image.bin file. How to load and run the generated image depends on your target system hardware. There are a number of HOWTO documents under the Accelerated Linux Development Kit documents that describe how to load and run the image on specific boards. Look for a file named after your target board.

Accelerated Linux Development Kit 5 Compiling the source package You need a cross-compiler package for your target. Many binary tool packages exist already. Your development host system may have packages available for it (for example, does). There are third-party packages available from groups such as CodeSourcery. Or you can get one from community sites such as www.uclinux.org.

1. Install the cross-compiler package for your target. 2. If you have not un-archived the source package, then do that now. The package is a bzipped tar image, so do:

tar xjf digi-XXXXXXXX.tar.bz2

This will dump the source into an digi-XXXXXXXX directory. You can do this into any directory. 3. Change directory (cd) into the source tree:

cd digi-XXXXXXXX

4. Configure the build target:

make menuconfig

You can also use make config or make xconfig if you prefer. The top level selection is straightforward if you know the vendor of the board for which you are compiling code. You can choose to modify the underlying default kernel and application configuration if you want. Initially, we suggest you use the default configuration for your target board. It will almost certainly work as is. You can choose to enter configuration for the kernel or libraries/applications at this step. Saying yes to those options runs the configuration on those components after Save and Exit of this step. See Changing the application, kernel, and/or libraries. Based on the platform you choose in this step, the build generates an appropriate default application set. Sometimes a number of questions appear after you Save and Exit. Do not be concerned; the questions indicate that some new config options have been added to the source tree that do not have defaults for the configuration you have chosen. If this happens, the safest option is to answer N to each question as it appears. 5. Build the image:

make

That’s it!

Accelerated Linux Development Kit 6 Compiling the source package

The make generates appropriate binary images for the specified target hardware. The final generated files are placed under the images directory. The exact files vary from target to target. Typically, you end up with something like an image.bin file. How to load and run the generated image depends on your target hardware. There are a number of HOWTO documents under the Accelerated Linux Development Kit documents directly that describe how to load and run the image on specific boards. Look for a file named after your target board.

Accelerated Linux Development Kit 7 Changing the application, kernel, and/or libraries You can modify the kernel configuration and application set generated for your target using the config system. You can configure by running one of the following commands:

n make xconfig—graphical X11-based config n make menuconfig—text menu-based config n make config—plain text shell script config Menuconfig and xconfig are the simplest, and we recommend using either of those commands. The key options under the Target Platform Selection menu are the following:

n Customize Kernel Settings: Selecting this option runs the standard Linux kernel config. n Customize Vendor/User Settings: Selecting this option runs a configuration process that allows you to enable or disable individual applications and libraries. Use the online Help for details on configuration options. When you Save and Exit, the build system runs through the configs you chose to customize.

Accelerated Linux Development Kit 8 Accelerated Linux Development Kit documents There is an assortment of documentation files under the Documentation directory. Here are a few of note:

n SOURCE File at the top level gives a brief rundown of the structure of this source distribution package.

n Documentation/Adding-User-Apps-HOWTO Description of how to add a new application into the config and build setup of the distribution.

n Documentation/Adding-Platforms-HOWTO Description of how to add a new vendor board config to the distribution.

n Documentation/-HOWTO Describes building and loading for a particular board.

Accelerated Linux Development Kit 9